@redneckz/wildless-cms-uni-blocks 0.14.756 → 0.14.758
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 +48 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/getInitialFormState.d.ts +2 -0
- package/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/components/ApplicationForm/getFormatData.js +5 -1
- package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
- package/dist/components/ApplicationForm/getInitialFormState.d.ts +2 -0
- package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ApplierTypeField.js +17 -0
- package/dist/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -1
- package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/RegionField.js +1 -1
- package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/RepresentativeNameField.js +7 -0
- package/dist/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/SituationDescriptionField.js +7 -0
- package/dist/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/SufferedFromField.js +25 -0
- package/dist/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.js +8 -0
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +2 -0
- package/lib/components/ApplicationForm/getFormatData.js +5 -1
- package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.d.ts +2 -0
- package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ApplierTypeField.js +15 -0
- package/lib/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -1
- package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/RegionField.js +1 -1
- package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/RepresentativeNameField.js +5 -0
- package/lib/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/SituationDescriptionField.js +5 -0
- package/lib/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/SufferedFromField.js +23 -0
- package/lib/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.js +8 -0
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +48 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/getInitialFormState.d.ts +2 -0
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/getFormatData.js +5 -1
- package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.js +17 -0
- package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.js +7 -0
- package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/SituationDescriptionField.js +7 -0
- package/mobile/dist/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.js +25 -0
- package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +8 -0
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getFormatData.js +5 -1
- package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.js +15 -0
- package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.js +5 -0
- package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/SituationDescriptionField.js +5 -0
- package/mobile/lib/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.js +23 -0
- package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +8 -0
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +73 -0
- package/mobile/src/components/ApplicationForm/getFormatData.tsx +8 -0
- package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +2 -0
- package/mobile/src/model/FormTypeFieldDef.ts +2 -1
- package/mobile/src/ui-kit/FormField/Fields/ApplierTypeField.tsx +24 -0
- package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/RepresentativeNameField.tsx +7 -0
- package/mobile/src/ui-kit/FormField/Fields/SituationDescriptionField.tsx +7 -0
- package/mobile/src/ui-kit/FormField/Fields/SufferedFromField.tsx +32 -0
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +5 -0
- package/mobile/src/ui-kit/FormField/getField.tsx +8 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +73 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +56 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +30 -0
- package/src/components/ApplicationForm/getFormatData.tsx +8 -0
- package/src/components/ApplicationForm/getInitialFormState.tsx +2 -0
- package/src/model/FormTypeFieldDef.ts +2 -1
- package/src/ui-kit/FormField/Fields/ApplierTypeField.tsx +24 -0
- package/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/RegionField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/RepresentativeNameField.tsx +7 -0
- package/src/ui-kit/FormField/Fields/SituationDescriptionField.tsx +7 -0
- package/src/ui-kit/FormField/Fields/SufferedFromField.tsx +32 -0
- package/src/ui-kit/FormField/NameFieldDef.ts +5 -0
- package/src/ui-kit/FormField/getField.tsx +8 -1
|
@@ -1093,5 +1093,78 @@
|
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
|
+
],
|
|
1097
|
+
[
|
|
1098
|
+
"Меры поддержки",
|
|
1099
|
+
{
|
|
1100
|
+
"content": {
|
|
1101
|
+
"version": "primary",
|
|
1102
|
+
"padding": "",
|
|
1103
|
+
"title": "Меры поддержки",
|
|
1104
|
+
"typeForm": "SUPPORT",
|
|
1105
|
+
"endpoint": "lead",
|
|
1106
|
+
"sections": [
|
|
1107
|
+
{
|
|
1108
|
+
"inputs": [
|
|
1109
|
+
{
|
|
1110
|
+
"name": "fullName",
|
|
1111
|
+
"required": true,
|
|
1112
|
+
"label": "ФИО клиента"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"name": "birthday",
|
|
1116
|
+
"required": true,
|
|
1117
|
+
"label": "Дата рождения клиента"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"name": "applierType",
|
|
1121
|
+
"required": true
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"name": "representativeName"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"name": "sufferedFrom",
|
|
1128
|
+
"required": true
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "region",
|
|
1132
|
+
"required": true,
|
|
1133
|
+
"label": "Регион обслуживания кредита"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"name": "situationDescription",
|
|
1137
|
+
"required": true
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"name": "phone",
|
|
1141
|
+
"required": true
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "email",
|
|
1145
|
+
"required": true
|
|
1146
|
+
}
|
|
1147
|
+
]
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"inputs": [
|
|
1151
|
+
{
|
|
1152
|
+
"name": "consentDataProcessing",
|
|
1153
|
+
"required": true
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
}
|
|
1157
|
+
],
|
|
1158
|
+
"button": {
|
|
1159
|
+
"text": "Отправить заявку",
|
|
1160
|
+
"version": "primary"
|
|
1161
|
+
},
|
|
1162
|
+
"link": {
|
|
1163
|
+
"text": "Согласен на обработку персональных данных",
|
|
1164
|
+
"href": "/privacy-policy",
|
|
1165
|
+
"target": "_blank"
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1096
1169
|
]
|
|
1097
1170
|
]
|
|
@@ -17,6 +17,8 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
17
17
|
vedTypes,
|
|
18
18
|
region,
|
|
19
19
|
inn,
|
|
20
|
+
sufferedFrom,
|
|
21
|
+
situationDescription,
|
|
20
22
|
...usedData
|
|
21
23
|
} = data;
|
|
22
24
|
const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
|
|
@@ -27,6 +29,7 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
27
29
|
...(inn && { inn }),
|
|
28
30
|
...(partnerComments ? { partnerComments } : {}),
|
|
29
31
|
...(serviceType ? { typeForm: serviceType } : {}),
|
|
32
|
+
...getIncidentComment(sufferedFrom, situationDescription?.text),
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
return Object.fromEntries(
|
|
@@ -34,6 +37,11 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
34
37
|
);
|
|
35
38
|
};
|
|
36
39
|
|
|
40
|
+
const getIncidentComment = (sufferedFrom?: string, situationDescription?: string) =>
|
|
41
|
+
sufferedFrom || situationDescription
|
|
42
|
+
? { comment: `${sufferedFrom || ''};${situationDescription || ''}` }
|
|
43
|
+
: {};
|
|
44
|
+
|
|
37
45
|
const getRegion = (region?: Option): Record<string, string> =>
|
|
38
46
|
region?.key || region?.text ? { region: region?.text || region?.key } : {};
|
|
39
47
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { type Option } from '../../Select/Option';
|
|
3
|
+
import { SelectControl } from '../../Select/SelectControl';
|
|
4
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
5
|
+
|
|
6
|
+
const APPLIER_TYPES: Option[] = [
|
|
7
|
+
{
|
|
8
|
+
key: 'client',
|
|
9
|
+
text: 'Клиент',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: 'representative',
|
|
13
|
+
text: 'Представитель клиента',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export const ApplierTypeField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
18
|
+
<SelectControl
|
|
19
|
+
label="Тип обратившегося"
|
|
20
|
+
{...input}
|
|
21
|
+
options={APPLIER_TYPES}
|
|
22
|
+
{...field('applierType')}
|
|
23
|
+
/>
|
|
24
|
+
));
|
|
@@ -3,5 +3,5 @@ import { DatePickerControl } from '../../DatePicker/DatePickerControl';
|
|
|
3
3
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
4
|
|
|
5
5
|
export const BirthdayField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
6
|
-
<DatePickerControl label=
|
|
6
|
+
<DatePickerControl label={input?.label || 'Дата рождения'} {...field(input?.name ?? '')} />
|
|
7
7
|
));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { InputControl } from '../../Input/InputControl';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
|
|
5
|
+
export const RepresentativeNameField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
6
|
+
<InputControl label="ФИО представителя" {...input} {...field('representativeName')} />
|
|
7
|
+
));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { InputControl } from '../../Input/InputControl';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
|
|
5
|
+
export const SituationDescriptionField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
6
|
+
<InputControl label="Описание ситуации" {...input} {...field('situationDescription')} />
|
|
7
|
+
));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { type Option } from '../../Select/Option';
|
|
3
|
+
import { SelectControl } from '../../Select/SelectControl';
|
|
4
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
5
|
+
|
|
6
|
+
const SUFFERED_FROM_TYPES: Option[] = [
|
|
7
|
+
{
|
|
8
|
+
key: 'blg',
|
|
9
|
+
text: 'Белгородской области',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: 'bshk',
|
|
13
|
+
text: 'Республике Башкортостан',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: 'krsk',
|
|
17
|
+
text: 'Курской области',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: 'chs',
|
|
21
|
+
text: 'От стихийного бедствия ЧС',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export const SufferedFromField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
26
|
+
<SelectControl
|
|
27
|
+
label="Пострадал в"
|
|
28
|
+
{...input}
|
|
29
|
+
options={SUFFERED_FROM_TYPES}
|
|
30
|
+
{...field('sufferedFrom')}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
@@ -31,6 +31,11 @@ type NameFieldApplicationDef =
|
|
|
31
31
|
| 'product'
|
|
32
32
|
| 'localities'
|
|
33
33
|
| 'partnerComments'
|
|
34
|
+
| 'sufferedFrom'
|
|
35
|
+
| 'situationDescription'
|
|
36
|
+
| 'applierType'
|
|
37
|
+
| 'representativeName'
|
|
38
|
+
| 'regionBranch'
|
|
34
39
|
| 'consentToReceiveMaterials'
|
|
35
40
|
| 'consentDataProcessing';
|
|
36
41
|
|
|
@@ -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 { AnnualRevenueField } from './Fields/AnnualRevenueField';
|
|
11
|
+
import { ApplierTypeField } from './Fields/ApplierTypeField';
|
|
11
12
|
import { BankEmpoleeField } from './Fields/BankEmpoleeField';
|
|
12
13
|
import { BirthdayField } from './Fields/BirthdayField';
|
|
13
14
|
import { CollectionCountField } from './Fields/CollectionCountField';
|
|
@@ -29,8 +30,11 @@ import { PosTerminalField } from './Fields/PosTerminalField';
|
|
|
29
30
|
import { ProductField } from './Fields/ProductField';
|
|
30
31
|
import { RegionField } from './Fields/RegionField';
|
|
31
32
|
import { RegionPremiumField } from './Fields/RegionPremiumField';
|
|
33
|
+
import { RepresentativeNameField } from './Fields/RepresentativeNameField';
|
|
32
34
|
import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
|
|
33
35
|
import { ServiceDirectionField } from './Fields/ServiceDirectionField';
|
|
36
|
+
import { SituationDescriptionField } from './Fields/SituationDescriptionField';
|
|
37
|
+
import { SufferedFromField } from './Fields/SufferedFromField';
|
|
34
38
|
import { SurnameField } from './Fields/SurnameField';
|
|
35
39
|
import { TermField } from './Fields/TermField';
|
|
36
40
|
import { UltraPremiumField } from './Fields/UltraPremiumField';
|
|
@@ -73,7 +77,10 @@ const InputsMap = {
|
|
|
73
77
|
<RegionField {...props} />
|
|
74
78
|
),
|
|
75
79
|
consentToReceiveMaterials: ConsentToReceiveMaterialsField,
|
|
76
|
-
|
|
80
|
+
sufferedFrom: SufferedFromField,
|
|
81
|
+
situationDescription: SituationDescriptionField,
|
|
82
|
+
representativeName: RepresentativeNameField,
|
|
83
|
+
applierType: ApplierTypeField,
|
|
77
84
|
surname: SurnameField,
|
|
78
85
|
name: NameField,
|
|
79
86
|
middleName: MiddleNameField,
|
package/package.json
CHANGED
|
@@ -1093,5 +1093,78 @@
|
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
|
+
],
|
|
1097
|
+
[
|
|
1098
|
+
"Меры поддержки",
|
|
1099
|
+
{
|
|
1100
|
+
"content": {
|
|
1101
|
+
"version": "primary",
|
|
1102
|
+
"padding": "",
|
|
1103
|
+
"title": "Меры поддержки",
|
|
1104
|
+
"typeForm": "SUPPORT",
|
|
1105
|
+
"endpoint": "lead",
|
|
1106
|
+
"sections": [
|
|
1107
|
+
{
|
|
1108
|
+
"inputs": [
|
|
1109
|
+
{
|
|
1110
|
+
"name": "fullName",
|
|
1111
|
+
"required": true,
|
|
1112
|
+
"label": "ФИО клиента"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"name": "birthday",
|
|
1116
|
+
"required": true,
|
|
1117
|
+
"label": "Дата рождения клиента"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"name": "applierType",
|
|
1121
|
+
"required": true
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"name": "representativeName"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"name": "sufferedFrom",
|
|
1128
|
+
"required": true
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "region",
|
|
1132
|
+
"required": true,
|
|
1133
|
+
"label": "Регион обслуживания кредита"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"name": "situationDescription",
|
|
1137
|
+
"required": true
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"name": "phone",
|
|
1141
|
+
"required": true
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "email",
|
|
1145
|
+
"required": true
|
|
1146
|
+
}
|
|
1147
|
+
]
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"inputs": [
|
|
1151
|
+
{
|
|
1152
|
+
"name": "consentDataProcessing",
|
|
1153
|
+
"required": true
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
}
|
|
1157
|
+
],
|
|
1158
|
+
"button": {
|
|
1159
|
+
"text": "Отправить заявку",
|
|
1160
|
+
"version": "primary"
|
|
1161
|
+
},
|
|
1162
|
+
"link": {
|
|
1163
|
+
"text": "Согласен на обработку персональных данных",
|
|
1164
|
+
"href": "/privacy-policy",
|
|
1165
|
+
"target": "_blank"
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1096
1169
|
]
|
|
1097
1170
|
]
|
|
@@ -652,4 +652,60 @@ export default {
|
|
|
652
652
|
<DialogManager />
|
|
653
653
|
</div>
|
|
654
654
|
),
|
|
655
|
+
receiptForBusiness: (
|
|
656
|
+
<div className="container grid grid-cols-12">
|
|
657
|
+
<ApplicationForm
|
|
658
|
+
className="col-span-12"
|
|
659
|
+
title="Заявка по акции 'Рецепт для бизнеса'"
|
|
660
|
+
typeForm="RFB"
|
|
661
|
+
endpoint="sendcorporatelead"
|
|
662
|
+
sections={[
|
|
663
|
+
{
|
|
664
|
+
inputs: [{ name: 'name', required: true }],
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
columns: 2,
|
|
668
|
+
inputs: [
|
|
669
|
+
{ name: 'phone', required: true },
|
|
670
|
+
{ name: 'inn', required: true },
|
|
671
|
+
],
|
|
672
|
+
},
|
|
673
|
+
]}
|
|
674
|
+
button={button}
|
|
675
|
+
link={linkCorp}
|
|
676
|
+
/>
|
|
677
|
+
<PopupManager />
|
|
678
|
+
<DialogManager />
|
|
679
|
+
</div>
|
|
680
|
+
),
|
|
681
|
+
support: (
|
|
682
|
+
<div className="container grid grid-cols-12">
|
|
683
|
+
<ApplicationForm
|
|
684
|
+
className="col-span-12"
|
|
685
|
+
title="Меры поддержки жителей пострадавших населенных пунктов территорий Курской, Брянской и Белгородской областей"
|
|
686
|
+
typeForm="SUPPORT"
|
|
687
|
+
endpoint="lead"
|
|
688
|
+
sections={[
|
|
689
|
+
{
|
|
690
|
+
inputs: [
|
|
691
|
+
{ name: 'fullName', required: true, label: 'ФИО клиента' },
|
|
692
|
+
{ name: 'birthday', required: true, label: 'Дата рождения клиента' },
|
|
693
|
+
{ name: 'applierType', required: true },
|
|
694
|
+
{ name: 'representativeName' },
|
|
695
|
+
{ name: 'sufferedFrom', required: true },
|
|
696
|
+
{ name: 'regionBranch', required: true, label: 'Регион обслуживания кредита' },
|
|
697
|
+
{ name: 'situationDescription', required: true },
|
|
698
|
+
{ name: 'phone', required: true },
|
|
699
|
+
{ name: 'email', required: true },
|
|
700
|
+
],
|
|
701
|
+
},
|
|
702
|
+
{ inputs: [{ name: 'consentDataProcessing', required: true }] },
|
|
703
|
+
]}
|
|
704
|
+
button={button}
|
|
705
|
+
link={link}
|
|
706
|
+
/>
|
|
707
|
+
<PopupManager />
|
|
708
|
+
<DialogManager />
|
|
709
|
+
</div>
|
|
710
|
+
),
|
|
655
711
|
};
|
|
@@ -673,4 +673,34 @@ export default {
|
|
|
673
673
|
<DialogManager />
|
|
674
674
|
</div>
|
|
675
675
|
),
|
|
676
|
+
support: (
|
|
677
|
+
<div className="container grid grid-cols-12">
|
|
678
|
+
<ApplicationForm
|
|
679
|
+
className="col-span-12"
|
|
680
|
+
title="Меры поддержки жителей пострадавших населенных пунктов территорий Курской, Брянской и Белгородской областей"
|
|
681
|
+
typeForm="SUPPORT"
|
|
682
|
+
endpoint="lead"
|
|
683
|
+
sections={[
|
|
684
|
+
{
|
|
685
|
+
inputs: [
|
|
686
|
+
{ name: 'fullName', required: true, label: 'ФИО клиента' },
|
|
687
|
+
{ name: 'birthday', required: true, label: 'Дата рождения клиента' },
|
|
688
|
+
{ name: 'applierType', required: true },
|
|
689
|
+
{ name: 'representativeName' },
|
|
690
|
+
{ name: 'sufferedFrom', required: true },
|
|
691
|
+
{ name: 'region', required: true, label: 'Регион обслуживания кредита' },
|
|
692
|
+
{ name: 'situationDescription', required: true },
|
|
693
|
+
{ name: 'phone', required: true },
|
|
694
|
+
{ name: 'email', required: true },
|
|
695
|
+
],
|
|
696
|
+
},
|
|
697
|
+
{ inputs: [{ name: 'consentDataProcessing', required: true }] },
|
|
698
|
+
]}
|
|
699
|
+
button={button}
|
|
700
|
+
link={link}
|
|
701
|
+
/>
|
|
702
|
+
<PopupManager />
|
|
703
|
+
<DialogManager />
|
|
704
|
+
</div>
|
|
705
|
+
),
|
|
676
706
|
};
|
|
@@ -17,6 +17,8 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
17
17
|
vedTypes,
|
|
18
18
|
region,
|
|
19
19
|
inn,
|
|
20
|
+
sufferedFrom,
|
|
21
|
+
situationDescription,
|
|
20
22
|
...usedData
|
|
21
23
|
} = data;
|
|
22
24
|
const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
|
|
@@ -27,6 +29,7 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
27
29
|
...(inn && { inn }),
|
|
28
30
|
...(partnerComments ? { partnerComments } : {}),
|
|
29
31
|
...(serviceType ? { typeForm: serviceType } : {}),
|
|
32
|
+
...getIncidentComment(sufferedFrom, situationDescription?.text),
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
return Object.fromEntries(
|
|
@@ -34,6 +37,11 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
34
37
|
);
|
|
35
38
|
};
|
|
36
39
|
|
|
40
|
+
const getIncidentComment = (sufferedFrom?: string, situationDescription?: string) =>
|
|
41
|
+
sufferedFrom || situationDescription
|
|
42
|
+
? { comment: `${sufferedFrom || ''};${situationDescription || ''}` }
|
|
43
|
+
: {};
|
|
44
|
+
|
|
37
45
|
const getRegion = (region?: Option): Record<string, string> =>
|
|
38
46
|
region?.key || region?.text ? { region: region?.text || region?.key } : {};
|
|
39
47
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { type Option } from '../../Select/Option';
|
|
3
|
+
import { SelectControl } from '../../Select/SelectControl';
|
|
4
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
5
|
+
|
|
6
|
+
const APPLIER_TYPES: Option[] = [
|
|
7
|
+
{
|
|
8
|
+
key: 'client',
|
|
9
|
+
text: 'Клиент',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: 'representative',
|
|
13
|
+
text: 'Представитель клиента',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export const ApplierTypeField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
18
|
+
<SelectControl
|
|
19
|
+
label="Тип обратившегося"
|
|
20
|
+
{...input}
|
|
21
|
+
options={APPLIER_TYPES}
|
|
22
|
+
{...field('applierType')}
|
|
23
|
+
/>
|
|
24
|
+
));
|
|
@@ -3,5 +3,5 @@ import { DatePickerControl } from '../../DatePicker/DatePickerControl';
|
|
|
3
3
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
4
|
|
|
5
5
|
export const BirthdayField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
6
|
-
<DatePickerControl label=
|
|
6
|
+
<DatePickerControl label={input?.label || 'Дата рождения'} {...field(input?.name ?? '')} />
|
|
7
7
|
));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { InputControl } from '../../Input/InputControl';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
|
|
5
|
+
export const RepresentativeNameField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
6
|
+
<InputControl label="ФИО представителя" {...input} {...field('representativeName')} />
|
|
7
|
+
));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { InputControl } from '../../Input/InputControl';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
|
|
5
|
+
export const SituationDescriptionField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
6
|
+
<InputControl label="Описание ситуации" {...input} {...field('situationDescription')} />
|
|
7
|
+
));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { type Option } from '../../Select/Option';
|
|
3
|
+
import { SelectControl } from '../../Select/SelectControl';
|
|
4
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
5
|
+
|
|
6
|
+
const SUFFERED_FROM_TYPES: Option[] = [
|
|
7
|
+
{
|
|
8
|
+
key: 'blg',
|
|
9
|
+
text: 'Белгородской области',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: 'bshk',
|
|
13
|
+
text: 'Республике Башкортостан',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: 'krsk',
|
|
17
|
+
text: 'Курской области',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: 'chs',
|
|
21
|
+
text: 'От стихийного бедствия ЧС',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export const SufferedFromField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
26
|
+
<SelectControl
|
|
27
|
+
label="Пострадал в"
|
|
28
|
+
{...input}
|
|
29
|
+
options={SUFFERED_FROM_TYPES}
|
|
30
|
+
{...field('sufferedFrom')}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
@@ -31,6 +31,11 @@ type NameFieldApplicationDef =
|
|
|
31
31
|
| 'product'
|
|
32
32
|
| 'localities'
|
|
33
33
|
| 'partnerComments'
|
|
34
|
+
| 'sufferedFrom'
|
|
35
|
+
| 'situationDescription'
|
|
36
|
+
| 'applierType'
|
|
37
|
+
| 'representativeName'
|
|
38
|
+
| 'regionBranch'
|
|
34
39
|
| 'consentToReceiveMaterials'
|
|
35
40
|
| 'consentDataProcessing';
|
|
36
41
|
|
|
@@ -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 { AnnualRevenueField } from './Fields/AnnualRevenueField';
|
|
11
|
+
import { ApplierTypeField } from './Fields/ApplierTypeField';
|
|
11
12
|
import { BankEmpoleeField } from './Fields/BankEmpoleeField';
|
|
12
13
|
import { BirthdayField } from './Fields/BirthdayField';
|
|
13
14
|
import { CollectionCountField } from './Fields/CollectionCountField';
|
|
@@ -29,8 +30,11 @@ import { PosTerminalField } from './Fields/PosTerminalField';
|
|
|
29
30
|
import { ProductField } from './Fields/ProductField';
|
|
30
31
|
import { RegionField } from './Fields/RegionField';
|
|
31
32
|
import { RegionPremiumField } from './Fields/RegionPremiumField';
|
|
33
|
+
import { RepresentativeNameField } from './Fields/RepresentativeNameField';
|
|
32
34
|
import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
|
|
33
35
|
import { ServiceDirectionField } from './Fields/ServiceDirectionField';
|
|
36
|
+
import { SituationDescriptionField } from './Fields/SituationDescriptionField';
|
|
37
|
+
import { SufferedFromField } from './Fields/SufferedFromField';
|
|
34
38
|
import { SurnameField } from './Fields/SurnameField';
|
|
35
39
|
import { TermField } from './Fields/TermField';
|
|
36
40
|
import { UltraPremiumField } from './Fields/UltraPremiumField';
|
|
@@ -73,7 +77,10 @@ const InputsMap = {
|
|
|
73
77
|
<RegionField {...props} />
|
|
74
78
|
),
|
|
75
79
|
consentToReceiveMaterials: ConsentToReceiveMaterialsField,
|
|
76
|
-
|
|
80
|
+
sufferedFrom: SufferedFromField,
|
|
81
|
+
situationDescription: SituationDescriptionField,
|
|
82
|
+
representativeName: RepresentativeNameField,
|
|
83
|
+
applierType: ApplierTypeField,
|
|
77
84
|
surname: SurnameField,
|
|
78
85
|
name: NameField,
|
|
79
86
|
middleName: MiddleNameField,
|