BC-5 fix: general tab of preferences form submitting.

This commit is contained in:
a.bouhuolia
2021-09-04 18:49:01 +02:00
parent d6d6fefd1f
commit 11df54d4ed
25 changed files with 251 additions and 131 deletions

View File

@@ -4,7 +4,7 @@ import intl from 'react-intl-universal';
// Retrieve the setup organization form validation.
export const getSetupOrganizationValidation = () =>
Yup.object().shape({
organizationName: Yup.string()
name: Yup.string()
.required()
.label(intl.get('organization_name_')),
location: Yup.string()

View File

@@ -36,13 +36,13 @@ export default function SetupOrganizationForm({ isSubmitting, values }) {
</h3>
{/* ---------- Organization name ---------- */}
<FastField name={'organizationName'}>
<FastField name={'name'}>
{({ form, field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'legal_organization_name'} />}
className={'form-group--name'}
intent={inputIntent({ error, touched })}
helperText={<ErrorMessage name={'organizationName'} />}
helperText={<ErrorMessage name={'name'} />}
>
<InputGroup {...field} intent={inputIntent({ error, touched })} />
</FormGroup>

View File

@@ -14,7 +14,7 @@ import { getSetupOrganizationValidation } from './SetupOrganization.schema';
// Initial values.
const defaultValues = {
organizationName: '',
name: '',
location: 'libya',
baseCurrency: '',
language: 'en',