@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
|
@@ -1415,6 +1415,10 @@
|
|
|
1415
1415
|
text: 'Интернет-эквайринг',
|
|
1416
1416
|
key: 'internet',
|
|
1417
1417
|
},
|
|
1418
|
+
{
|
|
1419
|
+
text: 'SoftPOS',
|
|
1420
|
+
key: 'softpos',
|
|
1421
|
+
},
|
|
1418
1422
|
{
|
|
1419
1423
|
text: 'Все виды эквайринга',
|
|
1420
1424
|
key: 'all',
|
|
@@ -2026,7 +2030,7 @@
|
|
|
2026
2030
|
|
|
2027
2031
|
const PhoneField = JSX(({ field, input }) => {
|
|
2028
2032
|
const fieldName = input?.name || 'phone';
|
|
2029
|
-
return
|
|
2033
|
+
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2030
2034
|
});
|
|
2031
2035
|
|
|
2032
2036
|
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);
|
|
@@ -2206,7 +2210,7 @@
|
|
|
2206
2210
|
function shouldRenderField({ input, field, }) {
|
|
2207
2211
|
const { condition } = input;
|
|
2208
2212
|
const { value } = field(condition?.name || '');
|
|
2209
|
-
return !condition || condition?.values?.
|
|
2213
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
2210
2214
|
}
|
|
2211
2215
|
|
|
2212
2216
|
const PRODUCT_REF = {
|
|
@@ -2641,11 +2645,11 @@
|
|
|
2641
2645
|
{
|
|
2642
2646
|
columns: 2,
|
|
2643
2647
|
inputs: [
|
|
2644
|
-
{ name: 'surname', required: true, dadata: true
|
|
2645
|
-
{ name: 'name', required: true, dadata: true
|
|
2646
|
-
{ name: 'middleName', dadata: true
|
|
2647
|
-
{ name: 'limitedBirthday', required: true
|
|
2648
|
-
{ name: 'phone', required: true
|
|
2648
|
+
{ name: 'surname', required: true, dadata: true },
|
|
2649
|
+
{ name: 'name', required: true, dadata: true },
|
|
2650
|
+
{ name: 'middleName', dadata: true },
|
|
2651
|
+
{ name: 'limitedBirthday', required: true },
|
|
2652
|
+
{ name: 'phone', required: true },
|
|
2649
2653
|
{ name: 'email', required: true, dadata: true },
|
|
2650
2654
|
],
|
|
2651
2655
|
},
|
|
@@ -2655,57 +2659,6 @@
|
|
|
2655
2659
|
];
|
|
2656
2660
|
};
|
|
2657
2661
|
|
|
2658
|
-
const getTraceId = () => {
|
|
2659
|
-
const result = new Uint8Array(8);
|
|
2660
|
-
globalThis.crypto.getRandomValues(result);
|
|
2661
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2662
|
-
};
|
|
2663
|
-
|
|
2664
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
2665
|
-
try {
|
|
2666
|
-
const response = await doRequest(url, method, body);
|
|
2667
|
-
return response.json();
|
|
2668
|
-
}
|
|
2669
|
-
catch (err) {
|
|
2670
|
-
console.error(err);
|
|
2671
|
-
return null;
|
|
2672
|
-
}
|
|
2673
|
-
};
|
|
2674
|
-
async function doRequest(url, method, body) {
|
|
2675
|
-
const traceId = getTraceId();
|
|
2676
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2677
|
-
method,
|
|
2678
|
-
headers: {
|
|
2679
|
-
'Content-Type': 'application/json',
|
|
2680
|
-
'X-B3-Sampled': '1',
|
|
2681
|
-
'X-B3-Spanid': traceId,
|
|
2682
|
-
'X-B3-Traceid': traceId,
|
|
2683
|
-
...getAuthorizationHeaders(),
|
|
2684
|
-
},
|
|
2685
|
-
credentials: 'include',
|
|
2686
|
-
body: body ? JSON.stringify(body) : null,
|
|
2687
|
-
});
|
|
2688
|
-
}
|
|
2689
|
-
const getAuthorizationHeaders = () => {
|
|
2690
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2691
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2692
|
-
};
|
|
2693
|
-
|
|
2694
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2695
|
-
|
|
2696
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2697
|
-
const navigator = locationNavigator();
|
|
2698
|
-
const handleAuth = useCallback(async () => {
|
|
2699
|
-
const resp = await getLink({
|
|
2700
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2701
|
-
});
|
|
2702
|
-
if (resp?.link) {
|
|
2703
|
-
navigator.assign(resp.link);
|
|
2704
|
-
}
|
|
2705
|
-
}, []);
|
|
2706
|
-
return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray px-4 py-6 @md:p-9", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-4 text-xl @md:text-2xl @md:mb-6", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-9", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-6 self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
|
|
2707
|
-
});
|
|
2708
|
-
|
|
2709
2662
|
const debounce = (fn, delay = 600) => {
|
|
2710
2663
|
let timerId;
|
|
2711
2664
|
const debouncedCallback = (...args) => {
|
|
@@ -3592,6 +3545,42 @@
|
|
|
3592
3545
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3593
3546
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3594
3547
|
|
|
3548
|
+
const getTraceId = () => {
|
|
3549
|
+
const result = new Uint8Array(8);
|
|
3550
|
+
globalThis.crypto.getRandomValues(result);
|
|
3551
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3552
|
+
};
|
|
3553
|
+
|
|
3554
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
3555
|
+
try {
|
|
3556
|
+
const response = await doRequest(url, method, body);
|
|
3557
|
+
return response.json();
|
|
3558
|
+
}
|
|
3559
|
+
catch (err) {
|
|
3560
|
+
console.error(err);
|
|
3561
|
+
return null;
|
|
3562
|
+
}
|
|
3563
|
+
};
|
|
3564
|
+
async function doRequest(url, method, body) {
|
|
3565
|
+
const traceId = getTraceId();
|
|
3566
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3567
|
+
method,
|
|
3568
|
+
headers: {
|
|
3569
|
+
'Content-Type': 'application/json',
|
|
3570
|
+
'X-B3-Sampled': '1',
|
|
3571
|
+
'X-B3-Spanid': traceId,
|
|
3572
|
+
'X-B3-Traceid': traceId,
|
|
3573
|
+
...getAuthorizationHeaders(),
|
|
3574
|
+
},
|
|
3575
|
+
credentials: 'include',
|
|
3576
|
+
body: body ? JSON.stringify(body) : null,
|
|
3577
|
+
});
|
|
3578
|
+
}
|
|
3579
|
+
const getAuthorizationHeaders = () => {
|
|
3580
|
+
const token = sessionStorage.getItem('accessToken');
|
|
3581
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3582
|
+
};
|
|
3583
|
+
|
|
3595
3584
|
const fetchRegionOffices = async (regionKey) => {
|
|
3596
3585
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3597
3586
|
regionRfCd: {
|
|
@@ -3821,7 +3810,7 @@
|
|
|
3821
3810
|
|
|
3822
3811
|
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 ?? '') })));
|
|
3823
3812
|
|
|
3824
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input
|
|
3813
|
+
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 })));
|
|
3825
3814
|
|
|
3826
3815
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3827
3816
|
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) })));
|
|
@@ -3885,8 +3874,7 @@
|
|
|
3885
3874
|
|
|
3886
3875
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3887
3876
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3888
|
-
|
|
3889
|
-
return (jsxs("div", { children: [filledByEsia ? (jsx("div", { className: "mb-6", children: jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }) })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
|
|
3877
|
+
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 }));
|
|
3890
3878
|
});
|
|
3891
3879
|
|
|
3892
3880
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4430,7 +4418,7 @@
|
|
|
4430
4418
|
}
|
|
4431
4419
|
})();
|
|
4432
4420
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4433
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange
|
|
4421
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4434
4422
|
});
|
|
4435
4423
|
|
|
4436
4424
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4509,7 +4497,7 @@
|
|
|
4509
4497
|
const MIN_YEARS = 0;
|
|
4510
4498
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4511
4499
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4512
|
-
return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange
|
|
4500
|
+
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 }));
|
|
4513
4501
|
});
|
|
4514
4502
|
|
|
4515
4503
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4530,7 +4518,7 @@
|
|
|
4530
4518
|
return (jsx(SelectField, { field: field, source: familyStatus, label: "\u0421\u0435\u043C\u0435\u0439\u043D\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", fieldName: "familyStatus", input: input }));
|
|
4531
4519
|
});
|
|
4532
4520
|
|
|
4533
|
-
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input
|
|
4521
|
+
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 })));
|
|
4534
4522
|
|
|
4535
4523
|
const HousingField = JSX(({ field, input }) => {
|
|
4536
4524
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4539,9 +4527,9 @@
|
|
|
4539
4527
|
|
|
4540
4528
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4541
4529
|
|
|
4542
|
-
const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input
|
|
4530
|
+
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 })));
|
|
4543
4531
|
|
|
4544
|
-
const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input
|
|
4532
|
+
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 })));
|
|
4545
4533
|
|
|
4546
4534
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4547
4535
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4693,7 +4681,7 @@
|
|
|
4693
4681
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4694
4682
|
updateOrganizationFields(store, field, item);
|
|
4695
4683
|
}, []);
|
|
4696
|
-
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''),
|
|
4684
|
+
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 }));
|
|
4697
4685
|
});
|
|
4698
4686
|
|
|
4699
4687
|
const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
@@ -4833,7 +4821,7 @@
|
|
|
4833
4821
|
|
|
4834
4822
|
const TotalIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4835
4823
|
|
|
4836
|
-
const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input
|
|
4824
|
+
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 })));
|
|
4837
4825
|
|
|
4838
4826
|
const DELIVERY_CITIES_REF = {
|
|
4839
4827
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5463,7 +5451,7 @@
|
|
|
5463
5451
|
const participant = task.participants[0];
|
|
5464
5452
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5465
5453
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5466
|
-
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,
|
|
5454
|
+
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;
|
|
5467
5455
|
return {
|
|
5468
5456
|
currency: currency?.key,
|
|
5469
5457
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5515,7 +5503,6 @@
|
|
|
5515
5503
|
monthsValue,
|
|
5516
5504
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5517
5505
|
},
|
|
5518
|
-
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5519
5506
|
...getParticipantIncomes(participantIncomes),
|
|
5520
5507
|
...getParticipantAddresses(participantAddresses),
|
|
5521
5508
|
...getParticipantContacts(participantContacts),
|
|
@@ -5570,6 +5557,39 @@
|
|
|
5570
5557
|
};
|
|
5571
5558
|
};
|
|
5572
5559
|
|
|
5560
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5561
|
+
|
|
5562
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5563
|
+
const navigator = locationNavigator();
|
|
5564
|
+
const retailFormStore = useRetailFormStore();
|
|
5565
|
+
const handleAuth = useCallback(async () => {
|
|
5566
|
+
const resp = await getLink({
|
|
5567
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5568
|
+
});
|
|
5569
|
+
if (resp?.link) {
|
|
5570
|
+
navigator.assign(resp.link);
|
|
5571
|
+
globalThis.location.href = resp.link;
|
|
5572
|
+
}
|
|
5573
|
+
}, []);
|
|
5574
|
+
const handleClose = useCallback(() => {
|
|
5575
|
+
if (retailFormStore.leadForm) {
|
|
5576
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
5577
|
+
delete leadForm.esiaAccountTypeCd;
|
|
5578
|
+
retailFormStore.leadForm = leadForm;
|
|
5579
|
+
}
|
|
5580
|
+
onClose?.();
|
|
5581
|
+
}, []);
|
|
5582
|
+
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" })] })] }) }));
|
|
5583
|
+
});
|
|
5584
|
+
|
|
5585
|
+
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5586
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
5587
|
+
const navigator = locationNavigator();
|
|
5588
|
+
return useCallback(() => {
|
|
5589
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5590
|
+
}, [open, nextStepLink]);
|
|
5591
|
+
};
|
|
5592
|
+
|
|
5573
5593
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5574
5594
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5575
5595
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5691,19 +5711,21 @@
|
|
|
5691
5711
|
|
|
5692
5712
|
/* eslint-disable max-lines */
|
|
5693
5713
|
// eslint-disable-next-line max-lines-per-function
|
|
5694
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5714
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
|
|
5695
5715
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5696
5716
|
const [ok, setOK] = useState();
|
|
5697
5717
|
const saveUserData = useSaveUserData();
|
|
5698
5718
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5699
5719
|
const navigator = locationNavigator();
|
|
5700
|
-
const
|
|
5701
|
-
|
|
5702
|
-
}, []);
|
|
5703
|
-
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5720
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5721
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
5704
5722
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5705
5723
|
const draftDialog = useDraftDialog();
|
|
5706
5724
|
const handleSubmit = useCallback(async (formData) => {
|
|
5725
|
+
if (esiaError) {
|
|
5726
|
+
navigator.assign(nextStepLink);
|
|
5727
|
+
return;
|
|
5728
|
+
}
|
|
5707
5729
|
try {
|
|
5708
5730
|
startSending();
|
|
5709
5731
|
const profileId = await createUserProfile({
|
|
@@ -5721,7 +5743,7 @@
|
|
|
5721
5743
|
});
|
|
5722
5744
|
verifyPhoneDialog.close();
|
|
5723
5745
|
if (productType === 'debitCard') {
|
|
5724
|
-
|
|
5746
|
+
openEsiaLoginDialog();
|
|
5725
5747
|
}
|
|
5726
5748
|
else {
|
|
5727
5749
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5760,7 +5782,7 @@
|
|
|
5760
5782
|
catch {
|
|
5761
5783
|
setOK(false);
|
|
5762
5784
|
}
|
|
5763
|
-
}, []);
|
|
5785
|
+
}, [esiaError]);
|
|
5764
5786
|
return { isSending, ok, handleSubmit };
|
|
5765
5787
|
};
|
|
5766
5788
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5843,10 +5865,7 @@
|
|
|
5843
5865
|
}
|
|
5844
5866
|
}, [target, key]);
|
|
5845
5867
|
|
|
5846
|
-
const
|
|
5847
|
-
saveToken(res);
|
|
5848
|
-
return res;
|
|
5849
|
-
});
|
|
5868
|
+
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5850
5869
|
|
|
5851
5870
|
const initialFormState = {
|
|
5852
5871
|
surname: '',
|
|
@@ -5864,24 +5883,19 @@
|
|
|
5864
5883
|
consentPhotoFlg: false,
|
|
5865
5884
|
consentFATCA: false,
|
|
5866
5885
|
};
|
|
5867
|
-
const getInitialFormState$1 = (inputs, savedForm
|
|
5886
|
+
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5868
5887
|
if (savedForm) {
|
|
5869
|
-
return {
|
|
5870
|
-
...savedForm,
|
|
5871
|
-
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5872
|
-
...(!esiaAuthSuccess && {
|
|
5873
|
-
esiaAccountTypeCd: { key: '' },
|
|
5874
|
-
}),
|
|
5875
|
-
};
|
|
5888
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5876
5889
|
}
|
|
5877
5890
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5878
5891
|
return { ...formState };
|
|
5879
5892
|
};
|
|
5880
5893
|
|
|
5881
|
-
const uploadFile = async (file,
|
|
5894
|
+
const uploadFile = async (file, taskId, documentCategory) => {
|
|
5882
5895
|
const fd = new FormData();
|
|
5896
|
+
fd.append('taskId', taskId);
|
|
5883
5897
|
fd.append('documentCategory', documentCategory);
|
|
5884
|
-
fd.append('file', file,
|
|
5898
|
+
fd.append('file', file, 'file.pdf');
|
|
5885
5899
|
const res = await globalThis
|
|
5886
5900
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5887
5901
|
method: 'POST',
|
|
@@ -5895,13 +5909,23 @@
|
|
|
5895
5909
|
return res;
|
|
5896
5910
|
};
|
|
5897
5911
|
|
|
5898
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5899
|
-
|
|
5900
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5912
|
+
const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
|
|
5913
|
+
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5901
5914
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5902
|
-
|
|
5903
|
-
if (
|
|
5904
|
-
|
|
5915
|
+
const files = [];
|
|
5916
|
+
if (!isDebit) {
|
|
5917
|
+
await saveDocument({
|
|
5918
|
+
document: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5919
|
+
taskId,
|
|
5920
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5921
|
+
files,
|
|
5922
|
+
});
|
|
5923
|
+
await saveDocument({
|
|
5924
|
+
document: esiaAdditionalDocument.pdfFilePayout,
|
|
5925
|
+
taskId,
|
|
5926
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5927
|
+
files,
|
|
5928
|
+
});
|
|
5905
5929
|
}
|
|
5906
5930
|
const mainData = {
|
|
5907
5931
|
name: profile.name,
|
|
@@ -5918,11 +5942,11 @@
|
|
|
5918
5942
|
birthPlace: addInfo.birthPlace,
|
|
5919
5943
|
addressRegistration: buildAddress(addressRegistration),
|
|
5920
5944
|
addressFact: buildAddress(addressFact),
|
|
5921
|
-
esiaAccountTypeCd:
|
|
5945
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5922
5946
|
};
|
|
5923
5947
|
return {
|
|
5924
5948
|
...mainData,
|
|
5925
|
-
...(
|
|
5949
|
+
...(!isDebit && {
|
|
5926
5950
|
snils: addInfo.snils,
|
|
5927
5951
|
inn: esiaAdditionalDocument.inn,
|
|
5928
5952
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5931,9 +5955,6 @@
|
|
|
5931
5955
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5932
5956
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5933
5957
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5934
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5935
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5936
|
-
employment: { key: 'WORK', text: 'Работаю' },
|
|
5937
5958
|
files,
|
|
5938
5959
|
}),
|
|
5939
5960
|
};
|
|
@@ -5966,67 +5987,21 @@
|
|
|
5966
5987
|
};
|
|
5967
5988
|
};
|
|
5968
5989
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5969
|
-
const
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
{
|
|
5978
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5979
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5980
|
-
isPDF: true,
|
|
5981
|
-
},
|
|
5982
|
-
{
|
|
5983
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5984
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5985
|
-
isPDF: true,
|
|
5986
|
-
},
|
|
5987
|
-
{
|
|
5988
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5989
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5990
|
-
isPDF: false,
|
|
5991
|
-
},
|
|
5992
|
-
{
|
|
5993
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5994
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5995
|
-
isPDF: false,
|
|
5996
|
-
},
|
|
5997
|
-
{
|
|
5998
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5999
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6000
|
-
isPDF: false,
|
|
6001
|
-
},
|
|
6002
|
-
{
|
|
6003
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6004
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6005
|
-
isPDF: true,
|
|
6006
|
-
},
|
|
6007
|
-
{
|
|
6008
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6009
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6010
|
-
isPDF: false,
|
|
6011
|
-
},
|
|
6012
|
-
];
|
|
6013
|
-
for (const doc of documents) {
|
|
6014
|
-
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6015
|
-
await fetch(`${contentType},${doc.file}`)
|
|
6016
|
-
.then((res) => res.blob())
|
|
6017
|
-
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6018
|
-
.then((file) => files.push(file));
|
|
6019
|
-
}
|
|
6020
|
-
return files;
|
|
6021
|
-
};
|
|
6022
|
-
const checkEsiaData = (esiaProfile) => {
|
|
6023
|
-
const { profile, document, addressRegistration } = esiaProfile;
|
|
5990
|
+
const saveDocument = async ({ document, taskId, category, files, }) => {
|
|
5991
|
+
await fetch(`data:application/pdf;base64,${document}`)
|
|
5992
|
+
.then((res) => res.blob())
|
|
5993
|
+
.then((value) => uploadFile(value, taskId, category))
|
|
5994
|
+
.then((file) => files.push(file));
|
|
5995
|
+
};
|
|
5996
|
+
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
5997
|
+
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
6024
5998
|
const data = [
|
|
6025
5999
|
profile.name,
|
|
6026
6000
|
profile.surname,
|
|
6027
6001
|
profile.midname,
|
|
6028
6002
|
profile.birthDate,
|
|
6029
6003
|
profile.phone,
|
|
6004
|
+
profile.email,
|
|
6030
6005
|
document.dulIssueDate,
|
|
6031
6006
|
document.dulIssuedBy,
|
|
6032
6007
|
document.dulNumber,
|
|
@@ -6034,14 +6009,6 @@
|
|
|
6034
6009
|
document.dulSubdivisionCode,
|
|
6035
6010
|
addressRegistration,
|
|
6036
6011
|
profile.esiaAccountType,
|
|
6037
|
-
];
|
|
6038
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6039
|
-
throw new Error();
|
|
6040
|
-
}
|
|
6041
|
-
};
|
|
6042
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6043
|
-
const { esiaAdditionalDocument } = esiaProfile;
|
|
6044
|
-
const data = [
|
|
6045
6012
|
esiaAdditionalDocument.inn,
|
|
6046
6013
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6047
6014
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6051,84 +6018,100 @@
|
|
|
6051
6018
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6052
6019
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6053
6020
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6054
|
-
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6055
|
-
esiaAdditionalDocument.xmlFilePayout,
|
|
6056
|
-
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6057
|
-
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6058
|
-
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6059
|
-
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6060
6021
|
];
|
|
6061
|
-
|
|
6022
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6023
|
+
throw new Error();
|
|
6024
|
+
}
|
|
6025
|
+
};
|
|
6026
|
+
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6027
|
+
const { profile, document, addressRegistration } = esiaProfile;
|
|
6028
|
+
const data = [
|
|
6029
|
+
profile.name,
|
|
6030
|
+
profile.surname,
|
|
6031
|
+
profile.midname,
|
|
6032
|
+
profile.birthDate,
|
|
6033
|
+
profile.phone,
|
|
6034
|
+
profile.email,
|
|
6035
|
+
document.dulIssueDate,
|
|
6036
|
+
document.dulIssuedBy,
|
|
6037
|
+
document.dulNumber,
|
|
6038
|
+
document.dulSerie,
|
|
6039
|
+
document.dulSubdivisionCode,
|
|
6040
|
+
addressRegistration,
|
|
6041
|
+
profile.esiaAccountType,
|
|
6042
|
+
];
|
|
6043
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6044
|
+
throw new Error();
|
|
6045
|
+
}
|
|
6062
6046
|
};
|
|
6063
6047
|
|
|
6064
|
-
const useInitApplicationLead = ({ inputs,
|
|
6048
|
+
const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
|
|
6049
|
+
const navigator = locationNavigator();
|
|
6050
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6065
6051
|
const leadFormStore = useLeadFormStore();
|
|
6066
6052
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6067
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm
|
|
6068
|
-
const
|
|
6069
|
-
|
|
6053
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6054
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
6055
|
+
startLoading();
|
|
6070
6056
|
try {
|
|
6071
|
-
const data = await
|
|
6057
|
+
const data = await updateProfileEsia({
|
|
6058
|
+
profileId,
|
|
6072
6059
|
code,
|
|
6073
6060
|
state,
|
|
6074
6061
|
redirectUri: globalThis.location?.href,
|
|
6075
|
-
authorize: true,
|
|
6076
6062
|
});
|
|
6077
|
-
if (data) {
|
|
6078
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6063
|
+
if (data && leadFormStore?.taskId) {
|
|
6064
|
+
const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
|
|
6079
6065
|
saveForm((_) => ({
|
|
6080
6066
|
..._,
|
|
6081
6067
|
...parsedData,
|
|
6082
6068
|
}));
|
|
6083
|
-
setEsiaStatus(EsiaStatuses.Success);
|
|
6084
6069
|
}
|
|
6070
|
+
navigator.assign(nextStepLink);
|
|
6085
6071
|
}
|
|
6086
6072
|
catch {
|
|
6087
|
-
|
|
6073
|
+
setEsiaError();
|
|
6088
6074
|
}
|
|
6089
|
-
|
|
6075
|
+
finally {
|
|
6076
|
+
endLoading();
|
|
6077
|
+
}
|
|
6078
|
+
}, [nextStepLink]);
|
|
6090
6079
|
useEffect(() => {
|
|
6091
6080
|
leadFormStore.productType = productType;
|
|
6081
|
+
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6092
6082
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6093
6083
|
const code = params.get('code');
|
|
6094
6084
|
const state = params.get('state');
|
|
6095
|
-
if (code && state) {
|
|
6096
|
-
|
|
6085
|
+
if (profileId && code && state) {
|
|
6086
|
+
updateEsiaProfile(profileId, code, state);
|
|
6097
6087
|
}
|
|
6098
6088
|
else {
|
|
6099
6089
|
sessionStorage.removeItem('accessToken');
|
|
6100
6090
|
sessionStorage.removeItem('refreshToken');
|
|
6101
6091
|
}
|
|
6102
6092
|
}, []);
|
|
6103
|
-
return initialFormState;
|
|
6093
|
+
return [initialFormState, { isLoading }];
|
|
6104
6094
|
};
|
|
6105
6095
|
|
|
6106
|
-
var EsiaStatuses;
|
|
6107
|
-
(function (EsiaStatuses) {
|
|
6108
|
-
EsiaStatuses["Success"] = "SUCCESS";
|
|
6109
|
-
EsiaStatuses["Error"] = "ERROR";
|
|
6110
|
-
EsiaStatuses["Pending"] = "PENDING";
|
|
6111
|
-
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6112
6096
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6113
|
-
const [
|
|
6114
|
-
const leadForm = useRef(null);
|
|
6097
|
+
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6115
6098
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6116
6099
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6117
6100
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
6118
|
-
const initialFormState = useInitApplicationLead({
|
|
6101
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead({
|
|
6119
6102
|
inputs,
|
|
6120
6103
|
nextStepLink,
|
|
6121
6104
|
productType,
|
|
6122
|
-
|
|
6123
|
-
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6105
|
+
setEsiaError,
|
|
6124
6106
|
});
|
|
6125
6107
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6126
6108
|
programId,
|
|
6127
6109
|
nextStepLink,
|
|
6128
6110
|
productType,
|
|
6111
|
+
esiaError,
|
|
6129
6112
|
data,
|
|
6130
6113
|
});
|
|
6131
|
-
const [, { field, onSubmit
|
|
6114
|
+
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6132
6115
|
formValidator,
|
|
6133
6116
|
onSubmit: handleSubmit,
|
|
6134
6117
|
});
|
|
@@ -6138,17 +6121,7 @@
|
|
|
6138
6121
|
responseTypeDialog.open({ ok });
|
|
6139
6122
|
}
|
|
6140
6123
|
}, [ok]);
|
|
6141
|
-
|
|
6142
|
-
if (esiaStatus && leadForm?.current) {
|
|
6143
|
-
leadForm.current.scrollIntoView({
|
|
6144
|
-
block: 'start',
|
|
6145
|
-
});
|
|
6146
|
-
}
|
|
6147
|
-
if (esiaStatus === EsiaStatuses.Success) {
|
|
6148
|
-
reset();
|
|
6149
|
-
}
|
|
6150
|
-
}, [leadForm?.current, esiaStatus]);
|
|
6151
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6124
|
+
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] }) }));
|
|
6152
6125
|
});
|
|
6153
6126
|
|
|
6154
6127
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7841,7 +7814,6 @@
|
|
|
7841
7814
|
mandatoryPayments: undefined,
|
|
7842
7815
|
snils: '',
|
|
7843
7816
|
armyIdFlg: false,
|
|
7844
|
-
esiaAccountTypeCd: { key: '', text: '' },
|
|
7845
7817
|
},
|
|
7846
7818
|
{
|
|
7847
7819
|
bankruptcyFlg: false,
|
|
@@ -8232,7 +8204,7 @@
|
|
|
8232
8204
|
label: 'Телефон работодателя',
|
|
8233
8205
|
required: true,
|
|
8234
8206
|
},
|
|
8235
|
-
{ name: 'beginDate', required: true
|
|
8207
|
+
{ name: 'beginDate', required: true },
|
|
8236
8208
|
],
|
|
8237
8209
|
},
|
|
8238
8210
|
{
|
|
@@ -8273,16 +8245,6 @@
|
|
|
8273
8245
|
{
|
|
8274
8246
|
title: 'Совокупный доход',
|
|
8275
8247
|
},
|
|
8276
|
-
{
|
|
8277
|
-
columns: 1,
|
|
8278
|
-
inputs: [
|
|
8279
|
-
{
|
|
8280
|
-
name: 'confirmationIncome',
|
|
8281
|
-
required: true,
|
|
8282
|
-
filledByEsia: true,
|
|
8283
|
-
},
|
|
8284
|
-
],
|
|
8285
|
-
},
|
|
8286
8248
|
{
|
|
8287
8249
|
inputs: [
|
|
8288
8250
|
{
|
|
@@ -8291,6 +8253,10 @@
|
|
|
8291
8253
|
},
|
|
8292
8254
|
],
|
|
8293
8255
|
},
|
|
8256
|
+
{
|
|
8257
|
+
columns: 1,
|
|
8258
|
+
inputs: [{ name: 'confirmationIncome', required: true }],
|
|
8259
|
+
},
|
|
8294
8260
|
{
|
|
8295
8261
|
columns: 1,
|
|
8296
8262
|
inputs: [{ name: 'wages', required: true, filledByEsia: true }],
|
|
@@ -10881,7 +10847,7 @@
|
|
|
10881
10847
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10882
10848
|
});
|
|
10883
10849
|
|
|
10884
|
-
const packageVersion = "0.14.
|
|
10850
|
+
const packageVersion = "0.14.820";
|
|
10885
10851
|
|
|
10886
10852
|
exports.Blocks = Blocks;
|
|
10887
10853
|
exports.ContentPage = ContentPage;
|