Skip to content
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

Employee/Provider details form field bug #563

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 56 additions & 54 deletions packages/telemed-ehr/app/src/components/EmployeeInformationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -494,61 +494,63 @@ export default function EmployeeInformationForm({
Add New State Qualification
</AccordionSummary>
<AccordionDetails>
<Grid container direction={'row'} spacing={1}>
<Grid item xs={4}>
<Autocomplete
options={displaystates}
getOptionLabel={(option: string) => option}
renderInput={(params) => (
<TextField
{...params}
label="State"
error={errors.state}
required
helperText={errors.state ? 'Please select a state' : null}
/>
)}
value={newLicenseState || null}
onChange={(event, value) => setNewLicenseState(value || undefined)}
/>
</Grid>
<Grid item xs={4}>
<Autocomplete
options={Object.keys(PractitionerQualificationCodesLabels)}
getOptionLabel={(option: string) => option}
renderInput={(params) => (
<TextField
{...params}
label="Qualification"
error={errors.qualification}
required
helperText={errors.qualification ? 'Please select a qualification' : null}
/>
)}
value={newLicenseCode || null}
onChange={(event, value) => setNewLicenseCode(value || undefined)}
/>
</Grid>
<Grid item xs={4} alignContent={'center'}>
<Button
variant="contained"
endIcon={<AddIcon />}
sx={{ textTransform: 'none', fontWeight: 'bold', borderRadius: 28 }}
onClick={handleAddLicense}
fullWidth
>
Add
</Button>
<form>
<Grid container direction={'row'} spacing={1}>
<Grid item xs={4}>
<Autocomplete
options={displaystates}
getOptionLabel={(option: string) => option}
renderInput={(params) => (
<TextField
{...params}
label="State"
error={errors.state}
required
helperText={errors.state ? 'Please select a state' : null}
/>
)}
value={newLicenseState || null}
onChange={(event, value) => setNewLicenseState(value || undefined)}
/>
</Grid>
<Grid item xs={4}>
<Autocomplete
options={Object.keys(PractitionerQualificationCodesLabels)}
getOptionLabel={(option: string) => option}
renderInput={(params) => (
<TextField
{...params}
label="Qualification"
error={errors.qualification}
required
helperText={errors.qualification ? 'Please select a qualification' : null}
/>
)}
value={newLicenseCode || null}
onChange={(event, value) => setNewLicenseCode(value || undefined)}
/>
</Grid>
<Grid item xs={4} alignContent={'center'}>
<Button
variant="contained"
endIcon={<AddIcon />}
sx={{ textTransform: 'none', fontWeight: 'bold', borderRadius: 28 }}
fullWidth
onClick={handleAddLicense}
>
Add
</Button>
</Grid>
{errors.duplicateLicense && (
<Typography
color="error"
variant="body2"
mt={1}
mx={1}
>{`License already exists.`}</Typography>
)}
</Grid>
{errors.duplicateLicense && (
<Typography
color="error"
variant="body2"
mt={1}
mx={1}
>{`License already exists.`}</Typography>
)}
</Grid>
</form>
</AccordionDetails>
</Accordion>
</Box>
Expand Down
Loading