-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Form submission #24
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,48 +108,48 @@ export default function JobApplicationDialog({jobApplication, handleClose, open, | |
aria-describedby="modal-modal-description" | ||
> | ||
<DialogTitle>{dialogTitle}</DialogTitle> | ||
<DialogContent dividers> | ||
<TextField | ||
required | ||
id="companyName" | ||
name="companyName" | ||
label="Company Name" | ||
fullWidth | ||
autoComplete="given-name" | ||
variant="standard" | ||
onChange={(e) => { | ||
setCompanyName(e.target.value); | ||
}} | ||
defaultValue={jobApplication.companyName} | ||
/> | ||
<form onSubmit={() => isNew?handleAddJobApplication():handleUpdateJobApplication(jobApplication.id)}> | ||
<DialogContent dividers> | ||
<TextField | ||
required | ||
id="companyName" | ||
name="companyName" | ||
label="Company Name" | ||
fullWidth | ||
autoComplete="given-name" | ||
variant="standard" | ||
onChange={(e) => { | ||
setCompanyName(e.target.value); | ||
}} | ||
defaultValue={jobApplication.companyName} | ||
/> | ||
|
||
<TextField | ||
required | ||
id="jobTitle" | ||
name="jobTitle" | ||
label="Job Title" | ||
fullWidth | ||
autoComplete="family-name" | ||
variant="standard" | ||
onChange={(e) => { | ||
setJobTitle(e.target.value); | ||
}} | ||
defaultValue={jobApplication.jobTitle} | ||
/> | ||
<TextField | ||
required | ||
id="jobTitle" | ||
name="jobTitle" | ||
label="Job Title" | ||
fullWidth | ||
autoComplete="family-name" | ||
variant="standard" | ||
onChange={(e) => { | ||
setJobTitle(e.target.value); | ||
}} | ||
defaultValue={jobApplication.jobTitle} | ||
/> | ||
|
||
<TextField | ||
required | ||
id="salaryRange" | ||
name="salaryRange" | ||
label="Salary Range" | ||
fullWidth | ||
autoComplete="shipping address-level2" | ||
variant="standard" | ||
onChange={(e) => { | ||
setSalaryRange(e.target.value); | ||
}} | ||
defaultValue={jobApplication.salaryRange} | ||
/> | ||
<TextField | ||
id="salaryRange" | ||
name="salaryRange" | ||
label="Salary Range" | ||
fullWidth | ||
autoComplete="shipping address-level2" | ||
variant="standard" | ||
onChange={(e) => { | ||
setSalaryRange(e.target.value); | ||
}} | ||
defaultValue={jobApplication.salaryRange} | ||
/> | ||
<DialogContent /> | ||
|
||
<LocalizationProvider dateAdapter={AdapterDayjs}> | ||
|
@@ -161,13 +161,12 @@ export default function JobApplicationDialog({jobApplication, handleClose, open, | |
value={appliedDate} | ||
onChange={(e) => { | ||
setAppliedDate(dayjs(e).format('YYYY-MM-DD')) | ||
} } | ||
} } | ||
renderInput={(params) => <TextField {...params} />} | ||
/> | ||
/> | ||
</LocalizationProvider> | ||
|
||
<TextField | ||
required | ||
id="description" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similarly, good call |
||
name="description" | ||
label="Description" | ||
|
@@ -194,13 +193,13 @@ export default function JobApplicationDialog({jobApplication, handleClose, open, | |
setJobUrl(e.target.value); | ||
}} | ||
defaultValue={jobApplication.jobUrl} | ||
|
||
/> | ||
|
||
<DialogContent /> | ||
<FormControl sx={{ minWidth: 120 }} variant="standard" size="small"> | ||
<InputLabel id="status-label">Status</InputLabel> | ||
<Select | ||
disabled={isNew} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. um....now I see what you meant by setting it default do |
||
labelId="status-label" | ||
id="status" | ||
name="status" | ||
|
@@ -216,11 +215,12 @@ export default function JobApplicationDialog({jobApplication, handleClose, open, | |
</Select> | ||
</FormControl> | ||
|
||
<DialogActions> | ||
<Button color="info" variant="outlined" startIcon={<CancelIcon />} onClick={handleClose}>Cancel</Button> | ||
<Button color="info" variant="contained" startIcon={<SaveIcon />} onClick={() => isNew?handleAddJobApplication():handleUpdateJobApplication(jobApplication.id)} >Save</Button> | ||
</DialogActions> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button color="info" variant="outlined" startIcon={<CancelIcon />} onClick={handleClose}>Cancel</Button> | ||
<Button color="info" variant="contained" startIcon={<SaveIcon />} type="submit" >Save</Button> | ||
</DialogActions> | ||
</DialogContent> | ||
</form> | ||
</Dialog> | ||
</> | ||
); | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call to make salary range not a hard requirement