@redneckz/wildless-cms-uni-blocks 0.14.952 → 0.14.954
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/bundle.umd.js +178 -65
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/utils/calculateInputs.d.ts +1 -1
- package/bundle/retail/utils/renderStep.d.ts +1 -2
- package/bundle/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.js +1 -2
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.js +52 -8
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/DebitForm/DebitFormStep.js +1 -2
- package/dist/components/DebitForm/DebitFormStep.js.map +1 -1
- package/dist/retail/adaptors/getEmploymentData.js +25 -21
- package/dist/retail/adaptors/getEmploymentData.js.map +1 -1
- package/dist/retail/utils/calculateInputs.d.ts +1 -1
- package/dist/retail/utils/calculateInputs.js +2 -6
- package/dist/retail/utils/calculateInputs.js.map +1 -1
- package/dist/retail/utils/renderStep.d.ts +1 -2
- package/dist/retail/utils/renderStep.js +2 -2
- package/dist/retail/utils/renderStep.js.map +1 -1
- package/dist/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/dist/retail/validator/getRetailFormValidator.js +1 -1
- package/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CallbackTimeField.js +8 -7
- package/dist/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.js +1 -2
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.js +52 -8
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/DebitForm/DebitFormStep.js +1 -2
- package/lib/components/DebitForm/DebitFormStep.js.map +1 -1
- package/lib/retail/adaptors/getEmploymentData.js +25 -21
- package/lib/retail/adaptors/getEmploymentData.js.map +1 -1
- package/lib/retail/utils/calculateInputs.d.ts +1 -1
- package/lib/retail/utils/calculateInputs.js +2 -6
- package/lib/retail/utils/calculateInputs.js.map +1 -1
- package/lib/retail/utils/renderStep.d.ts +1 -2
- package/lib/retail/utils/renderStep.js +2 -2
- package/lib/retail/utils/renderStep.js.map +1 -1
- package/lib/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/lib/retail/validator/getRetailFormValidator.js +1 -1
- package/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CallbackTimeField.js +8 -7
- package/lib/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +178 -65
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/utils/calculateInputs.d.ts +1 -1
- package/mobile/bundle/retail/utils/renderStep.d.ts +1 -2
- package/mobile/bundle/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js +1 -2
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +52 -8
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/DebitForm/DebitFormStep.js +1 -2
- package/mobile/dist/components/DebitForm/DebitFormStep.js.map +1 -1
- package/mobile/dist/retail/adaptors/getEmploymentData.js +25 -21
- package/mobile/dist/retail/adaptors/getEmploymentData.js.map +1 -1
- package/mobile/dist/retail/utils/calculateInputs.d.ts +1 -1
- package/mobile/dist/retail/utils/calculateInputs.js +2 -6
- package/mobile/dist/retail/utils/calculateInputs.js.map +1 -1
- package/mobile/dist/retail/utils/renderStep.d.ts +1 -2
- package/mobile/dist/retail/utils/renderStep.js +2 -2
- package/mobile/dist/retail/utils/renderStep.js.map +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/mobile/dist/retail/validator/getRetailFormValidator.js +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CallbackTimeField.js +8 -7
- package/mobile/dist/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js +1 -2
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +52 -8
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/DebitForm/DebitFormStep.js +1 -2
- package/mobile/lib/components/DebitForm/DebitFormStep.js.map +1 -1
- package/mobile/lib/retail/adaptors/getEmploymentData.js +25 -21
- package/mobile/lib/retail/adaptors/getEmploymentData.js.map +1 -1
- package/mobile/lib/retail/utils/calculateInputs.d.ts +1 -1
- package/mobile/lib/retail/utils/calculateInputs.js +2 -6
- package/mobile/lib/retail/utils/calculateInputs.js.map +1 -1
- package/mobile/lib/retail/utils/renderStep.d.ts +1 -2
- package/mobile/lib/retail/utils/renderStep.js +2 -2
- package/mobile/lib/retail/utils/renderStep.js.map +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/mobile/lib/retail/validator/getRetailFormValidator.js +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CallbackTimeField.js +8 -7
- package/mobile/lib/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +1 -2
- package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +84 -13
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +1 -2
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +52 -8
- package/mobile/src/components/DebitForm/DebitFormStep.tsx +1 -2
- package/mobile/src/retail/adaptors/getEmploymentData.tsx +25 -21
- package/mobile/src/retail/utils/calculateInputs.ts +2 -10
- package/mobile/src/retail/utils/renderStep.tsx +1 -3
- package/mobile/src/retail/validator/getRetailFormValidator.ts +1 -3
- package/mobile/src/ui-kit/FormField/Fields/CallbackTimeField.tsx +2 -1
- package/package.json +1 -1
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +1 -2
- package/src/components/CreditCardForm/creditCardFormStepsData.tsx +84 -13
- package/src/components/CreditForm/CreditFormStep.tsx +1 -2
- package/src/components/CreditForm/creditFormStepsData.tsx +52 -8
- package/src/components/DebitForm/DebitFormStep.tsx +1 -2
- package/src/retail/adaptors/getEmploymentData.tsx +25 -21
- package/src/retail/utils/calculateInputs.ts +2 -10
- package/src/retail/utils/renderStep.tsx +1 -3
- package/src/retail/validator/getRetailFormValidator.ts +1 -3
- package/src/ui-kit/FormField/Fields/CallbackTimeField.tsx +2 -1
|
@@ -56,6 +56,7 @@ const EMPLOYMENT_CONTENT: CreditCardSectionsProps[] = [
|
|
|
56
56
|
label:
|
|
57
57
|
'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, ' +
|
|
58
58
|
'если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
|
|
59
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
59
60
|
},
|
|
60
61
|
],
|
|
61
62
|
},
|
|
@@ -65,40 +66,94 @@ const EMPLOYMENT_CONTENT: CreditCardSectionsProps[] = [
|
|
|
65
66
|
{
|
|
66
67
|
columns: 2,
|
|
67
68
|
inputs: [
|
|
68
|
-
{
|
|
69
|
-
|
|
69
|
+
{
|
|
70
|
+
name: 'organizationName',
|
|
71
|
+
required: true,
|
|
72
|
+
dadata: true,
|
|
73
|
+
filledByEsia: true,
|
|
74
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'inn',
|
|
78
|
+
required: true,
|
|
79
|
+
dadata: true,
|
|
80
|
+
filledByEsia: true,
|
|
81
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
82
|
+
},
|
|
70
83
|
],
|
|
71
84
|
},
|
|
72
85
|
{
|
|
73
|
-
inputs: [
|
|
86
|
+
inputs: [
|
|
87
|
+
{
|
|
88
|
+
name: 'amountWorkers',
|
|
89
|
+
required: true,
|
|
90
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
91
|
+
},
|
|
92
|
+
],
|
|
74
93
|
},
|
|
75
94
|
{
|
|
76
95
|
columns: 2,
|
|
77
96
|
inputs: [
|
|
78
|
-
{
|
|
97
|
+
{
|
|
98
|
+
name: 'employerActivities',
|
|
99
|
+
required: true,
|
|
100
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
101
|
+
},
|
|
79
102
|
{
|
|
80
103
|
name: 'organizationPhone',
|
|
81
104
|
label: 'Телефон работодателя',
|
|
82
105
|
required: true,
|
|
106
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
83
107
|
},
|
|
84
108
|
],
|
|
85
109
|
},
|
|
86
110
|
{
|
|
87
111
|
columns: 2,
|
|
88
112
|
inputs: [
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
113
|
+
{
|
|
114
|
+
name: 'generalSeniority',
|
|
115
|
+
required: true,
|
|
116
|
+
filledByEsia: true,
|
|
117
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'lastJobExperience',
|
|
121
|
+
required: true,
|
|
122
|
+
filledByEsia: true,
|
|
123
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'experience5Years',
|
|
127
|
+
required: true,
|
|
128
|
+
filledByEsia: true,
|
|
129
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'jobsNumber',
|
|
133
|
+
required: true,
|
|
134
|
+
filledByEsia: true,
|
|
135
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
136
|
+
},
|
|
93
137
|
],
|
|
94
138
|
},
|
|
95
139
|
{
|
|
96
|
-
inputs: [
|
|
140
|
+
inputs: [
|
|
141
|
+
{
|
|
142
|
+
name: 'beginDate',
|
|
143
|
+
required: true,
|
|
144
|
+
filledByEsia: true,
|
|
145
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
146
|
+
},
|
|
147
|
+
],
|
|
97
148
|
},
|
|
98
149
|
{
|
|
99
150
|
columns: 2,
|
|
100
151
|
inputs: [
|
|
101
|
-
{
|
|
152
|
+
{
|
|
153
|
+
name: 'positionOrganization',
|
|
154
|
+
required: true,
|
|
155
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
156
|
+
},
|
|
102
157
|
{
|
|
103
158
|
name: 'partInBusiness',
|
|
104
159
|
required: true,
|
|
@@ -109,9 +164,17 @@ const EMPLOYMENT_CONTENT: CreditCardSectionsProps[] = [
|
|
|
109
164
|
{
|
|
110
165
|
title: 'Адрес работодателя',
|
|
111
166
|
inputs: [],
|
|
167
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
112
168
|
},
|
|
113
169
|
{
|
|
114
|
-
inputs: [
|
|
170
|
+
inputs: [
|
|
171
|
+
{
|
|
172
|
+
name: 'organizationAddress',
|
|
173
|
+
required: true,
|
|
174
|
+
dadata: true,
|
|
175
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
176
|
+
},
|
|
177
|
+
],
|
|
115
178
|
},
|
|
116
179
|
];
|
|
117
180
|
const FAMILY_STATUS_AND_INCOME_CONTENT: CreditCardSectionsProps[] = [
|
|
@@ -148,12 +211,20 @@ const FAMILY_STATUS_AND_INCOME_CONTENT: CreditCardSectionsProps[] = [
|
|
|
148
211
|
{
|
|
149
212
|
name: 'infoCard',
|
|
150
213
|
label: 'Сумма основного и дополнительных доходов после вычета налога',
|
|
214
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
151
215
|
},
|
|
152
216
|
],
|
|
153
217
|
},
|
|
154
218
|
{
|
|
155
219
|
columns: 1,
|
|
156
|
-
inputs: [
|
|
220
|
+
inputs: [
|
|
221
|
+
{
|
|
222
|
+
name: 'wages',
|
|
223
|
+
required: true,
|
|
224
|
+
filledByEsia: true,
|
|
225
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
226
|
+
},
|
|
227
|
+
],
|
|
157
228
|
},
|
|
158
229
|
{
|
|
159
230
|
columns: 1,
|
|
@@ -161,7 +232,7 @@ const FAMILY_STATUS_AND_INCOME_CONTENT: CreditCardSectionsProps[] = [
|
|
|
161
232
|
{
|
|
162
233
|
name: 'retirementIncome',
|
|
163
234
|
required: true,
|
|
164
|
-
condition: { name: 'employment', values: ['RETIREE'] },
|
|
235
|
+
condition: { name: 'employment', values: ['RETIREE', 'WORK_RETIREE'] },
|
|
165
236
|
},
|
|
166
237
|
],
|
|
167
238
|
},
|
|
@@ -38,7 +38,6 @@ export const CreditFormStep = JSX<CreditFormStepProps>(
|
|
|
38
38
|
getRetailFormValidator({
|
|
39
39
|
formState,
|
|
40
40
|
inputs,
|
|
41
|
-
step,
|
|
42
41
|
productType: PRODUCT_TYPE,
|
|
43
42
|
}),
|
|
44
43
|
[inputs],
|
|
@@ -57,7 +56,7 @@ export const CreditFormStep = JSX<CreditFormStepProps>(
|
|
|
57
56
|
|
|
58
57
|
return (
|
|
59
58
|
<form onSubmit={handleSubmit} className="space-y-m">
|
|
60
|
-
{renderStep({ sections, field,
|
|
59
|
+
{renderStep({ sections, field, params: { calcData } })}
|
|
61
60
|
<StepsNavigationButtons step={step} isSending={isSending} onPrevStep={onPrevStep} />
|
|
62
61
|
</form>
|
|
63
62
|
);
|
|
@@ -40,6 +40,7 @@ const EMPLOYMENT_CONTENT: SectionsRetailProps[] = [
|
|
|
40
40
|
label:
|
|
41
41
|
'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, ' +
|
|
42
42
|
'если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
|
|
43
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
43
44
|
},
|
|
44
45
|
],
|
|
45
46
|
},
|
|
@@ -49,34 +50,69 @@ const EMPLOYMENT_CONTENT: SectionsRetailProps[] = [
|
|
|
49
50
|
{
|
|
50
51
|
columns: 2,
|
|
51
52
|
inputs: [
|
|
52
|
-
{
|
|
53
|
-
|
|
53
|
+
{
|
|
54
|
+
name: 'organizationName',
|
|
55
|
+
required: true,
|
|
56
|
+
dadata: true,
|
|
57
|
+
filledByEsia: true,
|
|
58
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'inn',
|
|
62
|
+
required: true,
|
|
63
|
+
dadata: true,
|
|
64
|
+
filledByEsia: true,
|
|
65
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
66
|
+
},
|
|
54
67
|
],
|
|
55
68
|
},
|
|
56
69
|
{
|
|
57
70
|
columns: 2,
|
|
58
71
|
inputs: [
|
|
59
|
-
{
|
|
72
|
+
{
|
|
73
|
+
name: 'amountWorkers',
|
|
74
|
+
required: true,
|
|
75
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
76
|
+
},
|
|
60
77
|
{
|
|
61
78
|
name: 'organizationPhone',
|
|
62
79
|
label: 'Телефон работодателя',
|
|
63
80
|
required: true,
|
|
81
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
64
82
|
},
|
|
65
83
|
],
|
|
66
84
|
},
|
|
67
85
|
{
|
|
68
86
|
columns: 2,
|
|
69
87
|
inputs: [
|
|
70
|
-
{
|
|
71
|
-
|
|
88
|
+
{
|
|
89
|
+
name: 'jobsNumber',
|
|
90
|
+
required: true,
|
|
91
|
+
filledByEsia: true,
|
|
92
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'beginDate',
|
|
96
|
+
required: true,
|
|
97
|
+
filledByEsia: true,
|
|
98
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
99
|
+
},
|
|
72
100
|
],
|
|
73
101
|
},
|
|
74
102
|
{
|
|
75
103
|
title: 'Адрес работодателя',
|
|
76
104
|
inputs: [],
|
|
105
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
77
106
|
},
|
|
78
107
|
{
|
|
79
|
-
inputs: [
|
|
108
|
+
inputs: [
|
|
109
|
+
{
|
|
110
|
+
name: 'organizationAddress',
|
|
111
|
+
required: true,
|
|
112
|
+
dadata: true,
|
|
113
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
114
|
+
},
|
|
115
|
+
],
|
|
80
116
|
},
|
|
81
117
|
];
|
|
82
118
|
const FAMILY_STATUS_AND_INCOME_CONTENT: SectionsRetailProps[] = [
|
|
@@ -112,12 +148,20 @@ const FAMILY_STATUS_AND_INCOME_CONTENT: SectionsRetailProps[] = [
|
|
|
112
148
|
{
|
|
113
149
|
name: 'infoCard',
|
|
114
150
|
label: 'Сумма основного и дополнительных доходов после вычета налога',
|
|
151
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
115
152
|
},
|
|
116
153
|
],
|
|
117
154
|
},
|
|
118
155
|
{
|
|
119
156
|
columns: 1,
|
|
120
|
-
inputs: [
|
|
157
|
+
inputs: [
|
|
158
|
+
{
|
|
159
|
+
name: 'wages',
|
|
160
|
+
required: true,
|
|
161
|
+
filledByEsia: true,
|
|
162
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
163
|
+
},
|
|
164
|
+
],
|
|
121
165
|
},
|
|
122
166
|
{
|
|
123
167
|
columns: 1,
|
|
@@ -125,7 +169,7 @@ const FAMILY_STATUS_AND_INCOME_CONTENT: SectionsRetailProps[] = [
|
|
|
125
169
|
{
|
|
126
170
|
name: 'retirementIncome',
|
|
127
171
|
required: true,
|
|
128
|
-
condition: { name: 'employment', values: ['RETIREE'] },
|
|
172
|
+
condition: { name: 'employment', values: ['RETIREE', 'WORK_RETIREE'] },
|
|
129
173
|
},
|
|
130
174
|
],
|
|
131
175
|
},
|
|
@@ -32,7 +32,6 @@ export const DebitFormStep = JSX<DebitFormStepProps>(
|
|
|
32
32
|
getRetailFormValidator({
|
|
33
33
|
formState,
|
|
34
34
|
inputs,
|
|
35
|
-
step,
|
|
36
35
|
productType: PRODUCT_TYPE,
|
|
37
36
|
}),
|
|
38
37
|
[inputs],
|
|
@@ -51,7 +50,7 @@ export const DebitFormStep = JSX<DebitFormStepProps>(
|
|
|
51
50
|
|
|
52
51
|
return (
|
|
53
52
|
<form onSubmit={handleSubmit} className="space-y-m">
|
|
54
|
-
{renderStep({ sections, field
|
|
53
|
+
{renderStep({ sections, field })}
|
|
55
54
|
<StepsNavigationButtons step={step} isSending={isSending} onPrevStep={onPrevStep} />
|
|
56
55
|
</form>
|
|
57
56
|
);
|
|
@@ -25,25 +25,29 @@ export const getEmploymentData = (formData: LeadFormState): Partial<Participant>
|
|
|
25
25
|
partInBusiness,
|
|
26
26
|
} = formData;
|
|
27
27
|
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
28
|
+
return employment?.key === 'RETIREE'
|
|
29
|
+
? {
|
|
30
|
+
employmentTypeCd: employment,
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
employmentContractDate: formatDate(beginDate || '', true),
|
|
34
|
+
employmentTypeCd: employment,
|
|
35
|
+
organizationName,
|
|
36
|
+
organizationInn: inn,
|
|
37
|
+
organizationActivityTypeCd: employerActivities?.key ? employerActivities : undefined,
|
|
38
|
+
organizationTypeCd: organization,
|
|
39
|
+
organizationKindCd: employerOrganization,
|
|
40
|
+
employeesNumberCd: amountWorkers,
|
|
41
|
+
opf: legalForm,
|
|
42
|
+
seniority: generalSeniority,
|
|
43
|
+
generalSeniority: experience5Years,
|
|
44
|
+
jobsNumber,
|
|
45
|
+
lastWorkDuration: lastJobExperience,
|
|
46
|
+
positionCd: positionOrganization?.key ? positionOrganization : undefined,
|
|
47
|
+
participantContacts: getParticipantContacts({
|
|
48
|
+
organizationPhone: organizationPhone && formatPhone(organizationPhone),
|
|
49
|
+
}),
|
|
50
|
+
participantAddresses: getParticipantAddresses({ organizationAddress }),
|
|
51
|
+
ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : undefined,
|
|
52
|
+
};
|
|
49
53
|
};
|
|
@@ -4,14 +4,12 @@ import { type FieldRetailDef } from '../model/RetailFormContent';
|
|
|
4
4
|
|
|
5
5
|
export type GetValue = <K extends keyof LeadFormState>(name: K) => LeadFormState[K];
|
|
6
6
|
|
|
7
|
-
export const calculateInputs = (getValue: GetValue) => (inputs: FieldRetailDef[]
|
|
7
|
+
export const calculateInputs = (getValue: GetValue) => (inputs: FieldRetailDef[]) =>
|
|
8
8
|
inputs
|
|
9
9
|
.filter((_) => _)
|
|
10
10
|
.map((_) => {
|
|
11
11
|
if (
|
|
12
12
|
[
|
|
13
|
-
checkIsRetiree(step, getValue),
|
|
14
|
-
checkIsUnemployedRetiree(_, getValue),
|
|
15
13
|
checkBusinessOwner(_, getValue),
|
|
16
14
|
checkConsentPfrFlg(_, getValue),
|
|
17
15
|
checkAddressFillFromESIA(_, getValue),
|
|
@@ -25,12 +23,6 @@ export const calculateInputs = (getValue: GetValue) => (inputs: FieldRetailDef[]
|
|
|
25
23
|
return _;
|
|
26
24
|
});
|
|
27
25
|
|
|
28
|
-
const checkIsRetiree = (step: number, getValue: GetValue) =>
|
|
29
|
-
step === 2 && getValue('employment')?.key === 'RETIREE';
|
|
30
|
-
|
|
31
|
-
const checkIsUnemployedRetiree = ({ name }: FieldRetailDef, getValue: GetValue) =>
|
|
32
|
-
name === 'wages' && getValue('employment')?.key === 'RETIREE' && !getValue('inn');
|
|
33
|
-
|
|
34
26
|
const checkBusinessOwner = ({ name }: FieldRetailDef, getValue: GetValue) =>
|
|
35
27
|
name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
|
|
36
28
|
|
|
@@ -42,7 +34,7 @@ const checkAddressFact = ({ name }: FieldRetailDef, getValue: GetValue) =>
|
|
|
42
34
|
|
|
43
35
|
export const checkCondition = ({ condition }: FieldRetailDef, getValue: GetValue) =>
|
|
44
36
|
condition?.name &&
|
|
45
|
-
condition?.values?.
|
|
37
|
+
condition?.values?.every((_) => {
|
|
46
38
|
const dataValue = getValue(condition?.name);
|
|
47
39
|
|
|
48
40
|
return _ !== ((dataValue as Option)?.key ?? dataValue);
|
|
@@ -10,18 +10,16 @@ import { renderInputs } from './renderInputs';
|
|
|
10
10
|
export interface StepProps<SectionsProps extends SectionsRetailProps> {
|
|
11
11
|
sections?: SectionsProps[];
|
|
12
12
|
field: FormFieldRegisterer<LeadFormState>;
|
|
13
|
-
step: number;
|
|
14
13
|
params?: Record<string, any>;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export const renderStep = <SectionsProps extends SectionsRetailProps>({
|
|
18
17
|
sections,
|
|
19
18
|
field,
|
|
20
|
-
step,
|
|
21
19
|
params,
|
|
22
20
|
}: StepProps<SectionsProps>) =>
|
|
23
21
|
sections?.map(({ inputs: origInputs = [], columns, title, condition }, i) => {
|
|
24
|
-
const inputs = calculateInputs(getValue(field))(origInputs
|
|
22
|
+
const inputs = calculateInputs(getValue(field))(origInputs);
|
|
25
23
|
const cleanElements = [
|
|
26
24
|
!checkCondition({ condition }, getValue(field)) ? renderTitle(title) : null,
|
|
27
25
|
...renderInputs({ field, inputs, params }),
|
|
@@ -17,17 +17,15 @@ import {
|
|
|
17
17
|
type getRetailFormValidatorProps = {
|
|
18
18
|
formState: LeadFormState;
|
|
19
19
|
inputs: FieldRetailDef[];
|
|
20
|
-
step: number;
|
|
21
20
|
productType: ProductType;
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
export const getRetailFormValidator = ({
|
|
25
24
|
formState,
|
|
26
25
|
inputs,
|
|
27
|
-
step,
|
|
28
26
|
productType,
|
|
29
27
|
}: getRetailFormValidatorProps) =>
|
|
30
|
-
getFormValidator(calculateInputs((_) => formState[_])(inputs
|
|
28
|
+
getFormValidator(calculateInputs((_) => formState[_])(inputs), {
|
|
31
29
|
...validatorObj,
|
|
32
30
|
limitedBirthday: getLimitedBirthdayValidation(productType),
|
|
33
31
|
dulIssueDate: passportValidator(formState.limitedBirthday as Date),
|
|
@@ -8,6 +8,7 @@ const CALLBACK_TIME: Option[] = [
|
|
|
8
8
|
key: 'Перезвонить сейчас',
|
|
9
9
|
text: 'Перезвонить сейчас',
|
|
10
10
|
},
|
|
11
|
+
/* Временно убрать, требование от бизнеса
|
|
11
12
|
{
|
|
12
13
|
key: 'Перезвонить через час',
|
|
13
14
|
text: 'Перезвонить через час',
|
|
@@ -19,7 +20,7 @@ const CALLBACK_TIME: Option[] = [
|
|
|
19
20
|
{
|
|
20
21
|
key: 'Перезвонить завтра',
|
|
21
22
|
text: 'Перезвонить завтра',
|
|
22
|
-
},
|
|
23
|
+
}, */
|
|
23
24
|
];
|
|
24
25
|
|
|
25
26
|
export const CallbackTimeField = JSX<CustomFieldProps>(({ field, input }) => (
|