@redneckz/wildless-cms-uni-blocks 0.14.819 → 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 +188 -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/AcquiringField.js +4 -0
- package/dist/ui-kit/FormField/Fields/AcquiringField.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/AcquiringField.js +4 -0
- package/lib/ui-kit/FormField/Fields/AcquiringField.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 +188 -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/AcquiringField.js +4 -0
- package/mobile/dist/ui-kit/FormField/Fields/AcquiringField.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/AcquiringField.js +4 -0
- package/mobile/lib/ui-kit/FormField/Fields/AcquiringField.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/AcquiringField.tsx +4 -0
- 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/AcquiringField.tsx +4 -0
- 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
|
@@ -1407,6 +1407,10 @@
|
|
|
1407
1407
|
text: 'Интернет-эквайринг',
|
|
1408
1408
|
key: 'internet',
|
|
1409
1409
|
},
|
|
1410
|
+
{
|
|
1411
|
+
text: 'SoftPOS',
|
|
1412
|
+
key: 'softpos',
|
|
1413
|
+
},
|
|
1410
1414
|
{
|
|
1411
1415
|
text: 'Все виды эквайринга',
|
|
1412
1416
|
key: 'all',
|
|
@@ -2018,7 +2022,7 @@
|
|
|
2018
2022
|
|
|
2019
2023
|
const PhoneField = JSX(({ field, input }) => {
|
|
2020
2024
|
const fieldName = input?.name || 'phone';
|
|
2021
|
-
return
|
|
2025
|
+
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2022
2026
|
});
|
|
2023
2027
|
|
|
2024
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);
|
|
@@ -2198,7 +2202,7 @@
|
|
|
2198
2202
|
function shouldRenderField({ input, field, }) {
|
|
2199
2203
|
const { condition } = input;
|
|
2200
2204
|
const { value } = field(condition?.name || '');
|
|
2201
|
-
return !condition || condition?.values?.
|
|
2205
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
2202
2206
|
}
|
|
2203
2207
|
|
|
2204
2208
|
const PRODUCT_REF = {
|
|
@@ -2633,11 +2637,11 @@
|
|
|
2633
2637
|
{
|
|
2634
2638
|
columns: 2,
|
|
2635
2639
|
inputs: [
|
|
2636
|
-
{ name: 'surname', required: true, dadata: true
|
|
2637
|
-
{ name: 'name', required: true, dadata: true
|
|
2638
|
-
{ name: 'middleName', dadata: true
|
|
2639
|
-
{ name: 'limitedBirthday', required: true
|
|
2640
|
-
{ 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 },
|
|
2641
2645
|
{ name: 'email', required: true, dadata: true },
|
|
2642
2646
|
],
|
|
2643
2647
|
},
|
|
@@ -2647,57 +2651,6 @@
|
|
|
2647
2651
|
];
|
|
2648
2652
|
};
|
|
2649
2653
|
|
|
2650
|
-
const getTraceId = () => {
|
|
2651
|
-
const result = new Uint8Array(8);
|
|
2652
|
-
globalThis.crypto.getRandomValues(result);
|
|
2653
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2654
|
-
};
|
|
2655
|
-
|
|
2656
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
2657
|
-
try {
|
|
2658
|
-
const response = await doRequest(url, method, body);
|
|
2659
|
-
return response.json();
|
|
2660
|
-
}
|
|
2661
|
-
catch (err) {
|
|
2662
|
-
console.error(err);
|
|
2663
|
-
return null;
|
|
2664
|
-
}
|
|
2665
|
-
};
|
|
2666
|
-
async function doRequest(url, method, body) {
|
|
2667
|
-
const traceId = getTraceId();
|
|
2668
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2669
|
-
method,
|
|
2670
|
-
headers: {
|
|
2671
|
-
'Content-Type': 'application/json',
|
|
2672
|
-
'X-B3-Sampled': '1',
|
|
2673
|
-
'X-B3-Spanid': traceId,
|
|
2674
|
-
'X-B3-Traceid': traceId,
|
|
2675
|
-
...getAuthorizationHeaders(),
|
|
2676
|
-
},
|
|
2677
|
-
credentials: 'include',
|
|
2678
|
-
body: body ? JSON.stringify(body) : null,
|
|
2679
|
-
});
|
|
2680
|
-
}
|
|
2681
|
-
const getAuthorizationHeaders = () => {
|
|
2682
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2683
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2684
|
-
};
|
|
2685
|
-
|
|
2686
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2687
|
-
|
|
2688
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2689
|
-
const navigator = locationNavigator();
|
|
2690
|
-
const handleAuth = useCallback(async () => {
|
|
2691
|
-
const resp = await getLink({
|
|
2692
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2693
|
-
});
|
|
2694
|
-
if (resp?.link) {
|
|
2695
|
-
navigator.assign(resp.link);
|
|
2696
|
-
}
|
|
2697
|
-
}, []);
|
|
2698
|
-
return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray px-4 py-6 @md:p-9", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-4 text-xl @md:text-2xl @md:mb-6", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-9", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-6 self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
|
|
2699
|
-
});
|
|
2700
|
-
|
|
2701
2654
|
const debounce = (fn, delay = 600) => {
|
|
2702
2655
|
let timerId;
|
|
2703
2656
|
const debouncedCallback = (...args) => {
|
|
@@ -3584,6 +3537,42 @@
|
|
|
3584
3537
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3585
3538
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3586
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
|
+
|
|
3587
3576
|
const fetchRegionOffices = async (regionKey) => {
|
|
3588
3577
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3589
3578
|
regionRfCd: {
|
|
@@ -3813,7 +3802,7 @@
|
|
|
3813
3802
|
|
|
3814
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 ?? '') })));
|
|
3815
3804
|
|
|
3816
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input
|
|
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 })));
|
|
3817
3806
|
|
|
3818
3807
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3819
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) })));
|
|
@@ -3877,8 +3866,7 @@
|
|
|
3877
3866
|
|
|
3878
3867
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3879
3868
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3880
|
-
|
|
3881
|
-
return (jsxs("div", { children: [filledByEsia ? (jsx("div", { className: "mb-6", children: jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }) })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
|
|
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 }));
|
|
3882
3870
|
});
|
|
3883
3871
|
|
|
3884
3872
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4422,7 +4410,7 @@
|
|
|
4422
4410
|
}
|
|
4423
4411
|
})();
|
|
4424
4412
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4425
|
-
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 }));
|
|
4426
4414
|
});
|
|
4427
4415
|
|
|
4428
4416
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4501,7 +4489,7 @@
|
|
|
4501
4489
|
const MIN_YEARS = 0;
|
|
4502
4490
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4503
4491
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4504
|
-
return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange
|
|
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 }));
|
|
4505
4493
|
});
|
|
4506
4494
|
|
|
4507
4495
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4522,7 +4510,7 @@
|
|
|
4522
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 }));
|
|
4523
4511
|
});
|
|
4524
4512
|
|
|
4525
|
-
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input
|
|
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 })));
|
|
4526
4514
|
|
|
4527
4515
|
const HousingField = JSX(({ field, input }) => {
|
|
4528
4516
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4531,9 +4519,9 @@
|
|
|
4531
4519
|
|
|
4532
4520
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4533
4521
|
|
|
4534
|
-
const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input
|
|
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 })));
|
|
4535
4523
|
|
|
4536
|
-
const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input
|
|
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 })));
|
|
4537
4525
|
|
|
4538
4526
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4539
4527
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4685,7 +4673,7 @@
|
|
|
4685
4673
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4686
4674
|
updateOrganizationFields(store, field, item);
|
|
4687
4675
|
}, []);
|
|
4688
|
-
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''),
|
|
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 }));
|
|
4689
4677
|
});
|
|
4690
4678
|
|
|
4691
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 })));
|
|
@@ -4825,7 +4813,7 @@
|
|
|
4825
4813
|
|
|
4826
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 })));
|
|
4827
4815
|
|
|
4828
|
-
const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input
|
|
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 })));
|
|
4829
4817
|
|
|
4830
4818
|
const DELIVERY_CITIES_REF = {
|
|
4831
4819
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5455,7 +5443,7 @@
|
|
|
5455
5443
|
const participant = task.participants[0];
|
|
5456
5444
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5457
5445
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5458
|
-
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;
|
|
5459
5447
|
return {
|
|
5460
5448
|
currency: currency?.key,
|
|
5461
5449
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5507,7 +5495,6 @@
|
|
|
5507
5495
|
monthsValue,
|
|
5508
5496
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5509
5497
|
},
|
|
5510
|
-
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5511
5498
|
...getParticipantIncomes(participantIncomes),
|
|
5512
5499
|
...getParticipantAddresses(participantAddresses),
|
|
5513
5500
|
...getParticipantContacts(participantContacts),
|
|
@@ -5562,6 +5549,39 @@
|
|
|
5562
5549
|
};
|
|
5563
5550
|
};
|
|
5564
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
|
+
|
|
5565
5585
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5566
5586
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5567
5587
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5683,19 +5703,21 @@
|
|
|
5683
5703
|
|
|
5684
5704
|
/* eslint-disable max-lines */
|
|
5685
5705
|
// eslint-disable-next-line max-lines-per-function
|
|
5686
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5706
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
|
|
5687
5707
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5688
5708
|
const [ok, setOK] = useState();
|
|
5689
5709
|
const saveUserData = useSaveUserData();
|
|
5690
5710
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5691
5711
|
const navigator = locationNavigator();
|
|
5692
|
-
const
|
|
5693
|
-
|
|
5694
|
-
}, []);
|
|
5695
|
-
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5712
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5713
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
5696
5714
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5697
5715
|
const draftDialog = useDraftDialog();
|
|
5698
5716
|
const handleSubmit = useCallback(async (formData) => {
|
|
5717
|
+
if (esiaError) {
|
|
5718
|
+
navigator.assign(nextStepLink);
|
|
5719
|
+
return;
|
|
5720
|
+
}
|
|
5699
5721
|
try {
|
|
5700
5722
|
startSending();
|
|
5701
5723
|
const profileId = await createUserProfile({
|
|
@@ -5713,7 +5735,7 @@
|
|
|
5713
5735
|
});
|
|
5714
5736
|
verifyPhoneDialog.close();
|
|
5715
5737
|
if (productType === 'debitCard') {
|
|
5716
|
-
|
|
5738
|
+
openEsiaLoginDialog();
|
|
5717
5739
|
}
|
|
5718
5740
|
else {
|
|
5719
5741
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5752,7 +5774,7 @@
|
|
|
5752
5774
|
catch {
|
|
5753
5775
|
setOK(false);
|
|
5754
5776
|
}
|
|
5755
|
-
}, []);
|
|
5777
|
+
}, [esiaError]);
|
|
5756
5778
|
return { isSending, ok, handleSubmit };
|
|
5757
5779
|
};
|
|
5758
5780
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5835,10 +5857,7 @@
|
|
|
5835
5857
|
}
|
|
5836
5858
|
}, [target, key]);
|
|
5837
5859
|
|
|
5838
|
-
const
|
|
5839
|
-
saveToken(res);
|
|
5840
|
-
return res;
|
|
5841
|
-
});
|
|
5860
|
+
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5842
5861
|
|
|
5843
5862
|
const initialFormState = {
|
|
5844
5863
|
surname: '',
|
|
@@ -5856,24 +5875,19 @@
|
|
|
5856
5875
|
consentPhotoFlg: false,
|
|
5857
5876
|
consentFATCA: false,
|
|
5858
5877
|
};
|
|
5859
|
-
const getInitialFormState$1 = (inputs, savedForm
|
|
5878
|
+
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5860
5879
|
if (savedForm) {
|
|
5861
|
-
return {
|
|
5862
|
-
...savedForm,
|
|
5863
|
-
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5864
|
-
...(!esiaAuthSuccess && {
|
|
5865
|
-
esiaAccountTypeCd: { key: '' },
|
|
5866
|
-
}),
|
|
5867
|
-
};
|
|
5880
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5868
5881
|
}
|
|
5869
5882
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5870
5883
|
return { ...formState };
|
|
5871
5884
|
};
|
|
5872
5885
|
|
|
5873
|
-
const uploadFile = async (file,
|
|
5886
|
+
const uploadFile = async (file, taskId, documentCategory) => {
|
|
5874
5887
|
const fd = new FormData();
|
|
5888
|
+
fd.append('taskId', taskId);
|
|
5875
5889
|
fd.append('documentCategory', documentCategory);
|
|
5876
|
-
fd.append('file', file,
|
|
5890
|
+
fd.append('file', file, 'file.pdf');
|
|
5877
5891
|
const res = await globalThis
|
|
5878
5892
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5879
5893
|
method: 'POST',
|
|
@@ -5887,13 +5901,23 @@
|
|
|
5887
5901
|
return res;
|
|
5888
5902
|
};
|
|
5889
5903
|
|
|
5890
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5891
|
-
|
|
5892
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5904
|
+
const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
|
|
5905
|
+
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5893
5906
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5894
|
-
|
|
5895
|
-
if (
|
|
5896
|
-
|
|
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
|
+
});
|
|
5897
5921
|
}
|
|
5898
5922
|
const mainData = {
|
|
5899
5923
|
name: profile.name,
|
|
@@ -5910,11 +5934,11 @@
|
|
|
5910
5934
|
birthPlace: addInfo.birthPlace,
|
|
5911
5935
|
addressRegistration: buildAddress(addressRegistration),
|
|
5912
5936
|
addressFact: buildAddress(addressFact),
|
|
5913
|
-
esiaAccountTypeCd:
|
|
5937
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5914
5938
|
};
|
|
5915
5939
|
return {
|
|
5916
5940
|
...mainData,
|
|
5917
|
-
...(
|
|
5941
|
+
...(!isDebit && {
|
|
5918
5942
|
snils: addInfo.snils,
|
|
5919
5943
|
inn: esiaAdditionalDocument.inn,
|
|
5920
5944
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5923,9 +5947,6 @@
|
|
|
5923
5947
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5924
5948
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5925
5949
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5926
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5927
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5928
|
-
employment: { key: 'WORK', text: 'Работаю' },
|
|
5929
5950
|
files,
|
|
5930
5951
|
}),
|
|
5931
5952
|
};
|
|
@@ -5958,67 +5979,21 @@
|
|
|
5958
5979
|
};
|
|
5959
5980
|
};
|
|
5960
5981
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5961
|
-
const
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
{
|
|
5970
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5971
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5972
|
-
isPDF: true,
|
|
5973
|
-
},
|
|
5974
|
-
{
|
|
5975
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5976
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5977
|
-
isPDF: true,
|
|
5978
|
-
},
|
|
5979
|
-
{
|
|
5980
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5981
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5982
|
-
isPDF: false,
|
|
5983
|
-
},
|
|
5984
|
-
{
|
|
5985
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5986
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5987
|
-
isPDF: false,
|
|
5988
|
-
},
|
|
5989
|
-
{
|
|
5990
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5991
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5992
|
-
isPDF: false,
|
|
5993
|
-
},
|
|
5994
|
-
{
|
|
5995
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
5996
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5997
|
-
isPDF: true,
|
|
5998
|
-
},
|
|
5999
|
-
{
|
|
6000
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6001
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6002
|
-
isPDF: false,
|
|
6003
|
-
},
|
|
6004
|
-
];
|
|
6005
|
-
for (const doc of documents) {
|
|
6006
|
-
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6007
|
-
await fetch(`${contentType},${doc.file}`)
|
|
6008
|
-
.then((res) => res.blob())
|
|
6009
|
-
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6010
|
-
.then((file) => files.push(file));
|
|
6011
|
-
}
|
|
6012
|
-
return files;
|
|
6013
|
-
};
|
|
6014
|
-
const checkEsiaData = (esiaProfile) => {
|
|
6015
|
-
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;
|
|
6016
5990
|
const data = [
|
|
6017
5991
|
profile.name,
|
|
6018
5992
|
profile.surname,
|
|
6019
5993
|
profile.midname,
|
|
6020
5994
|
profile.birthDate,
|
|
6021
5995
|
profile.phone,
|
|
5996
|
+
profile.email,
|
|
6022
5997
|
document.dulIssueDate,
|
|
6023
5998
|
document.dulIssuedBy,
|
|
6024
5999
|
document.dulNumber,
|
|
@@ -6026,14 +6001,6 @@
|
|
|
6026
6001
|
document.dulSubdivisionCode,
|
|
6027
6002
|
addressRegistration,
|
|
6028
6003
|
profile.esiaAccountType,
|
|
6029
|
-
];
|
|
6030
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6031
|
-
throw new Error();
|
|
6032
|
-
}
|
|
6033
|
-
};
|
|
6034
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6035
|
-
const { esiaAdditionalDocument } = esiaProfile;
|
|
6036
|
-
const data = [
|
|
6037
6004
|
esiaAdditionalDocument.inn,
|
|
6038
6005
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6039
6006
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6043,84 +6010,100 @@
|
|
|
6043
6010
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6044
6011
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6045
6012
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6046
|
-
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6047
|
-
esiaAdditionalDocument.xmlFilePayout,
|
|
6048
|
-
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6049
|
-
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6050
|
-
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6051
|
-
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6052
6013
|
];
|
|
6053
|
-
|
|
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
|
+
}
|
|
6054
6038
|
};
|
|
6055
6039
|
|
|
6056
|
-
const useInitApplicationLead = ({ inputs,
|
|
6040
|
+
const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
|
|
6041
|
+
const navigator = locationNavigator();
|
|
6042
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6057
6043
|
const leadFormStore = useLeadFormStore();
|
|
6058
6044
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6059
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm
|
|
6060
|
-
const
|
|
6061
|
-
|
|
6045
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6046
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
6047
|
+
startLoading();
|
|
6062
6048
|
try {
|
|
6063
|
-
const data = await
|
|
6049
|
+
const data = await updateProfileEsia({
|
|
6050
|
+
profileId,
|
|
6064
6051
|
code,
|
|
6065
6052
|
state,
|
|
6066
6053
|
redirectUri: globalThis.location?.href,
|
|
6067
|
-
authorize: true,
|
|
6068
6054
|
});
|
|
6069
|
-
if (data) {
|
|
6070
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6055
|
+
if (data && leadFormStore?.taskId) {
|
|
6056
|
+
const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
|
|
6071
6057
|
saveForm((_) => ({
|
|
6072
6058
|
..._,
|
|
6073
6059
|
...parsedData,
|
|
6074
6060
|
}));
|
|
6075
|
-
setEsiaStatus(EsiaStatuses.Success);
|
|
6076
6061
|
}
|
|
6062
|
+
navigator.assign(nextStepLink);
|
|
6077
6063
|
}
|
|
6078
6064
|
catch {
|
|
6079
|
-
|
|
6065
|
+
setEsiaError();
|
|
6080
6066
|
}
|
|
6081
|
-
|
|
6067
|
+
finally {
|
|
6068
|
+
endLoading();
|
|
6069
|
+
}
|
|
6070
|
+
}, [nextStepLink]);
|
|
6082
6071
|
useEffect(() => {
|
|
6083
6072
|
leadFormStore.productType = productType;
|
|
6073
|
+
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6084
6074
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6085
6075
|
const code = params.get('code');
|
|
6086
6076
|
const state = params.get('state');
|
|
6087
|
-
if (code && state) {
|
|
6088
|
-
|
|
6077
|
+
if (profileId && code && state) {
|
|
6078
|
+
updateEsiaProfile(profileId, code, state);
|
|
6089
6079
|
}
|
|
6090
6080
|
else {
|
|
6091
6081
|
sessionStorage.removeItem('accessToken');
|
|
6092
6082
|
sessionStorage.removeItem('refreshToken');
|
|
6093
6083
|
}
|
|
6094
6084
|
}, []);
|
|
6095
|
-
return initialFormState;
|
|
6085
|
+
return [initialFormState, { isLoading }];
|
|
6096
6086
|
};
|
|
6097
6087
|
|
|
6098
|
-
var EsiaStatuses;
|
|
6099
|
-
(function (EsiaStatuses) {
|
|
6100
|
-
EsiaStatuses["Success"] = "SUCCESS";
|
|
6101
|
-
EsiaStatuses["Error"] = "ERROR";
|
|
6102
|
-
EsiaStatuses["Pending"] = "PENDING";
|
|
6103
|
-
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6104
6088
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6105
|
-
const [
|
|
6106
|
-
const leadForm = useRef(null);
|
|
6089
|
+
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6107
6090
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6108
6091
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6109
6092
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
6110
|
-
const initialFormState = useInitApplicationLead({
|
|
6093
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead({
|
|
6111
6094
|
inputs,
|
|
6112
6095
|
nextStepLink,
|
|
6113
6096
|
productType,
|
|
6114
|
-
|
|
6115
|
-
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6097
|
+
setEsiaError,
|
|
6116
6098
|
});
|
|
6117
6099
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6118
6100
|
programId,
|
|
6119
6101
|
nextStepLink,
|
|
6120
6102
|
productType,
|
|
6103
|
+
esiaError,
|
|
6121
6104
|
data,
|
|
6122
6105
|
});
|
|
6123
|
-
const [, { field, onSubmit
|
|
6106
|
+
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6124
6107
|
formValidator,
|
|
6125
6108
|
onSubmit: handleSubmit,
|
|
6126
6109
|
});
|
|
@@ -6130,17 +6113,7 @@
|
|
|
6130
6113
|
responseTypeDialog.open({ ok });
|
|
6131
6114
|
}
|
|
6132
6115
|
}, [ok]);
|
|
6133
|
-
|
|
6134
|
-
if (esiaStatus && leadForm?.current) {
|
|
6135
|
-
leadForm.current.scrollIntoView({
|
|
6136
|
-
block: 'start',
|
|
6137
|
-
});
|
|
6138
|
-
}
|
|
6139
|
-
if (esiaStatus === EsiaStatuses.Success) {
|
|
6140
|
-
reset();
|
|
6141
|
-
}
|
|
6142
|
-
}, [leadForm?.current, esiaStatus]);
|
|
6143
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
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] }) }));
|
|
6144
6117
|
});
|
|
6145
6118
|
|
|
6146
6119
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7849,7 +7822,6 @@
|
|
|
7849
7822
|
mandatoryPayments: undefined,
|
|
7850
7823
|
snils: '',
|
|
7851
7824
|
armyIdFlg: false,
|
|
7852
|
-
esiaAccountTypeCd: { key: '', text: '' },
|
|
7853
7825
|
},
|
|
7854
7826
|
{
|
|
7855
7827
|
bankruptcyFlg: false,
|
|
@@ -8240,7 +8212,7 @@
|
|
|
8240
8212
|
label: 'Телефон работодателя',
|
|
8241
8213
|
required: true,
|
|
8242
8214
|
},
|
|
8243
|
-
{ name: 'beginDate', required: true
|
|
8215
|
+
{ name: 'beginDate', required: true },
|
|
8244
8216
|
],
|
|
8245
8217
|
},
|
|
8246
8218
|
{
|
|
@@ -8281,16 +8253,6 @@
|
|
|
8281
8253
|
{
|
|
8282
8254
|
title: 'Совокупный доход',
|
|
8283
8255
|
},
|
|
8284
|
-
{
|
|
8285
|
-
columns: 1,
|
|
8286
|
-
inputs: [
|
|
8287
|
-
{
|
|
8288
|
-
name: 'confirmationIncome',
|
|
8289
|
-
required: true,
|
|
8290
|
-
filledByEsia: true,
|
|
8291
|
-
},
|
|
8292
|
-
],
|
|
8293
|
-
},
|
|
8294
8256
|
{
|
|
8295
8257
|
inputs: [
|
|
8296
8258
|
{
|
|
@@ -8299,6 +8261,10 @@
|
|
|
8299
8261
|
},
|
|
8300
8262
|
],
|
|
8301
8263
|
},
|
|
8264
|
+
{
|
|
8265
|
+
columns: 1,
|
|
8266
|
+
inputs: [{ name: 'confirmationIncome', required: true }],
|
|
8267
|
+
},
|
|
8302
8268
|
{
|
|
8303
8269
|
columns: 1,
|
|
8304
8270
|
inputs: [{ name: 'wages', required: true, filledByEsia: true }],
|
|
@@ -11588,7 +11554,7 @@
|
|
|
11588
11554
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11589
11555
|
});
|
|
11590
11556
|
|
|
11591
|
-
const packageVersion = "0.14.
|
|
11557
|
+
const packageVersion = "0.14.820";
|
|
11592
11558
|
|
|
11593
11559
|
exports.Blocks = Blocks;
|
|
11594
11560
|
exports.ContentPage = ContentPage;
|