@redneckz/wildless-cms-uni-blocks 0.14.951 → 0.14.953
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/api/apiBaseUrl.d.ts +0 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +492 -185
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
- package/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
- package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
- package/bundle/components/Header/DropdownMenu.d.ts +2 -2
- package/bundle/components/Header/HeaderQuickActionsMenu.d.ts +1 -1
- package/bundle/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
- package/bundle/retail/api/apiBaseUrl.d.ts +2 -1
- package/bundle/retail/api/checkCaptcha.d.ts +1 -0
- package/bundle/retail/api/checkCode.d.ts +1 -0
- package/bundle/retail/api/createDraftTask.d.ts +2 -1
- package/bundle/retail/api/createParticipant.d.ts +6 -0
- package/bundle/retail/api/sendMessage.d.ts +7 -0
- package/bundle/retail/api/updateUserTask.d.ts +14 -8
- package/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
- package/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
- package/bundle/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/bundle/retail/model/LeadFormState.d.ts +2 -4
- package/bundle/retail/utils/calculateInputs.d.ts +1 -1
- package/bundle/retail/utils/checkNewMicroservice.d.ts +1 -0
- package/bundle/retail/utils/renderStep.d.ts +1 -2
- package/bundle/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/bundle/ui-kit/SearchBar/SearchBar.d.ts +1 -2
- package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
- package/dist/api/apiBaseUrl.d.ts +0 -1
- package/dist/api/apiBaseUrl.js +1 -2
- package/dist/api/apiBaseUrl.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +35 -24
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +98 -4
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
- package/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js +16 -2
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.js +1 -2
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.js +52 -8
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/components/DebitForm/DebitFormStep.js +1 -2
- package/dist/components/DebitForm/DebitFormStep.js.map +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/renderLogoSearchBar.js +2 -2
- package/dist/components/Footer/renderLogoSearchBar.js.map +1 -1
- package/dist/components/Header/DropdownMenu.d.ts +2 -2
- package/dist/components/Header/HeaderQuickActionsMenu.d.ts +1 -1
- package/dist/components/Header/HeaderQuickActionsMenu.js +5 -7
- package/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/dist/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
- package/dist/retail/adaptors/getCreditFormTaskData.js +36 -25
- package/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
- package/dist/retail/adaptors/getEmploymentData.js +25 -21
- package/dist/retail/adaptors/getEmploymentData.js.map +1 -1
- package/dist/retail/adaptors/utils.js +1 -1
- package/dist/retail/adaptors/utils.js.map +1 -1
- package/dist/retail/api/apiBaseUrl.d.ts +2 -1
- package/dist/retail/api/apiBaseUrl.js +3 -2
- package/dist/retail/api/apiBaseUrl.js.map +1 -1
- package/dist/retail/api/checkCaptcha.d.ts +1 -0
- package/dist/retail/api/checkCaptcha.js +10 -3
- package/dist/retail/api/checkCaptcha.js.map +1 -1
- package/dist/retail/api/checkCode.d.ts +1 -0
- package/dist/retail/api/checkCode.js +9 -1
- package/dist/retail/api/checkCode.js.map +1 -1
- package/dist/retail/api/createCaptcha.js +5 -1
- package/dist/retail/api/createCaptcha.js.map +1 -1
- package/dist/retail/api/createDraftTask.d.ts +2 -1
- package/dist/retail/api/createDraftTask.js.map +1 -1
- package/dist/retail/api/createParticipant.d.ts +6 -0
- package/dist/retail/api/createParticipant.js +6 -0
- package/dist/retail/api/createParticipant.js.map +1 -0
- package/dist/retail/api/doRequest.js +4 -2
- package/dist/retail/api/doRequest.js.map +1 -1
- package/dist/retail/api/esiaRequestProfile.js +11 -7
- package/dist/retail/api/esiaRequestProfile.js.map +1 -1
- package/dist/retail/api/getDictionaries.js +3 -1
- package/dist/retail/api/getDictionaries.js.map +1 -1
- package/dist/retail/api/getLink.js +5 -1
- package/dist/retail/api/getLink.js.map +1 -1
- package/dist/retail/api/sendCode.js +8 -1
- package/dist/retail/api/sendCode.js.map +1 -1
- package/dist/retail/api/sendMessage.d.ts +7 -0
- package/dist/retail/api/sendMessage.js +8 -0
- package/dist/retail/api/sendMessage.js.map +1 -0
- package/dist/retail/api/updateUserTask.d.ts +14 -8
- package/dist/retail/api/updateUserTask.js.map +1 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
- package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
- package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/dist/retail/hooks/useLeadFormData.js +3 -1
- package/dist/retail/hooks/useLeadFormData.js.map +1 -1
- package/dist/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/dist/retail/model/LeadFormState.d.ts +2 -4
- package/dist/retail/utils/calculateInputs.d.ts +1 -1
- package/dist/retail/utils/calculateInputs.js +2 -6
- package/dist/retail/utils/calculateInputs.js.map +1 -1
- package/dist/retail/utils/checkNewMicroservice.d.ts +1 -0
- package/dist/retail/utils/checkNewMicroservice.js +8 -0
- package/dist/retail/utils/checkNewMicroservice.js.map +1 -0
- package/dist/retail/utils/renderStep.d.ts +1 -2
- package/dist/retail/utils/renderStep.js +2 -2
- package/dist/retail/utils/renderStep.js.map +1 -1
- package/dist/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/dist/retail/validator/getRetailFormValidator.js +1 -1
- package/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -2
- package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
- package/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/dist/ui-kit/YandexMap/useYandexMaps.js +1 -2
- package/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/dist/wlc.json +1 -2
- package/lib/api/apiBaseUrl.d.ts +0 -1
- package/lib/api/apiBaseUrl.js +0 -1
- package/lib/api/apiBaseUrl.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +33 -23
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +98 -4
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
- package/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js +16 -2
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.js +1 -2
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.js +52 -8
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/components/DebitForm/DebitFormStep.js +1 -2
- package/lib/components/DebitForm/DebitFormStep.js.map +1 -1
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/renderLogoSearchBar.js +2 -2
- package/lib/components/Footer/renderLogoSearchBar.js.map +1 -1
- package/lib/components/Header/DropdownMenu.d.ts +2 -2
- package/lib/components/Header/HeaderQuickActionsMenu.d.ts +1 -1
- package/lib/components/Header/HeaderQuickActionsMenu.js +5 -7
- package/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/lib/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
- package/lib/retail/adaptors/getCreditFormTaskData.js +36 -25
- package/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
- package/lib/retail/adaptors/getEmploymentData.js +25 -21
- package/lib/retail/adaptors/getEmploymentData.js.map +1 -1
- package/lib/retail/adaptors/utils.js +1 -1
- package/lib/retail/adaptors/utils.js.map +1 -1
- package/lib/retail/api/apiBaseUrl.d.ts +2 -1
- package/lib/retail/api/apiBaseUrl.js +2 -1
- package/lib/retail/api/apiBaseUrl.js.map +1 -1
- package/lib/retail/api/checkCaptcha.d.ts +1 -0
- package/lib/retail/api/checkCaptcha.js +10 -3
- package/lib/retail/api/checkCaptcha.js.map +1 -1
- package/lib/retail/api/checkCode.d.ts +1 -0
- package/lib/retail/api/checkCode.js +9 -1
- package/lib/retail/api/checkCode.js.map +1 -1
- package/lib/retail/api/createCaptcha.js +5 -1
- package/lib/retail/api/createCaptcha.js.map +1 -1
- package/lib/retail/api/createDraftTask.d.ts +2 -1
- package/lib/retail/api/createDraftTask.js.map +1 -1
- package/lib/retail/api/createParticipant.d.ts +6 -0
- package/lib/retail/api/createParticipant.js +3 -0
- package/lib/retail/api/createParticipant.js.map +1 -0
- package/lib/retail/api/doRequest.js +4 -2
- package/lib/retail/api/doRequest.js.map +1 -1
- package/lib/retail/api/esiaRequestProfile.js +11 -7
- package/lib/retail/api/esiaRequestProfile.js.map +1 -1
- package/lib/retail/api/getDictionaries.js +3 -1
- package/lib/retail/api/getDictionaries.js.map +1 -1
- package/lib/retail/api/getLink.js +5 -1
- package/lib/retail/api/getLink.js.map +1 -1
- package/lib/retail/api/sendCode.js +8 -1
- package/lib/retail/api/sendCode.js.map +1 -1
- package/lib/retail/api/sendMessage.d.ts +7 -0
- package/lib/retail/api/sendMessage.js +5 -0
- package/lib/retail/api/sendMessage.js.map +1 -0
- package/lib/retail/api/updateUserTask.d.ts +14 -8
- package/lib/retail/api/updateUserTask.js.map +1 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
- package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
- package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/retail/hooks/useLeadFormData.js +4 -2
- package/lib/retail/hooks/useLeadFormData.js.map +1 -1
- package/lib/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/lib/retail/model/LeadFormState.d.ts +2 -4
- package/lib/retail/utils/calculateInputs.d.ts +1 -1
- package/lib/retail/utils/calculateInputs.js +2 -6
- package/lib/retail/utils/calculateInputs.js.map +1 -1
- package/lib/retail/utils/checkNewMicroservice.d.ts +1 -0
- package/lib/retail/utils/checkNewMicroservice.js +5 -0
- package/lib/retail/utils/checkNewMicroservice.js.map +1 -0
- package/lib/retail/utils/renderStep.d.ts +1 -2
- package/lib/retail/utils/renderStep.js +2 -2
- package/lib/retail/utils/renderStep.js.map +1 -1
- package/lib/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/lib/retail/validator/getRetailFormValidator.js +1 -1
- package/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -2
- package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
- package/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/lib/ui-kit/YandexMap/useYandexMaps.js +1 -2
- package/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/lib/wlc.json +1 -2
- package/mobile/bundle/api/apiBaseUrl.d.ts +0 -1
- package/mobile/bundle/bundle.umd.js +487 -180
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
- package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
- package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
- package/mobile/bundle/components/Header/DropdownMenu.d.ts +2 -2
- package/mobile/bundle/components/Header/HeaderQuickActionsMenu.d.ts +1 -1
- package/mobile/bundle/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
- package/mobile/bundle/retail/api/apiBaseUrl.d.ts +2 -1
- package/mobile/bundle/retail/api/checkCaptcha.d.ts +1 -0
- package/mobile/bundle/retail/api/checkCode.d.ts +1 -0
- package/mobile/bundle/retail/api/createDraftTask.d.ts +2 -1
- package/mobile/bundle/retail/api/createParticipant.d.ts +6 -0
- package/mobile/bundle/retail/api/sendMessage.d.ts +7 -0
- package/mobile/bundle/retail/api/updateUserTask.d.ts +14 -8
- package/mobile/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
- package/mobile/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
- package/mobile/bundle/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/mobile/bundle/retail/model/LeadFormState.d.ts +2 -4
- package/mobile/bundle/retail/utils/calculateInputs.d.ts +1 -1
- package/mobile/bundle/retail/utils/checkNewMicroservice.d.ts +1 -0
- package/mobile/bundle/retail/utils/renderStep.d.ts +1 -2
- package/mobile/bundle/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/mobile/bundle/ui-kit/SearchBar/SearchBar.d.ts +1 -2
- package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
- package/mobile/dist/api/apiBaseUrl.d.ts +0 -1
- package/mobile/dist/api/apiBaseUrl.js +1 -2
- package/mobile/dist/api/apiBaseUrl.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +35 -24
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
- 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 +98 -4
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +16 -2
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js +1 -2
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +52 -8
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/components/DebitForm/DebitFormStep.js +1 -2
- package/mobile/dist/components/DebitForm/DebitFormStep.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.d.ts +2 -2
- package/mobile/dist/components/Header/HeaderQuickActionsMenu.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderQuickActionsMenu.js +5 -7
- package/mobile/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/mobile/dist/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
- package/mobile/dist/retail/adaptors/getCreditFormTaskData.js +36 -25
- package/mobile/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
- package/mobile/dist/retail/adaptors/getEmploymentData.js +25 -21
- package/mobile/dist/retail/adaptors/getEmploymentData.js.map +1 -1
- package/mobile/dist/retail/adaptors/utils.js +1 -1
- package/mobile/dist/retail/adaptors/utils.js.map +1 -1
- package/mobile/dist/retail/api/apiBaseUrl.d.ts +2 -1
- package/mobile/dist/retail/api/apiBaseUrl.js +3 -2
- package/mobile/dist/retail/api/apiBaseUrl.js.map +1 -1
- package/mobile/dist/retail/api/checkCaptcha.d.ts +1 -0
- package/mobile/dist/retail/api/checkCaptcha.js +10 -3
- package/mobile/dist/retail/api/checkCaptcha.js.map +1 -1
- package/mobile/dist/retail/api/checkCode.d.ts +1 -0
- package/mobile/dist/retail/api/checkCode.js +9 -1
- package/mobile/dist/retail/api/checkCode.js.map +1 -1
- package/mobile/dist/retail/api/createCaptcha.js +5 -1
- package/mobile/dist/retail/api/createCaptcha.js.map +1 -1
- package/mobile/dist/retail/api/createDraftTask.d.ts +2 -1
- package/mobile/dist/retail/api/createDraftTask.js.map +1 -1
- package/mobile/dist/retail/api/createParticipant.d.ts +6 -0
- package/mobile/dist/retail/api/createParticipant.js +6 -0
- package/mobile/dist/retail/api/createParticipant.js.map +1 -0
- package/mobile/dist/retail/api/doRequest.js +4 -2
- package/mobile/dist/retail/api/doRequest.js.map +1 -1
- package/mobile/dist/retail/api/esiaRequestProfile.js +11 -7
- package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -1
- package/mobile/dist/retail/api/getDictionaries.js +3 -1
- package/mobile/dist/retail/api/getDictionaries.js.map +1 -1
- package/mobile/dist/retail/api/getLink.js +5 -1
- package/mobile/dist/retail/api/getLink.js.map +1 -1
- package/mobile/dist/retail/api/sendCode.js +8 -1
- package/mobile/dist/retail/api/sendCode.js.map +1 -1
- package/mobile/dist/retail/api/sendMessage.d.ts +7 -0
- package/mobile/dist/retail/api/sendMessage.js +8 -0
- package/mobile/dist/retail/api/sendMessage.js.map +1 -0
- package/mobile/dist/retail/api/updateUserTask.d.ts +14 -8
- package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
- package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
- package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/dist/retail/hooks/useLeadFormData.js +3 -1
- package/mobile/dist/retail/hooks/useLeadFormData.js.map +1 -1
- package/mobile/dist/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/mobile/dist/retail/model/LeadFormState.d.ts +2 -4
- package/mobile/dist/retail/utils/calculateInputs.d.ts +1 -1
- package/mobile/dist/retail/utils/calculateInputs.js +2 -6
- package/mobile/dist/retail/utils/calculateInputs.js.map +1 -1
- package/mobile/dist/retail/utils/checkNewMicroservice.d.ts +1 -0
- package/mobile/dist/retail/utils/checkNewMicroservice.js +8 -0
- package/mobile/dist/retail/utils/checkNewMicroservice.js.map +1 -0
- package/mobile/dist/retail/utils/renderStep.d.ts +1 -2
- package/mobile/dist/retail/utils/renderStep.js +2 -2
- package/mobile/dist/retail/utils/renderStep.js.map +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/mobile/dist/retail/validator/getRetailFormValidator.js +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -2
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js +1 -2
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/mobile/dist/wlc.json +1 -2
- package/mobile/lib/api/apiBaseUrl.d.ts +0 -1
- package/mobile/lib/api/apiBaseUrl.js +0 -1
- package/mobile/lib/api/apiBaseUrl.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +33 -23
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
- 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 +98 -4
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +1 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +84 -13
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +16 -2
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js +1 -2
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +52 -8
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/components/DebitForm/DebitFormStep.js +1 -2
- package/mobile/lib/components/DebitForm/DebitFormStep.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.d.ts +2 -2
- package/mobile/lib/components/Header/HeaderQuickActionsMenu.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderQuickActionsMenu.js +5 -7
- package/mobile/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/mobile/lib/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
- package/mobile/lib/retail/adaptors/getCreditFormTaskData.js +36 -25
- package/mobile/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
- package/mobile/lib/retail/adaptors/getEmploymentData.js +25 -21
- package/mobile/lib/retail/adaptors/getEmploymentData.js.map +1 -1
- package/mobile/lib/retail/adaptors/utils.js +1 -1
- package/mobile/lib/retail/adaptors/utils.js.map +1 -1
- package/mobile/lib/retail/api/apiBaseUrl.d.ts +2 -1
- package/mobile/lib/retail/api/apiBaseUrl.js +2 -1
- package/mobile/lib/retail/api/apiBaseUrl.js.map +1 -1
- package/mobile/lib/retail/api/checkCaptcha.d.ts +1 -0
- package/mobile/lib/retail/api/checkCaptcha.js +10 -3
- package/mobile/lib/retail/api/checkCaptcha.js.map +1 -1
- package/mobile/lib/retail/api/checkCode.d.ts +1 -0
- package/mobile/lib/retail/api/checkCode.js +9 -1
- package/mobile/lib/retail/api/checkCode.js.map +1 -1
- package/mobile/lib/retail/api/createCaptcha.js +5 -1
- package/mobile/lib/retail/api/createCaptcha.js.map +1 -1
- package/mobile/lib/retail/api/createDraftTask.d.ts +2 -1
- package/mobile/lib/retail/api/createDraftTask.js.map +1 -1
- package/mobile/lib/retail/api/createParticipant.d.ts +6 -0
- package/mobile/lib/retail/api/createParticipant.js +3 -0
- package/mobile/lib/retail/api/createParticipant.js.map +1 -0
- package/mobile/lib/retail/api/doRequest.js +4 -2
- package/mobile/lib/retail/api/doRequest.js.map +1 -1
- package/mobile/lib/retail/api/esiaRequestProfile.js +11 -7
- package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -1
- package/mobile/lib/retail/api/getDictionaries.js +3 -1
- package/mobile/lib/retail/api/getDictionaries.js.map +1 -1
- package/mobile/lib/retail/api/getLink.js +5 -1
- package/mobile/lib/retail/api/getLink.js.map +1 -1
- package/mobile/lib/retail/api/sendCode.js +8 -1
- package/mobile/lib/retail/api/sendCode.js.map +1 -1
- package/mobile/lib/retail/api/sendMessage.d.ts +7 -0
- package/mobile/lib/retail/api/sendMessage.js +5 -0
- package/mobile/lib/retail/api/sendMessage.js.map +1 -0
- package/mobile/lib/retail/api/updateUserTask.d.ts +14 -8
- package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
- package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
- package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/retail/hooks/useLeadFormData.js +4 -2
- package/mobile/lib/retail/hooks/useLeadFormData.js.map +1 -1
- package/mobile/lib/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/mobile/lib/retail/model/LeadFormState.d.ts +2 -4
- package/mobile/lib/retail/utils/calculateInputs.d.ts +1 -1
- package/mobile/lib/retail/utils/calculateInputs.js +2 -6
- package/mobile/lib/retail/utils/calculateInputs.js.map +1 -1
- package/mobile/lib/retail/utils/checkNewMicroservice.d.ts +1 -0
- package/mobile/lib/retail/utils/checkNewMicroservice.js +5 -0
- package/mobile/lib/retail/utils/checkNewMicroservice.js.map +1 -0
- package/mobile/lib/retail/utils/renderStep.d.ts +1 -2
- package/mobile/lib/retail/utils/renderStep.js +2 -2
- package/mobile/lib/retail/utils/renderStep.js.map +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.d.ts +1 -2
- package/mobile/lib/retail/validator/getRetailFormValidator.js +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -2
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js +1 -2
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/mobile/lib/wlc.json +1 -2
- package/mobile/src/api/apiBaseUrl.ts +0 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +50 -24
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +17 -11
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +129 -3
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +9 -1
- package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
- package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +1 -2
- package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +84 -13
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +16 -2
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +1 -2
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +52 -8
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +1 -1
- package/mobile/src/components/DebitForm/DebitFormStep.tsx +1 -2
- package/mobile/src/components/Footer/Footer.tsx +3 -5
- package/mobile/src/components/Header/DropdownMenu.tsx +2 -2
- package/mobile/src/components/Header/HeaderQuickActionsMenu.tsx +7 -9
- package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +42 -28
- package/mobile/src/retail/adaptors/getEmploymentData.tsx +25 -21
- package/mobile/src/retail/adaptors/utils.ts +1 -1
- package/mobile/src/retail/api/apiBaseUrl.ts +2 -1
- package/mobile/src/retail/api/checkCaptcha.ts +10 -2
- package/mobile/src/retail/api/checkCode.ts +11 -2
- package/mobile/src/retail/api/createCaptcha.ts +11 -4
- package/mobile/src/retail/api/createDraftTask.ts +2 -1
- package/mobile/src/retail/api/createParticipant.ts +17 -0
- package/mobile/src/retail/api/doRequest.ts +17 -12
- package/mobile/src/retail/api/esiaRequestProfile.ts +10 -2
- package/mobile/src/retail/api/getDictionaries.ts +6 -1
- package/mobile/src/retail/api/getLink.ts +10 -2
- package/mobile/src/retail/api/sendCode.ts +9 -1
- package/mobile/src/retail/api/sendMessage.ts +12 -0
- package/mobile/src/retail/api/updateUserTask.ts +14 -9
- package/mobile/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
- package/mobile/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +54 -21
- package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +2 -1
- package/mobile/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +3 -0
- package/mobile/src/retail/hooks/useLeadFormData.ts +7 -2
- package/mobile/src/retail/model/LeadFormState.ts +2 -4
- package/mobile/src/retail/utils/calculateInputs.ts +2 -10
- package/mobile/src/retail/utils/checkNewMicroservice.ts +5 -0
- package/mobile/src/retail/utils/renderStep.tsx +1 -3
- package/mobile/src/retail/validator/getRetailFormValidator.ts +1 -3
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -3
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +28 -39
- package/mobile/src/ui-kit/YandexMap/useYandexMaps.ts +1 -4
- package/mobile/src/wlc.json +2 -2
- package/package.json +1 -1
- package/src/api/apiBaseUrl.ts +0 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +15 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +50 -24
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +17 -11
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +129 -3
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +9 -1
- package/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
- package/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -1
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +1 -2
- package/src/components/CreditCardForm/creditCardFormStepsData.tsx +84 -13
- package/src/components/CreditForm/CreditForm.fixture.tsx +12 -18
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +16 -2
- package/src/components/CreditForm/CreditFormStep.tsx +1 -2
- package/src/components/CreditForm/creditFormStepsData.tsx +52 -8
- package/src/components/CreditForm/useCreditFormAPI.tsx +1 -1
- package/src/components/DebitForm/DebitFormStep.tsx +1 -2
- package/src/components/Footer/Footer.tsx +3 -5
- package/src/components/Footer/renderLogoSearchBar.tsx +2 -7
- package/src/components/Header/DropdownMenu.tsx +2 -2
- package/src/components/Header/HeaderQuickActionsMenu.tsx +7 -9
- package/src/retail/adaptors/getCreditFormTaskData.ts +42 -28
- package/src/retail/adaptors/getEmploymentData.tsx +25 -21
- package/src/retail/adaptors/utils.ts +1 -1
- package/src/retail/api/apiBaseUrl.ts +2 -1
- package/src/retail/api/checkCaptcha.ts +10 -2
- package/src/retail/api/checkCode.ts +11 -2
- package/src/retail/api/createCaptcha.ts +11 -4
- package/src/retail/api/createDraftTask.ts +2 -1
- package/src/retail/api/createParticipant.ts +17 -0
- package/src/retail/api/doRequest.ts +17 -12
- package/src/retail/api/esiaRequestProfile.ts +10 -2
- package/src/retail/api/getDictionaries.ts +6 -1
- package/src/retail/api/getLink.ts +10 -2
- package/src/retail/api/sendCode.ts +9 -1
- package/src/retail/api/sendMessage.ts +12 -0
- package/src/retail/api/updateUserTask.ts +14 -9
- package/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
- package/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +54 -21
- package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +2 -1
- package/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +3 -0
- package/src/retail/hooks/useLeadFormData.ts +7 -2
- package/src/retail/model/LeadFormState.ts +2 -4
- package/src/retail/utils/calculateInputs.ts +2 -10
- package/src/retail/utils/checkNewMicroservice.ts +5 -0
- package/src/retail/utils/renderStep.tsx +1 -3
- package/src/retail/validator/getRetailFormValidator.ts +1 -3
- package/src/ui-kit/SearchBar/SearchBar.tsx +1 -3
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +28 -39
- package/src/ui-kit/YandexMap/useYandexMaps.ts +1 -4
- package/src/wlc.json +2 -2
- package/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
- package/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
- package/dist/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -14
- package/dist/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
- package/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
- package/lib/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -11
- package/lib/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
- package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
- package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -14
- package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
- package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
- package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -11
- package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
- package/mobile/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +0 -32
- package/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +0 -32
package/bundle/bundle.umd.js
CHANGED
|
@@ -1719,8 +1719,7 @@
|
|
|
1719
1719
|
return `GMT${sign}${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
|
|
1720
1720
|
};
|
|
1721
1721
|
|
|
1722
|
-
const API_BASE_URI
|
|
1723
|
-
const RETAIL_API_BASE_URI = '/light-api-cash/v1';
|
|
1722
|
+
const API_BASE_URI = '/api/v1';
|
|
1724
1723
|
|
|
1725
1724
|
const formatDate = (date, toTimeStamp = false) => {
|
|
1726
1725
|
if (typeof date === 'string') {
|
|
@@ -1796,7 +1795,7 @@
|
|
|
1796
1795
|
async function send(body, router, isIndividualType = false) {
|
|
1797
1796
|
const { serviceDirection } = body;
|
|
1798
1797
|
const isNaturalPerson = isIndividualType && serviceDirection !== 'Юридическое лицо / ИП';
|
|
1799
|
-
const url = `${API_BASE_URI
|
|
1798
|
+
const url = `${API_BASE_URI}${isNaturalPerson ? '/lead' : '/sendcorporatelead'}`;
|
|
1800
1799
|
const submitBody = getSubmitBody(body, isNaturalPerson, router);
|
|
1801
1800
|
try {
|
|
1802
1801
|
const response = await LeadServiceFetch(url, submitBody);
|
|
@@ -1812,7 +1811,7 @@
|
|
|
1812
1811
|
async function sendCode({ phone }) {
|
|
1813
1812
|
const submitBody = getPhoneBody(phone);
|
|
1814
1813
|
try {
|
|
1815
|
-
const response = LeadServiceFetch(`${API_BASE_URI
|
|
1814
|
+
const response = LeadServiceFetch(`${API_BASE_URI}/initCorporateLead`, submitBody).then(async (res) => {
|
|
1816
1815
|
if (!res.ok) {
|
|
1817
1816
|
throw new Error(`Ошибка HTTP: ${res.status}`);
|
|
1818
1817
|
}
|
|
@@ -1831,7 +1830,7 @@
|
|
|
1831
1830
|
leadRequest: getSubmitBody(body, false),
|
|
1832
1831
|
};
|
|
1833
1832
|
try {
|
|
1834
|
-
const response = await LeadServiceFetch(`${API_BASE_URI
|
|
1833
|
+
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
1835
1834
|
return await response.json();
|
|
1836
1835
|
}
|
|
1837
1836
|
catch (e) {
|
|
@@ -1843,7 +1842,7 @@
|
|
|
1843
1842
|
const submitBody = getSubmitBody(body, isNaturalPerson);
|
|
1844
1843
|
const formatSubmitBody = getFormatCallbackSubmitBody(submitBody);
|
|
1845
1844
|
try {
|
|
1846
|
-
const response = await LeadServiceFetch(`${API_BASE_URI
|
|
1845
|
+
const response = await LeadServiceFetch(`${API_BASE_URI}/callback`, formatSubmitBody);
|
|
1847
1846
|
if (!response?.ok) {
|
|
1848
1847
|
return null;
|
|
1849
1848
|
}
|
|
@@ -2043,7 +2042,7 @@
|
|
|
2043
2042
|
}
|
|
2044
2043
|
}
|
|
2045
2044
|
|
|
2046
|
-
const BRANCHES_URL = `${API_BASE_URI
|
|
2045
|
+
const BRANCHES_URL = `${API_BASE_URI}/branches`;
|
|
2047
2046
|
const EMPTY_VALUE$2 = [];
|
|
2048
2047
|
function useBranches(regionCode) {
|
|
2049
2048
|
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes);
|
|
@@ -2057,7 +2056,7 @@
|
|
|
2057
2056
|
const REGIONS_URL$1 = '/branchesByRegions';
|
|
2058
2057
|
const PREMIUM_REGIONS_URL = '/premiumBranchesByRegions';
|
|
2059
2058
|
function useBranchesByRegions(isPremium = false) {
|
|
2060
|
-
const { data } = useAsyncData(`${API_BASE_URI
|
|
2059
|
+
const { data } = useAsyncData(`${API_BASE_URI}${isPremium ? PREMIUM_REGIONS_URL : REGIONS_URL$1}`, fetchJSONUnsafe);
|
|
2061
2060
|
return Array.isArray(data) ? data : [];
|
|
2062
2061
|
}
|
|
2063
2062
|
|
|
@@ -2623,7 +2622,7 @@
|
|
|
2623
2622
|
|
|
2624
2623
|
const IsClientField = JSX(({ field, input }) => (jsx(CheckboxWithError, { ...field(input?.name ?? ''), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })));
|
|
2625
2624
|
|
|
2626
|
-
const OUT_SERVICE_BASE_URL = `${API_BASE_URI
|
|
2625
|
+
const OUT_SERVICE_BASE_URL = `${API_BASE_URI}/outservice`;
|
|
2627
2626
|
const EMPTY_REGIONS$1 = [];
|
|
2628
2627
|
async function getOutServiceRegions() {
|
|
2629
2628
|
const data = await fetchJSON(`${OUT_SERVICE_BASE_URL}/outserviceregions`);
|
|
@@ -2733,7 +2732,7 @@
|
|
|
2733
2732
|
];
|
|
2734
2733
|
const QuestionProductField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041A\u0430\u043A\u043E\u0439 \u0443 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441?", options: QUESTION_PRODUCT_TYPES, ...field(input?.name ?? '') })));
|
|
2735
2734
|
|
|
2736
|
-
const REGIONS_URL = `${API_BASE_URI
|
|
2735
|
+
const REGIONS_URL = `${API_BASE_URI}/regions`;
|
|
2737
2736
|
const EMPTY_REGIONS = [];
|
|
2738
2737
|
// TODO Почему url можно менять? Разве смысл не в инкапсуляции api url. Тоже под рефакторинг попадает
|
|
2739
2738
|
function useRegions(url = REGIONS_URL) {
|
|
@@ -2741,7 +2740,7 @@
|
|
|
2741
2740
|
return Array.isArray(data) ? data : EMPTY_REGIONS;
|
|
2742
2741
|
}
|
|
2743
2742
|
|
|
2744
|
-
const OUT_SERVICE_URL = `${API_BASE_URI
|
|
2743
|
+
const OUT_SERVICE_URL = `${API_BASE_URI}/outservice/outserviceregions`;
|
|
2745
2744
|
const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
|
|
2746
2745
|
|
|
2747
2746
|
const RegionField = JSX(({ field, input, params }) => {
|
|
@@ -3615,6 +3614,14 @@
|
|
|
3615
3614
|
EsiaStatuses["Pending"] = "PENDING";
|
|
3616
3615
|
})(EsiaStatuses || (EsiaStatuses = {}));
|
|
3617
3616
|
|
|
3617
|
+
const checkNewMicroservice = () => {
|
|
3618
|
+
const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
|
|
3619
|
+
return Boolean(isNewMicroservice);
|
|
3620
|
+
};
|
|
3621
|
+
|
|
3622
|
+
const RETAIL_API_BASE_URI = '/light-api-cash/v1';
|
|
3623
|
+
const NEW_RETAIL_API_BASE_URI = '/api/credit-application';
|
|
3624
|
+
|
|
3618
3625
|
const getTraceId = () => {
|
|
3619
3626
|
const result = new Uint8Array(8);
|
|
3620
3627
|
globalThis.crypto.getRandomValues(result);
|
|
@@ -3632,8 +3639,9 @@
|
|
|
3632
3639
|
}
|
|
3633
3640
|
};
|
|
3634
3641
|
async function doRequest(url, method, body) {
|
|
3642
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
3635
3643
|
const traceId = getTraceId();
|
|
3636
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3644
|
+
return globalThis?.fetch?.(`${isNewMicroservice ? NEW_RETAIL_API_BASE_URI : RETAIL_API_BASE_URI}${url}`, {
|
|
3637
3645
|
method,
|
|
3638
3646
|
headers: {
|
|
3639
3647
|
'Content-Type': 'application/json',
|
|
@@ -3651,7 +3659,10 @@
|
|
|
3651
3659
|
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3652
3660
|
};
|
|
3653
3661
|
|
|
3654
|
-
const getLink = (body) =>
|
|
3662
|
+
const getLink = async (body) => {
|
|
3663
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
3664
|
+
return await fetchRetailJSON(`${isNewMicroservice ? '/user-data' : ''}/esia/getLink`, 'POST', body);
|
|
3665
|
+
};
|
|
3655
3666
|
|
|
3656
3667
|
const EsiaLoginBanner = JSX(({ onChangeEsiaStatus, productType }) => {
|
|
3657
3668
|
const navigator = locationNavigator();
|
|
@@ -4439,7 +4450,7 @@
|
|
|
4439
4450
|
|
|
4440
4451
|
const YMAPS_NAMESPACE = 'ymaps';
|
|
4441
4452
|
const useYandexMaps = () => {
|
|
4442
|
-
const url = `https://api-maps.yandex.ru/2.1/?
|
|
4453
|
+
const url = `https://api-maps.yandex.ru/2.1/?lang=ru_RU`;
|
|
4443
4454
|
return useExternalNS(YMAPS_NAMESPACE, url, false);
|
|
4444
4455
|
};
|
|
4445
4456
|
|
|
@@ -4529,10 +4540,9 @@
|
|
|
4529
4540
|
};
|
|
4530
4541
|
const formatCoordinate = (coordinate) => Number(coordinate.toString().replace(',', '.'));
|
|
4531
4542
|
|
|
4532
|
-
const API_BASE_URI = '/light-api-cash/v1';
|
|
4533
|
-
|
|
4534
4543
|
const useLeadFormData = (typeField) => {
|
|
4535
|
-
const
|
|
4544
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
4545
|
+
const { data, error } = useAsyncData(`${isNewMicroservice ? `${NEW_RETAIL_API_BASE_URI}/public-data` : RETAIL_API_BASE_URI}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`, fetchData);
|
|
4536
4546
|
if (data && 'errorMessage' in data) {
|
|
4537
4547
|
return { error };
|
|
4538
4548
|
}
|
|
@@ -5085,9 +5095,10 @@
|
|
|
5085
5095
|
});
|
|
5086
5096
|
|
|
5087
5097
|
const getDictionaries = async (dictionaries, store) => {
|
|
5098
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
5088
5099
|
await Promise.all(Object.entries(dictionaries).map((dictionary) => {
|
|
5089
5100
|
const [fieldName, dictionaryName] = dictionary;
|
|
5090
|
-
fetchRetailJSON(
|
|
5101
|
+
fetchRetailJSON(`${isNewMicroservice ? '/public-data' : ''}/dictionary?dictionaryType=${encodeURIComponent(dictionaryName)}`, 'POST').then((res) => {
|
|
5091
5102
|
store[fieldName] = res;
|
|
5092
5103
|
});
|
|
5093
5104
|
}));
|
|
@@ -5843,6 +5854,8 @@
|
|
|
5843
5854
|
return res || {};
|
|
5844
5855
|
};
|
|
5845
5856
|
|
|
5857
|
+
const createParticipant = (body) => fetchRetailJSON('/public-data/createParticipant', 'POST', body).then((res) => res?.participantId || null);
|
|
5858
|
+
|
|
5846
5859
|
const createUserProfile = (body) => fetchRetailJSON('/public-data/createUserProfile', 'POST', body).then((res) => res?.profile?.id || null);
|
|
5847
5860
|
|
|
5848
5861
|
const createUserTaskDebit = async (body) => {
|
|
@@ -5866,7 +5879,13 @@
|
|
|
5866
5879
|
|
|
5867
5880
|
const updateUserTask = (body) => doRequest('/user-data/updateUserTask', 'PUT', body);
|
|
5868
5881
|
|
|
5869
|
-
const sendCode = (body) =>
|
|
5882
|
+
const sendCode = async (body) => {
|
|
5883
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
5884
|
+
return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/sendCode`, 'POST', {
|
|
5885
|
+
phoneNumber: body.phoneNumber,
|
|
5886
|
+
smsCodesSetName: isNewMicroservice ? body.smsCodesSetName.key : body.smsCodesSetName,
|
|
5887
|
+
});
|
|
5888
|
+
};
|
|
5870
5889
|
|
|
5871
5890
|
const ICON_SIZE = { width: '118', height: '24' };
|
|
5872
5891
|
|
|
@@ -5898,11 +5917,20 @@
|
|
|
5898
5917
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
5899
5918
|
: null] })));
|
|
5900
5919
|
|
|
5901
|
-
const checkCaptcha = (body) =>
|
|
5902
|
-
|
|
5903
|
-
|
|
5920
|
+
const checkCaptcha = async (body) => {
|
|
5921
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
5922
|
+
return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/checkCaptcha`, 'POST', {
|
|
5923
|
+
captchaText: body.captchaText,
|
|
5924
|
+
...(isNewMicroservice && { phoneNumber: body?.phoneNumber }),
|
|
5925
|
+
})
|
|
5926
|
+
.then((res) => res.text())
|
|
5927
|
+
.then((text) => text !== 'ERROR');
|
|
5928
|
+
};
|
|
5904
5929
|
|
|
5905
|
-
const createCaptcha = (phoneNumber) =>
|
|
5930
|
+
const createCaptcha = async (phoneNumber) => {
|
|
5931
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
5932
|
+
return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/createCaptcha?phoneNumber=${encodeURIComponent(phoneNumber)}`, 'GET').then(async (res) => (res ? res.blob() : new Blob()));
|
|
5933
|
+
};
|
|
5906
5934
|
|
|
5907
5935
|
const CaptchaDialog = JSX(({ phoneNumber, sendCode, onClose }) => {
|
|
5908
5936
|
const [captcha, setCaptcha] = useState('');
|
|
@@ -5912,7 +5940,7 @@
|
|
|
5912
5940
|
const { closeAll } = useDialogManager();
|
|
5913
5941
|
const handleCheckCaptcha = useCallback(async () => {
|
|
5914
5942
|
startLoading();
|
|
5915
|
-
const isValidCode = await checkCaptcha({ captchaText: code });
|
|
5943
|
+
const isValidCode = await checkCaptcha({ captchaText: code, phoneNumber });
|
|
5916
5944
|
if (isValidCode) {
|
|
5917
5945
|
onClose?.();
|
|
5918
5946
|
sendCode?.();
|
|
@@ -5929,7 +5957,14 @@
|
|
|
5929
5957
|
return (jsx(Dialog, { head: jsx(Logo, {}), onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsxs("div", { className: "flex", children: [jsx("img", { className: "grow", src: captcha }), jsx(Button, { className: "w-8", embedded: true, onClick: handleCreateCaptcha, children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-80", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-80 justify-between", children: [jsx(Button, { version: "secondary", onClick: closeAll, children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(SubmitButton$1, { version: "secondary", disabled: !code, onClick: handleCheckCaptcha, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] }), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
5930
5958
|
});
|
|
5931
5959
|
|
|
5932
|
-
const checkCode = async (body) =>
|
|
5960
|
+
const checkCode = async (body) => {
|
|
5961
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
5962
|
+
return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/checkCode`, 'POST', {
|
|
5963
|
+
smsText: body.smsText,
|
|
5964
|
+
smsCodesSetName: isNewMicroservice ? body.smsCodesSetName.key : body.smsCodesSetName,
|
|
5965
|
+
...(isNewMicroservice && { phoneNumber: body?.phoneNumber }),
|
|
5966
|
+
});
|
|
5967
|
+
};
|
|
5933
5968
|
|
|
5934
5969
|
const saveToken = (data) => {
|
|
5935
5970
|
globalThis.sessionStorage.setItem('accessToken', data.access_token);
|
|
@@ -5937,7 +5972,7 @@
|
|
|
5937
5972
|
};
|
|
5938
5973
|
|
|
5939
5974
|
const TIME_TO_RESEND = 180;
|
|
5940
|
-
const useVerifyPhoneDialogSubmit = ({ values, onSuccess, onFail, }) => {
|
|
5975
|
+
const useVerifyPhoneDialogSubmit = ({ values, phoneNumber, onSuccess, onFail, }) => {
|
|
5941
5976
|
const sessionStore = useSessionStore();
|
|
5942
5977
|
const attempts = sessionStore.smsCode?.attempts || 0;
|
|
5943
5978
|
const timer = Math.max(getTimer(sessionStore.smsCode?.sendTime || Date.now()), 0);
|
|
@@ -5956,6 +5991,7 @@
|
|
|
5956
5991
|
const response = await checkCode({
|
|
5957
5992
|
smsText: values.join(''),
|
|
5958
5993
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
5994
|
+
phoneNumber,
|
|
5959
5995
|
});
|
|
5960
5996
|
if (response.ok) {
|
|
5961
5997
|
const data = (await response.json());
|
|
@@ -5997,13 +6033,14 @@
|
|
|
5997
6033
|
const VerifyPhoneDialog = JSX(({ phone, withDescription = true, consents, onSuccess = noop, onClose = noop, onFail = noop, }) => {
|
|
5998
6034
|
const [values, setValues] = useState(Array(CODE_LENGTH).fill(''));
|
|
5999
6035
|
const sessionStore = useSessionStore();
|
|
6036
|
+
const phoneNumber = formatPhone(phone);
|
|
6000
6037
|
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setErrorText, } = useVerifyPhoneDialogSubmit({
|
|
6001
6038
|
values,
|
|
6039
|
+
phoneNumber,
|
|
6002
6040
|
onSuccess,
|
|
6003
6041
|
onFail,
|
|
6004
6042
|
});
|
|
6005
6043
|
const captchaDialog = useDialog(CaptchaDialog);
|
|
6006
|
-
const phoneNumber = formatPhone(phone);
|
|
6007
6044
|
const restartTimer = useCountDownTimer({ seconds: timeNextReq, onTick: setTimeNextReq });
|
|
6008
6045
|
const handleSendCode = useCallback(async () => {
|
|
6009
6046
|
const response = await sendCode({
|
|
@@ -6066,7 +6103,7 @@
|
|
|
6066
6103
|
const useConsentBkiDialog = (onClose) => {
|
|
6067
6104
|
const { open } = useDialog(ConsentBkiDialog);
|
|
6068
6105
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
6069
|
-
const handleSuccessVerify = (profileId) => async (smsCode) => {
|
|
6106
|
+
const handleSuccessVerify = (profileId, taskId, participantId) => async (smsCode) => {
|
|
6070
6107
|
try {
|
|
6071
6108
|
if (profileId) {
|
|
6072
6109
|
await updateUserProfile({
|
|
@@ -6077,18 +6114,32 @@
|
|
|
6077
6114
|
},
|
|
6078
6115
|
});
|
|
6079
6116
|
}
|
|
6117
|
+
else if (taskId && participantId) {
|
|
6118
|
+
await updateUserTask({
|
|
6119
|
+
task: {
|
|
6120
|
+
id: taskId,
|
|
6121
|
+
participant: {
|
|
6122
|
+
id: participantId,
|
|
6123
|
+
consentBkiFlg: true,
|
|
6124
|
+
smsConsentBki: smsCode,
|
|
6125
|
+
},
|
|
6126
|
+
},
|
|
6127
|
+
sendToBank: false,
|
|
6128
|
+
taskKind: 'SHORT',
|
|
6129
|
+
});
|
|
6130
|
+
}
|
|
6080
6131
|
onClose();
|
|
6081
6132
|
}
|
|
6082
6133
|
catch (ex) {
|
|
6083
6134
|
console.log(ex);
|
|
6084
6135
|
}
|
|
6085
6136
|
};
|
|
6086
|
-
const
|
|
6137
|
+
const handleSubmitBkiConsent = ({ phone, profileId, onFail, taskId, participantId }) => async (confirmStatus) => {
|
|
6087
6138
|
if (confirmStatus === 'SIGNED' && phone) {
|
|
6088
6139
|
verifyPhoneDialog.open({
|
|
6089
6140
|
phone,
|
|
6090
6141
|
consents: ['согласие на запрос информации в БКИ'],
|
|
6091
|
-
onSuccess: handleSuccessVerify(profileId),
|
|
6142
|
+
onSuccess: handleSuccessVerify(profileId, taskId, participantId),
|
|
6092
6143
|
onFail,
|
|
6093
6144
|
});
|
|
6094
6145
|
}
|
|
@@ -6097,7 +6148,16 @@
|
|
|
6097
6148
|
}
|
|
6098
6149
|
};
|
|
6099
6150
|
return {
|
|
6100
|
-
open: (phone, profileId, onFail) => open({
|
|
6151
|
+
open: ({ phone, profileId, onFail, taskId, participantId }) => open({
|
|
6152
|
+
onSubmit: handleSubmitBkiConsent({
|
|
6153
|
+
phone,
|
|
6154
|
+
profileId,
|
|
6155
|
+
onFail,
|
|
6156
|
+
taskId,
|
|
6157
|
+
participantId,
|
|
6158
|
+
}),
|
|
6159
|
+
onClose,
|
|
6160
|
+
}),
|
|
6101
6161
|
};
|
|
6102
6162
|
};
|
|
6103
6163
|
|
|
@@ -6183,10 +6243,10 @@
|
|
|
6183
6243
|
return [
|
|
6184
6244
|
...acc,
|
|
6185
6245
|
{
|
|
6246
|
+
...address,
|
|
6186
6247
|
addressType: {
|
|
6187
6248
|
key: fieldsNamesToAddressKeysMap[key],
|
|
6188
6249
|
},
|
|
6189
|
-
...address,
|
|
6190
6250
|
},
|
|
6191
6251
|
];
|
|
6192
6252
|
}
|
|
@@ -6444,40 +6504,50 @@
|
|
|
6444
6504
|
};
|
|
6445
6505
|
};
|
|
6446
6506
|
|
|
6447
|
-
|
|
6448
|
-
const getCreditLeadFormTaskData = ({ participantId, taskId, profileId, formData, marketingInfo, }) => {
|
|
6449
|
-
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
6507
|
+
const getCreditLeadFormTaskData = ({ participantId, taskId, profileId, formData, marketingInfo, consents, }) => {
|
|
6450
6508
|
const taskSource = getTaskSource(marketingInfo?.utm_source);
|
|
6509
|
+
const participantInfo = getParticipant({ participantId, profileId, formData, consents });
|
|
6451
6510
|
return {
|
|
6452
6511
|
sendToBank: true,
|
|
6453
6512
|
taskKind: 'SHORT',
|
|
6454
6513
|
task: {
|
|
6455
6514
|
taskSource,
|
|
6456
6515
|
id: taskId,
|
|
6457
|
-
|
|
6458
|
-
{
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
profile: {
|
|
6465
|
-
id: profileId,
|
|
6466
|
-
},
|
|
6467
|
-
participantContacts: getParticipantContacts$1({
|
|
6468
|
-
phone: phone && formatPhone(phone),
|
|
6469
|
-
email,
|
|
6470
|
-
}),
|
|
6471
|
-
roleCd: {
|
|
6472
|
-
key: 'BORROWER',
|
|
6473
|
-
value: 'Заемщик',
|
|
6474
|
-
},
|
|
6475
|
-
},
|
|
6476
|
-
],
|
|
6516
|
+
...(profileId
|
|
6517
|
+
? {
|
|
6518
|
+
participants: [participantInfo],
|
|
6519
|
+
}
|
|
6520
|
+
: {
|
|
6521
|
+
participant: participantInfo,
|
|
6522
|
+
}),
|
|
6477
6523
|
marketingInfo,
|
|
6478
6524
|
},
|
|
6479
6525
|
};
|
|
6480
6526
|
};
|
|
6527
|
+
const getParticipant = ({ participantId, profileId, formData, consents, }) => {
|
|
6528
|
+
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
6529
|
+
return {
|
|
6530
|
+
birthDate: limitedBirthday && formatDate(limitedBirthday, true),
|
|
6531
|
+
id: participantId,
|
|
6532
|
+
midname: middleName,
|
|
6533
|
+
name,
|
|
6534
|
+
surname,
|
|
6535
|
+
...(profileId && {
|
|
6536
|
+
profile: {
|
|
6537
|
+
id: profileId,
|
|
6538
|
+
},
|
|
6539
|
+
}),
|
|
6540
|
+
participantContacts: getParticipantContacts$1({
|
|
6541
|
+
phone: phone && formatPhone(phone),
|
|
6542
|
+
email,
|
|
6543
|
+
}),
|
|
6544
|
+
roleCd: {
|
|
6545
|
+
key: 'BORROWER',
|
|
6546
|
+
value: 'Заемщик',
|
|
6547
|
+
},
|
|
6548
|
+
...consents,
|
|
6549
|
+
};
|
|
6550
|
+
};
|
|
6481
6551
|
const getDebitLeadFormTaskData = (formData, programId, marketingInfo) => {
|
|
6482
6552
|
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
6483
6553
|
const taskSource = getTaskSource(marketingInfo?.utm_source);
|
|
@@ -6550,7 +6620,7 @@
|
|
|
6550
6620
|
|
|
6551
6621
|
/* eslint-disable max-lines */
|
|
6552
6622
|
// eslint-disable-next-line max-lines-per-function
|
|
6553
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, changeSubmitFormStatus, }) => {
|
|
6623
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, changeSubmitFormStatus, isNewMicroservice, }) => {
|
|
6554
6624
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
6555
6625
|
const saveUserData = useSaveUserData();
|
|
6556
6626
|
const sessionStore = useSessionStore();
|
|
@@ -6567,7 +6637,7 @@
|
|
|
6567
6637
|
verifyPhoneDialog.close();
|
|
6568
6638
|
changeSubmitFormStatus(false);
|
|
6569
6639
|
};
|
|
6570
|
-
const
|
|
6640
|
+
const handleSubmitOldMicroservice = useCallback(async (formData) => {
|
|
6571
6641
|
try {
|
|
6572
6642
|
startSending();
|
|
6573
6643
|
const transformedFormData = transformFormData(formData);
|
|
@@ -6595,7 +6665,11 @@
|
|
|
6595
6665
|
goToNextStep();
|
|
6596
6666
|
}
|
|
6597
6667
|
else {
|
|
6598
|
-
consentBkiDialog.open(
|
|
6668
|
+
consentBkiDialog.open({
|
|
6669
|
+
phone: transformedFormData.phone,
|
|
6670
|
+
profileId,
|
|
6671
|
+
onFail: handleFailSendForm,
|
|
6672
|
+
});
|
|
6599
6673
|
}
|
|
6600
6674
|
};
|
|
6601
6675
|
const handleSuccessVerify = async () => {
|
|
@@ -6635,7 +6709,65 @@
|
|
|
6635
6709
|
endSending();
|
|
6636
6710
|
}
|
|
6637
6711
|
}, []);
|
|
6638
|
-
|
|
6712
|
+
const handleSubmitNewMicroservice = useCallback(async (formData) => {
|
|
6713
|
+
try {
|
|
6714
|
+
startSending();
|
|
6715
|
+
const transformedFormData = transformFormData(formData);
|
|
6716
|
+
const participantId = await createParticipant({
|
|
6717
|
+
phone: formatPhone(transformedFormData.phone),
|
|
6718
|
+
email: transformedFormData.email,
|
|
6719
|
+
});
|
|
6720
|
+
const referalData = leadFormStore.referalData;
|
|
6721
|
+
const marketingInfo = sessionStore.marketingInfo;
|
|
6722
|
+
if (!participantId) {
|
|
6723
|
+
throw new Error();
|
|
6724
|
+
}
|
|
6725
|
+
const sendCurrentTask = async () => {
|
|
6726
|
+
const taskId = await updateUserDataNewMicroservice({
|
|
6727
|
+
programId,
|
|
6728
|
+
participantId,
|
|
6729
|
+
formData: transformedFormData,
|
|
6730
|
+
referalData,
|
|
6731
|
+
productType,
|
|
6732
|
+
marketingInfo,
|
|
6733
|
+
saveUserData,
|
|
6734
|
+
sendAspects,
|
|
6735
|
+
});
|
|
6736
|
+
verifyPhoneDialog.close();
|
|
6737
|
+
consentBkiDialog.open({
|
|
6738
|
+
phone: transformedFormData.phone,
|
|
6739
|
+
taskId,
|
|
6740
|
+
participantId,
|
|
6741
|
+
onFail: handleFailSendForm,
|
|
6742
|
+
});
|
|
6743
|
+
};
|
|
6744
|
+
const handleSuccessVerify = async () => {
|
|
6745
|
+
try {
|
|
6746
|
+
await sendCurrentTask();
|
|
6747
|
+
}
|
|
6748
|
+
catch {
|
|
6749
|
+
handleFailSendForm();
|
|
6750
|
+
}
|
|
6751
|
+
};
|
|
6752
|
+
const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
|
|
6753
|
+
verifyPhoneDialog.open({
|
|
6754
|
+
phone: transformedFormData.phone,
|
|
6755
|
+
consents: acceptedConsents,
|
|
6756
|
+
onSuccess: handleSuccessVerify,
|
|
6757
|
+
onFail: handleFailSendForm,
|
|
6758
|
+
});
|
|
6759
|
+
}
|
|
6760
|
+
catch {
|
|
6761
|
+
handleFailSendForm();
|
|
6762
|
+
}
|
|
6763
|
+
finally {
|
|
6764
|
+
endSending();
|
|
6765
|
+
}
|
|
6766
|
+
}, []);
|
|
6767
|
+
return {
|
|
6768
|
+
isSending,
|
|
6769
|
+
handleSubmit: isNewMicroservice ? handleSubmitNewMicroservice : handleSubmitOldMicroservice,
|
|
6770
|
+
};
|
|
6639
6771
|
};
|
|
6640
6772
|
const getAcceptedConsents = (formData, productType) => {
|
|
6641
6773
|
const consents = productTypeToConsentsMap[productType];
|
|
@@ -6682,6 +6814,37 @@
|
|
|
6682
6814
|
console.log(ex);
|
|
6683
6815
|
}
|
|
6684
6816
|
};
|
|
6817
|
+
const updateUserDataNewMicroservice = async ({ programId, participantId, formData, referalData, productType, marketingInfo, saveUserData, sendAspects, }) => {
|
|
6818
|
+
let taskId;
|
|
6819
|
+
const transformedConsents = transformConsentsFields(formData, productType);
|
|
6820
|
+
try {
|
|
6821
|
+
const creditData = await createDraftTask({
|
|
6822
|
+
participantId,
|
|
6823
|
+
programId,
|
|
6824
|
+
});
|
|
6825
|
+
taskId = creditData.taskId;
|
|
6826
|
+
await updateUserTask(getCreditLeadFormTaskData({
|
|
6827
|
+
participantId,
|
|
6828
|
+
taskId,
|
|
6829
|
+
formData,
|
|
6830
|
+
marketingInfo,
|
|
6831
|
+
consents: transformedConsents,
|
|
6832
|
+
}));
|
|
6833
|
+
if (referalData?.referalCode) {
|
|
6834
|
+
await saveReferalInfo({
|
|
6835
|
+
taskId,
|
|
6836
|
+
...referalData,
|
|
6837
|
+
});
|
|
6838
|
+
}
|
|
6839
|
+
sendAspects(participantId, taskId);
|
|
6840
|
+
saveUserData({ participantId, taskId, programId, formData });
|
|
6841
|
+
return taskId;
|
|
6842
|
+
}
|
|
6843
|
+
catch (ex) {
|
|
6844
|
+
console.log(ex);
|
|
6845
|
+
throw new Error();
|
|
6846
|
+
}
|
|
6847
|
+
};
|
|
6685
6848
|
const transformConsentsFields = (formData, productType) => {
|
|
6686
6849
|
const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg, consentInformMaterialsFlg, consentFATCA, } = formData;
|
|
6687
6850
|
let consents;
|
|
@@ -6764,13 +6927,16 @@
|
|
|
6764
6927
|
return () => clearInterval(timer);
|
|
6765
6928
|
};
|
|
6766
6929
|
|
|
6767
|
-
const esiaRequestProfile =
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6930
|
+
const esiaRequestProfile = async (body) => {
|
|
6931
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
6932
|
+
return await fetchRetailJSON(`${isNewMicroservice ? '/user-data' : ''}/esia/requestProfile`, 'POST', body).then((res) => {
|
|
6933
|
+
if (res?.access_token && res?.refresh_token) {
|
|
6934
|
+
saveToken(res);
|
|
6935
|
+
updateRefreshToken(true);
|
|
6936
|
+
}
|
|
6937
|
+
return res;
|
|
6938
|
+
});
|
|
6939
|
+
};
|
|
6774
6940
|
|
|
6775
6941
|
const useReferalProgramm = () => {
|
|
6776
6942
|
const leadFormStore = useLeadFormStore();
|
|
@@ -6854,12 +7020,12 @@
|
|
|
6854
7020
|
.then((response) => response.json());
|
|
6855
7021
|
};
|
|
6856
7022
|
|
|
6857
|
-
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
7023
|
+
const parseEsiaProfile = async (esiaProfile, isDebit = false, isNewMicroservice = false) => {
|
|
6858
7024
|
checkEsiaData(esiaProfile);
|
|
6859
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
7025
|
+
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile, isNewMicroservice);
|
|
6860
7026
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
6861
7027
|
let files = [];
|
|
6862
|
-
if (isFullEsiaData) {
|
|
7028
|
+
if (isFullEsiaData && !isNewMicroservice) {
|
|
6863
7029
|
files = await saveDocuments(esiaAdditionalDocument);
|
|
6864
7030
|
}
|
|
6865
7031
|
const mainData = {
|
|
@@ -6990,8 +7156,16 @@
|
|
|
6990
7156
|
throw new Error();
|
|
6991
7157
|
}
|
|
6992
7158
|
};
|
|
6993
|
-
const checkEsiaAdditionalDocument = (esiaProfile) => {
|
|
7159
|
+
const checkEsiaAdditionalDocument = (esiaProfile, isNewMicroservice) => {
|
|
6994
7160
|
const { esiaAdditionalDocument } = esiaProfile;
|
|
7161
|
+
const documents = [
|
|
7162
|
+
esiaAdditionalDocument?.pdfFilePayout,
|
|
7163
|
+
esiaAdditionalDocument?.pdfFileWorkbook,
|
|
7164
|
+
esiaAdditionalDocument?.pdfFileSigPayout,
|
|
7165
|
+
esiaAdditionalDocument?.xmlFilePayout,
|
|
7166
|
+
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
7167
|
+
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
7168
|
+
];
|
|
6995
7169
|
const data = [
|
|
6996
7170
|
esiaAdditionalDocument?.inn,
|
|
6997
7171
|
esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
|
|
@@ -7000,18 +7174,12 @@
|
|
|
7000
7174
|
esiaAdditionalDocument?.workLength?.toString(),
|
|
7001
7175
|
esiaAdditionalDocument?.workLengthLastJob?.toString(),
|
|
7002
7176
|
esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
|
|
7003
|
-
esiaAdditionalDocument?.pdfFilePayout,
|
|
7004
|
-
esiaAdditionalDocument?.pdfFileWorkbook,
|
|
7005
|
-
esiaAdditionalDocument?.pdfFileSigPayout,
|
|
7006
|
-
esiaAdditionalDocument?.xmlFilePayout,
|
|
7007
|
-
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
7008
|
-
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
7009
7177
|
];
|
|
7010
|
-
return data.every(Boolean);
|
|
7178
|
+
return data.every(Boolean) && (isNewMicroservice || documents.every(Boolean));
|
|
7011
7179
|
};
|
|
7012
7180
|
|
|
7013
7181
|
/* eslint-disable camelcase */
|
|
7014
|
-
const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
|
|
7182
|
+
const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, isNewMicroservice, }) => {
|
|
7015
7183
|
const leadFormStore = useLeadFormStore();
|
|
7016
7184
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
7017
7185
|
const sessionStore = useSessionStore();
|
|
@@ -7028,7 +7196,7 @@
|
|
|
7028
7196
|
authorize: true,
|
|
7029
7197
|
});
|
|
7030
7198
|
if (data) {
|
|
7031
|
-
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
7199
|
+
const parsedData = await parseEsiaProfile(data, productType === 'debitCard', isNewMicroservice);
|
|
7032
7200
|
saveForm((_) => ({
|
|
7033
7201
|
..._,
|
|
7034
7202
|
...parsedData,
|
|
@@ -7043,6 +7211,7 @@
|
|
|
7043
7211
|
useEffect(() => {
|
|
7044
7212
|
leadFormStore.productType = productType;
|
|
7045
7213
|
sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
|
|
7214
|
+
sessionStore.isNewMicroservice = isNewMicroservice || null;
|
|
7046
7215
|
}, [queryFromStorage]);
|
|
7047
7216
|
useEffect(() => {
|
|
7048
7217
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
@@ -7075,7 +7244,7 @@
|
|
|
7075
7244
|
};
|
|
7076
7245
|
};
|
|
7077
7246
|
|
|
7078
|
-
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
7247
|
+
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, isNewMicroservice = false, ...rest }) => {
|
|
7079
7248
|
const [esiaStatus, setEsiaStatus] = useState();
|
|
7080
7249
|
const [ok, setOK] = useState();
|
|
7081
7250
|
const [attemptsWithoutConsents, setAttemptsWithoutConsents] = useState(0);
|
|
@@ -7096,6 +7265,7 @@
|
|
|
7096
7265
|
productType,
|
|
7097
7266
|
setEsiaStatus,
|
|
7098
7267
|
esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
|
|
7268
|
+
isNewMicroservice,
|
|
7099
7269
|
});
|
|
7100
7270
|
const { isSending, handleSubmit } = useApplicationLeadApi({
|
|
7101
7271
|
programId,
|
|
@@ -7103,6 +7273,7 @@
|
|
|
7103
7273
|
productType,
|
|
7104
7274
|
data,
|
|
7105
7275
|
changeSubmitFormStatus,
|
|
7276
|
+
isNewMicroservice,
|
|
7106
7277
|
});
|
|
7107
7278
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, {
|
|
7108
7279
|
formValidator,
|
|
@@ -7706,7 +7877,7 @@
|
|
|
7706
7877
|
};
|
|
7707
7878
|
function useBusinessDepositRates(rateParams) {
|
|
7708
7879
|
const serviceName = rateParams?.rateType ? DEPOSIT_RATES_SERVICE_MAP[rateParams?.rateType] : '';
|
|
7709
|
-
const { data } = useAsyncData(serviceName ? `${API_BASE_URI
|
|
7880
|
+
const { data } = useAsyncData(serviceName ? `${API_BASE_URI}/depositrates/${serviceName}` : null, fetchJSONUnsafe);
|
|
7710
7881
|
return Array.isArray(data) ? data : [];
|
|
7711
7882
|
}
|
|
7712
7883
|
|
|
@@ -8250,7 +8421,7 @@
|
|
|
8250
8421
|
failUrl: `${navigator.origin}${FAILED_URL}`,
|
|
8251
8422
|
language: LANGUAGE,
|
|
8252
8423
|
};
|
|
8253
|
-
const url = `${API_BASE_URI
|
|
8424
|
+
const url = `${API_BASE_URI}/payment/${paymentURLMap[typeForm]}`;
|
|
8254
8425
|
try {
|
|
8255
8426
|
const res = await fetch(url, {
|
|
8256
8427
|
method: 'POST',
|
|
@@ -8815,12 +8986,10 @@
|
|
|
8815
8986
|
return statusesMap[status] || jsx(ReworkStatusContent$1, {});
|
|
8816
8987
|
};
|
|
8817
8988
|
|
|
8818
|
-
const calculateInputs = (getValue) => (inputs
|
|
8989
|
+
const calculateInputs = (getValue) => (inputs) => inputs
|
|
8819
8990
|
.filter((_) => _)
|
|
8820
8991
|
.map((_) => {
|
|
8821
8992
|
if ([
|
|
8822
|
-
checkIsRetiree(step, getValue),
|
|
8823
|
-
checkIsUnemployedRetiree(_, getValue),
|
|
8824
8993
|
checkBusinessOwner(_, getValue),
|
|
8825
8994
|
checkConsentPfrFlg(_, getValue),
|
|
8826
8995
|
checkAddressFillFromESIA(_, getValue),
|
|
@@ -8831,13 +9000,11 @@
|
|
|
8831
9000
|
}
|
|
8832
9001
|
return _;
|
|
8833
9002
|
});
|
|
8834
|
-
const checkIsRetiree = (step, getValue) => step === 2 && getValue('employment')?.key === 'RETIREE';
|
|
8835
|
-
const checkIsUnemployedRetiree = ({ name }, getValue) => name === 'wages' && getValue('employment')?.key === 'RETIREE' && !getValue('inn');
|
|
8836
9003
|
const checkBusinessOwner = ({ name }, getValue) => name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
|
|
8837
9004
|
const checkAddressFillFromESIA = ({ name, filledByEsia }, getValue) => name?.startsWith('address') && getValue('esiaAccountTypeCd')?.key && filledByEsia;
|
|
8838
9005
|
const checkAddressFact = ({ name }, getValue) => name === 'addressFact' && getValue('addressMatch');
|
|
8839
9006
|
const checkCondition = ({ condition }, getValue) => condition?.name &&
|
|
8840
|
-
condition?.values?.
|
|
9007
|
+
condition?.values?.every((_) => {
|
|
8841
9008
|
const dataValue = getValue(condition?.name);
|
|
8842
9009
|
return _ !== (dataValue?.key ?? dataValue);
|
|
8843
9010
|
});
|
|
@@ -8847,8 +9014,8 @@
|
|
|
8847
9014
|
const InputsMap = { ...InputsRetailMap, ...InputRetailCardMap };
|
|
8848
9015
|
const renderInputs = ({ field, inputs, params }) => inputs.map(getField(field, params, InputsMap));
|
|
8849
9016
|
|
|
8850
|
-
const renderStep$1 = ({ sections, field,
|
|
8851
|
-
const inputs = calculateInputs(getValue(field))(origInputs
|
|
9017
|
+
const renderStep$1 = ({ sections, field, params, }) => sections?.map(({ inputs: origInputs = [], columns, title, condition }, i) => {
|
|
9018
|
+
const inputs = calculateInputs(getValue(field))(origInputs);
|
|
8852
9019
|
const cleanElements = [
|
|
8853
9020
|
!checkCondition({ condition }, getValue(field)) ? renderTitle(title) : null,
|
|
8854
9021
|
...renderInputs({ field, inputs, params }),
|
|
@@ -8859,7 +9026,7 @@
|
|
|
8859
9026
|
});
|
|
8860
9027
|
const getValue = (field) => (name) => field(name)?.value;
|
|
8861
9028
|
|
|
8862
|
-
const getRetailFormValidator = ({ formState, inputs,
|
|
9029
|
+
const getRetailFormValidator = ({ formState, inputs, productType, }) => getFormValidator(calculateInputs((_) => formState[_])(inputs), {
|
|
8863
9030
|
...validatorObj,
|
|
8864
9031
|
limitedBirthday: getLimitedBirthdayValidation(productType),
|
|
8865
9032
|
dulIssueDate: passportValidator(formState.limitedBirthday),
|
|
@@ -9004,27 +9171,31 @@
|
|
|
9004
9171
|
|
|
9005
9172
|
const getEmploymentData = (formData) => {
|
|
9006
9173
|
const { beginDate, employment, organizationName, inn, legalForm, organization, amountWorkers, employerActivities, employerOrganization, generalSeniority, lastJobExperience, experience5Years, jobsNumber, organizationPhone, organizationAddress, positionOrganization, partInBusiness, } = formData;
|
|
9007
|
-
return
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9174
|
+
return employment?.key === 'RETIREE'
|
|
9175
|
+
? {
|
|
9176
|
+
employmentTypeCd: employment,
|
|
9177
|
+
}
|
|
9178
|
+
: {
|
|
9179
|
+
employmentContractDate: formatDate(beginDate || '', true),
|
|
9180
|
+
employmentTypeCd: employment,
|
|
9181
|
+
organizationName,
|
|
9182
|
+
organizationInn: inn,
|
|
9183
|
+
organizationActivityTypeCd: employerActivities?.key ? employerActivities : undefined,
|
|
9184
|
+
organizationTypeCd: organization,
|
|
9185
|
+
organizationKindCd: employerOrganization,
|
|
9186
|
+
employeesNumberCd: amountWorkers,
|
|
9187
|
+
opf: legalForm,
|
|
9188
|
+
seniority: generalSeniority,
|
|
9189
|
+
generalSeniority: experience5Years,
|
|
9190
|
+
jobsNumber,
|
|
9191
|
+
lastWorkDuration: lastJobExperience,
|
|
9192
|
+
positionCd: positionOrganization?.key ? positionOrganization : undefined,
|
|
9193
|
+
participantContacts: getParticipantContacts$1({
|
|
9194
|
+
organizationPhone: organizationPhone && formatPhone(organizationPhone),
|
|
9195
|
+
}),
|
|
9196
|
+
participantAddresses: getParticipantAddresses$1({ organizationAddress }),
|
|
9197
|
+
ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : undefined,
|
|
9198
|
+
};
|
|
9028
9199
|
};
|
|
9029
9200
|
|
|
9030
9201
|
const getPersonalInfoData = (formData) => {
|
|
@@ -9191,7 +9362,6 @@
|
|
|
9191
9362
|
const formValidator = useCallback((formState) => getRetailFormValidator({
|
|
9192
9363
|
formState,
|
|
9193
9364
|
inputs,
|
|
9194
|
-
step,
|
|
9195
9365
|
productType: PRODUCT_TYPE$2,
|
|
9196
9366
|
}), [inputs]);
|
|
9197
9367
|
const [initialState, onSubmit, isSending] = useCreditCardFormAPI({
|
|
@@ -9203,7 +9373,7 @@
|
|
|
9203
9373
|
formValidator,
|
|
9204
9374
|
onSubmit,
|
|
9205
9375
|
});
|
|
9206
|
-
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field
|
|
9376
|
+
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field }), jsx(StepsNavigationButtons$2, { isSending: isSending, step: step, onPrevStep: onPrevStep })] }));
|
|
9207
9377
|
});
|
|
9208
9378
|
|
|
9209
9379
|
const PERSONAL_DATA = [
|
|
@@ -9409,6 +9579,7 @@
|
|
|
9409
9579
|
name: 'infoCard',
|
|
9410
9580
|
label: 'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, ' +
|
|
9411
9581
|
'если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
|
|
9582
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9412
9583
|
},
|
|
9413
9584
|
],
|
|
9414
9585
|
},
|
|
@@ -9418,40 +9589,94 @@
|
|
|
9418
9589
|
{
|
|
9419
9590
|
columns: 2,
|
|
9420
9591
|
inputs: [
|
|
9421
|
-
{
|
|
9422
|
-
|
|
9592
|
+
{
|
|
9593
|
+
name: 'organizationName',
|
|
9594
|
+
required: true,
|
|
9595
|
+
dadata: true,
|
|
9596
|
+
filledByEsia: true,
|
|
9597
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9598
|
+
},
|
|
9599
|
+
{
|
|
9600
|
+
name: 'inn',
|
|
9601
|
+
required: true,
|
|
9602
|
+
dadata: true,
|
|
9603
|
+
filledByEsia: true,
|
|
9604
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9605
|
+
},
|
|
9423
9606
|
],
|
|
9424
9607
|
},
|
|
9425
9608
|
{
|
|
9426
|
-
inputs: [
|
|
9609
|
+
inputs: [
|
|
9610
|
+
{
|
|
9611
|
+
name: 'amountWorkers',
|
|
9612
|
+
required: true,
|
|
9613
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9614
|
+
},
|
|
9615
|
+
],
|
|
9427
9616
|
},
|
|
9428
9617
|
{
|
|
9429
9618
|
columns: 2,
|
|
9430
9619
|
inputs: [
|
|
9431
|
-
{
|
|
9620
|
+
{
|
|
9621
|
+
name: 'employerActivities',
|
|
9622
|
+
required: true,
|
|
9623
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9624
|
+
},
|
|
9432
9625
|
{
|
|
9433
9626
|
name: 'organizationPhone',
|
|
9434
9627
|
label: 'Телефон работодателя',
|
|
9435
9628
|
required: true,
|
|
9629
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9436
9630
|
},
|
|
9437
9631
|
],
|
|
9438
9632
|
},
|
|
9439
9633
|
{
|
|
9440
9634
|
columns: 2,
|
|
9441
9635
|
inputs: [
|
|
9442
|
-
{
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9636
|
+
{
|
|
9637
|
+
name: 'generalSeniority',
|
|
9638
|
+
required: true,
|
|
9639
|
+
filledByEsia: true,
|
|
9640
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9641
|
+
},
|
|
9642
|
+
{
|
|
9643
|
+
name: 'lastJobExperience',
|
|
9644
|
+
required: true,
|
|
9645
|
+
filledByEsia: true,
|
|
9646
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9647
|
+
},
|
|
9648
|
+
{
|
|
9649
|
+
name: 'experience5Years',
|
|
9650
|
+
required: true,
|
|
9651
|
+
filledByEsia: true,
|
|
9652
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9653
|
+
},
|
|
9654
|
+
{
|
|
9655
|
+
name: 'jobsNumber',
|
|
9656
|
+
required: true,
|
|
9657
|
+
filledByEsia: true,
|
|
9658
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9659
|
+
},
|
|
9446
9660
|
],
|
|
9447
9661
|
},
|
|
9448
9662
|
{
|
|
9449
|
-
inputs: [
|
|
9663
|
+
inputs: [
|
|
9664
|
+
{
|
|
9665
|
+
name: 'beginDate',
|
|
9666
|
+
required: true,
|
|
9667
|
+
filledByEsia: true,
|
|
9668
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9669
|
+
},
|
|
9670
|
+
],
|
|
9450
9671
|
},
|
|
9451
9672
|
{
|
|
9452
9673
|
columns: 2,
|
|
9453
9674
|
inputs: [
|
|
9454
|
-
{
|
|
9675
|
+
{
|
|
9676
|
+
name: 'positionOrganization',
|
|
9677
|
+
required: true,
|
|
9678
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9679
|
+
},
|
|
9455
9680
|
{
|
|
9456
9681
|
name: 'partInBusiness',
|
|
9457
9682
|
required: true,
|
|
@@ -9462,9 +9687,17 @@
|
|
|
9462
9687
|
{
|
|
9463
9688
|
title: 'Адрес работодателя',
|
|
9464
9689
|
inputs: [],
|
|
9690
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9465
9691
|
},
|
|
9466
9692
|
{
|
|
9467
|
-
inputs: [
|
|
9693
|
+
inputs: [
|
|
9694
|
+
{
|
|
9695
|
+
name: 'organizationAddress',
|
|
9696
|
+
required: true,
|
|
9697
|
+
dadata: true,
|
|
9698
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9699
|
+
},
|
|
9700
|
+
],
|
|
9468
9701
|
},
|
|
9469
9702
|
];
|
|
9470
9703
|
const FAMILY_STATUS_AND_INCOME_CONTENT$1 = [
|
|
@@ -9501,12 +9734,20 @@
|
|
|
9501
9734
|
{
|
|
9502
9735
|
name: 'infoCard',
|
|
9503
9736
|
label: 'Сумма основного и дополнительных доходов после вычета налога',
|
|
9737
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9504
9738
|
},
|
|
9505
9739
|
],
|
|
9506
9740
|
},
|
|
9507
9741
|
{
|
|
9508
9742
|
columns: 1,
|
|
9509
|
-
inputs: [
|
|
9743
|
+
inputs: [
|
|
9744
|
+
{
|
|
9745
|
+
name: 'wages',
|
|
9746
|
+
required: true,
|
|
9747
|
+
filledByEsia: true,
|
|
9748
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9749
|
+
},
|
|
9750
|
+
],
|
|
9510
9751
|
},
|
|
9511
9752
|
{
|
|
9512
9753
|
columns: 1,
|
|
@@ -9514,7 +9755,7 @@
|
|
|
9514
9755
|
{
|
|
9515
9756
|
name: 'retirementIncome',
|
|
9516
9757
|
required: true,
|
|
9517
|
-
condition: { name: 'employment', values: ['RETIREE'] },
|
|
9758
|
+
condition: { name: 'employment', values: ['RETIREE', 'WORK_RETIREE'] },
|
|
9518
9759
|
},
|
|
9519
9760
|
],
|
|
9520
9761
|
},
|
|
@@ -9639,6 +9880,10 @@
|
|
|
9639
9880
|
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold mr-s", children: ["\u0428\u0430\u0433 ", step, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
|
|
9640
9881
|
});
|
|
9641
9882
|
|
|
9883
|
+
const sendMessage = async (body) => {
|
|
9884
|
+
await doRequest('/camunda/send/message', 'POST', body);
|
|
9885
|
+
};
|
|
9886
|
+
|
|
9642
9887
|
const FailedStatusContent$1 = JSX(() => (jsx(FormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0412\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", description: "\u0412 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u0411\u0430\u043D\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C \u0412\u0430\u0448\u0443 \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0434\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u043F\u043E\u0437\u0436\u0435. \u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u0432 \u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB.", buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })));
|
|
9643
9888
|
|
|
9644
9889
|
const PendingStatusContent$1 = JSX(({ onExpire }) => {
|
|
@@ -9716,13 +9961,25 @@
|
|
|
9716
9961
|
'CREATE_APPLICATION_SHORT_SIGNAL',
|
|
9717
9962
|
'CREATE_APPLICATION_LOAN_V3_SIGNAL',
|
|
9718
9963
|
];
|
|
9964
|
+
const MESSAGE_NAMES = [
|
|
9965
|
+
'CREATE_APPLICATION_SHORT_MESSAGE',
|
|
9966
|
+
// 'CREATE_APPLICATION_LOAN_MESSAGE',
|
|
9967
|
+
];
|
|
9719
9968
|
const CreditFormStatusTracker = JSX(() => {
|
|
9969
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
9720
9970
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
9721
9971
|
const { taskId } = useRetailFormStore();
|
|
9722
9972
|
useEffect(() => {
|
|
9723
9973
|
(async () => {
|
|
9724
|
-
|
|
9725
|
-
|
|
9974
|
+
if (isNewMicroservice) {
|
|
9975
|
+
for (const messageName of MESSAGE_NAMES) {
|
|
9976
|
+
await sendMessage({ messageName, taskId });
|
|
9977
|
+
}
|
|
9978
|
+
}
|
|
9979
|
+
else {
|
|
9980
|
+
for (const signalType of SIGNAL_TYPES) {
|
|
9981
|
+
await sendSignalToProcess({ signalType, taskId });
|
|
9982
|
+
}
|
|
9726
9983
|
}
|
|
9727
9984
|
})();
|
|
9728
9985
|
}, [taskId]);
|
|
@@ -9784,33 +10041,43 @@
|
|
|
9784
10041
|
};
|
|
9785
10042
|
};
|
|
9786
10043
|
|
|
9787
|
-
const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) =>
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
{
|
|
9795
|
-
id: participantId,
|
|
9796
|
-
profile: {
|
|
9797
|
-
id: profileId,
|
|
9798
|
-
},
|
|
9799
|
-
roleCd: {
|
|
9800
|
-
key: 'BORROWER',
|
|
9801
|
-
value: 'Заемщик',
|
|
9802
|
-
},
|
|
9803
|
-
...getCurrentStepData$1(step, formData),
|
|
10044
|
+
const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => {
|
|
10045
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
10046
|
+
const participantInfo = {
|
|
10047
|
+
id: participantId,
|
|
10048
|
+
...(!isNewMicroservice && {
|
|
10049
|
+
profile: {
|
|
10050
|
+
id: profileId,
|
|
9804
10051
|
},
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
key: formData?.esiaAccountTypeCd?.key,
|
|
10052
|
+
}),
|
|
10053
|
+
roleCd: {
|
|
10054
|
+
key: 'BORROWER',
|
|
10055
|
+
value: 'Заемщик',
|
|
9810
10056
|
},
|
|
9811
|
-
|
|
9812
|
-
}
|
|
9813
|
-
|
|
10057
|
+
...getCurrentStepData$1(step, formData),
|
|
10058
|
+
};
|
|
10059
|
+
return {
|
|
10060
|
+
sendToBank: true,
|
|
10061
|
+
taskKind: 'UNITED',
|
|
10062
|
+
task: {
|
|
10063
|
+
id: taskId,
|
|
10064
|
+
authorizedAgentId: formData?.bankEmployeeCode,
|
|
10065
|
+
...(isNewMicroservice
|
|
10066
|
+
? {
|
|
10067
|
+
participant: participantInfo,
|
|
10068
|
+
}
|
|
10069
|
+
: {
|
|
10070
|
+
participants: [participantInfo],
|
|
10071
|
+
}),
|
|
10072
|
+
...getCalcData(formData),
|
|
10073
|
+
...getDeliveryCreditData(formData),
|
|
10074
|
+
esiaAccountTypeCd: {
|
|
10075
|
+
key: formData?.esiaAccountTypeCd?.key,
|
|
10076
|
+
},
|
|
10077
|
+
files: formData?.files,
|
|
10078
|
+
},
|
|
10079
|
+
};
|
|
10080
|
+
};
|
|
9814
10081
|
const getCurrentStepData$1 = (step, formData) => {
|
|
9815
10082
|
switch (step) {
|
|
9816
10083
|
case 0:
|
|
@@ -9875,7 +10142,7 @@
|
|
|
9875
10142
|
retailFormStore.leadForm = formData;
|
|
9876
10143
|
try {
|
|
9877
10144
|
const { taskId, profileId, participantId } = retailFormStore;
|
|
9878
|
-
if (taskId
|
|
10145
|
+
if (taskId) {
|
|
9879
10146
|
const response = await updateUserTask(getCreditFormTaskData({
|
|
9880
10147
|
participantId,
|
|
9881
10148
|
taskId,
|
|
@@ -9906,7 +10173,6 @@
|
|
|
9906
10173
|
const formValidator = useCallback((formState) => getRetailFormValidator({
|
|
9907
10174
|
formState,
|
|
9908
10175
|
inputs,
|
|
9909
|
-
step,
|
|
9910
10176
|
productType: PRODUCT_TYPE$1,
|
|
9911
10177
|
}), [inputs]);
|
|
9912
10178
|
const [initialState, onSubmit, isSending] = useCreditFormAPI({
|
|
@@ -9918,7 +10184,7 @@
|
|
|
9918
10184
|
formValidator,
|
|
9919
10185
|
onSubmit,
|
|
9920
10186
|
});
|
|
9921
|
-
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field,
|
|
10187
|
+
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, params: { calcData } }), jsx(StepsNavigationButtons$1, { step: step, isSending: isSending, onPrevStep: onPrevStep })] }));
|
|
9922
10188
|
});
|
|
9923
10189
|
|
|
9924
10190
|
/* eslint-disable max-lines */
|
|
@@ -9959,6 +10225,7 @@
|
|
|
9959
10225
|
name: 'infoCard',
|
|
9960
10226
|
label: 'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, ' +
|
|
9961
10227
|
'если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
|
|
10228
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9962
10229
|
},
|
|
9963
10230
|
],
|
|
9964
10231
|
},
|
|
@@ -9968,34 +10235,69 @@
|
|
|
9968
10235
|
{
|
|
9969
10236
|
columns: 2,
|
|
9970
10237
|
inputs: [
|
|
9971
|
-
{
|
|
9972
|
-
|
|
10238
|
+
{
|
|
10239
|
+
name: 'organizationName',
|
|
10240
|
+
required: true,
|
|
10241
|
+
dadata: true,
|
|
10242
|
+
filledByEsia: true,
|
|
10243
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10244
|
+
},
|
|
10245
|
+
{
|
|
10246
|
+
name: 'inn',
|
|
10247
|
+
required: true,
|
|
10248
|
+
dadata: true,
|
|
10249
|
+
filledByEsia: true,
|
|
10250
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10251
|
+
},
|
|
9973
10252
|
],
|
|
9974
10253
|
},
|
|
9975
10254
|
{
|
|
9976
10255
|
columns: 2,
|
|
9977
10256
|
inputs: [
|
|
9978
|
-
{
|
|
10257
|
+
{
|
|
10258
|
+
name: 'amountWorkers',
|
|
10259
|
+
required: true,
|
|
10260
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10261
|
+
},
|
|
9979
10262
|
{
|
|
9980
10263
|
name: 'organizationPhone',
|
|
9981
10264
|
label: 'Телефон работодателя',
|
|
9982
10265
|
required: true,
|
|
10266
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9983
10267
|
},
|
|
9984
10268
|
],
|
|
9985
10269
|
},
|
|
9986
10270
|
{
|
|
9987
10271
|
columns: 2,
|
|
9988
10272
|
inputs: [
|
|
9989
|
-
{
|
|
9990
|
-
|
|
10273
|
+
{
|
|
10274
|
+
name: 'jobsNumber',
|
|
10275
|
+
required: true,
|
|
10276
|
+
filledByEsia: true,
|
|
10277
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10278
|
+
},
|
|
10279
|
+
{
|
|
10280
|
+
name: 'beginDate',
|
|
10281
|
+
required: true,
|
|
10282
|
+
filledByEsia: true,
|
|
10283
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10284
|
+
},
|
|
9991
10285
|
],
|
|
9992
10286
|
},
|
|
9993
10287
|
{
|
|
9994
10288
|
title: 'Адрес работодателя',
|
|
9995
10289
|
inputs: [],
|
|
10290
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
9996
10291
|
},
|
|
9997
10292
|
{
|
|
9998
|
-
inputs: [
|
|
10293
|
+
inputs: [
|
|
10294
|
+
{
|
|
10295
|
+
name: 'organizationAddress',
|
|
10296
|
+
required: true,
|
|
10297
|
+
dadata: true,
|
|
10298
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10299
|
+
},
|
|
10300
|
+
],
|
|
9999
10301
|
},
|
|
10000
10302
|
];
|
|
10001
10303
|
const FAMILY_STATUS_AND_INCOME_CONTENT = [
|
|
@@ -10031,12 +10333,20 @@
|
|
|
10031
10333
|
{
|
|
10032
10334
|
name: 'infoCard',
|
|
10033
10335
|
label: 'Сумма основного и дополнительных доходов после вычета налога',
|
|
10336
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10034
10337
|
},
|
|
10035
10338
|
],
|
|
10036
10339
|
},
|
|
10037
10340
|
{
|
|
10038
10341
|
columns: 1,
|
|
10039
|
-
inputs: [
|
|
10342
|
+
inputs: [
|
|
10343
|
+
{
|
|
10344
|
+
name: 'wages',
|
|
10345
|
+
required: true,
|
|
10346
|
+
filledByEsia: true,
|
|
10347
|
+
condition: { name: 'employment', values: ['WORK', 'WORK_RETIREE'] },
|
|
10348
|
+
},
|
|
10349
|
+
],
|
|
10040
10350
|
},
|
|
10041
10351
|
{
|
|
10042
10352
|
columns: 1,
|
|
@@ -10044,7 +10354,7 @@
|
|
|
10044
10354
|
{
|
|
10045
10355
|
name: 'retirementIncome',
|
|
10046
10356
|
required: true,
|
|
10047
|
-
condition: { name: 'employment', values: ['RETIREE'] },
|
|
10357
|
+
condition: { name: 'employment', values: ['RETIREE', 'WORK_RETIREE'] },
|
|
10048
10358
|
},
|
|
10049
10359
|
],
|
|
10050
10360
|
},
|
|
@@ -10409,7 +10719,6 @@
|
|
|
10409
10719
|
const formValidator = useCallback((formState) => getRetailFormValidator({
|
|
10410
10720
|
formState,
|
|
10411
10721
|
inputs,
|
|
10412
|
-
step,
|
|
10413
10722
|
productType: PRODUCT_TYPE,
|
|
10414
10723
|
}), [inputs]);
|
|
10415
10724
|
const [initialState, onSubmit, isSending] = useDebitFormAPI({
|
|
@@ -10421,7 +10730,7 @@
|
|
|
10421
10730
|
formValidator,
|
|
10422
10731
|
onSubmit,
|
|
10423
10732
|
});
|
|
10424
|
-
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field
|
|
10733
|
+
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field }), jsx(StepsNavigationButtons, { step: step, isSending: isSending, onPrevStep: onPrevStep })] }));
|
|
10425
10734
|
});
|
|
10426
10735
|
|
|
10427
10736
|
/* eslint-disable max-lines */
|
|
@@ -10694,7 +11003,7 @@
|
|
|
10694
11003
|
};
|
|
10695
11004
|
const ErrorBlock = JSX(({ className = '', title, description, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-center items-center', className), defaultPadding: style('p-6xl'), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center", children: renderErrorContent(error) }), jsx(Headline, { title: title, description: description, headlineVersion: "XL", isEmbedded: true, className: "mb-2xl last:mb-0" }), button?.text ? (jsx(LinkButton, { version: button?.version, text: button?.text, ...button })) : null] })));
|
|
10696
11005
|
|
|
10697
|
-
const REGION_URL = `${API_BASE_URI
|
|
11006
|
+
const REGION_URL = `${API_BASE_URI}/region`;
|
|
10698
11007
|
function useLocation(defaultLocation = 'Москва') {
|
|
10699
11008
|
const locationStore = useLocalStore();
|
|
10700
11009
|
return locationStore.location ?? { name: defaultLocation };
|
|
@@ -10883,7 +11192,7 @@
|
|
|
10883
11192
|
}
|
|
10884
11193
|
};
|
|
10885
11194
|
|
|
10886
|
-
const EXCHANGE_RATES_URL = `${API_BASE_URI
|
|
11195
|
+
const EXCHANGE_RATES_URL = `${API_BASE_URI}/exchangerates`;
|
|
10887
11196
|
function useFetchExchangeRateData(currentRegion) {
|
|
10888
11197
|
const regionCode = currentRegion?.code || '000';
|
|
10889
11198
|
const { data } = useAsyncData(EXCHANGE_RATES_URL + `?regionCode=${regionCode}`, fetchJSONUnsafe);
|
|
@@ -11131,7 +11440,7 @@
|
|
|
11131
11440
|
});
|
|
11132
11441
|
|
|
11133
11442
|
const IS_SINGLE_SEARCH_INDEX = Boolean(env.SINGLE_SEARCH_INDEX);
|
|
11134
|
-
const SearchDialog = JSX(({ initialQuery, navigationItems, onClose
|
|
11443
|
+
const SearchDialog = JSX(({ initialQuery, navigationItems, onClose }) => {
|
|
11135
11444
|
const basePath = getBasePath(env.SITE_URL);
|
|
11136
11445
|
const basePathList = useMemo(() => (IS_SINGLE_SEARCH_INDEX ? [basePath] : navigationItems?.map((_) => _.href || '/')), [navigationItems]);
|
|
11137
11446
|
const [searchResult, searchInputProps] = useSearch({
|
|
@@ -11139,7 +11448,7 @@
|
|
|
11139
11448
|
initialQuery,
|
|
11140
11449
|
});
|
|
11141
11450
|
const searchItems = useMemo(() => combineTopItemsAndSearchResult(navigationItems)(searchResult), [navigationItems, searchResult]);
|
|
11142
|
-
return (jsx(Dialog, { maxWidth: "none", head: jsx(SearchInput, { className: "mt-s", autoFocus: true,
|
|
11451
|
+
return (jsx(Dialog, { maxWidth: "none", head: jsx(SearchInput, { className: "mt-s", autoFocus: true, ...searchInputProps }), onClose: onClose, children: jsx(Sitemap, { navigationItems: searchItems, isSearchPanel: true }) }));
|
|
11143
11452
|
});
|
|
11144
11453
|
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
11145
11454
|
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
@@ -11159,15 +11468,15 @@
|
|
|
11159
11468
|
searchDialog.open({ initialQuery: _, onClose: resetQueryOnDialogClose });
|
|
11160
11469
|
}
|
|
11161
11470
|
}, [resetQueryOnDialogClose, searchDialog]);
|
|
11162
|
-
return (jsxs("div", { className: style('relative', className), role: "search", children: [jsx(SearchInput, { value: value, placeholder: search?.placeholder, onChange: handleInitialInputChange
|
|
11471
|
+
return (jsxs("div", { className: style('relative', className), role: "search", children: [jsx(SearchInput, { value: value, placeholder: search?.placeholder, onChange: handleInitialInputChange }), jsx(CloseButton, { className: "absolute top-0 right-0 sm:hidden", onClose: resetQueryOnDialogClose })] }));
|
|
11163
11472
|
});
|
|
11164
11473
|
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
11165
11474
|
|
|
11166
11475
|
const renderLogoSearchBar = (common, navigationItems) => {
|
|
11167
|
-
const { logo
|
|
11476
|
+
const { logo } = common ?? {};
|
|
11168
11477
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11169
11478
|
const { dataHeader, dataFooter, ...logoProps } = logo ?? {};
|
|
11170
|
-
return (jsxs("div", { className: "flex items-stretch gap-3xl", children: [jsx(Logo, { className: LEFT_COLUMN_STYLE, logo: logoProps, data: dataFooter, showTitle: false }), jsx(SearchBar$1, { className: "grow", navigationItems: navigationItems,
|
|
11479
|
+
return (jsxs("div", { className: "flex items-stretch gap-3xl", children: [jsx(Logo, { className: LEFT_COLUMN_STYLE, logo: logoProps, data: dataFooter, showTitle: false }), jsx(SearchBar$1, { className: "grow", navigationItems: navigationItems, ...common })] }));
|
|
11171
11480
|
};
|
|
11172
11481
|
|
|
11173
11482
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
@@ -11182,7 +11491,7 @@
|
|
|
11182
11491
|
const { navigationItems } = rest.options?.page?.navigation ?? {};
|
|
11183
11492
|
const common = rest.options?.page?.common ?? {};
|
|
11184
11493
|
const { documents, relatedEnterprises, contacts, mediaLinks = [], horizontalNavigationTitle, feedbackButton, license, otherLinks = [], } = footer ?? {};
|
|
11185
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: style('grid gap-y-xl p-4xl pb-24 lg:p-xl', className), ...rest, children: [renderLogoSearchBar(common, navigationItems), jsxs("div", { className: "flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ", children: [jsx(Sitemap, { navigationItems: navigationItems }), jsx("div", { className: "border-t border-main-divider lg:hidden w-full" }), jsxs("div", { className: style(LEFT_COLUMN_STYLE, 'flex flex-col shrink-0 overflow-hidden space-y-xl'), children: [jsx(Contacts, { items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full", version: "primary", ...feedbackButton })) : null, mediaLinks.map((_, i) => (jsx(SocialMedia, { media: _?.links ?? [], showButtonText: false, stretched: true, children: _?.title }, String(i)))),
|
|
11494
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: style('grid gap-y-xl p-4xl pb-24 lg:p-xl', className), ...rest, children: [renderLogoSearchBar(common, navigationItems), jsxs("div", { className: "flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ", children: [jsx(Sitemap, { navigationItems: navigationItems }), jsx("div", { className: "border-t border-main-divider lg:hidden w-full" }), jsxs("div", { className: style(LEFT_COLUMN_STYLE, 'flex flex-col shrink-0 overflow-hidden space-y-xl'), children: [jsx(Contacts, { items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full", version: "primary", ...feedbackButton })) : null, mediaLinks.map((_, i) => (jsx(SocialMedia, { media: _?.links ?? [], showButtonText: false, stretched: true, children: _?.title }, String(i)))), otherLinks.map((_, i) => (jsx(Link, { className: "text-s font-light", ..._ }, `${_.href}_${i}`)))] })] }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
|
|
11186
11495
|
});
|
|
11187
11496
|
|
|
11188
11497
|
const getInnerPadding = (isPadding = false) => isPadding ? {} : { padding: 'p-0' };
|
|
@@ -11469,15 +11778,15 @@
|
|
|
11469
11778
|
const renderQuickActionsDropdown = ({ item, handlers, closeDropdown = noop, }) => {
|
|
11470
11779
|
const quickActionsMapping = {
|
|
11471
11780
|
call: {
|
|
11472
|
-
handler: (
|
|
11473
|
-
handlers?.call(
|
|
11781
|
+
handler: () => {
|
|
11782
|
+
handlers?.call();
|
|
11474
11783
|
closeDropdown();
|
|
11475
11784
|
},
|
|
11476
11785
|
text: 'Заказать звонок',
|
|
11477
11786
|
},
|
|
11478
11787
|
chat: {
|
|
11479
|
-
handler: (
|
|
11480
|
-
handlers?.chat(
|
|
11788
|
+
handler: () => {
|
|
11789
|
+
handlers?.chat();
|
|
11481
11790
|
closeDropdown();
|
|
11482
11791
|
},
|
|
11483
11792
|
text: 'Написать в чат',
|
|
@@ -11493,10 +11802,8 @@
|
|
|
11493
11802
|
}, []);
|
|
11494
11803
|
const aspects = useAspects();
|
|
11495
11804
|
const handleChatClick = useCallback((ev) => {
|
|
11496
|
-
console.log('chat click');
|
|
11497
11805
|
const openChatBot = aspects[CHAT_BOT_ASPECT_NAME];
|
|
11498
|
-
|
|
11499
|
-
if (openChatBot) {
|
|
11806
|
+
if (openChatBot && ev) {
|
|
11500
11807
|
openChatBot(ev).finally();
|
|
11501
11808
|
}
|
|
11502
11809
|
}, []);
|
|
@@ -11924,7 +12231,7 @@
|
|
|
11924
12231
|
|
|
11925
12232
|
const EMPTY_VALUE$1 = [];
|
|
11926
12233
|
function useAtms(regionCode) {
|
|
11927
|
-
const { data, error } = useAsyncData(`${API_BASE_URI
|
|
12234
|
+
const { data, error } = useAsyncData(`${API_BASE_URI}/atms?regionCode=${regionCode}`, fetchMap$1);
|
|
11928
12235
|
const isLoad = !data && !error;
|
|
11929
12236
|
return { data: data || EMPTY_VALUE$1, isLoad };
|
|
11930
12237
|
}
|
|
@@ -11965,7 +12272,7 @@
|
|
|
11965
12272
|
|
|
11966
12273
|
const EMPTY_VALUE = { branches: [], remoteWorkplaces: [] };
|
|
11967
12274
|
function useOffices(regionCode = '000') {
|
|
11968
|
-
const { data, error } = useAsyncData(`${API_BASE_URI
|
|
12275
|
+
const { data, error } = useAsyncData(`${API_BASE_URI}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(regionCode)}`, fetchMap);
|
|
11969
12276
|
const isLoad = !data && !error;
|
|
11970
12277
|
return { data: data || EMPTY_VALUE, isLoad };
|
|
11971
12278
|
}
|
|
@@ -12601,7 +12908,7 @@
|
|
|
12601
12908
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12602
12909
|
});
|
|
12603
12910
|
|
|
12604
|
-
const packageVersion = "0.14.
|
|
12911
|
+
const packageVersion = "0.14.952";
|
|
12605
12912
|
|
|
12606
12913
|
exports.Blocks = Blocks;
|
|
12607
12914
|
exports.ContentPage = ContentPage;
|