@redneckz/wildless-cms-uni-blocks 0.14.820 → 0.14.821
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 +184 -222
- 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 +50 -80
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
- 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 +50 -80
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
- 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/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 +184 -222
- 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 +50 -80
- 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 +10 -7
- 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 +50 -80
- 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 +10 -7
- 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 +65 -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 +65 -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 = {
|
|
@@ -2637,11 +2637,11 @@
|
|
|
2637
2637
|
{
|
|
2638
2638
|
columns: 2,
|
|
2639
2639
|
inputs: [
|
|
2640
|
-
{ name: 'surname', required: true, dadata: true
|
|
2641
|
-
{ name: 'name', required: true, dadata: true
|
|
2642
|
-
{ name: 'middleName', dadata: true
|
|
2643
|
-
{ name: 'limitedBirthday', required: true
|
|
2644
|
-
{ name: 'phone', required: true
|
|
2640
|
+
{ name: 'surname', required: true, dadata: true },
|
|
2641
|
+
{ name: 'name', required: true, dadata: true },
|
|
2642
|
+
{ name: 'middleName', dadata: true },
|
|
2643
|
+
{ name: 'limitedBirthday', required: true },
|
|
2644
|
+
{ name: 'phone', required: true },
|
|
2645
2645
|
{ name: 'email', required: true, dadata: true },
|
|
2646
2646
|
],
|
|
2647
2647
|
},
|
|
@@ -2651,57 +2651,6 @@
|
|
|
2651
2651
|
];
|
|
2652
2652
|
};
|
|
2653
2653
|
|
|
2654
|
-
const getTraceId = () => {
|
|
2655
|
-
const result = new Uint8Array(8);
|
|
2656
|
-
globalThis.crypto.getRandomValues(result);
|
|
2657
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2658
|
-
};
|
|
2659
|
-
|
|
2660
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
2661
|
-
try {
|
|
2662
|
-
const response = await doRequest(url, method, body);
|
|
2663
|
-
return response.json();
|
|
2664
|
-
}
|
|
2665
|
-
catch (err) {
|
|
2666
|
-
console.error(err);
|
|
2667
|
-
return null;
|
|
2668
|
-
}
|
|
2669
|
-
};
|
|
2670
|
-
async function doRequest(url, method, body) {
|
|
2671
|
-
const traceId = getTraceId();
|
|
2672
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2673
|
-
method,
|
|
2674
|
-
headers: {
|
|
2675
|
-
'Content-Type': 'application/json',
|
|
2676
|
-
'X-B3-Sampled': '1',
|
|
2677
|
-
'X-B3-Spanid': traceId,
|
|
2678
|
-
'X-B3-Traceid': traceId,
|
|
2679
|
-
...getAuthorizationHeaders(),
|
|
2680
|
-
},
|
|
2681
|
-
credentials: 'include',
|
|
2682
|
-
body: body ? JSON.stringify(body) : null,
|
|
2683
|
-
});
|
|
2684
|
-
}
|
|
2685
|
-
const getAuthorizationHeaders = () => {
|
|
2686
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2687
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2688
|
-
};
|
|
2689
|
-
|
|
2690
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2691
|
-
|
|
2692
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2693
|
-
const navigator = locationNavigator();
|
|
2694
|
-
const handleAuth = useCallback(async () => {
|
|
2695
|
-
const resp = await getLink({
|
|
2696
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2697
|
-
});
|
|
2698
|
-
if (resp?.link) {
|
|
2699
|
-
navigator.assign(resp.link);
|
|
2700
|
-
}
|
|
2701
|
-
}, []);
|
|
2702
|
-
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" })] }));
|
|
2703
|
-
});
|
|
2704
|
-
|
|
2705
2654
|
const debounce = (fn, delay = 600) => {
|
|
2706
2655
|
let timerId;
|
|
2707
2656
|
const debouncedCallback = (...args) => {
|
|
@@ -3588,6 +3537,42 @@
|
|
|
3588
3537
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3589
3538
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3590
3539
|
|
|
3540
|
+
const getTraceId = () => {
|
|
3541
|
+
const result = new Uint8Array(8);
|
|
3542
|
+
globalThis.crypto.getRandomValues(result);
|
|
3543
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3544
|
+
};
|
|
3545
|
+
|
|
3546
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
3547
|
+
try {
|
|
3548
|
+
const response = await doRequest(url, method, body);
|
|
3549
|
+
return response.json();
|
|
3550
|
+
}
|
|
3551
|
+
catch (err) {
|
|
3552
|
+
console.error(err);
|
|
3553
|
+
return null;
|
|
3554
|
+
}
|
|
3555
|
+
};
|
|
3556
|
+
async function doRequest(url, method, body) {
|
|
3557
|
+
const traceId = getTraceId();
|
|
3558
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3559
|
+
method,
|
|
3560
|
+
headers: {
|
|
3561
|
+
'Content-Type': 'application/json',
|
|
3562
|
+
'X-B3-Sampled': '1',
|
|
3563
|
+
'X-B3-Spanid': traceId,
|
|
3564
|
+
'X-B3-Traceid': traceId,
|
|
3565
|
+
...getAuthorizationHeaders(),
|
|
3566
|
+
},
|
|
3567
|
+
credentials: 'include',
|
|
3568
|
+
body: body ? JSON.stringify(body) : null,
|
|
3569
|
+
});
|
|
3570
|
+
}
|
|
3571
|
+
const getAuthorizationHeaders = () => {
|
|
3572
|
+
const token = sessionStorage.getItem('accessToken');
|
|
3573
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3574
|
+
};
|
|
3575
|
+
|
|
3591
3576
|
const fetchRegionOffices = async (regionKey) => {
|
|
3592
3577
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3593
3578
|
regionRfCd: {
|
|
@@ -3817,7 +3802,7 @@
|
|
|
3817
3802
|
|
|
3818
3803
|
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 ?? '') })));
|
|
3819
3804
|
|
|
3820
|
-
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
|
|
3805
|
+
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 })));
|
|
3821
3806
|
|
|
3822
3807
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3823
3808
|
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) })));
|
|
@@ -3881,8 +3866,7 @@
|
|
|
3881
3866
|
|
|
3882
3867
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3883
3868
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3884
|
-
|
|
3885
|
-
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 })] }));
|
|
3869
|
+
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 }));
|
|
3886
3870
|
});
|
|
3887
3871
|
|
|
3888
3872
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4426,7 +4410,7 @@
|
|
|
4426
4410
|
}
|
|
4427
4411
|
})();
|
|
4428
4412
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4429
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange
|
|
4413
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4430
4414
|
});
|
|
4431
4415
|
|
|
4432
4416
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4505,7 +4489,7 @@
|
|
|
4505
4489
|
const MIN_YEARS = 0;
|
|
4506
4490
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4507
4491
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4508
|
-
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
|
|
4492
|
+
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 }));
|
|
4509
4493
|
});
|
|
4510
4494
|
|
|
4511
4495
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4526,7 +4510,7 @@
|
|
|
4526
4510
|
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 }));
|
|
4527
4511
|
});
|
|
4528
4512
|
|
|
4529
|
-
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
|
|
4513
|
+
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 })));
|
|
4530
4514
|
|
|
4531
4515
|
const HousingField = JSX(({ field, input }) => {
|
|
4532
4516
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4535,9 +4519,9 @@
|
|
|
4535
4519
|
|
|
4536
4520
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4537
4521
|
|
|
4538
|
-
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
|
|
4522
|
+
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 })));
|
|
4539
4523
|
|
|
4540
|
-
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
|
|
4524
|
+
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 })));
|
|
4541
4525
|
|
|
4542
4526
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4543
4527
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4689,7 +4673,7 @@
|
|
|
4689
4673
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4690
4674
|
updateOrganizationFields(store, field, item);
|
|
4691
4675
|
}, []);
|
|
4692
|
-
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 ?? ''),
|
|
4676
|
+
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 }));
|
|
4693
4677
|
});
|
|
4694
4678
|
|
|
4695
4679
|
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 })));
|
|
@@ -4829,7 +4813,7 @@
|
|
|
4829
4813
|
|
|
4830
4814
|
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 })));
|
|
4831
4815
|
|
|
4832
|
-
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
|
|
4816
|
+
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 })));
|
|
4833
4817
|
|
|
4834
4818
|
const DELIVERY_CITIES_REF = {
|
|
4835
4819
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5459,7 +5443,7 @@
|
|
|
5459
5443
|
const participant = task.participants[0];
|
|
5460
5444
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5461
5445
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5462
|
-
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,
|
|
5446
|
+
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;
|
|
5463
5447
|
return {
|
|
5464
5448
|
currency: currency?.key,
|
|
5465
5449
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5511,7 +5495,6 @@
|
|
|
5511
5495
|
monthsValue,
|
|
5512
5496
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5513
5497
|
},
|
|
5514
|
-
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5515
5498
|
...getParticipantIncomes(participantIncomes),
|
|
5516
5499
|
...getParticipantAddresses(participantAddresses),
|
|
5517
5500
|
...getParticipantContacts(participantContacts),
|
|
@@ -5566,6 +5549,39 @@
|
|
|
5566
5549
|
};
|
|
5567
5550
|
};
|
|
5568
5551
|
|
|
5552
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5553
|
+
|
|
5554
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5555
|
+
const navigator = locationNavigator();
|
|
5556
|
+
const retailFormStore = useRetailFormStore();
|
|
5557
|
+
const handleAuth = useCallback(async () => {
|
|
5558
|
+
const resp = await getLink({
|
|
5559
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5560
|
+
});
|
|
5561
|
+
if (resp?.link) {
|
|
5562
|
+
navigator.assign(resp.link);
|
|
5563
|
+
globalThis.location.href = resp.link;
|
|
5564
|
+
}
|
|
5565
|
+
}, []);
|
|
5566
|
+
const handleClose = useCallback(() => {
|
|
5567
|
+
if (retailFormStore.leadForm) {
|
|
5568
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
5569
|
+
delete leadForm.esiaAccountTypeCd;
|
|
5570
|
+
retailFormStore.leadForm = leadForm;
|
|
5571
|
+
}
|
|
5572
|
+
onClose?.();
|
|
5573
|
+
}, []);
|
|
5574
|
+
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" })] })] }) }));
|
|
5575
|
+
});
|
|
5576
|
+
|
|
5577
|
+
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5578
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
5579
|
+
const navigator = locationNavigator();
|
|
5580
|
+
return useCallback(() => {
|
|
5581
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5582
|
+
}, [open, nextStepLink]);
|
|
5583
|
+
};
|
|
5584
|
+
|
|
5569
5585
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5570
5586
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5571
5587
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5687,19 +5703,21 @@
|
|
|
5687
5703
|
|
|
5688
5704
|
/* eslint-disable max-lines */
|
|
5689
5705
|
// eslint-disable-next-line max-lines-per-function
|
|
5690
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5706
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
|
|
5691
5707
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5692
5708
|
const [ok, setOK] = useState();
|
|
5693
5709
|
const saveUserData = useSaveUserData();
|
|
5694
5710
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5695
5711
|
const navigator = locationNavigator();
|
|
5696
|
-
const
|
|
5697
|
-
|
|
5698
|
-
}, []);
|
|
5699
|
-
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5712
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5713
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
5700
5714
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5701
5715
|
const draftDialog = useDraftDialog();
|
|
5702
5716
|
const handleSubmit = useCallback(async (formData) => {
|
|
5717
|
+
if (esiaError) {
|
|
5718
|
+
navigator.assign(nextStepLink);
|
|
5719
|
+
return;
|
|
5720
|
+
}
|
|
5703
5721
|
try {
|
|
5704
5722
|
startSending();
|
|
5705
5723
|
const profileId = await createUserProfile({
|
|
@@ -5717,7 +5735,7 @@
|
|
|
5717
5735
|
});
|
|
5718
5736
|
verifyPhoneDialog.close();
|
|
5719
5737
|
if (productType === 'debitCard') {
|
|
5720
|
-
|
|
5738
|
+
openEsiaLoginDialog();
|
|
5721
5739
|
}
|
|
5722
5740
|
else {
|
|
5723
5741
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5756,7 +5774,7 @@
|
|
|
5756
5774
|
catch {
|
|
5757
5775
|
setOK(false);
|
|
5758
5776
|
}
|
|
5759
|
-
}, []);
|
|
5777
|
+
}, [esiaError]);
|
|
5760
5778
|
return { isSending, ok, handleSubmit };
|
|
5761
5779
|
};
|
|
5762
5780
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5839,10 +5857,7 @@
|
|
|
5839
5857
|
}
|
|
5840
5858
|
}, [target, key]);
|
|
5841
5859
|
|
|
5842
|
-
const
|
|
5843
|
-
saveToken(res);
|
|
5844
|
-
return res;
|
|
5845
|
-
});
|
|
5860
|
+
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5846
5861
|
|
|
5847
5862
|
const initialFormState = {
|
|
5848
5863
|
surname: '',
|
|
@@ -5860,24 +5875,19 @@
|
|
|
5860
5875
|
consentPhotoFlg: false,
|
|
5861
5876
|
consentFATCA: false,
|
|
5862
5877
|
};
|
|
5863
|
-
const getInitialFormState$1 = (inputs, savedForm
|
|
5878
|
+
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5864
5879
|
if (savedForm) {
|
|
5865
|
-
return {
|
|
5866
|
-
...savedForm,
|
|
5867
|
-
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5868
|
-
...(!esiaAuthSuccess && {
|
|
5869
|
-
esiaAccountTypeCd: { key: '' },
|
|
5870
|
-
}),
|
|
5871
|
-
};
|
|
5880
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5872
5881
|
}
|
|
5873
5882
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5874
5883
|
return { ...formState };
|
|
5875
5884
|
};
|
|
5876
5885
|
|
|
5877
|
-
const uploadFile = async (file,
|
|
5886
|
+
const uploadFile = async (file, taskId, documentCategory) => {
|
|
5878
5887
|
const fd = new FormData();
|
|
5888
|
+
fd.append('taskId', taskId);
|
|
5879
5889
|
fd.append('documentCategory', documentCategory);
|
|
5880
|
-
fd.append('file', file,
|
|
5890
|
+
fd.append('file', file, 'file.pdf');
|
|
5881
5891
|
const res = await globalThis
|
|
5882
5892
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5883
5893
|
method: 'POST',
|
|
@@ -5891,13 +5901,23 @@
|
|
|
5891
5901
|
return res;
|
|
5892
5902
|
};
|
|
5893
5903
|
|
|
5894
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5895
|
-
|
|
5896
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5904
|
+
const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
|
|
5905
|
+
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5897
5906
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5898
|
-
|
|
5899
|
-
if (
|
|
5900
|
-
|
|
5907
|
+
const files = [];
|
|
5908
|
+
if (!isDebit) {
|
|
5909
|
+
await saveDocument({
|
|
5910
|
+
document: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5911
|
+
taskId,
|
|
5912
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5913
|
+
files,
|
|
5914
|
+
});
|
|
5915
|
+
await saveDocument({
|
|
5916
|
+
document: esiaAdditionalDocument.pdfFilePayout,
|
|
5917
|
+
taskId,
|
|
5918
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5919
|
+
files,
|
|
5920
|
+
});
|
|
5901
5921
|
}
|
|
5902
5922
|
const mainData = {
|
|
5903
5923
|
name: profile.name,
|
|
@@ -5914,11 +5934,11 @@
|
|
|
5914
5934
|
birthPlace: addInfo.birthPlace,
|
|
5915
5935
|
addressRegistration: buildAddress(addressRegistration),
|
|
5916
5936
|
addressFact: buildAddress(addressFact),
|
|
5917
|
-
esiaAccountTypeCd:
|
|
5937
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5918
5938
|
};
|
|
5919
5939
|
return {
|
|
5920
5940
|
...mainData,
|
|
5921
|
-
...(
|
|
5941
|
+
...(!isDebit && {
|
|
5922
5942
|
snils: addInfo.snils,
|
|
5923
5943
|
inn: esiaAdditionalDocument.inn,
|
|
5924
5944
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5927,9 +5947,6 @@
|
|
|
5927
5947
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5928
5948
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5929
5949
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5930
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5931
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5932
|
-
employment: { key: 'WORK', text: 'Работаю' },
|
|
5933
5950
|
files,
|
|
5934
5951
|
}),
|
|
5935
5952
|
};
|
|
@@ -5962,67 +5979,21 @@
|
|
|
5962
5979
|
};
|
|
5963
5980
|
};
|
|
5964
5981
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5965
|
-
const
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
{
|
|
5974
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5975
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5976
|
-
isPDF: true,
|
|
5977
|
-
},
|
|
5978
|
-
{
|
|
5979
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5980
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5981
|
-
isPDF: true,
|
|
5982
|
-
},
|
|
5983
|
-
{
|
|
5984
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5985
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5986
|
-
isPDF: false,
|
|
5987
|
-
},
|
|
5988
|
-
{
|
|
5989
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5990
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5991
|
-
isPDF: false,
|
|
5992
|
-
},
|
|
5993
|
-
{
|
|
5994
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5995
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5996
|
-
isPDF: false,
|
|
5997
|
-
},
|
|
5998
|
-
{
|
|
5999
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6000
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6001
|
-
isPDF: true,
|
|
6002
|
-
},
|
|
6003
|
-
{
|
|
6004
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6005
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6006
|
-
isPDF: false,
|
|
6007
|
-
},
|
|
6008
|
-
];
|
|
6009
|
-
for (const doc of documents) {
|
|
6010
|
-
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6011
|
-
await fetch(`${contentType},${doc.file}`)
|
|
6012
|
-
.then((res) => res.blob())
|
|
6013
|
-
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6014
|
-
.then((file) => files.push(file));
|
|
6015
|
-
}
|
|
6016
|
-
return files;
|
|
6017
|
-
};
|
|
6018
|
-
const checkEsiaData = (esiaProfile) => {
|
|
6019
|
-
const { profile, document, addressRegistration } = esiaProfile;
|
|
5982
|
+
const saveDocument = async ({ document, taskId, category, files, }) => {
|
|
5983
|
+
await fetch(`data:application/pdf;base64,${document}`)
|
|
5984
|
+
.then((res) => res.blob())
|
|
5985
|
+
.then((value) => uploadFile(value, taskId, category))
|
|
5986
|
+
.then((file) => files.push(file));
|
|
5987
|
+
};
|
|
5988
|
+
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
5989
|
+
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
6020
5990
|
const data = [
|
|
6021
5991
|
profile.name,
|
|
6022
5992
|
profile.surname,
|
|
6023
5993
|
profile.midname,
|
|
6024
5994
|
profile.birthDate,
|
|
6025
5995
|
profile.phone,
|
|
5996
|
+
profile.email,
|
|
6026
5997
|
document.dulIssueDate,
|
|
6027
5998
|
document.dulIssuedBy,
|
|
6028
5999
|
document.dulNumber,
|
|
@@ -6030,14 +6001,6 @@
|
|
|
6030
6001
|
document.dulSubdivisionCode,
|
|
6031
6002
|
addressRegistration,
|
|
6032
6003
|
profile.esiaAccountType,
|
|
6033
|
-
];
|
|
6034
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6035
|
-
throw new Error();
|
|
6036
|
-
}
|
|
6037
|
-
};
|
|
6038
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6039
|
-
const { esiaAdditionalDocument } = esiaProfile;
|
|
6040
|
-
const data = [
|
|
6041
6004
|
esiaAdditionalDocument.inn,
|
|
6042
6005
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6043
6006
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6047,84 +6010,100 @@
|
|
|
6047
6010
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6048
6011
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6049
6012
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6050
|
-
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6051
|
-
esiaAdditionalDocument.xmlFilePayout,
|
|
6052
|
-
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6053
|
-
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6054
|
-
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6055
|
-
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6056
6013
|
];
|
|
6057
|
-
|
|
6014
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6015
|
+
throw new Error();
|
|
6016
|
+
}
|
|
6017
|
+
};
|
|
6018
|
+
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6019
|
+
const { profile, document, addressRegistration } = esiaProfile;
|
|
6020
|
+
const data = [
|
|
6021
|
+
profile.name,
|
|
6022
|
+
profile.surname,
|
|
6023
|
+
profile.midname,
|
|
6024
|
+
profile.birthDate,
|
|
6025
|
+
profile.phone,
|
|
6026
|
+
profile.email,
|
|
6027
|
+
document.dulIssueDate,
|
|
6028
|
+
document.dulIssuedBy,
|
|
6029
|
+
document.dulNumber,
|
|
6030
|
+
document.dulSerie,
|
|
6031
|
+
document.dulSubdivisionCode,
|
|
6032
|
+
addressRegistration,
|
|
6033
|
+
profile.esiaAccountType,
|
|
6034
|
+
];
|
|
6035
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6036
|
+
throw new Error();
|
|
6037
|
+
}
|
|
6058
6038
|
};
|
|
6059
6039
|
|
|
6060
|
-
const useInitApplicationLead = ({ inputs,
|
|
6040
|
+
const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
|
|
6041
|
+
const navigator = locationNavigator();
|
|
6042
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6061
6043
|
const leadFormStore = useLeadFormStore();
|
|
6062
6044
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6063
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm
|
|
6064
|
-
const
|
|
6065
|
-
|
|
6045
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6046
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
6047
|
+
startLoading();
|
|
6066
6048
|
try {
|
|
6067
|
-
const data = await
|
|
6049
|
+
const data = await updateProfileEsia({
|
|
6050
|
+
profileId,
|
|
6068
6051
|
code,
|
|
6069
6052
|
state,
|
|
6070
6053
|
redirectUri: globalThis.location?.href,
|
|
6071
|
-
authorize: true,
|
|
6072
6054
|
});
|
|
6073
|
-
if (data) {
|
|
6074
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6055
|
+
if (data && leadFormStore?.taskId) {
|
|
6056
|
+
const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
|
|
6075
6057
|
saveForm((_) => ({
|
|
6076
6058
|
..._,
|
|
6077
6059
|
...parsedData,
|
|
6078
6060
|
}));
|
|
6079
|
-
setEsiaStatus(EsiaStatuses.Success);
|
|
6080
6061
|
}
|
|
6062
|
+
navigator.assign(nextStepLink);
|
|
6081
6063
|
}
|
|
6082
6064
|
catch {
|
|
6083
|
-
|
|
6065
|
+
setEsiaError();
|
|
6084
6066
|
}
|
|
6085
|
-
|
|
6067
|
+
finally {
|
|
6068
|
+
endLoading();
|
|
6069
|
+
}
|
|
6070
|
+
}, [nextStepLink]);
|
|
6086
6071
|
useEffect(() => {
|
|
6087
6072
|
leadFormStore.productType = productType;
|
|
6073
|
+
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6088
6074
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6089
6075
|
const code = params.get('code');
|
|
6090
6076
|
const state = params.get('state');
|
|
6091
|
-
if (code && state) {
|
|
6092
|
-
|
|
6077
|
+
if (profileId && code && state) {
|
|
6078
|
+
updateEsiaProfile(profileId, code, state);
|
|
6093
6079
|
}
|
|
6094
6080
|
else {
|
|
6095
6081
|
sessionStorage.removeItem('accessToken');
|
|
6096
6082
|
sessionStorage.removeItem('refreshToken');
|
|
6097
6083
|
}
|
|
6098
6084
|
}, []);
|
|
6099
|
-
return initialFormState;
|
|
6085
|
+
return [initialFormState, { isLoading }];
|
|
6100
6086
|
};
|
|
6101
6087
|
|
|
6102
|
-
var EsiaStatuses;
|
|
6103
|
-
(function (EsiaStatuses) {
|
|
6104
|
-
EsiaStatuses["Success"] = "SUCCESS";
|
|
6105
|
-
EsiaStatuses["Error"] = "ERROR";
|
|
6106
|
-
EsiaStatuses["Pending"] = "PENDING";
|
|
6107
|
-
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6108
6088
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6109
|
-
const [
|
|
6110
|
-
const leadForm = useRef(null);
|
|
6089
|
+
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6111
6090
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6112
6091
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6113
6092
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
6114
|
-
const initialFormState = useInitApplicationLead({
|
|
6093
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead({
|
|
6115
6094
|
inputs,
|
|
6116
6095
|
nextStepLink,
|
|
6117
6096
|
productType,
|
|
6118
|
-
|
|
6119
|
-
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6097
|
+
setEsiaError,
|
|
6120
6098
|
});
|
|
6121
6099
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6122
6100
|
programId,
|
|
6123
6101
|
nextStepLink,
|
|
6124
6102
|
productType,
|
|
6103
|
+
esiaError,
|
|
6125
6104
|
data,
|
|
6126
6105
|
});
|
|
6127
|
-
const [, { field, onSubmit
|
|
6106
|
+
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6128
6107
|
formValidator,
|
|
6129
6108
|
onSubmit: handleSubmit,
|
|
6130
6109
|
});
|
|
@@ -6134,17 +6113,7 @@
|
|
|
6134
6113
|
responseTypeDialog.open({ ok });
|
|
6135
6114
|
}
|
|
6136
6115
|
}, [ok]);
|
|
6137
|
-
|
|
6138
|
-
if (esiaStatus && leadForm?.current) {
|
|
6139
|
-
leadForm.current.scrollIntoView({
|
|
6140
|
-
block: 'start',
|
|
6141
|
-
});
|
|
6142
|
-
}
|
|
6143
|
-
if (esiaStatus === EsiaStatuses.Success) {
|
|
6144
|
-
reset();
|
|
6145
|
-
}
|
|
6146
|
-
}, [leadForm?.current, esiaStatus]);
|
|
6147
|
-
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] })] }));
|
|
6116
|
+
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] }) }));
|
|
6148
6117
|
});
|
|
6149
6118
|
|
|
6150
6119
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7853,7 +7822,6 @@
|
|
|
7853
7822
|
mandatoryPayments: undefined,
|
|
7854
7823
|
snils: '',
|
|
7855
7824
|
armyIdFlg: false,
|
|
7856
|
-
esiaAccountTypeCd: { key: '', text: '' },
|
|
7857
7825
|
},
|
|
7858
7826
|
{
|
|
7859
7827
|
bankruptcyFlg: false,
|
|
@@ -8244,7 +8212,7 @@
|
|
|
8244
8212
|
label: 'Телефон работодателя',
|
|
8245
8213
|
required: true,
|
|
8246
8214
|
},
|
|
8247
|
-
{ name: 'beginDate', required: true
|
|
8215
|
+
{ name: 'beginDate', required: true },
|
|
8248
8216
|
],
|
|
8249
8217
|
},
|
|
8250
8218
|
{
|
|
@@ -8285,16 +8253,6 @@
|
|
|
8285
8253
|
{
|
|
8286
8254
|
title: 'Совокупный доход',
|
|
8287
8255
|
},
|
|
8288
|
-
{
|
|
8289
|
-
columns: 1,
|
|
8290
|
-
inputs: [
|
|
8291
|
-
{
|
|
8292
|
-
name: 'confirmationIncome',
|
|
8293
|
-
required: true,
|
|
8294
|
-
filledByEsia: true,
|
|
8295
|
-
},
|
|
8296
|
-
],
|
|
8297
|
-
},
|
|
8298
8256
|
{
|
|
8299
8257
|
inputs: [
|
|
8300
8258
|
{
|
|
@@ -8303,6 +8261,10 @@
|
|
|
8303
8261
|
},
|
|
8304
8262
|
],
|
|
8305
8263
|
},
|
|
8264
|
+
{
|
|
8265
|
+
columns: 1,
|
|
8266
|
+
inputs: [{ name: 'confirmationIncome', required: true }],
|
|
8267
|
+
},
|
|
8306
8268
|
{
|
|
8307
8269
|
columns: 1,
|
|
8308
8270
|
inputs: [{ name: 'wages', required: true, filledByEsia: true }],
|
|
@@ -11592,7 +11554,7 @@
|
|
|
11592
11554
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11593
11555
|
});
|
|
11594
11556
|
|
|
11595
|
-
const packageVersion = "0.14.
|
|
11557
|
+
const packageVersion = "0.14.820";
|
|
11596
11558
|
|
|
11597
11559
|
exports.Blocks = Blocks;
|
|
11598
11560
|
exports.ContentPage = ContentPage;
|