Skip to content

Commit

Permalink
Update function syntax to remove semicolon.
Browse files Browse the repository at this point in the history
  • Loading branch information
wjames111 committed Aug 21, 2024
1 parent 0781cfe commit ff44dff
Showing 1 changed file with 95 additions and 100 deletions.
195 changes: 95 additions & 100 deletions src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,116 +321,111 @@ const FixPhoneNumbers: React.FC<Props> = ({
onSubmit={() => {}}

Check warning on line 321 in src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx#L321

Added line #L321 was not covered by tests
validationSchema={fixPhoneNumberSchema}
>
{({ errors, setValues, values }): ReactElement => {
return (
<>
<Grid container className={classes.outter}>
<Grid item xs={12}>
<Typography variant="h4">
{t('Fix Phone Numbers')}
{({ errors, setValues, values }): ReactElement => (
<>
<Grid container className={classes.outter}>
<Grid item xs={12}>
<Typography variant="h4">
{t('Fix Phone Numbers')}
</Typography>
<Divider className={classes.divider} />
</Grid>
<Grid item xs={12}>
<Box mb={2}>
<Typography fontWeight="bold">
{t('You have {{amount}} phone numbers to confirm.', {
amount: data.people.totalCount,
})}
</Typography>
<Divider className={classes.divider} />
</Grid>
<Grid item xs={12}>
<Box mb={2}>
<Typography fontWeight="bold">
{t(
'You have {{amount}} phone numbers to confirm.',
{
amount: data.people.totalCount,
},
)}
</Typography>
<Typography>
{t(
'Choose below which phone number will be set as primary.',
)}
</Typography>
<Box className={classes.defaultBox}>
<Typography>
{t(
'Choose below which phone number will be set as primary.',
)}
{t('Default Primary Source:')}
</Typography>
<Box className={classes.defaultBox}>
<Typography>
{t('Default Primary Source:')}
</Typography>

<Select
className={classes.select}
data-testid="source-select"
value={defaultSource}
onChange={(event: SelectChangeEvent<string>) =>
handleSourceChange(event)
}
size="small"
<Select
className={classes.select}
data-testid="source-select"
value={defaultSource}
onChange={(event: SelectChangeEvent<string>) =>
handleSourceChange(event)

Check warning on line 355 in src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx#L355

Added line #L355 was not covered by tests
}
size="small"
>
<MenuItem
value={appName}
data-testid="source-option-mpdx"
>
<MenuItem
value={appName}
data-testid="source-option-mpdx"
>
{appName}
</MenuItem>
<MenuItem
value="DataServer"
data-testid="source-option-dataserver"
>
{t('DataServer')}
</MenuItem>
</Select>
<Button
variant="contained"
onClick={() => handleBulkConfirm(values)}
data-testid="source-button"
{appName}
</MenuItem>
<MenuItem
value="DataServer"
data-testid="source-option-dataserver"
>
<Icon
path={mdiCheckboxMarkedCircle}
size={0.8}
className={classes.buttonIcon}
/>
{t('Confirm {{amount}} as {{source}}', {
amount: data.people.totalCount,
source: defaultSource,
})}
</Button>
</Box>
{t('DataServer')}
</MenuItem>
</Select>
<Button
variant="contained"
onClick={() => handleBulkConfirm(values)}
data-testid="source-button"
>
<Icon
path={mdiCheckboxMarkedCircle}
size={0.8}
className={classes.buttonIcon}
/>
{t('Confirm {{amount}} as {{source}}', {
amount: data.people.totalCount,
source: defaultSource,
})}
</Button>
</Box>
</Grid>
</Box>
</Grid>

<Grid item xs={12}>
{values.people.map(
(person: PersonInvalidNumberFragment, i: number) => (
<Contact
key={person.id}
person={person}
personIndex={i}
handleDelete={handleDeleteModalOpen}
setContactFocus={setContactFocus}
handleUpdate={updatePhoneNumber}
errors={errors}
values={values}
setValues={setValues}
/>
),
)}
</Grid>
<Grid item xs={12}>
{values.people.map(
(person: PersonInvalidNumberFragment, i: number) => (
<Contact
key={person.id}
person={person}
personIndex={i}
handleDelete={handleDeleteModalOpen}
setContactFocus={setContactFocus}
handleUpdate={updatePhoneNumber}
errors={errors}
values={values}
setValues={setValues}
/>
),
)}
</Grid>

<Grid item xs={12}>
<Box className={classes.footer}>
<Typography>
<Trans
defaults="Showing <bold>{{value}}</bold> of <bold>{{value}}</bold>"
shouldUnescape
values={{ value: data.people.totalCount }}
components={{ bold: <strong /> }}
/>
</Typography>
</Box>
</Grid>
<Grid item xs={12}>
<Box className={classes.footer}>
<Typography>
<Trans
defaults="Showing <bold>{{value}}</bold> of <bold>{{value}}</bold>"
shouldUnescape
values={{ value: data.people.totalCount }}
components={{ bold: <strong /> }}
/>
</Typography>
</Box>
</Grid>
<DeleteModal
modalState={deleteModalState}
handleClose={handleDeleteModalClose}
handleDelete={() => handleDelete(values, setValues)}
/>
</>
);
}}
</Grid>
<DeleteModal
modalState={deleteModalState}
handleClose={handleDeleteModalClose}
handleDelete={() => handleDelete(values, setValues)}
/>
</>
)}
</Formik>
) : (
<NoData tool="fixPhoneNumbers" />
Expand Down

0 comments on commit ff44dff

Please sign in to comment.