@redneckz/wildless-cms-uni-blocks 0.14.824 → 0.14.825
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 +198 -229
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
- package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +1 -0
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
- package/bundle/retail/api/checkCode.d.ts +0 -1
- package/{dist/retail/api/esiaRequestProfile.d.ts → bundle/retail/api/updateProfileEsia.d.ts} +4 -11
- package/bundle/retail/api/updateUserTask.d.ts +0 -1
- package/bundle/retail/api/uploadFile.d.ts +1 -1
- package/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -0
- package/bundle/retail/model/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -26
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/applicationFormData.js +31 -6
- package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -8
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +53 -83
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +22 -12
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +24 -16
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/retail/api/checkCode.d.ts +0 -1
- package/dist/retail/api/checkCode.js +2 -3
- package/dist/retail/api/checkCode.js.map +1 -1
- package/{bundle/retail/api/esiaRequestProfile.d.ts → dist/retail/api/updateProfileEsia.d.ts} +4 -11
- package/dist/retail/api/updateProfileEsia.js +6 -0
- package/dist/retail/api/updateProfileEsia.js.map +1 -0
- package/dist/retail/api/updateUserTask.d.ts +0 -1
- package/dist/retail/api/updateUserTask.js.map +1 -1
- package/dist/retail/api/uploadFile.d.ts +1 -1
- package/dist/retail/api/uploadFile.js +3 -2
- package/dist/retail/api/uploadFile.js.map +1 -1
- package/dist/retail/components/DraftDialog/parseDraftTask.js +1 -2
- package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +34 -0
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -0
- package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +15 -0
- package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- package/dist/retail/components/Fields/BeginDateField.js +1 -2
- package/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/dist/retail/components/Fields/ConfirmationIncomeField.js +1 -4
- package/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/dist/retail/components/Fields/DaDataInnField.js +1 -2
- package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/dist/retail/components/Fields/Experience5YearsField.js +1 -2
- package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/dist/retail/components/Fields/GeneralSeniorityField.js +1 -2
- package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/dist/retail/components/Fields/JobsNumberField.js +1 -2
- package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/dist/retail/components/Fields/LastJobExperienceField.js +1 -2
- package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/dist/retail/components/Fields/OrganizationNameField.js +1 -2
- package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/dist/retail/components/Fields/WagesField.js +1 -2
- package/dist/retail/components/Fields/WagesField.js.map +1 -1
- package/dist/retail/content.js +5 -11
- package/dist/retail/content.js.map +1 -1
- package/dist/retail/model/NameFieldDef.d.ts +1 -1
- package/dist/retail/utils/mainFormStateMap.js +0 -1
- package/dist/retail/utils/mainFormStateMap.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PhoneField.js +1 -2
- package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/dist/ui-kit/FormField/shouldRenderField.js +1 -1
- package/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -26
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/applicationFormData.js +30 -5
- package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -8
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +53 -83
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +22 -12
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +24 -16
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/retail/api/checkCode.d.ts +0 -1
- package/lib/retail/api/checkCode.js +1 -1
- package/lib/retail/api/checkCode.js.map +1 -1
- package/lib/retail/api/{esiaRequestProfile.d.ts → updateProfileEsia.d.ts} +4 -11
- package/lib/retail/api/updateProfileEsia.js +3 -0
- package/lib/retail/api/updateProfileEsia.js.map +1 -0
- package/lib/retail/api/updateUserTask.d.ts +0 -1
- package/lib/retail/api/updateUserTask.js.map +1 -1
- package/lib/retail/api/uploadFile.d.ts +1 -1
- package/lib/retail/api/uploadFile.js +3 -2
- package/lib/retail/api/uploadFile.js.map +1 -1
- package/lib/retail/components/DraftDialog/parseDraftTask.js +1 -2
- package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts +5 -0
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +32 -0
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -0
- package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +12 -0
- package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- package/lib/retail/components/Fields/BeginDateField.js +1 -2
- package/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/lib/retail/components/Fields/ConfirmationIncomeField.js +2 -5
- package/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/lib/retail/components/Fields/DaDataInnField.js +1 -2
- package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/lib/retail/components/Fields/Experience5YearsField.js +1 -2
- package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/lib/retail/components/Fields/GeneralSeniorityField.js +1 -2
- package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/lib/retail/components/Fields/JobsNumberField.js +1 -2
- package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/lib/retail/components/Fields/LastJobExperienceField.js +1 -2
- package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/lib/retail/components/Fields/OrganizationNameField.js +1 -2
- package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/lib/retail/components/Fields/WagesField.js +1 -2
- package/lib/retail/components/Fields/WagesField.js.map +1 -1
- package/lib/retail/content.js +5 -11
- package/lib/retail/content.js.map +1 -1
- package/lib/retail/model/NameFieldDef.d.ts +1 -1
- package/lib/retail/utils/mainFormStateMap.js +0 -1
- package/lib/retail/utils/mainFormStateMap.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PhoneField.js +1 -2
- package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/lib/ui-kit/FormField/shouldRenderField.js +1 -1
- package/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +198 -229
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
- package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +1 -0
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
- package/mobile/bundle/retail/api/checkCode.d.ts +0 -1
- package/mobile/bundle/retail/api/{esiaRequestProfile.d.ts → updateProfileEsia.d.ts} +4 -11
- package/mobile/bundle/retail/api/updateUserTask.d.ts +0 -1
- package/mobile/bundle/retail/api/uploadFile.d.ts +1 -1
- package/mobile/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/mobile/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -0
- package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -26
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js +31 -6
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -8
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +53 -83
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +22 -12
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +24 -16
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/retail/api/checkCode.d.ts +0 -1
- package/mobile/dist/retail/api/checkCode.js +2 -3
- package/mobile/dist/retail/api/checkCode.js.map +1 -1
- package/mobile/dist/retail/api/updateProfileEsia.d.ts +77 -0
- package/mobile/dist/retail/api/updateProfileEsia.js +6 -0
- package/mobile/dist/retail/api/updateProfileEsia.js.map +1 -0
- package/mobile/dist/retail/api/updateUserTask.d.ts +0 -1
- package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
- package/mobile/dist/retail/api/uploadFile.d.ts +1 -1
- package/mobile/dist/retail/api/uploadFile.js +3 -2
- package/mobile/dist/retail/api/uploadFile.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +1 -2
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +34 -0
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -0
- package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +15 -0
- package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- package/mobile/dist/retail/components/Fields/BeginDateField.js +1 -2
- package/mobile/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js +1 -4
- package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/DaDataInnField.js +1 -2
- package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/Experience5YearsField.js +1 -2
- package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +1 -2
- package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/JobsNumberField.js +1 -2
- package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +1 -2
- package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/OrganizationNameField.js +1 -2
- package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/WagesField.js +1 -2
- package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
- package/mobile/dist/retail/content.js +5 -11
- package/mobile/dist/retail/content.js.map +1 -1
- package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/dist/retail/utils/mainFormStateMap.js +0 -1
- package/mobile/dist/retail/utils/mainFormStateMap.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +1 -2
- package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/shouldRenderField.js +1 -1
- package/mobile/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -26
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +1 -0
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js +30 -5
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -8
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +53 -83
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +22 -12
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +24 -16
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/retail/api/checkCode.d.ts +0 -1
- package/mobile/lib/retail/api/checkCode.js +1 -1
- package/mobile/lib/retail/api/checkCode.js.map +1 -1
- package/mobile/lib/retail/api/updateProfileEsia.d.ts +77 -0
- package/mobile/lib/retail/api/updateProfileEsia.js +3 -0
- package/mobile/lib/retail/api/updateProfileEsia.js.map +1 -0
- package/mobile/lib/retail/api/updateUserTask.d.ts +0 -1
- package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
- package/mobile/lib/retail/api/uploadFile.d.ts +1 -1
- package/mobile/lib/retail/api/uploadFile.js +3 -2
- package/mobile/lib/retail/api/uploadFile.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +1 -2
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +32 -0
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -0
- package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +12 -0
- package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- package/mobile/lib/retail/components/Fields/BeginDateField.js +1 -2
- package/mobile/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js +2 -5
- package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/DaDataInnField.js +1 -2
- package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/Experience5YearsField.js +1 -2
- package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +1 -2
- package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/JobsNumberField.js +1 -2
- package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +1 -2
- package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/OrganizationNameField.js +1 -2
- package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/WagesField.js +1 -2
- package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
- package/mobile/lib/retail/content.js +5 -11
- package/mobile/lib/retail/content.js.map +1 -1
- package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/lib/retail/utils/mainFormStateMap.js +0 -1
- package/mobile/lib/retail/utils/mainFormStateMap.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +1 -2
- package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/shouldRenderField.js +1 -1
- package/mobile/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +10 -31
- package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +31 -5
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -8
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +66 -91
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +73 -57
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +48 -32
- package/mobile/src/retail/api/checkCode.ts +1 -1
- package/mobile/src/retail/api/{esiaRequestProfile.ts → updateProfileEsia.ts} +5 -16
- package/mobile/src/retail/api/updateUserTask.ts +0 -1
- package/mobile/src/retail/api/uploadFile.ts +3 -2
- package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +0 -2
- package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +65 -0
- package/mobile/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +13 -0
- package/mobile/src/retail/components/Fields/BeginDateField.tsx +0 -2
- package/mobile/src/retail/components/Fields/ConfirmationIncomeField.tsx +7 -18
- package/mobile/src/retail/components/Fields/DaDataInnField.tsx +0 -2
- package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +0 -2
- package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +0 -2
- package/mobile/src/retail/components/Fields/JobsNumberField.tsx +0 -2
- package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +0 -2
- package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +0 -2
- package/mobile/src/retail/components/Fields/WagesField.tsx +0 -2
- package/mobile/src/retail/content.tsx +5 -11
- package/mobile/src/retail/model/NameFieldDef.ts +0 -1
- package/mobile/src/retail/utils/mainFormStateMap.ts +0 -1
- package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -9
- package/mobile/src/ui-kit/FormField/shouldRenderField.tsx +1 -2
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +10 -31
- package/src/components/ApplicationLeadForm/applicationFormData.tsx +31 -5
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -8
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +66 -91
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +73 -57
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +48 -32
- package/src/retail/api/checkCode.ts +1 -1
- package/src/retail/api/{esiaRequestProfile.ts → updateProfileEsia.ts} +5 -16
- package/src/retail/api/updateUserTask.ts +0 -1
- package/src/retail/api/uploadFile.ts +3 -2
- package/src/retail/components/DraftDialog/parseDraftTask.ts +0 -2
- package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +7 -0
- package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +65 -0
- package/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +13 -0
- package/src/retail/components/Fields/BeginDateField.tsx +0 -2
- package/src/retail/components/Fields/ConfirmationIncomeField.tsx +7 -18
- package/src/retail/components/Fields/DaDataInnField.tsx +0 -2
- package/src/retail/components/Fields/Experience5YearsField.tsx +0 -2
- package/src/retail/components/Fields/GeneralSeniorityField.tsx +0 -2
- package/src/retail/components/Fields/JobsNumberField.tsx +0 -2
- package/src/retail/components/Fields/LastJobExperienceField.tsx +0 -2
- package/src/retail/components/Fields/OrganizationNameField.tsx +0 -2
- package/src/retail/components/Fields/WagesField.tsx +0 -2
- package/src/retail/content.tsx +5 -11
- package/src/retail/model/NameFieldDef.ts +0 -1
- package/src/retail/utils/mainFormStateMap.ts +0 -1
- package/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -9
- package/src/ui-kit/FormField/shouldRenderField.tsx +1 -2
- package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -22
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/dist/retail/api/esiaRequestProfile.js +0 -10
- package/dist/retail/api/esiaRequestProfile.js.map +0 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -20
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/lib/retail/api/esiaRequestProfile.js +0 -7
- package/lib/retail/api/esiaRequestProfile.js.map +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -22
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/mobile/dist/retail/api/esiaRequestProfile.d.ts +0 -84
- package/mobile/dist/retail/api/esiaRequestProfile.js +0 -10
- package/mobile/dist/retail/api/esiaRequestProfile.js.map +0 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -20
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/mobile/lib/retail/api/esiaRequestProfile.d.ts +0 -84
- package/mobile/lib/retail/api/esiaRequestProfile.js +0 -7
- package/mobile/lib/retail/api/esiaRequestProfile.js.map +0 -1
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +0 -51
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +0 -51
package/bundle/bundle.umd.js
CHANGED
|
@@ -2022,7 +2022,7 @@
|
|
|
2022
2022
|
|
|
2023
2023
|
const PhoneField = JSX(({ field, input }) => {
|
|
2024
2024
|
const fieldName = input?.name || 'phone';
|
|
2025
|
-
return
|
|
2025
|
+
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2026
2026
|
});
|
|
2027
2027
|
|
|
2028
2028
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
@@ -2202,7 +2202,7 @@
|
|
|
2202
2202
|
function shouldRenderField({ input, field, }) {
|
|
2203
2203
|
const { condition } = input;
|
|
2204
2204
|
const { value } = field(condition?.name || '');
|
|
2205
|
-
return !condition || condition?.values?.
|
|
2205
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
2206
2206
|
}
|
|
2207
2207
|
|
|
2208
2208
|
const PRODUCT_REF = {
|
|
@@ -2660,11 +2660,11 @@
|
|
|
2660
2660
|
{
|
|
2661
2661
|
columns: 2,
|
|
2662
2662
|
inputs: [
|
|
2663
|
-
{ name: 'surname', required: true, dadata: true
|
|
2664
|
-
{ name: 'name', required: true, dadata: true
|
|
2665
|
-
{ name: 'middleName', dadata: true
|
|
2666
|
-
{ name: 'limitedBirthday', required: true
|
|
2667
|
-
{ name: 'phone', required: true
|
|
2663
|
+
{ name: 'surname', required: true, dadata: true },
|
|
2664
|
+
{ name: 'name', required: true, dadata: true },
|
|
2665
|
+
{ name: 'middleName', dadata: true },
|
|
2666
|
+
{ name: 'limitedBirthday', required: true },
|
|
2667
|
+
{ name: 'phone', required: true },
|
|
2668
2668
|
{ name: 'email', required: true, dadata: true },
|
|
2669
2669
|
],
|
|
2670
2670
|
},
|
|
@@ -2674,57 +2674,6 @@
|
|
|
2674
2674
|
];
|
|
2675
2675
|
};
|
|
2676
2676
|
|
|
2677
|
-
const getTraceId = () => {
|
|
2678
|
-
const result = new Uint8Array(8);
|
|
2679
|
-
globalThis.crypto.getRandomValues(result);
|
|
2680
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2681
|
-
};
|
|
2682
|
-
|
|
2683
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
2684
|
-
try {
|
|
2685
|
-
const response = await doRequest(url, method, body);
|
|
2686
|
-
return response.json();
|
|
2687
|
-
}
|
|
2688
|
-
catch (err) {
|
|
2689
|
-
console.error(err);
|
|
2690
|
-
return null;
|
|
2691
|
-
}
|
|
2692
|
-
};
|
|
2693
|
-
async function doRequest(url, method, body) {
|
|
2694
|
-
const traceId = getTraceId();
|
|
2695
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2696
|
-
method,
|
|
2697
|
-
headers: {
|
|
2698
|
-
'Content-Type': 'application/json',
|
|
2699
|
-
'X-B3-Sampled': '1',
|
|
2700
|
-
'X-B3-Spanid': traceId,
|
|
2701
|
-
'X-B3-Traceid': traceId,
|
|
2702
|
-
...getAuthorizationHeaders(),
|
|
2703
|
-
},
|
|
2704
|
-
credentials: 'include',
|
|
2705
|
-
body: body ? JSON.stringify(body) : null,
|
|
2706
|
-
});
|
|
2707
|
-
}
|
|
2708
|
-
const getAuthorizationHeaders = () => {
|
|
2709
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2710
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2711
|
-
};
|
|
2712
|
-
|
|
2713
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2714
|
-
|
|
2715
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2716
|
-
const navigator = locationNavigator();
|
|
2717
|
-
const handleAuth = useCallback(async () => {
|
|
2718
|
-
const resp = await getLink({
|
|
2719
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2720
|
-
});
|
|
2721
|
-
if (resp?.link) {
|
|
2722
|
-
navigator.assign(resp.link);
|
|
2723
|
-
}
|
|
2724
|
-
}, []);
|
|
2725
|
-
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" })] }));
|
|
2726
|
-
});
|
|
2727
|
-
|
|
2728
2677
|
const debounce = (fn, delay = 600) => {
|
|
2729
2678
|
let timerId;
|
|
2730
2679
|
const debouncedCallback = (...args) => {
|
|
@@ -3611,6 +3560,42 @@
|
|
|
3611
3560
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3612
3561
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3613
3562
|
|
|
3563
|
+
const getTraceId = () => {
|
|
3564
|
+
const result = new Uint8Array(8);
|
|
3565
|
+
globalThis.crypto.getRandomValues(result);
|
|
3566
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3567
|
+
};
|
|
3568
|
+
|
|
3569
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
3570
|
+
try {
|
|
3571
|
+
const response = await doRequest(url, method, body);
|
|
3572
|
+
return response.json();
|
|
3573
|
+
}
|
|
3574
|
+
catch (err) {
|
|
3575
|
+
console.error(err);
|
|
3576
|
+
return null;
|
|
3577
|
+
}
|
|
3578
|
+
};
|
|
3579
|
+
async function doRequest(url, method, body) {
|
|
3580
|
+
const traceId = getTraceId();
|
|
3581
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3582
|
+
method,
|
|
3583
|
+
headers: {
|
|
3584
|
+
'Content-Type': 'application/json',
|
|
3585
|
+
'X-B3-Sampled': '1',
|
|
3586
|
+
'X-B3-Spanid': traceId,
|
|
3587
|
+
'X-B3-Traceid': traceId,
|
|
3588
|
+
...getAuthorizationHeaders(),
|
|
3589
|
+
},
|
|
3590
|
+
credentials: 'include',
|
|
3591
|
+
body: body ? JSON.stringify(body) : null,
|
|
3592
|
+
});
|
|
3593
|
+
}
|
|
3594
|
+
const getAuthorizationHeaders = () => {
|
|
3595
|
+
const token = sessionStorage.getItem('accessToken');
|
|
3596
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3597
|
+
};
|
|
3598
|
+
|
|
3614
3599
|
const fetchRegionOffices = async (regionKey) => {
|
|
3615
3600
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3616
3601
|
regionRfCd: {
|
|
@@ -3840,7 +3825,7 @@
|
|
|
3840
3825
|
|
|
3841
3826
|
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 ?? '') })));
|
|
3842
3827
|
|
|
3843
|
-
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
|
|
3828
|
+
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 })));
|
|
3844
3829
|
|
|
3845
3830
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3846
3831
|
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) })));
|
|
@@ -3904,8 +3889,7 @@
|
|
|
3904
3889
|
|
|
3905
3890
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3906
3891
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3907
|
-
|
|
3908
|
-
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 })] }));
|
|
3892
|
+
return (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 }));
|
|
3909
3893
|
});
|
|
3910
3894
|
|
|
3911
3895
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4449,7 +4433,7 @@
|
|
|
4449
4433
|
}
|
|
4450
4434
|
})();
|
|
4451
4435
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4452
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange
|
|
4436
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4453
4437
|
});
|
|
4454
4438
|
|
|
4455
4439
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), minDate: new Date() })));
|
|
@@ -4532,7 +4516,7 @@
|
|
|
4532
4516
|
const MIN_YEARS = 0;
|
|
4533
4517
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4534
4518
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4535
|
-
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
|
|
4519
|
+
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 }));
|
|
4536
4520
|
});
|
|
4537
4521
|
|
|
4538
4522
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4553,7 +4537,7 @@
|
|
|
4553
4537
|
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 }));
|
|
4554
4538
|
});
|
|
4555
4539
|
|
|
4556
|
-
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
|
|
4540
|
+
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 })));
|
|
4557
4541
|
|
|
4558
4542
|
const HousingField = JSX(({ field, input }) => {
|
|
4559
4543
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4562,9 +4546,9 @@
|
|
|
4562
4546
|
|
|
4563
4547
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4564
4548
|
|
|
4565
|
-
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
|
|
4549
|
+
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 })));
|
|
4566
4550
|
|
|
4567
|
-
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
|
|
4551
|
+
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 })));
|
|
4568
4552
|
|
|
4569
4553
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4570
4554
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4730,7 +4714,7 @@
|
|
|
4730
4714
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4731
4715
|
updateOrganizationFields(store, field, item);
|
|
4732
4716
|
}, []);
|
|
4733
|
-
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 ?? ''),
|
|
4717
|
+
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 }));
|
|
4734
4718
|
});
|
|
4735
4719
|
|
|
4736
4720
|
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 })));
|
|
@@ -4877,7 +4861,7 @@
|
|
|
4877
4861
|
|
|
4878
4862
|
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 })));
|
|
4879
4863
|
|
|
4880
|
-
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
|
|
4864
|
+
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 })));
|
|
4881
4865
|
|
|
4882
4866
|
const DELIVERY_CITIES_REF = {
|
|
4883
4867
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5507,7 +5491,7 @@
|
|
|
5507
5491
|
const participant = task.participants[0];
|
|
5508
5492
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5509
5493
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5510
|
-
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd,
|
|
5494
|
+
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
|
|
5511
5495
|
return {
|
|
5512
5496
|
currency: currency?.key,
|
|
5513
5497
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5559,7 +5543,6 @@
|
|
|
5559
5543
|
monthsValue,
|
|
5560
5544
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5561
5545
|
},
|
|
5562
|
-
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5563
5546
|
...getParticipantIncomes(participantIncomes),
|
|
5564
5547
|
...getParticipantAddresses(participantAddresses),
|
|
5565
5548
|
...getParticipantContacts(participantContacts),
|
|
@@ -5614,6 +5597,39 @@
|
|
|
5614
5597
|
};
|
|
5615
5598
|
};
|
|
5616
5599
|
|
|
5600
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5601
|
+
|
|
5602
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5603
|
+
const navigator = locationNavigator();
|
|
5604
|
+
const retailFormStore = useRetailFormStore();
|
|
5605
|
+
const handleAuth = useCallback(async () => {
|
|
5606
|
+
const resp = await getLink({
|
|
5607
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5608
|
+
});
|
|
5609
|
+
if (resp?.link) {
|
|
5610
|
+
navigator.assign(resp.link);
|
|
5611
|
+
globalThis.location.href = resp.link;
|
|
5612
|
+
}
|
|
5613
|
+
}, []);
|
|
5614
|
+
const handleClose = useCallback(() => {
|
|
5615
|
+
if (retailFormStore.leadForm) {
|
|
5616
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
5617
|
+
delete leadForm.esiaAccountTypeCd;
|
|
5618
|
+
retailFormStore.leadForm = leadForm;
|
|
5619
|
+
}
|
|
5620
|
+
onClose?.();
|
|
5621
|
+
}, []);
|
|
5622
|
+
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full px-m", children: [jsxs("ul", { className: "list-disc", 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, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "@container flex flex-wrap gap-lg w-full", children: [jsx(Button, { type: "button", onClick: handleAuth, className: "w-full md:w-auto", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, className: "w-full md:w-auto", children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
|
|
5623
|
+
});
|
|
5624
|
+
|
|
5625
|
+
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5626
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
5627
|
+
const navigator = locationNavigator();
|
|
5628
|
+
return useCallback(() => {
|
|
5629
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5630
|
+
}, [open, nextStepLink]);
|
|
5631
|
+
};
|
|
5632
|
+
|
|
5617
5633
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5618
5634
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5619
5635
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5735,40 +5751,43 @@
|
|
|
5735
5751
|
|
|
5736
5752
|
/* eslint-disable max-lines */
|
|
5737
5753
|
// eslint-disable-next-line max-lines-per-function
|
|
5738
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5754
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
|
|
5739
5755
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5740
5756
|
const [ok, setOK] = useState();
|
|
5741
5757
|
const saveUserData = useSaveUserData();
|
|
5742
5758
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5743
5759
|
const navigator = locationNavigator();
|
|
5744
|
-
const
|
|
5745
|
-
|
|
5746
|
-
}, []);
|
|
5747
|
-
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5760
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5761
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
5748
5762
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5749
5763
|
const draftDialog = useDraftDialog();
|
|
5750
5764
|
const handleSubmit = useCallback(async (formData) => {
|
|
5765
|
+
if (esiaError) {
|
|
5766
|
+
navigator.assign(nextStepLink);
|
|
5767
|
+
return;
|
|
5768
|
+
}
|
|
5751
5769
|
try {
|
|
5752
5770
|
startSending();
|
|
5771
|
+
const transformedFormData = transformFormData(formData);
|
|
5753
5772
|
const profileId = await createUserProfile({
|
|
5754
|
-
profile: { phone: formatPhone(
|
|
5773
|
+
profile: { phone: formatPhone(transformedFormData.phone) },
|
|
5755
5774
|
});
|
|
5756
|
-
if (profileId &&
|
|
5775
|
+
if (profileId && transformedFormData?.phone) {
|
|
5757
5776
|
const sendCurrentTask = async () => {
|
|
5758
5777
|
await updateUserData({
|
|
5759
5778
|
programId,
|
|
5760
5779
|
profileId,
|
|
5761
|
-
formData,
|
|
5780
|
+
formData: transformedFormData,
|
|
5762
5781
|
productType,
|
|
5763
5782
|
saveUserData,
|
|
5764
5783
|
sendAspects,
|
|
5765
5784
|
});
|
|
5766
5785
|
verifyPhoneDialog.close();
|
|
5767
5786
|
if (productType === 'debitCard') {
|
|
5768
|
-
|
|
5787
|
+
openEsiaLoginDialog();
|
|
5769
5788
|
}
|
|
5770
5789
|
else {
|
|
5771
|
-
consentBkiDialog.open(
|
|
5790
|
+
consentBkiDialog.open(transformedFormData.phone, profileId);
|
|
5772
5791
|
}
|
|
5773
5792
|
};
|
|
5774
5793
|
const handleSuccessVerify = async () => {
|
|
@@ -5794,7 +5813,7 @@
|
|
|
5794
5813
|
};
|
|
5795
5814
|
const acceptedConsents = getAcceptedConsents(formData, productType);
|
|
5796
5815
|
verifyPhoneDialog.open({
|
|
5797
|
-
phone:
|
|
5816
|
+
phone: transformedFormData?.phone,
|
|
5798
5817
|
consents: acceptedConsents,
|
|
5799
5818
|
onSuccess: handleSuccessVerify,
|
|
5800
5819
|
});
|
|
@@ -5804,7 +5823,7 @@
|
|
|
5804
5823
|
catch {
|
|
5805
5824
|
setOK(false);
|
|
5806
5825
|
}
|
|
5807
|
-
}, []);
|
|
5826
|
+
}, [esiaError]);
|
|
5808
5827
|
return { isSending, ok, handleSubmit };
|
|
5809
5828
|
};
|
|
5810
5829
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5876,6 +5895,12 @@
|
|
|
5876
5895
|
consentAssignmentClaimsFlg: consentOthersFlg,
|
|
5877
5896
|
};
|
|
5878
5897
|
};
|
|
5898
|
+
const transformFormData = (formData) => ({
|
|
5899
|
+
...formData,
|
|
5900
|
+
surname: formData.surname?.trim(),
|
|
5901
|
+
name: formData.name?.trim(),
|
|
5902
|
+
middleName: formData.middleName?.trim(),
|
|
5903
|
+
});
|
|
5879
5904
|
|
|
5880
5905
|
const useSetter = (target, key) => useCallback((value) => {
|
|
5881
5906
|
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
@@ -5887,10 +5912,7 @@
|
|
|
5887
5912
|
}
|
|
5888
5913
|
}, [target, key]);
|
|
5889
5914
|
|
|
5890
|
-
const
|
|
5891
|
-
saveToken(res);
|
|
5892
|
-
return res;
|
|
5893
|
-
});
|
|
5915
|
+
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5894
5916
|
|
|
5895
5917
|
const initialFormState = {
|
|
5896
5918
|
surname: '',
|
|
@@ -5908,24 +5930,19 @@
|
|
|
5908
5930
|
consentPhotoFlg: false,
|
|
5909
5931
|
consentFATCA: false,
|
|
5910
5932
|
};
|
|
5911
|
-
const getInitialFormState$1 = (inputs, savedForm
|
|
5933
|
+
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5912
5934
|
if (savedForm) {
|
|
5913
|
-
return {
|
|
5914
|
-
...savedForm,
|
|
5915
|
-
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5916
|
-
...(!esiaAuthSuccess && {
|
|
5917
|
-
esiaAccountTypeCd: { key: '' },
|
|
5918
|
-
}),
|
|
5919
|
-
};
|
|
5935
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5920
5936
|
}
|
|
5921
5937
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5922
5938
|
return { ...formState };
|
|
5923
5939
|
};
|
|
5924
5940
|
|
|
5925
|
-
const uploadFile = async (file,
|
|
5941
|
+
const uploadFile = async (file, taskId, documentCategory) => {
|
|
5926
5942
|
const fd = new FormData();
|
|
5943
|
+
fd.append('taskId', taskId);
|
|
5927
5944
|
fd.append('documentCategory', documentCategory);
|
|
5928
|
-
fd.append('file', file,
|
|
5945
|
+
fd.append('file', file, 'file.pdf');
|
|
5929
5946
|
const res = await globalThis
|
|
5930
5947
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5931
5948
|
method: 'POST',
|
|
@@ -5939,13 +5956,23 @@
|
|
|
5939
5956
|
return res;
|
|
5940
5957
|
};
|
|
5941
5958
|
|
|
5942
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5943
|
-
|
|
5944
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5959
|
+
const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
|
|
5960
|
+
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5945
5961
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5946
|
-
|
|
5947
|
-
if (
|
|
5948
|
-
|
|
5962
|
+
const files = [];
|
|
5963
|
+
if (!isDebit) {
|
|
5964
|
+
await saveDocument({
|
|
5965
|
+
document: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5966
|
+
taskId,
|
|
5967
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5968
|
+
files,
|
|
5969
|
+
});
|
|
5970
|
+
await saveDocument({
|
|
5971
|
+
document: esiaAdditionalDocument.pdfFilePayout,
|
|
5972
|
+
taskId,
|
|
5973
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5974
|
+
files,
|
|
5975
|
+
});
|
|
5949
5976
|
}
|
|
5950
5977
|
const mainData = {
|
|
5951
5978
|
name: profile.name,
|
|
@@ -5962,11 +5989,11 @@
|
|
|
5962
5989
|
birthPlace: addInfo.birthPlace,
|
|
5963
5990
|
addressRegistration: buildAddress(addressRegistration),
|
|
5964
5991
|
addressFact: buildAddress(addressFact),
|
|
5965
|
-
esiaAccountTypeCd:
|
|
5992
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5966
5993
|
};
|
|
5967
5994
|
return {
|
|
5968
5995
|
...mainData,
|
|
5969
|
-
...(
|
|
5996
|
+
...(!isDebit && {
|
|
5970
5997
|
snils: addInfo.snils,
|
|
5971
5998
|
inn: esiaAdditionalDocument.inn,
|
|
5972
5999
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5975,9 +6002,6 @@
|
|
|
5975
6002
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5976
6003
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5977
6004
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5978
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5979
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5980
|
-
employment: { key: 'WORK', text: 'Работаю' },
|
|
5981
6005
|
files,
|
|
5982
6006
|
}),
|
|
5983
6007
|
};
|
|
@@ -6010,60 +6034,43 @@
|
|
|
6010
6034
|
};
|
|
6011
6035
|
};
|
|
6012
6036
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
6013
|
-
const
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
isPDF: false,
|
|
6045
|
-
},
|
|
6046
|
-
{
|
|
6047
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6048
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6049
|
-
isPDF: true,
|
|
6050
|
-
},
|
|
6051
|
-
{
|
|
6052
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6053
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6054
|
-
isPDF: false,
|
|
6055
|
-
},
|
|
6037
|
+
const saveDocument = async ({ document, taskId, category, files, }) => {
|
|
6038
|
+
await fetch(`data:application/pdf;base64,${document}`)
|
|
6039
|
+
.then((res) => res.blob())
|
|
6040
|
+
.then((value) => uploadFile(value, taskId, category))
|
|
6041
|
+
.then((file) => files.push(file));
|
|
6042
|
+
};
|
|
6043
|
+
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
6044
|
+
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
6045
|
+
const data = [
|
|
6046
|
+
profile.name,
|
|
6047
|
+
profile.surname,
|
|
6048
|
+
profile.midname,
|
|
6049
|
+
profile.birthDate,
|
|
6050
|
+
profile.phone,
|
|
6051
|
+
profile.email,
|
|
6052
|
+
document.dulIssueDate,
|
|
6053
|
+
document.dulIssuedBy,
|
|
6054
|
+
document.dulNumber,
|
|
6055
|
+
document.dulSerie,
|
|
6056
|
+
document.dulSubdivisionCode,
|
|
6057
|
+
addressRegistration,
|
|
6058
|
+
profile.esiaAccountType,
|
|
6059
|
+
esiaAdditionalDocument.inn,
|
|
6060
|
+
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6061
|
+
esiaAdditionalDocument.startWorkDate,
|
|
6062
|
+
esiaAdditionalDocument.workLengthInFiveYears.toString(),
|
|
6063
|
+
esiaAdditionalDocument.workLength.toString(),
|
|
6064
|
+
esiaAdditionalDocument.workLengthLastJob.toString(),
|
|
6065
|
+
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6066
|
+
esiaAdditionalDocument.pdfFilePayout,
|
|
6067
|
+
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6056
6068
|
];
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
await fetch(`${contentType},${doc.file}`)
|
|
6060
|
-
.then((res) => res.blob())
|
|
6061
|
-
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6062
|
-
.then((file) => files.push(file));
|
|
6069
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6070
|
+
throw new Error();
|
|
6063
6071
|
}
|
|
6064
|
-
return files;
|
|
6065
6072
|
};
|
|
6066
|
-
const
|
|
6073
|
+
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6067
6074
|
const { profile, document, addressRegistration } = esiaProfile;
|
|
6068
6075
|
const data = [
|
|
6069
6076
|
profile.name,
|
|
@@ -6071,6 +6078,7 @@
|
|
|
6071
6078
|
profile.midname,
|
|
6072
6079
|
profile.birthDate,
|
|
6073
6080
|
profile.phone,
|
|
6081
|
+
profile.email,
|
|
6074
6082
|
document.dulIssueDate,
|
|
6075
6083
|
document.dulIssuedBy,
|
|
6076
6084
|
document.dulNumber,
|
|
@@ -6083,97 +6091,75 @@
|
|
|
6083
6091
|
throw new Error();
|
|
6084
6092
|
}
|
|
6085
6093
|
};
|
|
6086
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6087
|
-
const { esiaAdditionalDocument } = esiaProfile;
|
|
6088
|
-
const data = [
|
|
6089
|
-
esiaAdditionalDocument?.inn,
|
|
6090
|
-
esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
|
|
6091
|
-
esiaAdditionalDocument?.startWorkDate,
|
|
6092
|
-
esiaAdditionalDocument?.workLengthInFiveYears?.toString(),
|
|
6093
|
-
esiaAdditionalDocument?.workLength?.toString(),
|
|
6094
|
-
esiaAdditionalDocument?.workLengthLastJob?.toString(),
|
|
6095
|
-
esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
|
|
6096
|
-
esiaAdditionalDocument?.pdfFilePayout,
|
|
6097
|
-
esiaAdditionalDocument?.pdfFileWorkbook,
|
|
6098
|
-
esiaAdditionalDocument?.pdfFileSigPayout,
|
|
6099
|
-
esiaAdditionalDocument?.xmlFilePayout,
|
|
6100
|
-
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
6101
|
-
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
6102
|
-
esiaAdditionalDocument?.pdfFileSigWorkbook,
|
|
6103
|
-
esiaAdditionalDocument?.xmlFileSigWorkbook,
|
|
6104
|
-
];
|
|
6105
|
-
return data.every((_) => Boolean(_));
|
|
6106
|
-
};
|
|
6107
6094
|
|
|
6108
|
-
const useInitApplicationLead = ({ inputs,
|
|
6095
|
+
const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
|
|
6096
|
+
const navigator = locationNavigator();
|
|
6097
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6109
6098
|
const leadFormStore = useLeadFormStore();
|
|
6110
6099
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6111
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm
|
|
6112
|
-
const
|
|
6113
|
-
|
|
6100
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6101
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
6102
|
+
startLoading();
|
|
6114
6103
|
try {
|
|
6115
|
-
const data = await
|
|
6104
|
+
const data = await updateProfileEsia({
|
|
6105
|
+
profileId,
|
|
6116
6106
|
code,
|
|
6117
6107
|
state,
|
|
6118
6108
|
redirectUri: globalThis.location?.href,
|
|
6119
|
-
authorize: true,
|
|
6120
6109
|
});
|
|
6121
|
-
if (data) {
|
|
6122
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6110
|
+
if (data && leadFormStore?.taskId) {
|
|
6111
|
+
const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
|
|
6123
6112
|
saveForm((_) => ({
|
|
6124
6113
|
..._,
|
|
6125
6114
|
...parsedData,
|
|
6126
6115
|
}));
|
|
6127
|
-
setEsiaStatus(EsiaStatuses.Success);
|
|
6128
6116
|
}
|
|
6117
|
+
navigator.assign(nextStepLink);
|
|
6129
6118
|
}
|
|
6130
6119
|
catch {
|
|
6131
|
-
|
|
6120
|
+
setEsiaError();
|
|
6132
6121
|
}
|
|
6133
|
-
|
|
6122
|
+
finally {
|
|
6123
|
+
endLoading();
|
|
6124
|
+
}
|
|
6125
|
+
}, [nextStepLink]);
|
|
6134
6126
|
useEffect(() => {
|
|
6135
6127
|
leadFormStore.productType = productType;
|
|
6128
|
+
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6136
6129
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6137
6130
|
const code = params.get('code');
|
|
6138
6131
|
const state = params.get('state');
|
|
6139
|
-
if (code && state) {
|
|
6140
|
-
|
|
6132
|
+
if (profileId && code && state) {
|
|
6133
|
+
updateEsiaProfile(profileId, code, state);
|
|
6141
6134
|
}
|
|
6142
6135
|
else {
|
|
6143
6136
|
sessionStorage.removeItem('accessToken');
|
|
6144
6137
|
sessionStorage.removeItem('refreshToken');
|
|
6145
6138
|
}
|
|
6146
6139
|
}, []);
|
|
6147
|
-
return initialFormState;
|
|
6140
|
+
return [initialFormState, { isLoading }];
|
|
6148
6141
|
};
|
|
6149
6142
|
|
|
6150
|
-
var EsiaStatuses;
|
|
6151
|
-
(function (EsiaStatuses) {
|
|
6152
|
-
EsiaStatuses["Success"] = "SUCCESS";
|
|
6153
|
-
EsiaStatuses["Error"] = "ERROR";
|
|
6154
|
-
EsiaStatuses["Pending"] = "PENDING";
|
|
6155
|
-
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6156
6143
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6157
|
-
const [
|
|
6158
|
-
const leadForm = useRef(null);
|
|
6144
|
+
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6159
6145
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6160
6146
|
const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
|
|
6161
6147
|
const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
|
|
6162
6148
|
const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
|
|
6163
|
-
const initialFormState = useInitApplicationLead({
|
|
6149
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead({
|
|
6164
6150
|
inputs,
|
|
6165
6151
|
nextStepLink,
|
|
6166
6152
|
productType,
|
|
6167
|
-
|
|
6168
|
-
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6153
|
+
setEsiaError,
|
|
6169
6154
|
});
|
|
6170
6155
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6171
6156
|
programId,
|
|
6172
6157
|
nextStepLink,
|
|
6173
6158
|
productType,
|
|
6159
|
+
esiaError,
|
|
6174
6160
|
data,
|
|
6175
6161
|
});
|
|
6176
|
-
const [, { field, onSubmit
|
|
6162
|
+
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6177
6163
|
formValidator,
|
|
6178
6164
|
onSubmit: handleSubmit,
|
|
6179
6165
|
});
|
|
@@ -6183,17 +6169,7 @@
|
|
|
6183
6169
|
responseTypeDialog.open({ ok });
|
|
6184
6170
|
}
|
|
6185
6171
|
}, [ok]);
|
|
6186
|
-
|
|
6187
|
-
if (esiaStatus && leadForm?.current) {
|
|
6188
|
-
leadForm.current.scrollIntoView({
|
|
6189
|
-
block: 'start',
|
|
6190
|
-
});
|
|
6191
|
-
}
|
|
6192
|
-
if (esiaStatus === EsiaStatuses.Success) {
|
|
6193
|
-
reset();
|
|
6194
|
-
}
|
|
6195
|
-
}, [leadForm?.current, esiaStatus]);
|
|
6196
|
-
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] })] }));
|
|
6172
|
+
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? 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), esiaError ? (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] }) }));
|
|
6197
6173
|
});
|
|
6198
6174
|
const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
6199
6175
|
const getExtendedValidatorObj = (productType) => ({
|
|
@@ -7907,7 +7883,6 @@
|
|
|
7907
7883
|
mandatoryPayments: undefined,
|
|
7908
7884
|
snils: '',
|
|
7909
7885
|
armyIdFlg: false,
|
|
7910
|
-
esiaAccountTypeCd: { key: '', text: '' },
|
|
7911
7886
|
},
|
|
7912
7887
|
{
|
|
7913
7888
|
bankruptcyFlg: false,
|
|
@@ -8303,7 +8278,7 @@
|
|
|
8303
8278
|
label: 'Телефон работодателя',
|
|
8304
8279
|
required: true,
|
|
8305
8280
|
},
|
|
8306
|
-
{ name: 'beginDate', required: true
|
|
8281
|
+
{ name: 'beginDate', required: true },
|
|
8307
8282
|
],
|
|
8308
8283
|
},
|
|
8309
8284
|
{
|
|
@@ -8344,16 +8319,6 @@
|
|
|
8344
8319
|
{
|
|
8345
8320
|
title: 'Совокупный доход',
|
|
8346
8321
|
},
|
|
8347
|
-
{
|
|
8348
|
-
columns: 1,
|
|
8349
|
-
inputs: [
|
|
8350
|
-
{
|
|
8351
|
-
name: 'confirmationIncome',
|
|
8352
|
-
required: true,
|
|
8353
|
-
filledByEsia: true,
|
|
8354
|
-
},
|
|
8355
|
-
],
|
|
8356
|
-
},
|
|
8357
8322
|
{
|
|
8358
8323
|
inputs: [
|
|
8359
8324
|
{
|
|
@@ -8362,6 +8327,10 @@
|
|
|
8362
8327
|
},
|
|
8363
8328
|
],
|
|
8364
8329
|
},
|
|
8330
|
+
{
|
|
8331
|
+
columns: 1,
|
|
8332
|
+
inputs: [{ name: 'confirmationIncome', required: true }],
|
|
8333
|
+
},
|
|
8365
8334
|
{
|
|
8366
8335
|
columns: 1,
|
|
8367
8336
|
inputs: [{ name: 'wages', required: true, filledByEsia: true }],
|
|
@@ -11661,7 +11630,7 @@
|
|
|
11661
11630
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11662
11631
|
});
|
|
11663
11632
|
|
|
11664
|
-
const packageVersion = "0.14.
|
|
11633
|
+
const packageVersion = "0.14.824";
|
|
11665
11634
|
|
|
11666
11635
|
exports.Blocks = Blocks;
|
|
11667
11636
|
exports.ContentPage = ContentPage;
|