Skip to content

Commit

Permalink
fix(chor): pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk committed Jul 22, 2024
1 parent 2987d6e commit 27865c1
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions src/components/pages/CompanyData/components/FormFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ const UpdateForm = ({
<div style={{ marginTop: '34px' }}>
<ValidatingInput
name="siteName"
label={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.site.name`)}
label={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.site.name`
)}
value={data.siteName ?? ''}
validate={isName}
hint={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.site.hint`)}
errorMessage={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.site.error`)}
hint={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.site.hint`
)}
errorMessage={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.site.error`
)}
onValid={onChange}
onInvalid={onChange}
skipInitialValidation={newForm}
Expand All @@ -105,52 +111,76 @@ const UpdateForm = ({
<div style={{ margin: '12px 0' }}>
<ValidatingInput
name="street"
label={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.street.name`)}
label={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.street.name`
)}
value={data.street ?? ''}
hint={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.street.hint`)}
hint={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.street.hint`
)}
validate={isStreet}
onValid={onChange}
onInvalid={onChange}
errorMessage={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.street.error`)}
errorMessage={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.street.error`
)}
skipInitialValidation={newForm}
/>
</div>
<div style={{ margin: '12px 0' }}>
<ValidatingInput
name="city"
label={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.city.name`)}
label={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.city.name`
)}
value={data.city ?? ''}
hint={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.city.hint`)}
hint={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.city.hint`
)}
validate={isCity}
onValid={onChange}
onInvalid={onChange}
errorMessage={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.city.error`)}
errorMessage={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.city.error`
)}
skipInitialValidation={newForm}
/>
</div>
<div style={{ margin: '12px 0' }}>
<ValidatingInput
name="countryCode"
label={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.countryCode.name`)}
label={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.countryCode.name`
)}
value={data.countryCode ?? ''}
hint={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.countryCode.hint`)}
hint={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.countryCode.hint`
)}
validate={isCountry}
onValid={onChange}
onInvalid={onChange}
errorMessage={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.countryCode.error`)}
errorMessage={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.countryCode.error`
)}
skipInitialValidation={newForm}
/>
</div>
<div style={{ margin: '12px 0' }}>
<ValidatingInput
name="postalCode"
label={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.postal.name`)}
label={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.postal.name`
)}
value={data.postalCode ?? ''}
hint={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.postal.hint`)}
hint={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.postal.hint`
)}
validate={isPostalCode}
onValid={onChange}
onInvalid={onChange}
errorMessage={t(`content.companyData.${isAddress ? 'address' : 'site'}.form.postal.error`)}
errorMessage={t(
`content.companyData.${isAddress ? 'address' : 'site'}.form.postal.error`
)}
skipInitialValidation={newForm}
/>
</div>
Expand Down

0 comments on commit 27865c1

Please sign in to comment.