@redneckz/wildless-cms-uni-blocks 0.14.817 → 0.14.818
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 +109 -112
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +0 -1
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -5
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +20 -12
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +65 -70
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -5
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +6 -10
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/dist/retail/components/Fields/BeginDateField.js +2 -1
- package/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/dist/retail/components/Fields/ConfirmationIncomeField.js +4 -1
- package/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/dist/retail/components/Fields/DaDataInnField.js +2 -1
- package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/dist/retail/components/Fields/Experience5YearsField.js +2 -1
- package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
- package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/dist/retail/components/Fields/JobsNumberField.js +2 -1
- package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
- package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/dist/retail/components/Fields/OrganizationNameField.js +2 -1
- package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/dist/retail/components/Fields/WagesField.js +2 -1
- package/dist/retail/components/Fields/WagesField.js.map +1 -1
- package/dist/retail/content.js +7 -10
- package/dist/retail/content.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +20 -12
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +65 -70
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +0 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -5
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +6 -10
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/lib/retail/components/Fields/BeginDateField.js +2 -1
- package/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/lib/retail/components/Fields/ConfirmationIncomeField.js +5 -2
- package/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/lib/retail/components/Fields/DaDataInnField.js +2 -1
- package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/lib/retail/components/Fields/Experience5YearsField.js +2 -1
- package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
- package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/lib/retail/components/Fields/JobsNumberField.js +2 -1
- package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
- package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/lib/retail/components/Fields/OrganizationNameField.js +2 -1
- package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/lib/retail/components/Fields/WagesField.js +2 -1
- package/lib/retail/components/Fields/WagesField.js.map +1 -1
- package/lib/retail/content.js +7 -10
- package/lib/retail/content.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +109 -112
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -5
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +20 -12
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +65 -70
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -5
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +6 -10
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/dist/retail/components/Fields/BeginDateField.js +2 -1
- package/mobile/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js +4 -1
- package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/DaDataInnField.js +2 -1
- package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/Experience5YearsField.js +2 -1
- package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
- package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/JobsNumberField.js +2 -1
- package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
- package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/OrganizationNameField.js +2 -1
- package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/WagesField.js +2 -1
- package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
- package/mobile/dist/retail/content.js +7 -10
- package/mobile/dist/retail/content.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +20 -12
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +65 -70
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +0 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -5
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +6 -10
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/lib/retail/components/Fields/BeginDateField.js +2 -1
- package/mobile/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js +5 -2
- package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/DaDataInnField.js +2 -1
- package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/Experience5YearsField.js +2 -1
- package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
- package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/JobsNumberField.js +2 -1
- package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
- package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/OrganizationNameField.js +2 -1
- package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/WagesField.js +2 -1
- package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
- package/mobile/lib/retail/content.js +7 -10
- package/mobile/lib/retail/content.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +24 -15
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +0 -1
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +71 -80
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +0 -1
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -14
- package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -2
- package/mobile/src/retail/components/Fields/BeginDateField.tsx +2 -0
- package/mobile/src/retail/components/Fields/ConfirmationIncomeField.tsx +18 -7
- package/mobile/src/retail/components/Fields/DaDataInnField.tsx +2 -0
- package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
- package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
- package/mobile/src/retail/components/Fields/JobsNumberField.tsx +2 -0
- package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
- package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
- package/mobile/src/retail/components/Fields/WagesField.tsx +2 -0
- package/mobile/src/retail/content.tsx +7 -10
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +24 -15
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +0 -1
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +71 -80
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +0 -1
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -14
- package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -2
- package/src/retail/components/Fields/BeginDateField.tsx +2 -0
- package/src/retail/components/Fields/ConfirmationIncomeField.tsx +18 -7
- package/src/retail/components/Fields/DaDataInnField.tsx +2 -0
- package/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
- package/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
- package/src/retail/components/Fields/JobsNumberField.tsx +2 -0
- package/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
- package/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
- package/src/retail/components/Fields/WagesField.tsx +2 -0
- package/src/retail/content.tsx +7 -10
package/bundle/bundle.umd.js
CHANGED
|
@@ -2693,7 +2693,6 @@
|
|
|
2693
2693
|
});
|
|
2694
2694
|
if (resp?.link) {
|
|
2695
2695
|
navigator.assign(resp.link);
|
|
2696
|
-
globalThis.location.href = resp.link;
|
|
2697
2696
|
}
|
|
2698
2697
|
}, []);
|
|
2699
2698
|
return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray px-4 py-6 @md:p-9", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-4 text-xl @md:text-2xl @md:mb-6", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-9", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-6 self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
|
|
@@ -3814,7 +3813,7 @@
|
|
|
3814
3813
|
|
|
3815
3814
|
const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
|
|
3816
3815
|
|
|
3817
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input })));
|
|
3816
|
+
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') })));
|
|
3818
3817
|
|
|
3819
3818
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3820
3819
|
const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$2) })));
|
|
@@ -3878,7 +3877,8 @@
|
|
|
3878
3877
|
|
|
3879
3878
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3880
3879
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3881
|
-
|
|
3880
|
+
const filledByEsia = input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '');
|
|
3881
|
+
return (jsxs("div", { children: [filledByEsia ? (jsx("div", { className: "mb-6", children: jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }) })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
|
|
3882
3882
|
});
|
|
3883
3883
|
|
|
3884
3884
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4422,7 +4422,7 @@
|
|
|
4422
4422
|
}
|
|
4423
4423
|
})();
|
|
4424
4424
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4425
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4425
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') }));
|
|
4426
4426
|
});
|
|
4427
4427
|
|
|
4428
4428
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4501,7 +4501,7 @@
|
|
|
4501
4501
|
const MIN_YEARS = 0;
|
|
4502
4502
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4503
4503
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4504
|
-
return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
4504
|
+
return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') }));
|
|
4505
4505
|
});
|
|
4506
4506
|
|
|
4507
4507
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4522,7 +4522,7 @@
|
|
|
4522
4522
|
return (jsx(SelectField, { field: field, source: familyStatus, label: "\u0421\u0435\u043C\u0435\u0439\u043D\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", fieldName: "familyStatus", input: input }));
|
|
4523
4523
|
});
|
|
4524
4524
|
|
|
4525
|
-
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input })));
|
|
4525
|
+
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') })));
|
|
4526
4526
|
|
|
4527
4527
|
const HousingField = JSX(({ field, input }) => {
|
|
4528
4528
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4531,9 +4531,9 @@
|
|
|
4531
4531
|
|
|
4532
4532
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4533
4533
|
|
|
4534
|
-
const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input })));
|
|
4534
|
+
const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') })));
|
|
4535
4535
|
|
|
4536
|
-
const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input })));
|
|
4536
|
+
const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') })));
|
|
4537
4537
|
|
|
4538
4538
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4539
4539
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4685,7 +4685,7 @@
|
|
|
4685
4685
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4686
4686
|
updateOrganizationFields(store, field, item);
|
|
4687
4687
|
}, []);
|
|
4688
|
-
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4688
|
+
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4689
4689
|
});
|
|
4690
4690
|
|
|
4691
4691
|
const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
@@ -4825,7 +4825,7 @@
|
|
|
4825
4825
|
|
|
4826
4826
|
const TotalIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4827
4827
|
|
|
4828
|
-
const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4828
|
+
const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') })));
|
|
4829
4829
|
|
|
4830
4830
|
const DELIVERY_CITIES_REF = {
|
|
4831
4831
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5338,11 +5338,11 @@
|
|
|
5338
5338
|
}, []);
|
|
5339
5339
|
|
|
5340
5340
|
const getFamilyStatusAndIncomeData = (formData) => {
|
|
5341
|
-
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription,
|
|
5341
|
+
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
5342
5342
|
return {
|
|
5343
5343
|
maritalStatusCd: familyStatus,
|
|
5344
5344
|
totalDependents: familyMembers,
|
|
5345
|
-
incomeCertificateCd:
|
|
5345
|
+
incomeCertificateCd: confirmationIncome,
|
|
5346
5346
|
otherDependents: dependents,
|
|
5347
5347
|
childrenDependents: children,
|
|
5348
5348
|
militaryStatusCd: conscription,
|
|
@@ -5888,45 +5888,12 @@
|
|
|
5888
5888
|
};
|
|
5889
5889
|
|
|
5890
5890
|
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5891
|
-
|
|
5891
|
+
checkEsiaData(esiaProfile);
|
|
5892
|
+
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5892
5893
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5893
5894
|
let files = [];
|
|
5894
|
-
if (
|
|
5895
|
-
files = await saveDocuments(
|
|
5896
|
-
{
|
|
5897
|
-
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5898
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5899
|
-
isPDF: true,
|
|
5900
|
-
},
|
|
5901
|
-
{
|
|
5902
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5903
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5904
|
-
isPDF: true,
|
|
5905
|
-
},
|
|
5906
|
-
{
|
|
5907
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5908
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5909
|
-
isPDF: true,
|
|
5910
|
-
},
|
|
5911
|
-
{
|
|
5912
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5913
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5914
|
-
isPDF: false,
|
|
5915
|
-
},
|
|
5916
|
-
{
|
|
5917
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5918
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5919
|
-
isPDF: false,
|
|
5920
|
-
},
|
|
5921
|
-
{
|
|
5922
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5923
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5924
|
-
isPDF: false,
|
|
5925
|
-
},
|
|
5926
|
-
//TODO: После тестирования добавить документы снизу
|
|
5927
|
-
// {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
|
|
5928
|
-
// {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
|
|
5929
|
-
]);
|
|
5895
|
+
if (isFullEsiaData) {
|
|
5896
|
+
files = await saveDocuments(esiaAdditionalDocument);
|
|
5930
5897
|
}
|
|
5931
5898
|
const mainData = {
|
|
5932
5899
|
name: profile.name,
|
|
@@ -5943,11 +5910,11 @@
|
|
|
5943
5910
|
birthPlace: addInfo.birthPlace,
|
|
5944
5911
|
addressRegistration: buildAddress(addressRegistration),
|
|
5945
5912
|
addressFact: buildAddress(addressFact),
|
|
5946
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5913
|
+
esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
|
|
5947
5914
|
};
|
|
5948
5915
|
return {
|
|
5949
5916
|
...mainData,
|
|
5950
|
-
...(
|
|
5917
|
+
...(isFullEsiaData && {
|
|
5951
5918
|
snils: addInfo.snils,
|
|
5952
5919
|
inn: esiaAdditionalDocument.inn,
|
|
5953
5920
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5956,6 +5923,9 @@
|
|
|
5956
5923
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5957
5924
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5958
5925
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5926
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5927
|
+
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5928
|
+
employment: { key: 'WORK', text: 'Работаю' },
|
|
5959
5929
|
files,
|
|
5960
5930
|
}),
|
|
5961
5931
|
};
|
|
@@ -5988,8 +5958,50 @@
|
|
|
5988
5958
|
};
|
|
5989
5959
|
};
|
|
5990
5960
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5991
|
-
const saveDocuments = async (
|
|
5961
|
+
const saveDocuments = async (esiaAdditionalDocument) => {
|
|
5992
5962
|
const files = [];
|
|
5963
|
+
const documents = [
|
|
5964
|
+
{
|
|
5965
|
+
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5966
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5967
|
+
isPDF: true,
|
|
5968
|
+
},
|
|
5969
|
+
{
|
|
5970
|
+
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5971
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5972
|
+
isPDF: true,
|
|
5973
|
+
},
|
|
5974
|
+
{
|
|
5975
|
+
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5976
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5977
|
+
isPDF: true,
|
|
5978
|
+
},
|
|
5979
|
+
{
|
|
5980
|
+
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5981
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5982
|
+
isPDF: false,
|
|
5983
|
+
},
|
|
5984
|
+
{
|
|
5985
|
+
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5986
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5987
|
+
isPDF: false,
|
|
5988
|
+
},
|
|
5989
|
+
{
|
|
5990
|
+
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5991
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5992
|
+
isPDF: false,
|
|
5993
|
+
},
|
|
5994
|
+
{
|
|
5995
|
+
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
5996
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5997
|
+
isPDF: true,
|
|
5998
|
+
},
|
|
5999
|
+
{
|
|
6000
|
+
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6001
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
6002
|
+
isPDF: false,
|
|
6003
|
+
},
|
|
6004
|
+
];
|
|
5993
6005
|
for (const doc of documents) {
|
|
5994
6006
|
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
5995
6007
|
await fetch(`${contentType},${doc.file}`)
|
|
@@ -5999,15 +6011,14 @@
|
|
|
5999
6011
|
}
|
|
6000
6012
|
return files;
|
|
6001
6013
|
};
|
|
6002
|
-
const
|
|
6003
|
-
const { profile, document, addressRegistration
|
|
6014
|
+
const checkEsiaData = (esiaProfile) => {
|
|
6015
|
+
const { profile, document, addressRegistration } = esiaProfile;
|
|
6004
6016
|
const data = [
|
|
6005
6017
|
profile.name,
|
|
6006
6018
|
profile.surname,
|
|
6007
6019
|
profile.midname,
|
|
6008
6020
|
profile.birthDate,
|
|
6009
6021
|
profile.phone,
|
|
6010
|
-
profile.email,
|
|
6011
6022
|
document.dulIssueDate,
|
|
6012
6023
|
document.dulIssuedBy,
|
|
6013
6024
|
document.dulNumber,
|
|
@@ -6015,6 +6026,14 @@
|
|
|
6015
6026
|
document.dulSubdivisionCode,
|
|
6016
6027
|
addressRegistration,
|
|
6017
6028
|
profile.esiaAccountType,
|
|
6029
|
+
];
|
|
6030
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6031
|
+
throw new Error();
|
|
6032
|
+
}
|
|
6033
|
+
};
|
|
6034
|
+
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6035
|
+
const { esiaAdditionalDocument } = esiaProfile;
|
|
6036
|
+
const data = [
|
|
6018
6037
|
esiaAdditionalDocument.inn,
|
|
6019
6038
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6020
6039
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6028,43 +6047,18 @@
|
|
|
6028
6047
|
esiaAdditionalDocument.xmlFilePayout,
|
|
6029
6048
|
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6030
6049
|
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
// esiaAdditionalDocument.xmlFileSigWorkbook
|
|
6050
|
+
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6051
|
+
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6034
6052
|
];
|
|
6035
|
-
|
|
6036
|
-
throw new Error();
|
|
6037
|
-
}
|
|
6038
|
-
};
|
|
6039
|
-
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6040
|
-
const { profile, document, addressRegistration } = esiaProfile;
|
|
6041
|
-
const data = [
|
|
6042
|
-
profile.name,
|
|
6043
|
-
profile.surname,
|
|
6044
|
-
profile.midname,
|
|
6045
|
-
profile.birthDate,
|
|
6046
|
-
profile.phone,
|
|
6047
|
-
profile.email,
|
|
6048
|
-
document.dulIssueDate,
|
|
6049
|
-
document.dulIssuedBy,
|
|
6050
|
-
document.dulNumber,
|
|
6051
|
-
document.dulSerie,
|
|
6052
|
-
document.dulSubdivisionCode,
|
|
6053
|
-
addressRegistration,
|
|
6054
|
-
profile.esiaAccountType,
|
|
6055
|
-
];
|
|
6056
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6057
|
-
throw new Error();
|
|
6058
|
-
}
|
|
6053
|
+
return data.every((_) => Boolean(_));
|
|
6059
6054
|
};
|
|
6060
6055
|
|
|
6061
|
-
const useInitApplicationLead = ({ inputs, productType,
|
|
6062
|
-
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6056
|
+
const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
|
|
6063
6057
|
const leadFormStore = useLeadFormStore();
|
|
6064
6058
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6065
6059
|
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
|
|
6066
6060
|
const requestEsiaProfile = useCallback(async (code, state) => {
|
|
6067
|
-
|
|
6061
|
+
setEsiaStatus(EsiaStatuses.Pending);
|
|
6068
6062
|
try {
|
|
6069
6063
|
const data = await esiaRequestProfile({
|
|
6070
6064
|
code,
|
|
@@ -6078,14 +6072,11 @@
|
|
|
6078
6072
|
..._,
|
|
6079
6073
|
...parsedData,
|
|
6080
6074
|
}));
|
|
6081
|
-
|
|
6075
|
+
setEsiaStatus(EsiaStatuses.Success);
|
|
6082
6076
|
}
|
|
6083
6077
|
}
|
|
6084
6078
|
catch {
|
|
6085
|
-
|
|
6086
|
-
}
|
|
6087
|
-
finally {
|
|
6088
|
-
endLoading();
|
|
6079
|
+
setEsiaStatus(EsiaStatuses.Error);
|
|
6089
6080
|
}
|
|
6090
6081
|
}, []);
|
|
6091
6082
|
useEffect(() => {
|
|
@@ -6101,28 +6092,32 @@
|
|
|
6101
6092
|
sessionStorage.removeItem('refreshToken');
|
|
6102
6093
|
}
|
|
6103
6094
|
}, []);
|
|
6104
|
-
return
|
|
6095
|
+
return initialFormState;
|
|
6105
6096
|
};
|
|
6106
6097
|
|
|
6098
|
+
var EsiaStatuses;
|
|
6099
|
+
(function (EsiaStatuses) {
|
|
6100
|
+
EsiaStatuses["Success"] = "SUCCESS";
|
|
6101
|
+
EsiaStatuses["Error"] = "ERROR";
|
|
6102
|
+
EsiaStatuses["Pending"] = "PENDING";
|
|
6103
|
+
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6107
6104
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6108
|
-
const [
|
|
6109
|
-
const
|
|
6105
|
+
const [esiaStatus, setEsiaStatus] = useState();
|
|
6106
|
+
const leadForm = useRef(null);
|
|
6110
6107
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6111
6108
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6112
6109
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
6113
|
-
const
|
|
6110
|
+
const initialFormState = useInitApplicationLead({
|
|
6114
6111
|
inputs,
|
|
6115
6112
|
nextStepLink,
|
|
6116
6113
|
productType,
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
esiaAuthSuccess,
|
|
6114
|
+
setEsiaStatus,
|
|
6115
|
+
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6120
6116
|
});
|
|
6121
6117
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6122
6118
|
programId,
|
|
6123
6119
|
nextStepLink,
|
|
6124
6120
|
productType,
|
|
6125
|
-
esiaAuthSuccess,
|
|
6126
6121
|
data,
|
|
6127
6122
|
});
|
|
6128
6123
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, {
|
|
@@ -6136,11 +6131,16 @@
|
|
|
6136
6131
|
}
|
|
6137
6132
|
}, [ok]);
|
|
6138
6133
|
useEffect(() => {
|
|
6139
|
-
if (
|
|
6134
|
+
if (esiaStatus && leadForm?.current) {
|
|
6135
|
+
leadForm.current.scrollIntoView({
|
|
6136
|
+
block: 'start',
|
|
6137
|
+
});
|
|
6138
|
+
}
|
|
6139
|
+
if (esiaStatus === EsiaStatuses.Success) {
|
|
6140
6140
|
reset();
|
|
6141
6141
|
}
|
|
6142
|
-
}, [
|
|
6143
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!
|
|
6142
|
+
}, [leadForm?.current, esiaStatus]);
|
|
6143
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6144
6144
|
});
|
|
6145
6145
|
|
|
6146
6146
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -8240,7 +8240,7 @@
|
|
|
8240
8240
|
label: 'Телефон работодателя',
|
|
8241
8241
|
required: true,
|
|
8242
8242
|
},
|
|
8243
|
-
{ name: 'beginDate', required: true },
|
|
8243
|
+
{ name: 'beginDate', required: true, filledByEsia: true },
|
|
8244
8244
|
],
|
|
8245
8245
|
},
|
|
8246
8246
|
{
|
|
@@ -8282,23 +8282,20 @@
|
|
|
8282
8282
|
title: 'Совокупный доход',
|
|
8283
8283
|
},
|
|
8284
8284
|
{
|
|
8285
|
+
columns: 1,
|
|
8285
8286
|
inputs: [
|
|
8286
8287
|
{
|
|
8287
|
-
name: '
|
|
8288
|
-
|
|
8288
|
+
name: 'confirmationIncome',
|
|
8289
|
+
required: true,
|
|
8290
|
+
filledByEsia: true,
|
|
8289
8291
|
},
|
|
8290
8292
|
],
|
|
8291
8293
|
},
|
|
8292
8294
|
{
|
|
8293
|
-
columns: 1,
|
|
8294
8295
|
inputs: [
|
|
8295
8296
|
{
|
|
8296
|
-
name: '
|
|
8297
|
-
|
|
8298
|
-
condition: {
|
|
8299
|
-
name: 'esiaAccountTypeCd',
|
|
8300
|
-
values: [''],
|
|
8301
|
-
},
|
|
8297
|
+
name: 'infoCard',
|
|
8298
|
+
label: 'Сумма основного и дополнительных доходов после вычета налога',
|
|
8302
8299
|
},
|
|
8303
8300
|
],
|
|
8304
8301
|
},
|
|
@@ -11591,7 +11588,7 @@
|
|
|
11591
11588
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11592
11589
|
});
|
|
11593
11590
|
|
|
11594
|
-
const packageVersion = "0.14.
|
|
11591
|
+
const packageVersion = "0.14.817";
|
|
11595
11592
|
|
|
11596
11593
|
exports.Blocks = Blocks;
|
|
11597
11594
|
exports.ContentPage = ContentPage;
|