@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
|
@@ -2701,7 +2701,6 @@
|
|
|
2701
2701
|
});
|
|
2702
2702
|
if (resp?.link) {
|
|
2703
2703
|
navigator.assign(resp.link);
|
|
2704
|
-
globalThis.location.href = resp.link;
|
|
2705
2704
|
}
|
|
2706
2705
|
}, []);
|
|
2707
2706
|
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" })] }));
|
|
@@ -3822,7 +3821,7 @@
|
|
|
3822
3821
|
|
|
3823
3822
|
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 ?? '') })));
|
|
3824
3823
|
|
|
3825
|
-
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 })));
|
|
3824
|
+
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 ?? '') })));
|
|
3826
3825
|
|
|
3827
3826
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3828
3827
|
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) })));
|
|
@@ -3886,7 +3885,8 @@
|
|
|
3886
3885
|
|
|
3887
3886
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3888
3887
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3889
|
-
|
|
3888
|
+
const filledByEsia = input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '');
|
|
3889
|
+
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 })] }));
|
|
3890
3890
|
});
|
|
3891
3891
|
|
|
3892
3892
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4430,7 +4430,7 @@
|
|
|
4430
4430
|
}
|
|
4431
4431
|
})();
|
|
4432
4432
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4433
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4433
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? '') }));
|
|
4434
4434
|
});
|
|
4435
4435
|
|
|
4436
4436
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4509,7 +4509,7 @@
|
|
|
4509
4509
|
const MIN_YEARS = 0;
|
|
4510
4510
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4511
4511
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4512
|
-
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 }));
|
|
4512
|
+
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 ?? '') }));
|
|
4513
4513
|
});
|
|
4514
4514
|
|
|
4515
4515
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4530,7 +4530,7 @@
|
|
|
4530
4530
|
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 }));
|
|
4531
4531
|
});
|
|
4532
4532
|
|
|
4533
|
-
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 })));
|
|
4533
|
+
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 ?? '') })));
|
|
4534
4534
|
|
|
4535
4535
|
const HousingField = JSX(({ field, input }) => {
|
|
4536
4536
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4539,9 +4539,9 @@
|
|
|
4539
4539
|
|
|
4540
4540
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4541
4541
|
|
|
4542
|
-
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 })));
|
|
4542
|
+
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 ?? '') })));
|
|
4543
4543
|
|
|
4544
|
-
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 })));
|
|
4544
|
+
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 ?? '') })));
|
|
4545
4545
|
|
|
4546
4546
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4547
4547
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4693,7 +4693,7 @@
|
|
|
4693
4693
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4694
4694
|
updateOrganizationFields(store, field, item);
|
|
4695
4695
|
}, []);
|
|
4696
|
-
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 }));
|
|
4696
|
+
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 }));
|
|
4697
4697
|
});
|
|
4698
4698
|
|
|
4699
4699
|
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 })));
|
|
@@ -4833,7 +4833,7 @@
|
|
|
4833
4833
|
|
|
4834
4834
|
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 })));
|
|
4835
4835
|
|
|
4836
|
-
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 })));
|
|
4836
|
+
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 ?? '') })));
|
|
4837
4837
|
|
|
4838
4838
|
const DELIVERY_CITIES_REF = {
|
|
4839
4839
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5346,11 +5346,11 @@
|
|
|
5346
5346
|
}, []);
|
|
5347
5347
|
|
|
5348
5348
|
const getFamilyStatusAndIncomeData = (formData) => {
|
|
5349
|
-
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription,
|
|
5349
|
+
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
5350
5350
|
return {
|
|
5351
5351
|
maritalStatusCd: familyStatus,
|
|
5352
5352
|
totalDependents: familyMembers,
|
|
5353
|
-
incomeCertificateCd:
|
|
5353
|
+
incomeCertificateCd: confirmationIncome,
|
|
5354
5354
|
otherDependents: dependents,
|
|
5355
5355
|
childrenDependents: children,
|
|
5356
5356
|
militaryStatusCd: conscription,
|
|
@@ -5896,45 +5896,12 @@
|
|
|
5896
5896
|
};
|
|
5897
5897
|
|
|
5898
5898
|
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5899
|
-
|
|
5899
|
+
checkEsiaData(esiaProfile);
|
|
5900
|
+
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5900
5901
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5901
5902
|
let files = [];
|
|
5902
|
-
if (
|
|
5903
|
-
files = await saveDocuments(
|
|
5904
|
-
{
|
|
5905
|
-
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5906
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5907
|
-
isPDF: true,
|
|
5908
|
-
},
|
|
5909
|
-
{
|
|
5910
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5911
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5912
|
-
isPDF: true,
|
|
5913
|
-
},
|
|
5914
|
-
{
|
|
5915
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5916
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5917
|
-
isPDF: true,
|
|
5918
|
-
},
|
|
5919
|
-
{
|
|
5920
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5921
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5922
|
-
isPDF: false,
|
|
5923
|
-
},
|
|
5924
|
-
{
|
|
5925
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5926
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5927
|
-
isPDF: false,
|
|
5928
|
-
},
|
|
5929
|
-
{
|
|
5930
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5931
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5932
|
-
isPDF: false,
|
|
5933
|
-
},
|
|
5934
|
-
//TODO: После тестирования добавить документы снизу
|
|
5935
|
-
// {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
|
|
5936
|
-
// {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
|
|
5937
|
-
]);
|
|
5903
|
+
if (isFullEsiaData) {
|
|
5904
|
+
files = await saveDocuments(esiaAdditionalDocument);
|
|
5938
5905
|
}
|
|
5939
5906
|
const mainData = {
|
|
5940
5907
|
name: profile.name,
|
|
@@ -5951,11 +5918,11 @@
|
|
|
5951
5918
|
birthPlace: addInfo.birthPlace,
|
|
5952
5919
|
addressRegistration: buildAddress(addressRegistration),
|
|
5953
5920
|
addressFact: buildAddress(addressFact),
|
|
5954
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5921
|
+
esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
|
|
5955
5922
|
};
|
|
5956
5923
|
return {
|
|
5957
5924
|
...mainData,
|
|
5958
|
-
...(
|
|
5925
|
+
...(isFullEsiaData && {
|
|
5959
5926
|
snils: addInfo.snils,
|
|
5960
5927
|
inn: esiaAdditionalDocument.inn,
|
|
5961
5928
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5964,6 +5931,9 @@
|
|
|
5964
5931
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5965
5932
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5966
5933
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5934
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5935
|
+
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5936
|
+
employment: { key: 'WORK', text: 'Работаю' },
|
|
5967
5937
|
files,
|
|
5968
5938
|
}),
|
|
5969
5939
|
};
|
|
@@ -5996,8 +5966,50 @@
|
|
|
5996
5966
|
};
|
|
5997
5967
|
};
|
|
5998
5968
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5999
|
-
const saveDocuments = async (
|
|
5969
|
+
const saveDocuments = async (esiaAdditionalDocument) => {
|
|
6000
5970
|
const files = [];
|
|
5971
|
+
const documents = [
|
|
5972
|
+
{
|
|
5973
|
+
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5974
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5975
|
+
isPDF: true,
|
|
5976
|
+
},
|
|
5977
|
+
{
|
|
5978
|
+
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5979
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5980
|
+
isPDF: true,
|
|
5981
|
+
},
|
|
5982
|
+
{
|
|
5983
|
+
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5984
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5985
|
+
isPDF: true,
|
|
5986
|
+
},
|
|
5987
|
+
{
|
|
5988
|
+
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5989
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5990
|
+
isPDF: false,
|
|
5991
|
+
},
|
|
5992
|
+
{
|
|
5993
|
+
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5994
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5995
|
+
isPDF: false,
|
|
5996
|
+
},
|
|
5997
|
+
{
|
|
5998
|
+
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5999
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
6000
|
+
isPDF: false,
|
|
6001
|
+
},
|
|
6002
|
+
{
|
|
6003
|
+
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6004
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
6005
|
+
isPDF: true,
|
|
6006
|
+
},
|
|
6007
|
+
{
|
|
6008
|
+
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6009
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
6010
|
+
isPDF: false,
|
|
6011
|
+
},
|
|
6012
|
+
];
|
|
6001
6013
|
for (const doc of documents) {
|
|
6002
6014
|
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6003
6015
|
await fetch(`${contentType},${doc.file}`)
|
|
@@ -6007,15 +6019,14 @@
|
|
|
6007
6019
|
}
|
|
6008
6020
|
return files;
|
|
6009
6021
|
};
|
|
6010
|
-
const
|
|
6011
|
-
const { profile, document, addressRegistration
|
|
6022
|
+
const checkEsiaData = (esiaProfile) => {
|
|
6023
|
+
const { profile, document, addressRegistration } = esiaProfile;
|
|
6012
6024
|
const data = [
|
|
6013
6025
|
profile.name,
|
|
6014
6026
|
profile.surname,
|
|
6015
6027
|
profile.midname,
|
|
6016
6028
|
profile.birthDate,
|
|
6017
6029
|
profile.phone,
|
|
6018
|
-
profile.email,
|
|
6019
6030
|
document.dulIssueDate,
|
|
6020
6031
|
document.dulIssuedBy,
|
|
6021
6032
|
document.dulNumber,
|
|
@@ -6023,6 +6034,14 @@
|
|
|
6023
6034
|
document.dulSubdivisionCode,
|
|
6024
6035
|
addressRegistration,
|
|
6025
6036
|
profile.esiaAccountType,
|
|
6037
|
+
];
|
|
6038
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6039
|
+
throw new Error();
|
|
6040
|
+
}
|
|
6041
|
+
};
|
|
6042
|
+
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6043
|
+
const { esiaAdditionalDocument } = esiaProfile;
|
|
6044
|
+
const data = [
|
|
6026
6045
|
esiaAdditionalDocument.inn,
|
|
6027
6046
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6028
6047
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6036,43 +6055,18 @@
|
|
|
6036
6055
|
esiaAdditionalDocument.xmlFilePayout,
|
|
6037
6056
|
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6038
6057
|
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
// esiaAdditionalDocument.xmlFileSigWorkbook
|
|
6058
|
+
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6059
|
+
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6042
6060
|
];
|
|
6043
|
-
|
|
6044
|
-
throw new Error();
|
|
6045
|
-
}
|
|
6046
|
-
};
|
|
6047
|
-
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6048
|
-
const { profile, document, addressRegistration } = esiaProfile;
|
|
6049
|
-
const data = [
|
|
6050
|
-
profile.name,
|
|
6051
|
-
profile.surname,
|
|
6052
|
-
profile.midname,
|
|
6053
|
-
profile.birthDate,
|
|
6054
|
-
profile.phone,
|
|
6055
|
-
profile.email,
|
|
6056
|
-
document.dulIssueDate,
|
|
6057
|
-
document.dulIssuedBy,
|
|
6058
|
-
document.dulNumber,
|
|
6059
|
-
document.dulSerie,
|
|
6060
|
-
document.dulSubdivisionCode,
|
|
6061
|
-
addressRegistration,
|
|
6062
|
-
profile.esiaAccountType,
|
|
6063
|
-
];
|
|
6064
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6065
|
-
throw new Error();
|
|
6066
|
-
}
|
|
6061
|
+
return data.every((_) => Boolean(_));
|
|
6067
6062
|
};
|
|
6068
6063
|
|
|
6069
|
-
const useInitApplicationLead = ({ inputs, productType,
|
|
6070
|
-
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6064
|
+
const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
|
|
6071
6065
|
const leadFormStore = useLeadFormStore();
|
|
6072
6066
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6073
6067
|
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
|
|
6074
6068
|
const requestEsiaProfile = useCallback(async (code, state) => {
|
|
6075
|
-
|
|
6069
|
+
setEsiaStatus(EsiaStatuses.Pending);
|
|
6076
6070
|
try {
|
|
6077
6071
|
const data = await esiaRequestProfile({
|
|
6078
6072
|
code,
|
|
@@ -6086,14 +6080,11 @@
|
|
|
6086
6080
|
..._,
|
|
6087
6081
|
...parsedData,
|
|
6088
6082
|
}));
|
|
6089
|
-
|
|
6083
|
+
setEsiaStatus(EsiaStatuses.Success);
|
|
6090
6084
|
}
|
|
6091
6085
|
}
|
|
6092
6086
|
catch {
|
|
6093
|
-
|
|
6094
|
-
}
|
|
6095
|
-
finally {
|
|
6096
|
-
endLoading();
|
|
6087
|
+
setEsiaStatus(EsiaStatuses.Error);
|
|
6097
6088
|
}
|
|
6098
6089
|
}, []);
|
|
6099
6090
|
useEffect(() => {
|
|
@@ -6109,28 +6100,32 @@
|
|
|
6109
6100
|
sessionStorage.removeItem('refreshToken');
|
|
6110
6101
|
}
|
|
6111
6102
|
}, []);
|
|
6112
|
-
return
|
|
6103
|
+
return initialFormState;
|
|
6113
6104
|
};
|
|
6114
6105
|
|
|
6106
|
+
var EsiaStatuses;
|
|
6107
|
+
(function (EsiaStatuses) {
|
|
6108
|
+
EsiaStatuses["Success"] = "SUCCESS";
|
|
6109
|
+
EsiaStatuses["Error"] = "ERROR";
|
|
6110
|
+
EsiaStatuses["Pending"] = "PENDING";
|
|
6111
|
+
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6115
6112
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6116
|
-
const [
|
|
6117
|
-
const
|
|
6113
|
+
const [esiaStatus, setEsiaStatus] = useState();
|
|
6114
|
+
const leadForm = useRef(null);
|
|
6118
6115
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6119
6116
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6120
6117
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
6121
|
-
const
|
|
6118
|
+
const initialFormState = useInitApplicationLead({
|
|
6122
6119
|
inputs,
|
|
6123
6120
|
nextStepLink,
|
|
6124
6121
|
productType,
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
esiaAuthSuccess,
|
|
6122
|
+
setEsiaStatus,
|
|
6123
|
+
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6128
6124
|
});
|
|
6129
6125
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6130
6126
|
programId,
|
|
6131
6127
|
nextStepLink,
|
|
6132
6128
|
productType,
|
|
6133
|
-
esiaAuthSuccess,
|
|
6134
6129
|
data,
|
|
6135
6130
|
});
|
|
6136
6131
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, {
|
|
@@ -6144,11 +6139,16 @@
|
|
|
6144
6139
|
}
|
|
6145
6140
|
}, [ok]);
|
|
6146
6141
|
useEffect(() => {
|
|
6147
|
-
if (
|
|
6142
|
+
if (esiaStatus && leadForm?.current) {
|
|
6143
|
+
leadForm.current.scrollIntoView({
|
|
6144
|
+
block: 'start',
|
|
6145
|
+
});
|
|
6146
|
+
}
|
|
6147
|
+
if (esiaStatus === EsiaStatuses.Success) {
|
|
6148
6148
|
reset();
|
|
6149
6149
|
}
|
|
6150
|
-
}, [
|
|
6151
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!
|
|
6150
|
+
}, [leadForm?.current, esiaStatus]);
|
|
6151
|
+
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] })] }));
|
|
6152
6152
|
});
|
|
6153
6153
|
|
|
6154
6154
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -8232,7 +8232,7 @@
|
|
|
8232
8232
|
label: 'Телефон работодателя',
|
|
8233
8233
|
required: true,
|
|
8234
8234
|
},
|
|
8235
|
-
{ name: 'beginDate', required: true },
|
|
8235
|
+
{ name: 'beginDate', required: true, filledByEsia: true },
|
|
8236
8236
|
],
|
|
8237
8237
|
},
|
|
8238
8238
|
{
|
|
@@ -8274,23 +8274,20 @@
|
|
|
8274
8274
|
title: 'Совокупный доход',
|
|
8275
8275
|
},
|
|
8276
8276
|
{
|
|
8277
|
+
columns: 1,
|
|
8277
8278
|
inputs: [
|
|
8278
8279
|
{
|
|
8279
|
-
name: '
|
|
8280
|
-
|
|
8280
|
+
name: 'confirmationIncome',
|
|
8281
|
+
required: true,
|
|
8282
|
+
filledByEsia: true,
|
|
8281
8283
|
},
|
|
8282
8284
|
],
|
|
8283
8285
|
},
|
|
8284
8286
|
{
|
|
8285
|
-
columns: 1,
|
|
8286
8287
|
inputs: [
|
|
8287
8288
|
{
|
|
8288
|
-
name: '
|
|
8289
|
-
|
|
8290
|
-
condition: {
|
|
8291
|
-
name: 'esiaAccountTypeCd',
|
|
8292
|
-
values: [''],
|
|
8293
|
-
},
|
|
8289
|
+
name: 'infoCard',
|
|
8290
|
+
label: 'Сумма основного и дополнительных доходов после вычета налога',
|
|
8294
8291
|
},
|
|
8295
8292
|
],
|
|
8296
8293
|
},
|
|
@@ -10884,7 +10881,7 @@
|
|
|
10884
10881
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10885
10882
|
});
|
|
10886
10883
|
|
|
10887
|
-
const packageVersion = "0.14.
|
|
10884
|
+
const packageVersion = "0.14.817";
|
|
10888
10885
|
|
|
10889
10886
|
exports.Blocks = Blocks;
|
|
10890
10887
|
exports.ContentPage = ContentPage;
|