@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
|
@@ -2030,7 +2030,7 @@
|
|
|
2030
2030
|
|
|
2031
2031
|
const PhoneField = JSX(({ field, input }) => {
|
|
2032
2032
|
const fieldName = input?.name || 'phone';
|
|
2033
|
-
return
|
|
2033
|
+
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2034
2034
|
});
|
|
2035
2035
|
|
|
2036
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);
|
|
@@ -2210,7 +2210,7 @@
|
|
|
2210
2210
|
function shouldRenderField({ input, field, }) {
|
|
2211
2211
|
const { condition } = input;
|
|
2212
2212
|
const { value } = field(condition?.name || '');
|
|
2213
|
-
return !condition || condition?.values?.
|
|
2213
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
2214
2214
|
}
|
|
2215
2215
|
|
|
2216
2216
|
const PRODUCT_REF = {
|
|
@@ -2437,25 +2437,27 @@
|
|
|
2437
2437
|
|
|
2438
2438
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
2439
2439
|
const ADDRESS_ERROR_MESSAGE = 'Укажите регион, город/населенный пункт, улицу, дом';
|
|
2440
|
-
const MIN_AGE = 23;
|
|
2441
|
-
const MAX_AGE = 75;
|
|
2442
|
-
const AGE_ERROR_MESSAGE = 'Допустимый возраст заёмщика - от 23 до 75 лет';
|
|
2443
2440
|
const addressDaDataValidate = (address) => Boolean(address.region && (address.city || address.locality) && address.house);
|
|
2444
2441
|
const addressDaDataValidator = () => validator(addressDaDataValidate)(ADDRESS_ERROR_MESSAGE);
|
|
2445
2442
|
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && (address.city || address.locality) && address.house))(ADDRESS_ERROR_MESSAGE);
|
|
2446
2443
|
const codeWordValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 3 && _.length <= 21 && isCyrillic(_))(errorMsg ?? ERROR_MESSAGE);
|
|
2447
2444
|
const jobNumberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && /^[0-9]{1,2}$/g.test(_))(errorMsg ?? ERROR_MESSAGE);
|
|
2448
2445
|
const lengthStringValidator = (inputLength, errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= inputLength)(errorMsg ?? ERROR_MESSAGE);
|
|
2449
|
-
const limitedBirthdayValidate = (date) => {
|
|
2446
|
+
const limitedBirthdayValidate = ({ minAge, maxAge }) => (date) => {
|
|
2450
2447
|
const today = new Date();
|
|
2451
|
-
const minDate = new Date(today.getFullYear() -
|
|
2452
|
-
const maxDate =
|
|
2453
|
-
|
|
2448
|
+
const minDate = new Date(today.getFullYear() - minAge, today.getMonth(), today.getDate());
|
|
2449
|
+
const maxDate = maxAge
|
|
2450
|
+
? new Date(today.getFullYear() - maxAge, today.getMonth(), today.getDate())
|
|
2451
|
+
: null;
|
|
2452
|
+
if (!date || date > minDate) {
|
|
2453
|
+
return false;
|
|
2454
|
+
}
|
|
2455
|
+
if (maxDate && date < maxDate) {
|
|
2454
2456
|
return false;
|
|
2455
2457
|
}
|
|
2456
2458
|
return true;
|
|
2457
2459
|
};
|
|
2458
|
-
const limitedBirthdayValidator = () => validator(limitedBirthdayValidate)(
|
|
2460
|
+
const limitedBirthdayValidator = (params) => validator(limitedBirthdayValidate(params))(params.errorMessage);
|
|
2459
2461
|
const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
2460
2462
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
2461
2463
|
const snilsValidate = (snils) => {
|
|
@@ -2477,6 +2479,23 @@
|
|
|
2477
2479
|
};
|
|
2478
2480
|
const snilsValidator = (errorMsg) => validator(snilsValidate)(errorMsg);
|
|
2479
2481
|
|
|
2482
|
+
const limitedBirthdayValidationData = {
|
|
2483
|
+
credit: {
|
|
2484
|
+
minAge: 23,
|
|
2485
|
+
maxAge: 75,
|
|
2486
|
+
errorMessage: 'Допустимый возраст заёмщика - от 23 до 75 лет',
|
|
2487
|
+
},
|
|
2488
|
+
creditCard: {
|
|
2489
|
+
minAge: 21,
|
|
2490
|
+
errorMessage: 'Допустимый возраст заёмщика - от 21 года',
|
|
2491
|
+
},
|
|
2492
|
+
debitCard: {
|
|
2493
|
+
minAge: 18,
|
|
2494
|
+
errorMessage: 'Допустимый возраст - от 18 лет',
|
|
2495
|
+
},
|
|
2496
|
+
};
|
|
2497
|
+
const getLimitedBirthdayValidation = (productType) => limitedBirthdayValidator(limitedBirthdayValidationData[productType]);
|
|
2498
|
+
|
|
2480
2499
|
const validatorConsentsObj = {
|
|
2481
2500
|
processPersonalDataFlg: agreementValidator,
|
|
2482
2501
|
consentProviderFlg: agreementValidator,
|
|
@@ -2511,7 +2530,6 @@
|
|
|
2511
2530
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
2512
2531
|
addressMatch: defaultValidator(),
|
|
2513
2532
|
sex: defaultValidator('Укажите свой пол'),
|
|
2514
|
-
limitedBirthday: limitedBirthdayValidator(),
|
|
2515
2533
|
birthPlace: defaultValidator('Укажите место рождения'),
|
|
2516
2534
|
education: defaultSelectValidator('Выберите ваше образование'),
|
|
2517
2535
|
housing: defaultSelectValidator('Выберите тип жилья'),
|
|
@@ -2645,11 +2663,11 @@
|
|
|
2645
2663
|
{
|
|
2646
2664
|
columns: 2,
|
|
2647
2665
|
inputs: [
|
|
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
|
|
2666
|
+
{ name: 'surname', required: true, dadata: true },
|
|
2667
|
+
{ name: 'name', required: true, dadata: true },
|
|
2668
|
+
{ name: 'middleName', dadata: true },
|
|
2669
|
+
{ name: 'limitedBirthday', required: true },
|
|
2670
|
+
{ name: 'phone', required: true },
|
|
2653
2671
|
{ name: 'email', required: true, dadata: true },
|
|
2654
2672
|
],
|
|
2655
2673
|
},
|
|
@@ -2659,57 +2677,6 @@
|
|
|
2659
2677
|
];
|
|
2660
2678
|
};
|
|
2661
2679
|
|
|
2662
|
-
const getTraceId = () => {
|
|
2663
|
-
const result = new Uint8Array(8);
|
|
2664
|
-
globalThis.crypto.getRandomValues(result);
|
|
2665
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2666
|
-
};
|
|
2667
|
-
|
|
2668
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
2669
|
-
try {
|
|
2670
|
-
const response = await doRequest(url, method, body);
|
|
2671
|
-
return response.json();
|
|
2672
|
-
}
|
|
2673
|
-
catch (err) {
|
|
2674
|
-
console.error(err);
|
|
2675
|
-
return null;
|
|
2676
|
-
}
|
|
2677
|
-
};
|
|
2678
|
-
async function doRequest(url, method, body) {
|
|
2679
|
-
const traceId = getTraceId();
|
|
2680
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2681
|
-
method,
|
|
2682
|
-
headers: {
|
|
2683
|
-
'Content-Type': 'application/json',
|
|
2684
|
-
'X-B3-Sampled': '1',
|
|
2685
|
-
'X-B3-Spanid': traceId,
|
|
2686
|
-
'X-B3-Traceid': traceId,
|
|
2687
|
-
...getAuthorizationHeaders(),
|
|
2688
|
-
},
|
|
2689
|
-
credentials: 'include',
|
|
2690
|
-
body: body ? JSON.stringify(body) : null,
|
|
2691
|
-
});
|
|
2692
|
-
}
|
|
2693
|
-
const getAuthorizationHeaders = () => {
|
|
2694
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2695
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2696
|
-
};
|
|
2697
|
-
|
|
2698
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2699
|
-
|
|
2700
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2701
|
-
const navigator = locationNavigator();
|
|
2702
|
-
const handleAuth = useCallback(async () => {
|
|
2703
|
-
const resp = await getLink({
|
|
2704
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2705
|
-
});
|
|
2706
|
-
if (resp?.link) {
|
|
2707
|
-
navigator.assign(resp.link);
|
|
2708
|
-
}
|
|
2709
|
-
}, []);
|
|
2710
|
-
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" })] }));
|
|
2711
|
-
});
|
|
2712
|
-
|
|
2713
2680
|
const debounce = (fn, delay = 600) => {
|
|
2714
2681
|
let timerId;
|
|
2715
2682
|
const debouncedCallback = (...args) => {
|
|
@@ -3596,6 +3563,42 @@
|
|
|
3596
3563
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3597
3564
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3598
3565
|
|
|
3566
|
+
const getTraceId = () => {
|
|
3567
|
+
const result = new Uint8Array(8);
|
|
3568
|
+
globalThis.crypto.getRandomValues(result);
|
|
3569
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3570
|
+
};
|
|
3571
|
+
|
|
3572
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
3573
|
+
try {
|
|
3574
|
+
const response = await doRequest(url, method, body);
|
|
3575
|
+
return response.json();
|
|
3576
|
+
}
|
|
3577
|
+
catch (err) {
|
|
3578
|
+
console.error(err);
|
|
3579
|
+
return null;
|
|
3580
|
+
}
|
|
3581
|
+
};
|
|
3582
|
+
async function doRequest(url, method, body) {
|
|
3583
|
+
const traceId = getTraceId();
|
|
3584
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3585
|
+
method,
|
|
3586
|
+
headers: {
|
|
3587
|
+
'Content-Type': 'application/json',
|
|
3588
|
+
'X-B3-Sampled': '1',
|
|
3589
|
+
'X-B3-Spanid': traceId,
|
|
3590
|
+
'X-B3-Traceid': traceId,
|
|
3591
|
+
...getAuthorizationHeaders(),
|
|
3592
|
+
},
|
|
3593
|
+
credentials: 'include',
|
|
3594
|
+
body: body ? JSON.stringify(body) : null,
|
|
3595
|
+
});
|
|
3596
|
+
}
|
|
3597
|
+
const getAuthorizationHeaders = () => {
|
|
3598
|
+
const token = sessionStorage.getItem('accessToken');
|
|
3599
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3600
|
+
};
|
|
3601
|
+
|
|
3599
3602
|
const fetchRegionOffices = async (regionKey) => {
|
|
3600
3603
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3601
3604
|
regionRfCd: {
|
|
@@ -3825,7 +3828,7 @@
|
|
|
3825
3828
|
|
|
3826
3829
|
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 ?? '') })));
|
|
3827
3830
|
|
|
3828
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input
|
|
3831
|
+
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 })));
|
|
3829
3832
|
|
|
3830
3833
|
const FIELD_NAME$2 = 'birthPlace';
|
|
3831
3834
|
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) })));
|
|
@@ -3889,8 +3892,7 @@
|
|
|
3889
3892
|
|
|
3890
3893
|
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
3891
3894
|
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
3892
|
-
|
|
3893
|
-
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 })] }));
|
|
3895
|
+
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 }));
|
|
3894
3896
|
});
|
|
3895
3897
|
|
|
3896
3898
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
@@ -4434,7 +4436,7 @@
|
|
|
4434
4436
|
}
|
|
4435
4437
|
})();
|
|
4436
4438
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
4437
|
-
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange
|
|
4439
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
4438
4440
|
});
|
|
4439
4441
|
|
|
4440
4442
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
|
|
@@ -4513,7 +4515,7 @@
|
|
|
4513
4515
|
const MIN_YEARS = 0;
|
|
4514
4516
|
const Experience5YearsField = JSX(({ field, input }) => {
|
|
4515
4517
|
const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
4516
|
-
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
|
|
4518
|
+
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 }));
|
|
4517
4519
|
});
|
|
4518
4520
|
|
|
4519
4521
|
const FamilyMembersField = JSX(({ field, input }) => {
|
|
@@ -4534,7 +4536,7 @@
|
|
|
4534
4536
|
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 }));
|
|
4535
4537
|
});
|
|
4536
4538
|
|
|
4537
|
-
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
|
|
4539
|
+
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 })));
|
|
4538
4540
|
|
|
4539
4541
|
const HousingField = JSX(({ field, input }) => {
|
|
4540
4542
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -4543,9 +4545,9 @@
|
|
|
4543
4545
|
|
|
4544
4546
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4545
4547
|
|
|
4546
|
-
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
|
|
4548
|
+
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 })));
|
|
4547
4549
|
|
|
4548
|
-
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
|
|
4550
|
+
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 })));
|
|
4549
4551
|
|
|
4550
4552
|
const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
|
|
4551
4553
|
const isLatin = (_ = '') => latinPattern.test(_);
|
|
@@ -4697,7 +4699,7 @@
|
|
|
4697
4699
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
4698
4700
|
updateOrganizationFields(store, field, item);
|
|
4699
4701
|
}, []);
|
|
4700
|
-
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 ?? ''),
|
|
4702
|
+
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 }));
|
|
4701
4703
|
});
|
|
4702
4704
|
|
|
4703
4705
|
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 })));
|
|
@@ -4837,7 +4839,7 @@
|
|
|
4837
4839
|
|
|
4838
4840
|
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 })));
|
|
4839
4841
|
|
|
4840
|
-
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
|
|
4842
|
+
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 })));
|
|
4841
4843
|
|
|
4842
4844
|
const DELIVERY_CITIES_REF = {
|
|
4843
4845
|
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
@@ -5467,7 +5469,7 @@
|
|
|
5467
5469
|
const participant = task.participants[0];
|
|
5468
5470
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5469
5471
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5470
|
-
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,
|
|
5472
|
+
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;
|
|
5471
5473
|
return {
|
|
5472
5474
|
currency: currency?.key,
|
|
5473
5475
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5519,7 +5521,6 @@
|
|
|
5519
5521
|
monthsValue,
|
|
5520
5522
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5521
5523
|
},
|
|
5522
|
-
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5523
5524
|
...getParticipantIncomes(participantIncomes),
|
|
5524
5525
|
...getParticipantAddresses(participantAddresses),
|
|
5525
5526
|
...getParticipantContacts(participantContacts),
|
|
@@ -5574,6 +5575,39 @@
|
|
|
5574
5575
|
};
|
|
5575
5576
|
};
|
|
5576
5577
|
|
|
5578
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5579
|
+
|
|
5580
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5581
|
+
const navigator = locationNavigator();
|
|
5582
|
+
const retailFormStore = useRetailFormStore();
|
|
5583
|
+
const handleAuth = useCallback(async () => {
|
|
5584
|
+
const resp = await getLink({
|
|
5585
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5586
|
+
});
|
|
5587
|
+
if (resp?.link) {
|
|
5588
|
+
navigator.assign(resp.link);
|
|
5589
|
+
globalThis.location.href = resp.link;
|
|
5590
|
+
}
|
|
5591
|
+
}, []);
|
|
5592
|
+
const handleClose = useCallback(() => {
|
|
5593
|
+
if (retailFormStore.leadForm) {
|
|
5594
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
5595
|
+
delete leadForm.esiaAccountTypeCd;
|
|
5596
|
+
retailFormStore.leadForm = leadForm;
|
|
5597
|
+
}
|
|
5598
|
+
onClose?.();
|
|
5599
|
+
}, []);
|
|
5600
|
+
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" })] })] }) }));
|
|
5601
|
+
});
|
|
5602
|
+
|
|
5603
|
+
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5604
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
5605
|
+
const navigator = locationNavigator();
|
|
5606
|
+
return useCallback(() => {
|
|
5607
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5608
|
+
}, [open, nextStepLink]);
|
|
5609
|
+
};
|
|
5610
|
+
|
|
5577
5611
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5578
5612
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5579
5613
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5695,19 +5729,21 @@
|
|
|
5695
5729
|
|
|
5696
5730
|
/* eslint-disable max-lines */
|
|
5697
5731
|
// eslint-disable-next-line max-lines-per-function
|
|
5698
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5732
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
|
|
5699
5733
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5700
5734
|
const [ok, setOK] = useState();
|
|
5701
5735
|
const saveUserData = useSaveUserData();
|
|
5702
5736
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5703
5737
|
const navigator = locationNavigator();
|
|
5704
|
-
const
|
|
5705
|
-
|
|
5706
|
-
}, []);
|
|
5707
|
-
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5738
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5739
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
5708
5740
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5709
5741
|
const draftDialog = useDraftDialog();
|
|
5710
5742
|
const handleSubmit = useCallback(async (formData) => {
|
|
5743
|
+
if (esiaError) {
|
|
5744
|
+
navigator.assign(nextStepLink);
|
|
5745
|
+
return;
|
|
5746
|
+
}
|
|
5711
5747
|
try {
|
|
5712
5748
|
startSending();
|
|
5713
5749
|
const profileId = await createUserProfile({
|
|
@@ -5725,7 +5761,7 @@
|
|
|
5725
5761
|
});
|
|
5726
5762
|
verifyPhoneDialog.close();
|
|
5727
5763
|
if (productType === 'debitCard') {
|
|
5728
|
-
|
|
5764
|
+
openEsiaLoginDialog();
|
|
5729
5765
|
}
|
|
5730
5766
|
else {
|
|
5731
5767
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5764,7 +5800,7 @@
|
|
|
5764
5800
|
catch {
|
|
5765
5801
|
setOK(false);
|
|
5766
5802
|
}
|
|
5767
|
-
}, []);
|
|
5803
|
+
}, [esiaError]);
|
|
5768
5804
|
return { isSending, ok, handleSubmit };
|
|
5769
5805
|
};
|
|
5770
5806
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5847,10 +5883,7 @@
|
|
|
5847
5883
|
}
|
|
5848
5884
|
}, [target, key]);
|
|
5849
5885
|
|
|
5850
|
-
const
|
|
5851
|
-
saveToken(res);
|
|
5852
|
-
return res;
|
|
5853
|
-
});
|
|
5886
|
+
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5854
5887
|
|
|
5855
5888
|
const initialFormState = {
|
|
5856
5889
|
surname: '',
|
|
@@ -5868,24 +5901,19 @@
|
|
|
5868
5901
|
consentPhotoFlg: false,
|
|
5869
5902
|
consentFATCA: false,
|
|
5870
5903
|
};
|
|
5871
|
-
const getInitialFormState$1 = (inputs, savedForm
|
|
5904
|
+
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5872
5905
|
if (savedForm) {
|
|
5873
|
-
return {
|
|
5874
|
-
...savedForm,
|
|
5875
|
-
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5876
|
-
...(!esiaAuthSuccess && {
|
|
5877
|
-
esiaAccountTypeCd: { key: '' },
|
|
5878
|
-
}),
|
|
5879
|
-
};
|
|
5906
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5880
5907
|
}
|
|
5881
5908
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5882
5909
|
return { ...formState };
|
|
5883
5910
|
};
|
|
5884
5911
|
|
|
5885
|
-
const uploadFile = async (file,
|
|
5912
|
+
const uploadFile = async (file, taskId, documentCategory) => {
|
|
5886
5913
|
const fd = new FormData();
|
|
5914
|
+
fd.append('taskId', taskId);
|
|
5887
5915
|
fd.append('documentCategory', documentCategory);
|
|
5888
|
-
fd.append('file', file,
|
|
5916
|
+
fd.append('file', file, 'file.pdf');
|
|
5889
5917
|
const res = await globalThis
|
|
5890
5918
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5891
5919
|
method: 'POST',
|
|
@@ -5899,13 +5927,23 @@
|
|
|
5899
5927
|
return res;
|
|
5900
5928
|
};
|
|
5901
5929
|
|
|
5902
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5903
|
-
|
|
5904
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
5930
|
+
const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
|
|
5931
|
+
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5905
5932
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5906
|
-
|
|
5907
|
-
if (
|
|
5908
|
-
|
|
5933
|
+
const files = [];
|
|
5934
|
+
if (!isDebit) {
|
|
5935
|
+
await saveDocument({
|
|
5936
|
+
document: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5937
|
+
taskId,
|
|
5938
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5939
|
+
files,
|
|
5940
|
+
});
|
|
5941
|
+
await saveDocument({
|
|
5942
|
+
document: esiaAdditionalDocument.pdfFilePayout,
|
|
5943
|
+
taskId,
|
|
5944
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5945
|
+
files,
|
|
5946
|
+
});
|
|
5909
5947
|
}
|
|
5910
5948
|
const mainData = {
|
|
5911
5949
|
name: profile.name,
|
|
@@ -5922,11 +5960,11 @@
|
|
|
5922
5960
|
birthPlace: addInfo.birthPlace,
|
|
5923
5961
|
addressRegistration: buildAddress(addressRegistration),
|
|
5924
5962
|
addressFact: buildAddress(addressFact),
|
|
5925
|
-
esiaAccountTypeCd:
|
|
5963
|
+
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5926
5964
|
};
|
|
5927
5965
|
return {
|
|
5928
5966
|
...mainData,
|
|
5929
|
-
...(
|
|
5967
|
+
...(!isDebit && {
|
|
5930
5968
|
snils: addInfo.snils,
|
|
5931
5969
|
inn: esiaAdditionalDocument.inn,
|
|
5932
5970
|
wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
|
|
@@ -5935,9 +5973,6 @@
|
|
|
5935
5973
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
5936
5974
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
5937
5975
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
5938
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
5939
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
5940
|
-
employment: { key: 'WORK', text: 'Работаю' },
|
|
5941
5976
|
files,
|
|
5942
5977
|
}),
|
|
5943
5978
|
};
|
|
@@ -5970,67 +6005,21 @@
|
|
|
5970
6005
|
};
|
|
5971
6006
|
};
|
|
5972
6007
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5973
|
-
const
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
{
|
|
5982
|
-
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5983
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5984
|
-
isPDF: true,
|
|
5985
|
-
},
|
|
5986
|
-
{
|
|
5987
|
-
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5988
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5989
|
-
isPDF: true,
|
|
5990
|
-
},
|
|
5991
|
-
{
|
|
5992
|
-
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5993
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5994
|
-
isPDF: false,
|
|
5995
|
-
},
|
|
5996
|
-
{
|
|
5997
|
-
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5998
|
-
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5999
|
-
isPDF: false,
|
|
6000
|
-
},
|
|
6001
|
-
{
|
|
6002
|
-
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
6003
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6004
|
-
isPDF: false,
|
|
6005
|
-
},
|
|
6006
|
-
{
|
|
6007
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6008
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6009
|
-
isPDF: true,
|
|
6010
|
-
},
|
|
6011
|
-
{
|
|
6012
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6013
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6014
|
-
isPDF: false,
|
|
6015
|
-
},
|
|
6016
|
-
];
|
|
6017
|
-
for (const doc of documents) {
|
|
6018
|
-
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6019
|
-
await fetch(`${contentType},${doc.file}`)
|
|
6020
|
-
.then((res) => res.blob())
|
|
6021
|
-
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6022
|
-
.then((file) => files.push(file));
|
|
6023
|
-
}
|
|
6024
|
-
return files;
|
|
6025
|
-
};
|
|
6026
|
-
const checkEsiaData = (esiaProfile) => {
|
|
6027
|
-
const { profile, document, addressRegistration } = esiaProfile;
|
|
6008
|
+
const saveDocument = async ({ document, taskId, category, files, }) => {
|
|
6009
|
+
await fetch(`data:application/pdf;base64,${document}`)
|
|
6010
|
+
.then((res) => res.blob())
|
|
6011
|
+
.then((value) => uploadFile(value, taskId, category))
|
|
6012
|
+
.then((file) => files.push(file));
|
|
6013
|
+
};
|
|
6014
|
+
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
6015
|
+
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
6028
6016
|
const data = [
|
|
6029
6017
|
profile.name,
|
|
6030
6018
|
profile.surname,
|
|
6031
6019
|
profile.midname,
|
|
6032
6020
|
profile.birthDate,
|
|
6033
6021
|
profile.phone,
|
|
6022
|
+
profile.email,
|
|
6034
6023
|
document.dulIssueDate,
|
|
6035
6024
|
document.dulIssuedBy,
|
|
6036
6025
|
document.dulNumber,
|
|
@@ -6038,14 +6027,6 @@
|
|
|
6038
6027
|
document.dulSubdivisionCode,
|
|
6039
6028
|
addressRegistration,
|
|
6040
6029
|
profile.esiaAccountType,
|
|
6041
|
-
];
|
|
6042
|
-
if (!data.every((_) => Boolean(_))) {
|
|
6043
|
-
throw new Error();
|
|
6044
|
-
}
|
|
6045
|
-
};
|
|
6046
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
6047
|
-
const { esiaAdditionalDocument } = esiaProfile;
|
|
6048
|
-
const data = [
|
|
6049
6030
|
esiaAdditionalDocument.inn,
|
|
6050
6031
|
esiaAdditionalDocument.averageMonthlyIncome.toString(),
|
|
6051
6032
|
esiaAdditionalDocument.startWorkDate,
|
|
@@ -6055,84 +6036,101 @@
|
|
|
6055
6036
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6056
6037
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6057
6038
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6058
|
-
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6059
|
-
esiaAdditionalDocument.xmlFilePayout,
|
|
6060
|
-
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6061
|
-
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6062
|
-
esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6063
|
-
esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6064
6039
|
];
|
|
6065
|
-
|
|
6040
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6041
|
+
throw new Error();
|
|
6042
|
+
}
|
|
6043
|
+
};
|
|
6044
|
+
const checkEsiaDataForDebit = (esiaProfile) => {
|
|
6045
|
+
const { profile, document, addressRegistration } = esiaProfile;
|
|
6046
|
+
const data = [
|
|
6047
|
+
profile.name,
|
|
6048
|
+
profile.surname,
|
|
6049
|
+
profile.midname,
|
|
6050
|
+
profile.birthDate,
|
|
6051
|
+
profile.phone,
|
|
6052
|
+
profile.email,
|
|
6053
|
+
document.dulIssueDate,
|
|
6054
|
+
document.dulIssuedBy,
|
|
6055
|
+
document.dulNumber,
|
|
6056
|
+
document.dulSerie,
|
|
6057
|
+
document.dulSubdivisionCode,
|
|
6058
|
+
addressRegistration,
|
|
6059
|
+
profile.esiaAccountType,
|
|
6060
|
+
];
|
|
6061
|
+
if (!data.every((_) => Boolean(_))) {
|
|
6062
|
+
throw new Error();
|
|
6063
|
+
}
|
|
6066
6064
|
};
|
|
6067
6065
|
|
|
6068
|
-
const useInitApplicationLead = ({ inputs,
|
|
6066
|
+
const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
|
|
6067
|
+
const navigator = locationNavigator();
|
|
6068
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6069
6069
|
const leadFormStore = useLeadFormStore();
|
|
6070
6070
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6071
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm
|
|
6072
|
-
const
|
|
6073
|
-
|
|
6071
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6072
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
6073
|
+
startLoading();
|
|
6074
6074
|
try {
|
|
6075
|
-
const data = await
|
|
6075
|
+
const data = await updateProfileEsia({
|
|
6076
|
+
profileId,
|
|
6076
6077
|
code,
|
|
6077
6078
|
state,
|
|
6078
6079
|
redirectUri: globalThis.location?.href,
|
|
6079
|
-
authorize: true,
|
|
6080
6080
|
});
|
|
6081
|
-
if (data) {
|
|
6082
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6081
|
+
if (data && leadFormStore?.taskId) {
|
|
6082
|
+
const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
|
|
6083
6083
|
saveForm((_) => ({
|
|
6084
6084
|
..._,
|
|
6085
6085
|
...parsedData,
|
|
6086
6086
|
}));
|
|
6087
|
-
setEsiaStatus(EsiaStatuses.Success);
|
|
6088
6087
|
}
|
|
6088
|
+
navigator.assign(nextStepLink);
|
|
6089
6089
|
}
|
|
6090
6090
|
catch {
|
|
6091
|
-
|
|
6091
|
+
setEsiaError();
|
|
6092
6092
|
}
|
|
6093
|
-
|
|
6093
|
+
finally {
|
|
6094
|
+
endLoading();
|
|
6095
|
+
}
|
|
6096
|
+
}, [nextStepLink]);
|
|
6094
6097
|
useEffect(() => {
|
|
6095
6098
|
leadFormStore.productType = productType;
|
|
6099
|
+
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6096
6100
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6097
6101
|
const code = params.get('code');
|
|
6098
6102
|
const state = params.get('state');
|
|
6099
|
-
if (code && state) {
|
|
6100
|
-
|
|
6103
|
+
if (profileId && code && state) {
|
|
6104
|
+
updateEsiaProfile(profileId, code, state);
|
|
6101
6105
|
}
|
|
6102
6106
|
else {
|
|
6103
6107
|
sessionStorage.removeItem('accessToken');
|
|
6104
6108
|
sessionStorage.removeItem('refreshToken');
|
|
6105
6109
|
}
|
|
6106
6110
|
}, []);
|
|
6107
|
-
return initialFormState;
|
|
6111
|
+
return [initialFormState, { isLoading }];
|
|
6108
6112
|
};
|
|
6109
6113
|
|
|
6110
|
-
var EsiaStatuses;
|
|
6111
|
-
(function (EsiaStatuses) {
|
|
6112
|
-
EsiaStatuses["Success"] = "SUCCESS";
|
|
6113
|
-
EsiaStatuses["Error"] = "ERROR";
|
|
6114
|
-
EsiaStatuses["Pending"] = "PENDING";
|
|
6115
|
-
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
6116
6114
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6117
|
-
const [
|
|
6118
|
-
const leadForm = useRef(null);
|
|
6115
|
+
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6119
6116
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6120
|
-
const inputs = useMemo(() => (applicationFormData
|
|
6121
|
-
const
|
|
6122
|
-
const
|
|
6117
|
+
const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
|
|
6118
|
+
const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
|
|
6119
|
+
const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
|
|
6120
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead({
|
|
6123
6121
|
inputs,
|
|
6124
6122
|
nextStepLink,
|
|
6125
6123
|
productType,
|
|
6126
|
-
|
|
6127
|
-
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
6124
|
+
setEsiaError,
|
|
6128
6125
|
});
|
|
6129
6126
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6130
6127
|
programId,
|
|
6131
6128
|
nextStepLink,
|
|
6132
6129
|
productType,
|
|
6130
|
+
esiaError,
|
|
6133
6131
|
data,
|
|
6134
6132
|
});
|
|
6135
|
-
const [, { field, onSubmit
|
|
6133
|
+
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6136
6134
|
formValidator,
|
|
6137
6135
|
onSubmit: handleSubmit,
|
|
6138
6136
|
});
|
|
@@ -6142,17 +6140,12 @@
|
|
|
6142
6140
|
responseTypeDialog.open({ ok });
|
|
6143
6141
|
}
|
|
6144
6142
|
}, [ok]);
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
if (esiaStatus === EsiaStatuses.Success) {
|
|
6152
|
-
reset();
|
|
6153
|
-
}
|
|
6154
|
-
}, [leadForm?.current, esiaStatus]);
|
|
6155
|
-
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] })] }));
|
|
6143
|
+
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaError ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] }) }));
|
|
6144
|
+
});
|
|
6145
|
+
const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
6146
|
+
const getExtendedValidatorObj = (productType) => ({
|
|
6147
|
+
...validatorObj,
|
|
6148
|
+
limitedBirthday: getLimitedBirthdayValidation(productType),
|
|
6156
6149
|
});
|
|
6157
6150
|
|
|
6158
6151
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7845,7 +7838,6 @@
|
|
|
7845
7838
|
mandatoryPayments: undefined,
|
|
7846
7839
|
snils: '',
|
|
7847
7840
|
armyIdFlg: false,
|
|
7848
|
-
esiaAccountTypeCd: { key: '', text: '' },
|
|
7849
7841
|
},
|
|
7850
7842
|
{
|
|
7851
7843
|
bankruptcyFlg: false,
|
|
@@ -8083,11 +8075,16 @@
|
|
|
8083
8075
|
return [initialState, handleSubmit, isSending];
|
|
8084
8076
|
};
|
|
8085
8077
|
|
|
8078
|
+
const PRODUCT_TYPE$1 = 'creditCard';
|
|
8079
|
+
const extendedValidatorObj$1 = {
|
|
8080
|
+
...validatorObj,
|
|
8081
|
+
limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE$1),
|
|
8082
|
+
};
|
|
8086
8083
|
const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
|
|
8087
8084
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs || []), [sections]);
|
|
8088
8085
|
const formValidator = useCallback((formState) =>
|
|
8089
8086
|
// TODO Слишком сложно
|
|
8090
|
-
getFormValidator(calculateInputs((_) => formState[_])(inputs, step),
|
|
8087
|
+
getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj$1)(formState), [inputs]);
|
|
8091
8088
|
const [initialState, onSubmit, isSending] = useCreditCardFormAPI({
|
|
8092
8089
|
step,
|
|
8093
8090
|
onNextStep,
|
|
@@ -8236,7 +8233,7 @@
|
|
|
8236
8233
|
label: 'Телефон работодателя',
|
|
8237
8234
|
required: true,
|
|
8238
8235
|
},
|
|
8239
|
-
{ name: 'beginDate', required: true
|
|
8236
|
+
{ name: 'beginDate', required: true },
|
|
8240
8237
|
],
|
|
8241
8238
|
},
|
|
8242
8239
|
{
|
|
@@ -8277,16 +8274,6 @@
|
|
|
8277
8274
|
{
|
|
8278
8275
|
title: 'Совокупный доход',
|
|
8279
8276
|
},
|
|
8280
|
-
{
|
|
8281
|
-
columns: 1,
|
|
8282
|
-
inputs: [
|
|
8283
|
-
{
|
|
8284
|
-
name: 'confirmationIncome',
|
|
8285
|
-
required: true,
|
|
8286
|
-
filledByEsia: true,
|
|
8287
|
-
},
|
|
8288
|
-
],
|
|
8289
|
-
},
|
|
8290
8277
|
{
|
|
8291
8278
|
inputs: [
|
|
8292
8279
|
{
|
|
@@ -8295,6 +8282,10 @@
|
|
|
8295
8282
|
},
|
|
8296
8283
|
],
|
|
8297
8284
|
},
|
|
8285
|
+
{
|
|
8286
|
+
columns: 1,
|
|
8287
|
+
inputs: [{ name: 'confirmationIncome', required: true }],
|
|
8288
|
+
},
|
|
8298
8289
|
{
|
|
8299
8290
|
columns: 1,
|
|
8300
8291
|
inputs: [{ name: 'wages', required: true, filledByEsia: true }],
|
|
@@ -8829,13 +8820,18 @@
|
|
|
8829
8820
|
return [initialState, handleSubmit, isSending];
|
|
8830
8821
|
};
|
|
8831
8822
|
|
|
8823
|
+
const PRODUCT_TYPE = 'credit';
|
|
8824
|
+
const extendedValidatorObj = {
|
|
8825
|
+
...validatorObj,
|
|
8826
|
+
limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE),
|
|
8827
|
+
};
|
|
8832
8828
|
const CreditFormStep = JSX(({ step, sections, programsSource, onPrevStep, onNextStep, onFinish }) => {
|
|
8833
8829
|
const { programId } = useRetailFormStore();
|
|
8834
8830
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
8835
8831
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
|
|
8836
8832
|
const formValidator = useCallback((formState) =>
|
|
8837
8833
|
// TODO Слишком сложно
|
|
8838
|
-
getFormValidator(calculateInputs((_) => formState[_])(inputs, step),
|
|
8834
|
+
getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj)(formState), [inputs]);
|
|
8839
8835
|
const [initialState, onSubmit, isSending] = useCreditFormAPI({
|
|
8840
8836
|
step,
|
|
8841
8837
|
onNextStep,
|
|
@@ -10885,7 +10881,7 @@
|
|
|
10885
10881
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10886
10882
|
});
|
|
10887
10883
|
|
|
10888
|
-
const packageVersion = "0.14.
|
|
10884
|
+
const packageVersion = "0.14.821";
|
|
10889
10885
|
|
|
10890
10886
|
exports.Blocks = Blocks;
|
|
10891
10887
|
exports.ContentPage = ContentPage;
|