@redneckz/wildless-cms-uni-blocks 0.14.568 → 0.14.570
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +86 -63
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/bundle/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/bundle/ui-kit/FormField/constants.d.ts +0 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/dist/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/dist/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js +26 -0
- package/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/dist/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/dist/ui-kit/FormField/constants.d.ts +0 -1
- package/dist/ui-kit/FormField/constants.js +1 -9
- package/dist/ui-kit/FormField/constants.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +6 -1
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -0
- package/lib/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/lib/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js +24 -0
- package/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/lib/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/lib/ui-kit/FormField/constants.d.ts +0 -1
- package/lib/ui-kit/FormField/constants.js +0 -8
- package/lib/ui-kit/FormField/constants.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +6 -1
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +86 -63
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/mobile/bundle/ui-kit/FormField/constants.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js +26 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/mobile/dist/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/mobile/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/constants.d.ts +0 -1
- package/mobile/dist/ui-kit/FormField/constants.js +1 -9
- package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +6 -1
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js +24 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/mobile/lib/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/mobile/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/constants.d.ts +0 -1
- package/mobile/lib/ui-kit/FormField/constants.js +0 -8
- package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +6 -1
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.example.json +6 -856
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -9
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxGroup.tsx +7 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +1 -1
- package/mobile/src/ui-kit/FormField/Fields/ConsentToAllDocsField.tsx +29 -0
- package/mobile/src/ui-kit/FormField/Fields/ProductField.tsx +13 -4
- package/mobile/src/ui-kit/FormField/constants.tsx +0 -9
- package/mobile/src/ui-kit/FormField/getField.tsx +7 -1
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.example.json +6 -856
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.tsx +8 -10
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +7 -10
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -9
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -1
- package/src/ui-kit/Checkbox/CheckboxGroup.tsx +7 -1
- package/src/ui-kit/Checkbox/CheckboxProps.ts +1 -1
- package/src/ui-kit/FormField/Fields/ConsentToAllDocsField.tsx +29 -0
- package/src/ui-kit/FormField/Fields/ProductField.tsx +13 -4
- package/src/ui-kit/FormField/constants.tsx +0 -9
- package/src/ui-kit/FormField/getField.tsx +7 -1
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '../../setup-fixture';
|
|
2
|
-
|
|
3
|
-
import { type LinkProps } from '../../model/LinkProps';
|
|
2
|
+
import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
|
|
4
3
|
import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
|
|
5
4
|
import { ApplicationLeadForm } from './ApplicationLeadForm';
|
|
6
5
|
import { type SubmitButtonProps } from './ApplicationLeadFormContent';
|
|
@@ -10,12 +9,6 @@ const button: SubmitButtonProps = {
|
|
|
10
9
|
version: 'primary',
|
|
11
10
|
};
|
|
12
11
|
|
|
13
|
-
const link: LinkProps = {
|
|
14
|
-
text: 'Согласен на обработку персональных данных',
|
|
15
|
-
href: '/privacy-policy',
|
|
16
|
-
target: '_blank',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
12
|
export default {
|
|
20
13
|
default: (
|
|
21
14
|
<div className="container grid grid-cols-12">
|
|
@@ -26,17 +19,22 @@ export default {
|
|
|
26
19
|
endpoint="lead"
|
|
27
20
|
sections={[
|
|
28
21
|
{
|
|
22
|
+
columns: 2,
|
|
29
23
|
inputs: [
|
|
24
|
+
{ fieldType: 'common', name: 'surname', required: true },
|
|
30
25
|
{ fieldType: 'common', name: 'name', required: true },
|
|
31
26
|
{ fieldType: 'common', name: 'middleName' },
|
|
32
|
-
{ fieldType: 'common', name: '
|
|
27
|
+
{ fieldType: 'common', name: 'birthday', required: true },
|
|
28
|
+
{ fieldType: 'common', name: 'phone', required: true },
|
|
29
|
+
{ fieldType: 'common', name: 'email', required: true },
|
|
33
30
|
],
|
|
34
31
|
},
|
|
32
|
+
{ inputs: [{ fieldType: 'common', name: 'consentToAllDocs', required: true }] },
|
|
35
33
|
]}
|
|
36
34
|
button={button}
|
|
37
|
-
link={link}
|
|
38
35
|
/>
|
|
39
36
|
<PopupManager />
|
|
37
|
+
<DialogManager />
|
|
40
38
|
</div>
|
|
41
39
|
),
|
|
42
40
|
};
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import '../../setup-fixture';
|
|
2
2
|
|
|
3
|
-
import { type LinkProps } from '../../model/LinkProps';
|
|
4
3
|
import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
|
|
5
4
|
import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
|
|
6
5
|
import { ApplicationLeadForm } from './ApplicationLeadForm';
|
|
7
6
|
import { type SubmitButtonProps } from './ApplicationLeadFormContent';
|
|
8
7
|
|
|
9
8
|
const button: SubmitButtonProps = {
|
|
10
|
-
text: '
|
|
9
|
+
text: 'Оформить',
|
|
11
10
|
version: 'primary',
|
|
12
11
|
};
|
|
13
12
|
|
|
14
|
-
const link: LinkProps = {
|
|
15
|
-
text: 'Согласен на обработку персональных данных',
|
|
16
|
-
href: '/privacy-policy',
|
|
17
|
-
target: '_blank',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
13
|
export default {
|
|
21
14
|
default: (
|
|
22
15
|
<div className="container grid grid-cols-12">
|
|
@@ -27,15 +20,19 @@ export default {
|
|
|
27
20
|
endpoint="lead"
|
|
28
21
|
sections={[
|
|
29
22
|
{
|
|
23
|
+
columns: 2,
|
|
30
24
|
inputs: [
|
|
25
|
+
{ fieldType: 'common', name: 'surname', required: true },
|
|
31
26
|
{ fieldType: 'common', name: 'name', required: true },
|
|
32
27
|
{ fieldType: 'common', name: 'middleName' },
|
|
33
|
-
{ fieldType: 'common', name: '
|
|
28
|
+
{ fieldType: 'common', name: 'birthday', required: true },
|
|
29
|
+
{ fieldType: 'common', name: 'phone', required: true },
|
|
30
|
+
{ fieldType: 'common', name: 'email', required: true },
|
|
34
31
|
],
|
|
35
32
|
},
|
|
33
|
+
{ inputs: [{ fieldType: 'common', name: 'consentToAllDocs', required: true }] },
|
|
36
34
|
]}
|
|
37
35
|
button={button}
|
|
38
|
-
link={link}
|
|
39
36
|
/>
|
|
40
37
|
<PopupManager />
|
|
41
38
|
<DialogManager />
|
|
@@ -3,7 +3,6 @@ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { LeadServiceAPI } from '../../api/LeadServiceAPI';
|
|
4
4
|
import { useForm } from '../../hooks/useForm';
|
|
5
5
|
import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
|
|
6
|
-
import { getConsentDataProcessing } from '../../ui-kit/FormField/getConsentDataProcessing';
|
|
7
6
|
import { getField } from '../../ui-kit/FormField/getField';
|
|
8
7
|
import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
|
|
9
8
|
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
@@ -16,7 +15,7 @@ import { isValidationSuccess } from '../../validation/validator';
|
|
|
16
15
|
import { type ApplicationLeadFormContent, type FieldDef } from './ApplicationLeadFormContent';
|
|
17
16
|
import { getFormatData } from './getFormatData';
|
|
18
17
|
import { getInitialFormState, type FormState } from './getInitialFormState';
|
|
19
|
-
import {
|
|
18
|
+
import { renderSubmitButton } from './renderSubmitButton';
|
|
20
19
|
|
|
21
20
|
interface ApplicationLeadFormProps extends ApplicationLeadFormContent, UniBlockProps {}
|
|
22
21
|
|
|
@@ -24,7 +23,7 @@ const API = LeadServiceAPI();
|
|
|
24
23
|
|
|
25
24
|
export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
26
25
|
// eslint-disable-next-line max-lines-per-function
|
|
27
|
-
({ className, title, typeForm = '', sections = [], button,
|
|
26
|
+
({ className, title, typeForm = '', sections = [], button, endpoint, ...rest }) => {
|
|
28
27
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []) as FieldDef[];
|
|
29
28
|
const initialFormState = getInitialFormState(inputs, typeForm);
|
|
30
29
|
const [responseType, setResponseType] = useState<'OK' | 'Fail' | ''>('');
|
|
@@ -46,7 +45,6 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
46
45
|
}, []);
|
|
47
46
|
|
|
48
47
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
49
|
-
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
50
48
|
|
|
51
49
|
useEffect(() => {
|
|
52
50
|
if (responseType === 'OK') {
|
|
@@ -71,11 +69,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
71
69
|
{(_?.inputs || [])?.map(getField(field, typeForm))}
|
|
72
70
|
</div>
|
|
73
71
|
))}
|
|
74
|
-
{
|
|
75
|
-
fieldName ? field('consentDataProcessing') : undefined,
|
|
76
|
-
link,
|
|
77
|
-
button,
|
|
78
|
-
)}
|
|
72
|
+
{renderSubmitButton(button)}
|
|
79
73
|
</form>
|
|
80
74
|
</ApplicationFormLayout>
|
|
81
75
|
);
|
|
@@ -7,6 +7,7 @@ import { FoldableSection } from '../Foldable/FoldableSection';
|
|
|
7
7
|
import { Icon } from '../Icon/Icon';
|
|
8
8
|
import { Checkbox } from './Checkbox';
|
|
9
9
|
import { type CheckboxGroupProps } from './CheckboxProps';
|
|
10
|
+
import { CheckboxWithError } from './CheckboxWithError';
|
|
10
11
|
|
|
11
12
|
export const CheckboxGroup = JSX<CheckboxGroupProps>(({ className, items = [], ...props }) => {
|
|
12
13
|
const isChecked = items.every((_) => _?.value);
|
|
@@ -27,7 +28,12 @@ export const CheckboxGroup = JSX<CheckboxGroupProps>(({ className, items = [], .
|
|
|
27
28
|
</FoldableSection>
|
|
28
29
|
)}
|
|
29
30
|
renderFoldButton={renderGeneralCheckbox(
|
|
30
|
-
<
|
|
31
|
+
<CheckboxWithError
|
|
32
|
+
required={true}
|
|
33
|
+
value={isChecked}
|
|
34
|
+
onChange={handleGeneralToggle}
|
|
35
|
+
{...props}
|
|
36
|
+
/>,
|
|
31
37
|
)}
|
|
32
38
|
/>
|
|
33
39
|
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { CheckboxGroup } from '../../Checkbox/CheckboxGroup';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
|
|
5
|
+
const items = [
|
|
6
|
+
{
|
|
7
|
+
field: 'processPersonalDataLeadFlg',
|
|
8
|
+
text: 'Согласие на обработку персональных данных',
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
field: 'consentOtherFlg',
|
|
13
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
field: 'consentProviderFlg',
|
|
18
|
+
text: 'Согласие об использовании простой электронной подписи',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{ field: 'consentPfrFlg', text: 'Согласие на запрос в ПФР Открыты по субботам', required: true },
|
|
22
|
+
{ field: 'consentPhotoFlg', text: 'Прочие согласия (согласие на фотографирование)' },
|
|
23
|
+
];
|
|
24
|
+
export const ConsentToAllDocsField = JSX<CustomFieldProps>(({ field }) => (
|
|
25
|
+
<CheckboxGroup
|
|
26
|
+
text="Согласие на все документы"
|
|
27
|
+
items={items.map((_) => ({ ...field(_.field), text: _.text, required: _.required }))}
|
|
28
|
+
/>
|
|
29
|
+
));
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type JSONRefObject } from '../../../data/JSONRefObject';
|
|
2
|
+
import { UniBlock } from '../../../UniBlock/UniBlock';
|
|
3
|
+
import { type UniBlockProps } from '../../../UniBlock/UniBlockProps';
|
|
2
4
|
import { withValidator } from '../../../validation/withValidator';
|
|
3
5
|
import { SelectControl } from '../../Select/SelectControl';
|
|
4
|
-
import { PRODUCT_TYPE } from '../constants';
|
|
5
6
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
6
7
|
import { validatorObj } from '../getObjectValidator';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
+
export interface ProductFieldProps extends CustomFieldProps, UniBlockProps {
|
|
10
|
+
source?: JSONRefObject & {
|
|
11
|
+
productList?: string[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ProductField = UniBlock<ProductFieldProps>(({ field, source }) => (
|
|
9
16
|
<SelectControl
|
|
10
17
|
placeholder="Выберите продукт"
|
|
11
18
|
label="Продукт"
|
|
12
|
-
options={
|
|
19
|
+
options={arrayToOptions(source?.productList)}
|
|
13
20
|
{...withValidator(field('product'), validatorObj.product)}
|
|
14
21
|
/>
|
|
15
22
|
));
|
|
23
|
+
|
|
24
|
+
const arrayToOptions = (array?: string[]) => (array ?? []).map((_) => ({ key: _, value: _ }));
|
|
@@ -26,13 +26,4 @@ export const FEEDBACK_METHOD: Option[] = [
|
|
|
26
26
|
{ key: 'email', text: 'Электронное сообщение' },
|
|
27
27
|
];
|
|
28
28
|
|
|
29
|
-
export const PRODUCT_TYPE: Option[] = [
|
|
30
|
-
{ key: 'Карта дебетовая', text: 'Карта дебетовая' },
|
|
31
|
-
{ key: 'Карта кредитная', text: 'Карта кредитная' },
|
|
32
|
-
{ key: 'Потребительский кредит', text: 'Потребительский кредит' },
|
|
33
|
-
{ key: 'Ипотечный кредит', text: 'Ипотечный кредит' },
|
|
34
|
-
{ key: 'Вклад', text: 'Вклад' },
|
|
35
|
-
{ key: 'Накопительный счет', text: 'Накопительный счет' },
|
|
36
|
-
];
|
|
37
|
-
|
|
38
29
|
export const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
|
|
@@ -8,6 +8,7 @@ import { AcquiringField } from './Fields/AcquiringField';
|
|
|
8
8
|
import { AddressBranchField } from './Fields/AddressBranchField';
|
|
9
9
|
import { AmountField } from './Fields/AmountField';
|
|
10
10
|
import { CommentField } from './Fields/CommentField';
|
|
11
|
+
import { ConsentToAllDocsField } from './Fields/ConsentToAllDocsField';
|
|
11
12
|
import { FeedbackMethodField } from './Fields/FeedbackMethodField';
|
|
12
13
|
import { FeedbackTypeField } from './Fields/FeedbackTypeField';
|
|
13
14
|
import { IsClientField } from './Fields/IsClientField';
|
|
@@ -31,6 +32,10 @@ import { validatorObj } from './getObjectValidator';
|
|
|
31
32
|
import { getValidation } from './getValidation';
|
|
32
33
|
import { isRenderField } from './isRenderField';
|
|
33
34
|
|
|
35
|
+
const PRODUCT_REF = {
|
|
36
|
+
$ref: '/wcms-resources/outservice-productlist.json',
|
|
37
|
+
};
|
|
38
|
+
|
|
34
39
|
export const getField =
|
|
35
40
|
// eslint-disable-next-line max-lines-per-function
|
|
36
41
|
(field: FormFieldRegisterer<any>, typeForm: string) => (input: FieldDef, i: number) => {
|
|
@@ -82,7 +87,7 @@ export const getField =
|
|
|
82
87
|
{...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, required)}
|
|
83
88
|
/>
|
|
84
89
|
),
|
|
85
|
-
product: <ProductField field={field} />,
|
|
90
|
+
product: <ProductField field={field} source={PRODUCT_REF} />,
|
|
86
91
|
localities: <LocalitiesField field={field} input={input} />,
|
|
87
92
|
isClient: <IsClientField field={field} />,
|
|
88
93
|
consentToReceiveMaterials: (
|
|
@@ -125,6 +130,7 @@ export const getField =
|
|
|
125
130
|
<InputControl label="Дата и время обращения в Банк" {...field('applicationDate')} />
|
|
126
131
|
),
|
|
127
132
|
secondaryPhone: <SecondaryPhoneField field={field} />,
|
|
133
|
+
сonsentToAllDocs: <ConsentToAllDocsField field={field} />,
|
|
128
134
|
};
|
|
129
135
|
|
|
130
136
|
return isRenderField({ input, field }) ? (
|
|
@@ -35,6 +35,7 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
35
35
|
localities: defaultValidator,
|
|
36
36
|
consentDataProcessing: agreementValidator,
|
|
37
37
|
annualRevenue: defaultValidator,
|
|
38
|
+
consentToAllDocs: agreementValidator,
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
export const getObjectValidator = (inputs: FieldDef[]): Record<string, Validator> => {
|