@redneckz/wildless-cms-uni-blocks 0.14.820 → 0.14.822
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 +237 -236
- 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/retail/validator/getLimitedBirthdayValidation.d.ts +2 -0
- package/bundle/retail/validator/validators.d.ts +6 -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 +17 -28
- 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/components/CreditCardForm/CreditCardFormStep.js +7 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.js +7 -1
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/DebitForm/DebitFormStep.js +7 -1
- package/dist/components/DebitForm/DebitFormStep.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/retail/validator/getLimitedBirthdayValidation.d.ts +2 -0
- package/dist/retail/validator/getLimitedBirthdayValidation.js +21 -0
- package/dist/retail/validator/getLimitedBirthdayValidation.js.map +1 -0
- package/dist/retail/validator/validatorObj.js +0 -1
- package/dist/retail/validator/validatorObj.js.map +1 -1
- package/dist/retail/validator/validators.d.ts +6 -1
- package/dist/retail/validator/validators.js +10 -8
- package/dist/retail/validator/validators.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 +17 -28
- 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/components/CreditCardForm/CreditCardFormStep.js +7 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.js +7 -1
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/DebitForm/DebitFormStep.js +7 -1
- package/lib/components/DebitForm/DebitFormStep.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/retail/validator/getLimitedBirthdayValidation.d.ts +2 -0
- package/lib/retail/validator/getLimitedBirthdayValidation.js +18 -0
- package/lib/retail/validator/getLimitedBirthdayValidation.js.map +1 -0
- package/lib/retail/validator/validatorObj.js +1 -2
- package/lib/retail/validator/validatorObj.js.map +1 -1
- package/lib/retail/validator/validators.d.ts +6 -1
- package/lib/retail/validator/validators.js +10 -8
- package/lib/retail/validator/validators.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 +231 -235
- 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/retail/validator/getLimitedBirthdayValidation.d.ts +2 -0
- package/mobile/bundle/retail/validator/validators.d.ts +6 -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 +17 -28
- 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/components/CreditCardForm/CreditCardFormStep.js +7 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js +7 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/DebitForm/DebitFormStep.js +7 -1
- package/mobile/dist/components/DebitForm/DebitFormStep.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/retail/validator/getLimitedBirthdayValidation.d.ts +2 -0
- package/mobile/dist/retail/validator/getLimitedBirthdayValidation.js +21 -0
- package/mobile/dist/retail/validator/getLimitedBirthdayValidation.js.map +1 -0
- package/mobile/dist/retail/validator/validatorObj.js +0 -1
- package/mobile/dist/retail/validator/validatorObj.js.map +1 -1
- package/mobile/dist/retail/validator/validators.d.ts +6 -1
- package/mobile/dist/retail/validator/validators.js +10 -8
- package/mobile/dist/retail/validator/validators.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 +17 -28
- 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/components/CreditCardForm/CreditCardFormStep.js +7 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js +7 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/DebitForm/DebitFormStep.js +7 -1
- package/mobile/lib/components/DebitForm/DebitFormStep.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/retail/validator/getLimitedBirthdayValidation.d.ts +2 -0
- package/mobile/lib/retail/validator/getLimitedBirthdayValidation.js +18 -0
- package/mobile/lib/retail/validator/getLimitedBirthdayValidation.js.map +1 -0
- package/mobile/lib/retail/validator/validatorObj.js +1 -2
- package/mobile/lib/retail/validator/validatorObj.js.map +1 -1
- package/mobile/lib/retail/validator/validators.d.ts +6 -1
- package/mobile/lib/retail/validator/validators.js +10 -8
- package/mobile/lib/retail/validator/validators.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 +27 -37
- 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/components/CreditCardForm/CreditCardFormStep.tsx +9 -1
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +10 -1
- package/mobile/src/components/DebitForm/DebitFormStep.tsx +9 -1
- 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/retail/validator/getLimitedBirthdayValidation.ts +21 -0
- package/mobile/src/retail/validator/validatorObj.ts +0 -2
- package/mobile/src/retail/validator/validators.ts +24 -13
- 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 +27 -37
- 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/components/CreditCardForm/CreditCardFormStep.tsx +9 -1
- package/src/components/CreditForm/CreditFormStep.tsx +10 -1
- package/src/components/DebitForm/DebitFormStep.tsx +9 -1
- 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/retail/validator/getLimitedBirthdayValidation.ts +21 -0
- package/src/retail/validator/validatorObj.ts +0 -2
- package/src/retail/validator/validators.ts +24 -13
- package/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -9
- package/src/ui-kit/FormField/shouldRenderField.tsx +1 -2
- package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -22
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/dist/retail/api/esiaRequestProfile.js +0 -10
- package/dist/retail/api/esiaRequestProfile.js.map +0 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -20
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/lib/retail/api/esiaRequestProfile.js +0 -7
- package/lib/retail/api/esiaRequestProfile.js.map +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -22
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/mobile/dist/retail/api/esiaRequestProfile.d.ts +0 -84
- package/mobile/dist/retail/api/esiaRequestProfile.js +0 -10
- package/mobile/dist/retail/api/esiaRequestProfile.js.map +0 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +0 -4
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +0 -20
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +0 -1
- package/mobile/lib/retail/api/esiaRequestProfile.d.ts +0 -84
- package/mobile/lib/retail/api/esiaRequestProfile.js +0 -7
- package/mobile/lib/retail/api/esiaRequestProfile.js.map +0 -1
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +0 -51
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +0 -51
package/bundle/bundle.umd.js
CHANGED
|
@@ -2022,7 +2022,7 @@
|
|
|
2022
2022
|
|
|
2023
2023
|
const PhoneField = JSX(({ field, input }) => {
|
|
2024
2024
|
const fieldName = input?.name || 'phone';
|
|
2025
|
-
return
|
|
2025
|
+
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2026
2026
|
});
|
|
2027
2027
|
|
|
2028
2028
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
@@ -2202,7 +2202,7 @@
|
|
|
2202
2202
|
function shouldRenderField({ input, field, }) {
|
|
2203
2203
|
const { condition } = input;
|
|
2204
2204
|
const { value } = field(condition?.name || '');
|
|
2205
|
-
return !condition || condition?.values?.
|
|
2205
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
2206
2206
|
}
|
|
2207
2207
|
|
|
2208
2208
|
const PRODUCT_REF = {
|
|
@@ -2429,25 +2429,27 @@
|
|
|
2429
2429
|
|
|
2430
2430
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
2431
2431
|
const ADDRESS_ERROR_MESSAGE = 'Укажите регион, город/населенный пункт, улицу, дом';
|
|
2432
|
-
const MIN_AGE = 23;
|
|
2433
|
-
const MAX_AGE = 75;
|
|
2434
|
-
const AGE_ERROR_MESSAGE = 'Допустимый возраст заёмщика - от 23 до 75 лет';
|
|
2435
2432
|
const addressDaDataValidate = (address) => Boolean(address.region && (address.city || address.locality) && address.house);
|
|
2436
2433
|
const addressDaDataValidator = () => validator(addressDaDataValidate)(ADDRESS_ERROR_MESSAGE);
|
|
2437
2434
|
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && (address.city || address.locality) && address.house))(ADDRESS_ERROR_MESSAGE);
|
|
2438
2435
|
const codeWordValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 3 && _.length <= 21 && isCyrillic(_))(errorMsg ?? ERROR_MESSAGE);
|
|
2439
2436
|
const jobNumberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && /^[0-9]{1,2}$/g.test(_))(errorMsg ?? ERROR_MESSAGE);
|
|
2440
2437
|
const lengthStringValidator = (inputLength, errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= inputLength)(errorMsg ?? ERROR_MESSAGE);
|
|
2441
|
-
const limitedBirthdayValidate = (date) => {
|
|
2438
|
+
const limitedBirthdayValidate = ({ minAge, maxAge }) => (date) => {
|
|
2442
2439
|
const today = new Date();
|
|
2443
|
-
const minDate = new Date(today.getFullYear() -
|
|
2444
|
-
const maxDate =
|
|
2445
|
-
|
|
2440
|
+
const minDate = new Date(today.getFullYear() - minAge, today.getMonth(), today.getDate());
|
|
2441
|
+
const maxDate = maxAge
|
|
2442
|
+
? new Date(today.getFullYear() - maxAge, today.getMonth(), today.getDate())
|
|
2443
|
+
: null;
|
|
2444
|
+
if (!date || date > minDate) {
|
|
2445
|
+
return false;
|
|
2446
|
+
}
|
|
2447
|
+
if (maxDate && date < maxDate) {
|
|
2446
2448
|
return false;
|
|
2447
2449
|
}
|
|
2448
2450
|
return true;
|
|
2449
2451
|
};
|
|
2450
|
-
const limitedBirthdayValidator = () => validator(limitedBirthdayValidate)(
|
|
2452
|
+
const limitedBirthdayValidator = (params) => validator(limitedBirthdayValidate(params))(params.errorMessage);
|
|
2451
2453
|
const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
2452
2454
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
2453
2455
|
const snilsValidate = (snils) => {
|
|
@@ -2469,6 +2471,23 @@
|
|
|
2469
2471
|
};
|
|
2470
2472
|
const snilsValidator = (errorMsg) => validator(snilsValidate)(errorMsg);
|
|
2471
2473
|
|
|
2474
|
+
const limitedBirthdayValidationData = {
|
|
2475
|
+
credit: {
|
|
2476
|
+
minAge: 23,
|
|
2477
|
+
maxAge: 75,
|
|
2478
|
+
errorMessage: 'Допустимый возраст заёмщика - от 23 до 75 лет',
|
|
2479
|
+
},
|
|
2480
|
+
creditCard: {
|
|
2481
|
+
minAge: 21,
|
|
2482
|
+
errorMessage: 'Допустимый возраст заёмщика - от 21 года',
|
|
2483
|
+
},
|
|
2484
|
+
debitCard: {
|
|
2485
|
+
minAge: 18,
|
|
2486
|
+
errorMessage: 'Допустимый возраст - от 18 лет',
|
|
2487
|
+
},
|
|
2488
|
+
};
|
|
2489
|
+
const getLimitedBirthdayValidation = (productType) => limitedBirthdayValidator(limitedBirthdayValidationData[productType]);
|
|
2490
|
+
|
|
2472
2491
|
const validatorConsentsObj = {
|
|
2473
2492
|
processPersonalDataFlg: agreementValidator,
|
|
2474
2493
|
consentProviderFlg: agreementValidator,
|
|
@@ -2503,7 +2522,6 @@
|
|
|
2503
2522
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
2504
2523
|
addressMatch: defaultValidator(),
|
|
2505
2524
|
sex: defaultValidator('Укажите свой пол'),
|
|
2506
|
-
limitedBirthday: limitedBirthdayValidator(),
|
|
2507
2525
|
birthPlace: defaultValidator('Укажите место рождения'),
|
|
2508
2526
|
education: defaultSelectValidator('Выберите ваше образование'),
|
|
2509
2527
|
housing: defaultSelectValidator('Выберите тип жилья'),
|
|
@@ -2637,11 +2655,11 @@
|
|
|
2637
2655
|
{
|
|
2638
2656
|
columns: 2,
|
|
2639
2657
|
inputs: [
|
|
2640
|
-
{ name: 'surname', required: true, dadata: true
|
|
2641
|
-
{ name: 'name', required: true, dadata: true
|
|
2642
|
-
{ name: 'middleName', dadata: true
|
|
2643
|
-
{ name: 'limitedBirthday', required: true
|
|
2644
|
-
{ name: 'phone', required: true
|
|
2658
|
+
{ name: 'surname', required: true, dadata: true },
|
|
2659
|
+
{ name: 'name', required: true, dadata: true },
|
|
2660
|
+
{ name: 'middleName', dadata: true },
|
|
2661
|
+
{ name: 'limitedBirthday', required: true },
|
|
2662
|
+
{ name: 'phone', required: true },
|
|
2645
2663
|
{ name: 'email', required: true, dadata: true },
|
|
2646
2664
|
],
|
|
2647
2665
|
},
|
|
@@ -2651,57 +2669,6 @@
|
|
|
2651
2669
|
];
|
|
2652
2670
|
};
|
|
2653
2671
|
|
|
2654
|
-
const getTraceId = () => {
|
|
2655
|
-
const result = new Uint8Array(8);
|
|
2656
|
-
globalThis.crypto.getRandomValues(result);
|
|
2657
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2658
|
-
};
|
|
2659
|
-
|
|
2660
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
2661
|
-
try {
|
|
2662
|
-
const response = await doRequest(url, method, body);
|
|
2663
|
-
return response.json();
|
|
2664
|
-
}
|
|
2665
|
-
catch (err) {
|
|
2666
|
-
console.error(err);
|
|
2667
|
-
return null;
|
|
2668
|
-
}
|
|
2669
|
-
};
|
|
2670
|
-
async function doRequest(url, method, body) {
|
|
2671
|
-
const traceId = getTraceId();
|
|
2672
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2673
|
-
method,
|
|
2674
|
-
headers: {
|
|
2675
|
-
'Content-Type': 'application/json',
|
|
2676
|
-
'X-B3-Sampled': '1',
|
|
2677
|
-
'X-B3-Spanid': traceId,
|
|
2678
|
-
'X-B3-Traceid': traceId,
|
|
2679
|
-
...getAuthorizationHeaders(),
|
|
2680
|
-
},
|
|
2681
|
-
credentials: 'include',
|
|
2682
|
-
body: body ? JSON.stringify(body) : null,
|
|
2683
|
-
});
|
|
2684
|
-
}
|
|
2685
|
-
const getAuthorizationHeaders = () => {
|
|
2686
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2687
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2688
|
-
};
|
|
2689
|
-
|
|
2690
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2691
|
-
|
|
2692
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2693
|
-
const navigator = locationNavigator();
|
|
2694
|
-
const handleAuth = useCallback(async () => {
|
|
2695
|
-
const resp = await getLink({
|
|
2696
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2697
|
-
});
|
|
2698
|
-
if (resp?.link) {
|
|
2699
|
-
navigator.assign(resp.link);
|
|
2700
|
-
}
|
|
2701
|
-
}, []);
|
|
2702
|
-
return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray px-4 py-6 @md:p-9", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-4 text-xl @md:text-2xl @md:mb-6", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-9", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-6 self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
|
|
2703
|
-
});
|
|
2704
|
-
|
|
2705
2672
|
const debounce = (fn, delay = 600) => {
|
|
2706
2673
|
let timerId;
|
|
2707
2674
|
const debouncedCallback = (...args) => {
|
|
@@ -3588,6 +3555,42 @@
|
|
|
3588
3555
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3589
3556
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3590
3557
|
|
|
3558
|
+
const getTraceId = () => {
|
|
3559
|
+
const result = new Uint8Array(8);
|
|
3560
|
+
globalThis.crypto.getRandomValues(result);
|
|
3561
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3562
|
+
};
|
|
3563
|
+
|
|
3564
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
3565
|
+
try {
|
|
3566
|
+
const response = await doRequest(url, method, body);
|
|
3567
|
+
return response.json();
|
|
3568
|
+
}
|
|
3569
|
+
catch (err) {
|
|
3570
|
+
console.error(err);
|
|
3571
|
+
return null;
|
|
3572
|
+
}
|
|
3573
|
+
};
|
|
3574
|
+
async function doRequest(url, method, body) {
|
|
3575
|
+
const traceId = getTraceId();
|
|
3576
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3577
|
+
method,
|
|
3578
|
+
headers: {
|
|
3579
|
+
'Content-Type': 'application/json',
|
|
3580
|
+
'X-B3-Sampled': '1',
|
|
3581
|
+
'X-B3-Spanid': traceId,
|
|
3582
|
+
'X-B3-Traceid': traceId,
|
|
3583
|
+
...getAuthorizationHeaders(),
|
|
3584
|
+
},
|
|
3585
|
+
credentials: 'include',
|
|
3586
|
+
body: body ? JSON.stringify(body) : null,
|
|
3587
|
+
});
|
|
3588
|
+
}
|
|
3589
|
+
const getAuthorizationHeaders = () => {
|
|
3590
|
+
const token = sessionStorage.getItem('accessToken');
|
|
3591
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3592
|
+
};
|
|
3593
|
+
|
|
3591
3594
|
const fetchRegionOffices = async (regionKey) => {
|
|
3592
3595
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3593
3596
|
regionRfCd: {
|
|
@@ -3817,7 +3820,7 @@
|
|
|
3817
3820
|
|
|
3818
3821
|
const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
|
|
3819
3822
|
|
|
3820
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input
|
|
3823
|
+
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input })));
|
|
3821
3824
|
|
|
3822
3825
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3823
3826
|
const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$2) })));
|
|
@@ -3881,8 +3884,7 @@
|
|
|
3881
3884
|
|
|
3882
3885
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3883
3886
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3884
|
-
|
|
3885
|
-
return (jsxs("div", { children: [filledByEsia ? (jsx("div", { className: "mb-6", children: jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }) })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
|
|
3887
|
+
return (jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input }));
|
|
3886
3888
|
});
|
|
3887
3889
|
|
|
3888
3890
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4426,7 +4428,7 @@
|
|
|
4426
4428
|
}
|
|
4427
4429
|
})();
|
|
4428
4430
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4429
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange
|
|
4431
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4430
4432
|
});
|
|
4431
4433
|
|
|
4432
4434
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4505,7 +4507,7 @@
|
|
|
4505
4507
|
const MIN_YEARS = 0;
|
|
4506
4508
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4507
4509
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4508
|
-
return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange
|
|
4510
|
+
return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
4509
4511
|
});
|
|
4510
4512
|
|
|
4511
4513
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4526,7 +4528,7 @@
|
|
|
4526
4528
|
return (jsx(SelectField, { field: field, source: familyStatus, label: "\u0421\u0435\u043C\u0435\u0439\u043D\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", fieldName: "familyStatus", input: input }));
|
|
4527
4529
|
});
|
|
4528
4530
|
|
|
4529
|
-
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input
|
|
4531
|
+
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input })));
|
|
4530
4532
|
|
|
4531
4533
|
const HousingField = JSX(({ field, input }) => {
|
|
4532
4534
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4535,9 +4537,9 @@
|
|
|
4535
4537
|
|
|
4536
4538
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4537
4539
|
|
|
4538
|
-
const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input
|
|
4540
|
+
const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input })));
|
|
4539
4541
|
|
|
4540
|
-
const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input
|
|
4542
|
+
const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input })));
|
|
4541
4543
|
|
|
4542
4544
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4543
4545
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4689,7 +4691,7 @@
|
|
|
4689
4691
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4690
4692
|
updateOrganizationFields(store, field, item);
|
|
4691
4693
|
}, []);
|
|
4692
|
-
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''),
|
|
4694
|
+
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4693
4695
|
});
|
|
4694
4696
|
|
|
4695
4697
|
const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
@@ -4829,7 +4831,7 @@
|
|
|
4829
4831
|
|
|
4830
4832
|
const TotalIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4831
4833
|
|
|
4832
|
-
const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input
|
|
4834
|
+
const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4833
4835
|
|
|
4834
4836
|
const DELIVERY_CITIES_REF = {
|
|
4835
4837
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5459,7 +5461,7 @@
|
|
|
5459
5461
|
const participant = task.participants[0];
|
|
5460
5462
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5461
5463
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5462
|
-
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd,
|
|
5464
|
+
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
|
|
5463
5465
|
return {
|
|
5464
5466
|
currency: currency?.key,
|
|
5465
5467
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5511,7 +5513,6 @@
|
|
|
5511
5513
|
monthsValue,
|
|
5512
5514
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5513
5515
|
},
|
|
5514
|
-
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5515
5516
|
...getParticipantIncomes(participantIncomes),
|
|
5516
5517
|
...getParticipantAddresses(participantAddresses),
|
|
5517
5518
|
...getParticipantContacts(participantContacts),
|
|
@@ -5566,6 +5567,39 @@
|
|
|
5566
5567
|
};
|
|
5567
5568
|
};
|
|
5568
5569
|
|
|
5570
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5571
|
+
|
|
5572
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5573
|
+
const navigator = locationNavigator();
|
|
5574
|
+
const retailFormStore = useRetailFormStore();
|
|
5575
|
+
const handleAuth = useCallback(async () => {
|
|
5576
|
+
const resp = await getLink({
|
|
5577
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5578
|
+
});
|
|
5579
|
+
if (resp?.link) {
|
|
5580
|
+
navigator.assign(resp.link);
|
|
5581
|
+
globalThis.location.href = resp.link;
|
|
5582
|
+
}
|
|
5583
|
+
}, []);
|
|
5584
|
+
const handleClose = useCallback(() => {
|
|
5585
|
+
if (retailFormStore.leadForm) {
|
|
5586
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
5587
|
+
delete leadForm.esiaAccountTypeCd;
|
|
5588
|
+
retailFormStore.leadForm = leadForm;
|
|
5589
|
+
}
|
|
5590
|
+
onClose?.();
|
|
5591
|
+
}, []);
|
|
5592
|
+
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" })] })] }) }));
|
|
5593
|
+
});
|
|
5594
|
+
|
|
5595
|
+
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5596
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
5597
|
+
const navigator = locationNavigator();
|
|
5598
|
+
return useCallback(() => {
|
|
5599
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5600
|
+
}, [open, nextStepLink]);
|
|
5601
|
+
};
|
|
5602
|
+
|
|
5569
5603
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5570
5604
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5571
5605
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5687,19 +5721,21 @@
|
|
|
5687
5721
|
|
|
5688
5722
|
/* eslint-disable max-lines */
|
|
5689
5723
|
// eslint-disable-next-line max-lines-per-function
|
|
5690
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5724
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
|
|
5691
5725
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5692
5726
|
const [ok, setOK] = useState();
|
|
5693
5727
|
const saveUserData = useSaveUserData();
|
|
5694
5728
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5695
5729
|
const navigator = locationNavigator();
|
|
5696
|
-
const
|
|
5697
|
-
|
|
5698
|
-
}, []);
|
|
5699
|
-
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5730
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5731
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
5700
5732
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5701
5733
|
const draftDialog = useDraftDialog();
|
|
5702
5734
|
const handleSubmit = useCallback(async (formData) => {
|
|
5735
|
+
if (esiaError) {
|
|
5736
|
+
navigator.assign(nextStepLink);
|
|
5737
|
+
return;
|
|
5738
|
+
}
|
|
5703
5739
|
try {
|
|
5704
5740
|
startSending();
|
|
5705
5741
|
const profileId = await createUserProfile({
|
|
@@ -5717,7 +5753,7 @@
|
|
|
5717
5753
|
});
|
|
5718
5754
|
verifyPhoneDialog.close();
|
|
5719
5755
|
if (productType === 'debitCard') {
|
|
5720
|
-
|
|
5756
|
+
openEsiaLoginDialog();
|
|
5721
5757
|
}
|
|
5722
5758
|
else {
|
|
5723
5759
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5756,7 +5792,7 @@
|
|
|
5756
5792
|
catch {
|
|
5757
5793
|
setOK(false);
|
|
5758
5794
|
}
|
|
5759
|
-
}, []);
|
|
5795
|
+
}, [esiaError]);
|
|
5760
5796
|
return { isSending, ok, handleSubmit };
|
|
5761
5797
|
};
|
|
5762
5798
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5839,10 +5875,7 @@
|
|
|
5839
5875
|
}
|
|
5840
5876
|
}, [target, key]);
|
|
5841
5877
|
|
|
5842
|
-
const
|
|
5843
|
-
saveToken(res);
|
|
5844
|
-
return res;
|
|
5845
|
-
});
|
|
5878
|
+
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5846
5879
|
|
|
5847
5880
|
const initialFormState = {
|
|
5848
5881
|
surname: '',
|
|
@@ -5860,24 +5893,19 @@
|
|
|
5860
5893
|
consentPhotoFlg: false,
|
|
5861
5894
|
consentFATCA: false,
|
|
5862
5895
|
};
|
|
5863
|
-
const getInitialFormState$1 = (inputs, savedForm
|
|
5896
|
+
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5864
5897
|
if (savedForm) {
|
|
5865
|
-
return {
|
|
5866
|
-
...savedForm,
|
|
5867
|
-
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5868
|
-
...(!esiaAuthSuccess && {
|
|
5869
|
-
esiaAccountTypeCd: { key: '' },
|
|
5870
|
-
}),
|
|
5871
|
-
};
|
|
5898
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5872
5899
|
}
|
|
5873
5900
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5874
5901
|
return { ...formState };
|
|
5875
5902
|
};
|
|
5876
5903
|
|
|
5877
|
-
const uploadFile = async (file,
|
|
5904
|
+
const uploadFile = async (file, taskId, documentCategory) => {
|
|
5878
5905
|
const fd = new FormData();
|
|
5906
|
+
fd.append('taskId', taskId);
|
|
5879
5907
|
fd.append('documentCategory', documentCategory);
|
|
5880
|
-
fd.append('file', file,
|
|
5908
|
+
fd.append('file', file, 'file.pdf');
|
|
5881
5909
|
const res = await globalThis
|
|
5882
5910
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5883
5911
|
method: 'POST',
|
|
@@ -5891,13 +5919,23 @@
|
|
|
5891
5919
|
return res;
|
|
5892
5920
|
};
|
|
5893
5921
|
|
|
5894
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5895
|
-
|
|
5896
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5922
|
+
const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
|
|
5923
|
+
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5897
5924
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5898
|
-
|
|
5899
|
-
if (
|
|
5900
|
-
|
|
5925
|
+
const files = [];
|
|
5926
|
+
if (!isDebit) {
|
|
5927
|
+
await saveDocument({
|
|
5928
|
+
document: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5929
|
+
taskId,
|
|
5930
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5931
|
+
files,
|
|
5932
|
+
});
|
|
5933
|
+
await saveDocument({
|
|
5934
|
+
document: esiaAdditionalDocument.pdfFilePayout,
|
|
5935
|
+
taskId,
|
|
5936
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5937
|
+
files,
|
|
5938
|
+
});
|
|
5901
5939
|
}
|
|
5902
5940
|
const mainData = {
|
|
5903
5941
|
name: profile.name,
|
|
@@ -5914,11 +5952,11 @@
|
|
|
5914
5952
|
birthPlace: addInfo.birthPlace,
|
|
5915
5953
|
addressRegistration: buildAddress(addressRegistration),
|
|
5916
5954
|
addressFact: buildAddress(addressFact),
|
|
5917
|
-
esiaAccountTypeCd:
|
|
5955
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5918
5956
|
};
|
|
5919
5957
|
return {
|
|
5920
5958
|
...mainData,
|
|
5921
|
-
...(
|
|
5959
|
+
...(!isDebit && {
|
|
5922
5960
|
snils: addInfo.snils,
|
|
5923
5961
|
inn: esiaAdditionalDocument.inn,
|
|
5924
5962
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5927,9 +5965,6 @@
|
|
|
5927
5965
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5928
5966
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5929
5967
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5930
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5931
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5932
|
-
employment: { key: 'WORK', text: 'Работаю' },
|
|
5933
5968
|
files,
|
|
5934
5969
|
}),
|
|
5935
5970
|
};
|
|
@@ -5962,67 +5997,21 @@
|
|
|
5962
5997
|
};
|
|
5963
5998
|
};
|
|
5964
5999
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5965
|
-
const
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
{
|
|
5974
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5975
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5976
|
-
isPDF: true,
|
|
5977
|
-
},
|
|
5978
|
-
{
|
|
5979
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5980
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5981
|
-
isPDF: true,
|
|
5982
|
-
},
|
|
5983
|
-
{
|
|
5984
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5985
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5986
|
-
isPDF: false,
|
|
5987
|
-
},
|
|
5988
|
-
{
|
|
5989
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5990
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5991
|
-
isPDF: false,
|
|
5992
|
-
},
|
|
5993
|
-
{
|
|
5994
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5995
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
5996
|
-
isPDF: false,
|
|
5997
|
-
},
|
|
5998
|
-
{
|
|
5999
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6000
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6001
|
-
isPDF: true,
|
|
6002
|
-
},
|
|
6003
|
-
{
|
|
6004
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6005
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6006
|
-
isPDF: false,
|
|
6007
|
-
},
|
|
6008
|
-
];
|
|
6009
|
-
for (const doc of documents) {
|
|
6010
|
-
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6011
|
-
await fetch(`${contentType},${doc.file}`)
|
|
6012
|
-
.then((res) => res.blob())
|
|
6013
|
-
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6014
|
-
.then((file) => files.push(file));
|
|
6015
|
-
}
|
|
6016
|
-
return files;
|
|
6017
|
-
};
|
|
6018
|
-
const checkEsiaData = (esiaProfile) => {
|
|
6019
|
-
const { profile, document, addressRegistration } = esiaProfile;
|
|
6000
|
+
const saveDocument = async ({ document, taskId, category, files, }) => {
|
|
6001
|
+
await fetch(`data:application/pdf;base64,${document}`)
|
|
6002
|
+
.then((res) => res.blob())
|
|
6003
|
+
.then((value) => uploadFile(value, taskId, category))
|
|
6004
|
+
.then((file) => files.push(file));
|
|
6005
|
+
};
|
|
6006
|
+
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
6007
|
+
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
6020
6008
|
const data = [
|
|
6021
6009
|
profile.name,
|
|
6022
6010
|
profile.surname,
|
|
6023
6011
|
profile.midname,
|
|
6024
6012
|
profile.birthDate,
|
|
6025
6013
|
profile.phone,
|
|
6014
|
+
profile.email,
|
|
6026
6015
|
document.dulIssueDate,
|
|
6027
6016
|
document.dulIssuedBy,
|
|
6028
6017
|
document.dulNumber,
|
|
@@ -6030,14 +6019,6 @@
|
|
|
6030
6019
|
document.dulSubdivisionCode,
|
|
6031
6020
|
addressRegistration,
|
|
6032
6021
|
profile.esiaAccountType,
|
|
6033
|
-
];
|
|
6034
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6035
|
-
throw new Error();
|
|
6036
|
-
}
|
|
6037
|
-
};
|
|
6038
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6039
|
-
const { esiaAdditionalDocument } = esiaProfile;
|
|
6040
|
-
const data = [
|
|
6041
6022
|
esiaAdditionalDocument.inn,
|
|
6042
6023
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6043
6024
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6047,84 +6028,101 @@
|
|
|
6047
6028
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6048
6029
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6049
6030
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6050
|
-
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6051
|
-
esiaAdditionalDocument.xmlFilePayout,
|
|
6052
|
-
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6053
|
-
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6054
|
-
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6055
|
-
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6056
6031
|
];
|
|
6057
|
-
|
|
6032
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6033
|
+
throw new Error();
|
|
6034
|
+
}
|
|
6035
|
+
};
|
|
6036
|
+
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6037
|
+
const { profile, document, addressRegistration } = esiaProfile;
|
|
6038
|
+
const data = [
|
|
6039
|
+
profile.name,
|
|
6040
|
+
profile.surname,
|
|
6041
|
+
profile.midname,
|
|
6042
|
+
profile.birthDate,
|
|
6043
|
+
profile.phone,
|
|
6044
|
+
profile.email,
|
|
6045
|
+
document.dulIssueDate,
|
|
6046
|
+
document.dulIssuedBy,
|
|
6047
|
+
document.dulNumber,
|
|
6048
|
+
document.dulSerie,
|
|
6049
|
+
document.dulSubdivisionCode,
|
|
6050
|
+
addressRegistration,
|
|
6051
|
+
profile.esiaAccountType,
|
|
6052
|
+
];
|
|
6053
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6054
|
+
throw new Error();
|
|
6055
|
+
}
|
|
6058
6056
|
};
|
|
6059
6057
|
|
|
6060
|
-
const useInitApplicationLead = ({ inputs,
|
|
6058
|
+
const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
|
|
6059
|
+
const navigator = locationNavigator();
|
|
6060
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6061
6061
|
const leadFormStore = useLeadFormStore();
|
|
6062
6062
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6063
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm
|
|
6064
|
-
const
|
|
6065
|
-
|
|
6063
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6064
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
6065
|
+
startLoading();
|
|
6066
6066
|
try {
|
|
6067
|
-
const data = await
|
|
6067
|
+
const data = await updateProfileEsia({
|
|
6068
|
+
profileId,
|
|
6068
6069
|
code,
|
|
6069
6070
|
state,
|
|
6070
6071
|
redirectUri: globalThis.location?.href,
|
|
6071
|
-
authorize: true,
|
|
6072
6072
|
});
|
|
6073
|
-
if (data) {
|
|
6074
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6073
|
+
if (data && leadFormStore?.taskId) {
|
|
6074
|
+
const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
|
|
6075
6075
|
saveForm((_) => ({
|
|
6076
6076
|
..._,
|
|
6077
6077
|
...parsedData,
|
|
6078
6078
|
}));
|
|
6079
|
-
setEsiaStatus(EsiaStatuses.Success);
|
|
6080
6079
|
}
|
|
6080
|
+
navigator.assign(nextStepLink);
|
|
6081
6081
|
}
|
|
6082
6082
|
catch {
|
|
6083
|
-
|
|
6083
|
+
setEsiaError();
|
|
6084
6084
|
}
|
|
6085
|
-
|
|
6085
|
+
finally {
|
|
6086
|
+
endLoading();
|
|
6087
|
+
}
|
|
6088
|
+
}, [nextStepLink]);
|
|
6086
6089
|
useEffect(() => {
|
|
6087
6090
|
leadFormStore.productType = productType;
|
|
6091
|
+
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6088
6092
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6089
6093
|
const code = params.get('code');
|
|
6090
6094
|
const state = params.get('state');
|
|
6091
|
-
if (code && state) {
|
|
6092
|
-
|
|
6095
|
+
if (profileId && code && state) {
|
|
6096
|
+
updateEsiaProfile(profileId, code, state);
|
|
6093
6097
|
}
|
|
6094
6098
|
else {
|
|
6095
6099
|
sessionStorage.removeItem('accessToken');
|
|
6096
6100
|
sessionStorage.removeItem('refreshToken');
|
|
6097
6101
|
}
|
|
6098
6102
|
}, []);
|
|
6099
|
-
return initialFormState;
|
|
6103
|
+
return [initialFormState, { isLoading }];
|
|
6100
6104
|
};
|
|
6101
6105
|
|
|
6102
|
-
var EsiaStatuses;
|
|
6103
|
-
(function (EsiaStatuses) {
|
|
6104
|
-
EsiaStatuses["Success"] = "SUCCESS";
|
|
6105
|
-
EsiaStatuses["Error"] = "ERROR";
|
|
6106
|
-
EsiaStatuses["Pending"] = "PENDING";
|
|
6107
|
-
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6108
6106
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6109
|
-
const [
|
|
6110
|
-
const leadForm = useRef(null);
|
|
6107
|
+
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6111
6108
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6112
|
-
const inputs = useMemo(() => (applicationFormData
|
|
6113
|
-
const
|
|
6114
|
-
const
|
|
6109
|
+
const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
|
|
6110
|
+
const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
|
|
6111
|
+
const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
|
|
6112
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead({
|
|
6115
6113
|
inputs,
|
|
6116
6114
|
nextStepLink,
|
|
6117
6115
|
productType,
|
|
6118
|
-
|
|
6119
|
-
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6116
|
+
setEsiaError,
|
|
6120
6117
|
});
|
|
6121
6118
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6122
6119
|
programId,
|
|
6123
6120
|
nextStepLink,
|
|
6124
6121
|
productType,
|
|
6122
|
+
esiaError,
|
|
6125
6123
|
data,
|
|
6126
6124
|
});
|
|
6127
|
-
const [, { field, onSubmit
|
|
6125
|
+
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6128
6126
|
formValidator,
|
|
6129
6127
|
onSubmit: handleSubmit,
|
|
6130
6128
|
});
|
|
@@ -6134,17 +6132,12 @@
|
|
|
6134
6132
|
responseTypeDialog.open({ ok });
|
|
6135
6133
|
}
|
|
6136
6134
|
}, [ok]);
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
if (esiaStatus === EsiaStatuses.Success) {
|
|
6144
|
-
reset();
|
|
6145
|
-
}
|
|
6146
|
-
}, [leadForm?.current, esiaStatus]);
|
|
6147
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6135
|
+
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] }) }));
|
|
6136
|
+
});
|
|
6137
|
+
const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
6138
|
+
const getExtendedValidatorObj = (productType) => ({
|
|
6139
|
+
...validatorObj,
|
|
6140
|
+
limitedBirthday: getLimitedBirthdayValidation(productType),
|
|
6148
6141
|
});
|
|
6149
6142
|
|
|
6150
6143
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7853,7 +7846,6 @@
|
|
|
7853
7846
|
mandatoryPayments: undefined,
|
|
7854
7847
|
snils: '',
|
|
7855
7848
|
armyIdFlg: false,
|
|
7856
|
-
esiaAccountTypeCd: { key: '', text: '' },
|
|
7857
7849
|
},
|
|
7858
7850
|
{
|
|
7859
7851
|
bankruptcyFlg: false,
|
|
@@ -8091,11 +8083,16 @@
|
|
|
8091
8083
|
return [initialState, handleSubmit, isSending];
|
|
8092
8084
|
};
|
|
8093
8085
|
|
|
8086
|
+
const PRODUCT_TYPE$2 = 'creditCard';
|
|
8087
|
+
const extendedValidatorObj$2 = {
|
|
8088
|
+
...validatorObj,
|
|
8089
|
+
limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE$2),
|
|
8090
|
+
};
|
|
8094
8091
|
const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
|
|
8095
8092
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs || []), [sections]);
|
|
8096
8093
|
const formValidator = useCallback((formState) =>
|
|
8097
8094
|
// TODO Слишком сложно
|
|
8098
|
-
getFormValidator(calculateInputs((_) => formState[_])(inputs, step),
|
|
8095
|
+
getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj$2)(formState), [inputs]);
|
|
8099
8096
|
const [initialState, onSubmit, isSending] = useCreditCardFormAPI({
|
|
8100
8097
|
step,
|
|
8101
8098
|
onNextStep,
|
|
@@ -8244,7 +8241,7 @@
|
|
|
8244
8241
|
label: 'Телефон работодателя',
|
|
8245
8242
|
required: true,
|
|
8246
8243
|
},
|
|
8247
|
-
{ name: 'beginDate', required: true
|
|
8244
|
+
{ name: 'beginDate', required: true },
|
|
8248
8245
|
],
|
|
8249
8246
|
},
|
|
8250
8247
|
{
|
|
@@ -8285,16 +8282,6 @@
|
|
|
8285
8282
|
{
|
|
8286
8283
|
title: 'Совокупный доход',
|
|
8287
8284
|
},
|
|
8288
|
-
{
|
|
8289
|
-
columns: 1,
|
|
8290
|
-
inputs: [
|
|
8291
|
-
{
|
|
8292
|
-
name: 'confirmationIncome',
|
|
8293
|
-
required: true,
|
|
8294
|
-
filledByEsia: true,
|
|
8295
|
-
},
|
|
8296
|
-
],
|
|
8297
|
-
},
|
|
8298
8285
|
{
|
|
8299
8286
|
inputs: [
|
|
8300
8287
|
{
|
|
@@ -8303,6 +8290,10 @@
|
|
|
8303
8290
|
},
|
|
8304
8291
|
],
|
|
8305
8292
|
},
|
|
8293
|
+
{
|
|
8294
|
+
columns: 1,
|
|
8295
|
+
inputs: [{ name: 'confirmationIncome', required: true }],
|
|
8296
|
+
},
|
|
8306
8297
|
{
|
|
8307
8298
|
columns: 1,
|
|
8308
8299
|
inputs: [{ name: 'wages', required: true, filledByEsia: true }],
|
|
@@ -8915,13 +8906,18 @@
|
|
|
8915
8906
|
return [initialState, handleSubmit, isSending];
|
|
8916
8907
|
};
|
|
8917
8908
|
|
|
8909
|
+
const PRODUCT_TYPE$1 = 'credit';
|
|
8910
|
+
const extendedValidatorObj$1 = {
|
|
8911
|
+
...validatorObj,
|
|
8912
|
+
limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE$1),
|
|
8913
|
+
};
|
|
8918
8914
|
const CreditFormStep = JSX(({ step, sections, programsSource, onPrevStep, onNextStep, onFinish }) => {
|
|
8919
8915
|
const { programId } = useRetailFormStore();
|
|
8920
8916
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
8921
8917
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
|
|
8922
8918
|
const formValidator = useCallback((formState) =>
|
|
8923
8919
|
// TODO Слишком сложно
|
|
8924
|
-
getFormValidator(calculateInputs((_) => formState[_])(inputs, step),
|
|
8920
|
+
getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj$1)(formState), [inputs]);
|
|
8925
8921
|
const [initialState, onSubmit, isSending] = useCreditFormAPI({
|
|
8926
8922
|
step,
|
|
8927
8923
|
onNextStep,
|
|
@@ -9231,11 +9227,16 @@
|
|
|
9231
9227
|
return [initialState, handleSubmit, isSending];
|
|
9232
9228
|
};
|
|
9233
9229
|
|
|
9230
|
+
const PRODUCT_TYPE = 'debitCard';
|
|
9231
|
+
const extendedValidatorObj = {
|
|
9232
|
+
...validatorObj,
|
|
9233
|
+
limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE),
|
|
9234
|
+
};
|
|
9234
9235
|
const DebitFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
|
|
9235
9236
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
|
|
9236
9237
|
const formValidator = useCallback((formState) =>
|
|
9237
9238
|
// TODO Слишком сложно
|
|
9238
|
-
getFormValidator(calculateInputs((_) => formState[_])(inputs, step),
|
|
9239
|
+
getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj)(formState), [inputs]);
|
|
9239
9240
|
const [initialState, onSubmit, isSending] = useDebitFormAPI({
|
|
9240
9241
|
step,
|
|
9241
9242
|
onNextStep,
|
|
@@ -11592,7 +11593,7 @@
|
|
|
11592
11593
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11593
11594
|
});
|
|
11594
11595
|
|
|
11595
|
-
const packageVersion = "0.14.
|
|
11596
|
+
const packageVersion = "0.14.821";
|
|
11596
11597
|
|
|
11597
11598
|
exports.Blocks = Blocks;
|
|
11598
11599
|
exports.ContentPage = ContentPage;
|