@redneckz/wildless-cms-uni-blocks 0.14.951 → 0.14.952
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 +323 -128
- 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/checkNewMicroservice.d.ts +1 -0
- 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/CreditForm/CreditFormStatusTracker.js +16 -2
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.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/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/checkNewMicroservice.d.ts +1 -0
- package/dist/retail/utils/checkNewMicroservice.js +8 -0
- package/dist/retail/utils/checkNewMicroservice.js.map +1 -0
- 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/CreditForm/CreditFormStatusTracker.js +16 -2
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.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/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/checkNewMicroservice.d.ts +1 -0
- package/lib/retail/utils/checkNewMicroservice.js +5 -0
- package/lib/retail/utils/checkNewMicroservice.js.map +1 -0
- 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 +318 -123
- 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/checkNewMicroservice.d.ts +1 -0
- 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/CreditForm/CreditFormStatusTracker.js +16 -2
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.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/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/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/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/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/CreditForm/CreditFormStatusTracker.js +16 -2
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.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/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/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/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/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/CreditForm/CreditFormStatusTracker.tsx +16 -2
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +1 -1
- 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/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/checkNewMicroservice.ts +5 -0
- 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/CreditForm/CreditForm.fixture.tsx +12 -18
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +16 -2
- package/src/components/CreditForm/useCreditFormAPI.tsx +1 -1
- 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/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/checkNewMicroservice.ts +5 -0
- 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
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
1
|
import { getParticipantContacts } from '../../retail/adaptors/utils';
|
|
3
2
|
import { type CreateUserTaskDebitBody } from '../../retail/api/createUserTaskDebit';
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
type MarketingInfo,
|
|
5
|
+
type Participant,
|
|
6
|
+
type UpdateUserTaskBody,
|
|
7
|
+
} from '../../retail/api/updateUserTask';
|
|
8
|
+
import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
|
|
6
9
|
import { formatDate } from '../../utils/formatDate';
|
|
7
10
|
import { formatPhone } from '../../utils/formatPhone';
|
|
8
11
|
import { type Nullable } from '../../utils/Nullable';
|
|
@@ -11,9 +14,10 @@ import { debitProgrammIdToCardCodesMap } from '../DebitForm/utils';
|
|
|
11
14
|
type getLeadFormTaskDataProps = {
|
|
12
15
|
participantId: number;
|
|
13
16
|
taskId: number;
|
|
14
|
-
profileId
|
|
17
|
+
profileId?: number;
|
|
15
18
|
formData: LeadFormState;
|
|
16
19
|
marketingInfo: MarketingInfo | null;
|
|
20
|
+
consents?: FormRetailConsents;
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export const getCreditLeadFormTaskData = ({
|
|
@@ -22,9 +26,10 @@ export const getCreditLeadFormTaskData = ({
|
|
|
22
26
|
profileId,
|
|
23
27
|
formData,
|
|
24
28
|
marketingInfo,
|
|
29
|
+
consents,
|
|
25
30
|
}: getLeadFormTaskDataProps): UpdateUserTaskBody => {
|
|
26
|
-
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
27
31
|
const taskSource = getTaskSource(marketingInfo?.utm_source);
|
|
32
|
+
const participantInfo = getParticipant({ participantId, profileId, formData, consents });
|
|
28
33
|
|
|
29
34
|
return {
|
|
30
35
|
sendToBank: true,
|
|
@@ -32,31 +37,52 @@ export const getCreditLeadFormTaskData = ({
|
|
|
32
37
|
task: {
|
|
33
38
|
taskSource,
|
|
34
39
|
id: taskId,
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
surname,
|
|
42
|
-
profile: {
|
|
43
|
-
id: profileId,
|
|
44
|
-
},
|
|
45
|
-
participantContacts: getParticipantContacts({
|
|
46
|
-
phone: phone && formatPhone(phone),
|
|
47
|
-
email,
|
|
40
|
+
...(profileId
|
|
41
|
+
? {
|
|
42
|
+
participants: [participantInfo],
|
|
43
|
+
}
|
|
44
|
+
: {
|
|
45
|
+
participant: participantInfo,
|
|
48
46
|
}),
|
|
49
|
-
roleCd: {
|
|
50
|
-
key: 'BORROWER',
|
|
51
|
-
value: 'Заемщик',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
47
|
marketingInfo,
|
|
56
48
|
},
|
|
57
49
|
};
|
|
58
50
|
};
|
|
59
51
|
|
|
52
|
+
export const getParticipant = ({
|
|
53
|
+
participantId,
|
|
54
|
+
profileId,
|
|
55
|
+
formData,
|
|
56
|
+
consents,
|
|
57
|
+
}: Pick<
|
|
58
|
+
getLeadFormTaskDataProps,
|
|
59
|
+
'profileId' | 'participantId' | 'formData' | 'consents'
|
|
60
|
+
>): Participant => {
|
|
61
|
+
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
birthDate: limitedBirthday && formatDate(limitedBirthday, true),
|
|
65
|
+
id: participantId,
|
|
66
|
+
midname: middleName,
|
|
67
|
+
name,
|
|
68
|
+
surname,
|
|
69
|
+
...(profileId && {
|
|
70
|
+
profile: {
|
|
71
|
+
id: profileId,
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
participantContacts: getParticipantContacts({
|
|
75
|
+
phone: phone && formatPhone(phone),
|
|
76
|
+
email,
|
|
77
|
+
}),
|
|
78
|
+
roleCd: {
|
|
79
|
+
key: 'BORROWER',
|
|
80
|
+
value: 'Заемщик',
|
|
81
|
+
},
|
|
82
|
+
...consents,
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
60
86
|
export const getDebitLeadFormTaskData = (
|
|
61
87
|
formData: LeadFormState,
|
|
62
88
|
programId: string,
|
|
@@ -6,16 +6,17 @@ import { normalizePhone } from '../../ui-kit/PhoneInput/normalizePhone';
|
|
|
6
6
|
|
|
7
7
|
export const parseEsiaProfile = async (
|
|
8
8
|
esiaProfile: EsiaRequestProfileResponse,
|
|
9
|
-
isDebit
|
|
9
|
+
isDebit = false,
|
|
10
|
+
isNewMicroservice = false,
|
|
10
11
|
): Promise<LeadFormState> => {
|
|
11
12
|
checkEsiaData(esiaProfile);
|
|
12
|
-
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
|
|
13
|
+
const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile, isNewMicroservice);
|
|
13
14
|
|
|
14
15
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } =
|
|
15
16
|
esiaProfile;
|
|
16
17
|
let files: File[] = [];
|
|
17
18
|
|
|
18
|
-
if (isFullEsiaData) {
|
|
19
|
+
if (isFullEsiaData && !isNewMicroservice) {
|
|
19
20
|
files = await saveDocuments(esiaAdditionalDocument);
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -176,8 +177,19 @@ const checkEsiaData = (esiaProfile: EsiaRequestProfileResponse) => {
|
|
|
176
177
|
}
|
|
177
178
|
};
|
|
178
179
|
|
|
179
|
-
const checkEsiaAdditionalDocument = (
|
|
180
|
+
const checkEsiaAdditionalDocument = (
|
|
181
|
+
esiaProfile: EsiaRequestProfileResponse,
|
|
182
|
+
isNewMicroservice: boolean,
|
|
183
|
+
) => {
|
|
180
184
|
const { esiaAdditionalDocument } = esiaProfile;
|
|
185
|
+
const documents = [
|
|
186
|
+
esiaAdditionalDocument?.pdfFilePayout,
|
|
187
|
+
esiaAdditionalDocument?.pdfFileWorkbook,
|
|
188
|
+
esiaAdditionalDocument?.pdfFileSigPayout,
|
|
189
|
+
esiaAdditionalDocument?.xmlFilePayout,
|
|
190
|
+
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
191
|
+
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
192
|
+
];
|
|
181
193
|
|
|
182
194
|
const data = [
|
|
183
195
|
esiaAdditionalDocument?.inn,
|
|
@@ -187,13 +199,7 @@ const checkEsiaAdditionalDocument = (esiaProfile: EsiaRequestProfileResponse) =>
|
|
|
187
199
|
esiaAdditionalDocument?.workLength?.toString(),
|
|
188
200
|
esiaAdditionalDocument?.workLengthLastJob?.toString(),
|
|
189
201
|
esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
|
|
190
|
-
esiaAdditionalDocument?.pdfFilePayout,
|
|
191
|
-
esiaAdditionalDocument?.pdfFileWorkbook,
|
|
192
|
-
esiaAdditionalDocument?.pdfFileSigPayout,
|
|
193
|
-
esiaAdditionalDocument?.xmlFilePayout,
|
|
194
|
-
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
195
|
-
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
196
202
|
];
|
|
197
203
|
|
|
198
|
-
return data.every(Boolean);
|
|
204
|
+
return data.every(Boolean) && (isNewMicroservice || documents.every(Boolean));
|
|
199
205
|
};
|
|
@@ -5,6 +5,7 @@ import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
|
5
5
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
6
6
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
7
7
|
import { createDraftTask } from '../../retail/api/createDraftTask';
|
|
8
|
+
import { createParticipant } from '../../retail/api/createParticipant';
|
|
8
9
|
import { createUserProfile } from '../../retail/api/createUserProfile';
|
|
9
10
|
import { createUserTaskDebit } from '../../retail/api/createUserTaskDebit';
|
|
10
11
|
import { getLastTaskStatus } from '../../retail/api/getLastTaskStatus';
|
|
@@ -33,6 +34,7 @@ interface ApplicationLeadApiProps extends AspectsProps {
|
|
|
33
34
|
nextStepLink: string;
|
|
34
35
|
productType: ProductType;
|
|
35
36
|
changeSubmitFormStatus: (status?: boolean) => void;
|
|
37
|
+
isNewMicroservice: boolean;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -42,6 +44,7 @@ export const useApplicationLeadApi = ({
|
|
|
42
44
|
productType,
|
|
43
45
|
data,
|
|
44
46
|
changeSubmitFormStatus,
|
|
47
|
+
isNewMicroservice,
|
|
45
48
|
}: ApplicationLeadApiProps) => {
|
|
46
49
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
47
50
|
const saveUserData = useSaveUserData();
|
|
@@ -63,7 +66,7 @@ export const useApplicationLeadApi = ({
|
|
|
63
66
|
changeSubmitFormStatus(false);
|
|
64
67
|
};
|
|
65
68
|
|
|
66
|
-
const
|
|
69
|
+
const handleSubmitOldMicroservice = useCallback(async (formData: LeadFormState) => {
|
|
67
70
|
try {
|
|
68
71
|
startSending();
|
|
69
72
|
const transformedFormData = transformFormData(formData);
|
|
@@ -93,7 +96,11 @@ export const useApplicationLeadApi = ({
|
|
|
93
96
|
if (productType === 'debitCard') {
|
|
94
97
|
goToNextStep();
|
|
95
98
|
} else {
|
|
96
|
-
consentBkiDialog.open(
|
|
99
|
+
consentBkiDialog.open({
|
|
100
|
+
phone: transformedFormData.phone,
|
|
101
|
+
profileId,
|
|
102
|
+
onFail: handleFailSendForm,
|
|
103
|
+
});
|
|
97
104
|
}
|
|
98
105
|
};
|
|
99
106
|
const handleSuccessVerify = async () => {
|
|
@@ -133,7 +140,70 @@ export const useApplicationLeadApi = ({
|
|
|
133
140
|
}
|
|
134
141
|
}, []);
|
|
135
142
|
|
|
136
|
-
|
|
143
|
+
const handleSubmitNewMicroservice = useCallback(async (formData: LeadFormState) => {
|
|
144
|
+
try {
|
|
145
|
+
startSending();
|
|
146
|
+
const transformedFormData = transformFormData(formData);
|
|
147
|
+
const participantId = await createParticipant({
|
|
148
|
+
phone: formatPhone(transformedFormData.phone as string),
|
|
149
|
+
email: transformedFormData.email as string,
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const referalData = leadFormStore.referalData;
|
|
153
|
+
const marketingInfo = sessionStore.marketingInfo;
|
|
154
|
+
|
|
155
|
+
if (!participantId) {
|
|
156
|
+
throw new Error();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const sendCurrentTask = async () => {
|
|
160
|
+
const taskId = await updateUserDataNewMicroservice({
|
|
161
|
+
programId,
|
|
162
|
+
participantId,
|
|
163
|
+
formData: transformedFormData,
|
|
164
|
+
referalData,
|
|
165
|
+
productType,
|
|
166
|
+
marketingInfo,
|
|
167
|
+
saveUserData,
|
|
168
|
+
sendAspects,
|
|
169
|
+
});
|
|
170
|
+
verifyPhoneDialog.close();
|
|
171
|
+
|
|
172
|
+
consentBkiDialog.open({
|
|
173
|
+
phone: transformedFormData.phone,
|
|
174
|
+
taskId,
|
|
175
|
+
participantId,
|
|
176
|
+
onFail: handleFailSendForm,
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const handleSuccessVerify = async () => {
|
|
181
|
+
try {
|
|
182
|
+
await sendCurrentTask();
|
|
183
|
+
} catch {
|
|
184
|
+
handleFailSendForm();
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
|
|
189
|
+
|
|
190
|
+
verifyPhoneDialog.open({
|
|
191
|
+
phone: transformedFormData.phone as string,
|
|
192
|
+
consents: acceptedConsents,
|
|
193
|
+
onSuccess: handleSuccessVerify,
|
|
194
|
+
onFail: handleFailSendForm,
|
|
195
|
+
});
|
|
196
|
+
} catch {
|
|
197
|
+
handleFailSendForm();
|
|
198
|
+
} finally {
|
|
199
|
+
endSending();
|
|
200
|
+
}
|
|
201
|
+
}, []);
|
|
202
|
+
|
|
203
|
+
return {
|
|
204
|
+
isSending,
|
|
205
|
+
handleSubmit: isNewMicroservice ? handleSubmitNewMicroservice : handleSubmitOldMicroservice,
|
|
206
|
+
};
|
|
137
207
|
};
|
|
138
208
|
|
|
139
209
|
const getAcceptedConsents = (formData: LeadFormState, productType: ProductType): string[] => {
|
|
@@ -209,6 +279,62 @@ const updateUserData = async ({
|
|
|
209
279
|
}
|
|
210
280
|
};
|
|
211
281
|
|
|
282
|
+
const updateUserDataNewMicroservice = async ({
|
|
283
|
+
programId,
|
|
284
|
+
participantId,
|
|
285
|
+
formData,
|
|
286
|
+
referalData,
|
|
287
|
+
productType,
|
|
288
|
+
marketingInfo,
|
|
289
|
+
saveUserData,
|
|
290
|
+
sendAspects,
|
|
291
|
+
}: {
|
|
292
|
+
programId: string;
|
|
293
|
+
participantId: number;
|
|
294
|
+
formData: LeadFormState;
|
|
295
|
+
referalData: ReferalData | null;
|
|
296
|
+
productType: ProductType;
|
|
297
|
+
marketingInfo: MarketingInfo | null;
|
|
298
|
+
saveUserData: (userData: UserData) => void;
|
|
299
|
+
sendAspects: (profileId: number, taskId: number) => void;
|
|
300
|
+
}): Promise<number> => {
|
|
301
|
+
let taskId: number;
|
|
302
|
+
const transformedConsents = transformConsentsFields(formData, productType);
|
|
303
|
+
|
|
304
|
+
try {
|
|
305
|
+
const creditData = await createDraftTask({
|
|
306
|
+
participantId,
|
|
307
|
+
programId,
|
|
308
|
+
});
|
|
309
|
+
taskId = creditData.taskId;
|
|
310
|
+
|
|
311
|
+
await updateUserTask(
|
|
312
|
+
getCreditLeadFormTaskData({
|
|
313
|
+
participantId,
|
|
314
|
+
taskId,
|
|
315
|
+
formData,
|
|
316
|
+
marketingInfo,
|
|
317
|
+
consents: transformedConsents,
|
|
318
|
+
}),
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
if (referalData?.referalCode) {
|
|
322
|
+
await saveReferalInfo({
|
|
323
|
+
taskId,
|
|
324
|
+
...referalData,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
sendAspects(participantId, taskId);
|
|
329
|
+
saveUserData({ participantId, taskId, programId, formData });
|
|
330
|
+
|
|
331
|
+
return taskId;
|
|
332
|
+
} catch (ex) {
|
|
333
|
+
console.log(ex);
|
|
334
|
+
throw new Error();
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
|
|
212
338
|
const transformConsentsFields = (
|
|
213
339
|
formData: LeadFormState,
|
|
214
340
|
productType: ProductType,
|
|
@@ -19,10 +19,12 @@ type InitApplicationLeadProps = {
|
|
|
19
19
|
productType: ProductType;
|
|
20
20
|
setEsiaStatus: (status: EsiaStatuses) => void;
|
|
21
21
|
esiaAuthSuccess: boolean;
|
|
22
|
+
isNewMicroservice: boolean;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export interface ApplicationLeadStore {
|
|
25
26
|
marketingInfo: MarketingInfo | null;
|
|
27
|
+
isNewMicroservice: boolean | null;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export const useInitApplicationLead = ({
|
|
@@ -30,6 +32,7 @@ export const useInitApplicationLead = ({
|
|
|
30
32
|
productType,
|
|
31
33
|
setEsiaStatus,
|
|
32
34
|
esiaAuthSuccess,
|
|
35
|
+
isNewMicroservice,
|
|
33
36
|
}: InitApplicationLeadProps): LeadFormState => {
|
|
34
37
|
const leadFormStore = useLeadFormStore();
|
|
35
38
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
@@ -53,7 +56,11 @@ export const useInitApplicationLead = ({
|
|
|
53
56
|
});
|
|
54
57
|
|
|
55
58
|
if (data) {
|
|
56
|
-
const parsedData = await parseEsiaProfile(
|
|
59
|
+
const parsedData = await parseEsiaProfile(
|
|
60
|
+
data,
|
|
61
|
+
productType === 'debitCard',
|
|
62
|
+
isNewMicroservice,
|
|
63
|
+
);
|
|
57
64
|
|
|
58
65
|
saveForm((_) => ({
|
|
59
66
|
..._,
|
|
@@ -70,6 +77,7 @@ export const useInitApplicationLead = ({
|
|
|
70
77
|
leadFormStore.productType = productType;
|
|
71
78
|
|
|
72
79
|
sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
|
|
80
|
+
sessionStore.isNewMicroservice = isNewMicroservice || null;
|
|
73
81
|
}, [queryFromStorage]);
|
|
74
82
|
|
|
75
83
|
useEffect(() => {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useLocalStore } from '@redneckz/uni-jsx/lib/Store/useLocalStore';
|
|
2
2
|
import { type LeadFormState } from '../../retail/model/LeadFormState';
|
|
3
3
|
import { type ReferalData } from '../../retail/model/ReferalData';
|
|
4
|
+
import { type Nullable } from '../../utils/Nullable';
|
|
4
5
|
import { type ProductType } from './ApplicationLeadFormContent';
|
|
5
6
|
|
|
6
7
|
export interface LeadFormStoreSlice {
|
|
7
8
|
leadForm: LeadFormState;
|
|
8
9
|
taskId: number;
|
|
9
|
-
profileId: number
|
|
10
|
+
profileId: Nullable<number>;
|
|
10
11
|
participantId: number;
|
|
11
12
|
programId: string;
|
|
12
13
|
productType: ProductType;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
import { type LeadFormState } from '../../retail/model/LeadFormState';
|
|
3
|
+
import { type Nullable } from '../../utils/Nullable';
|
|
3
4
|
import { useLeadFormStore } from './useLeadFormStore';
|
|
4
5
|
|
|
5
6
|
export interface UserData {
|
|
6
7
|
participantId: number;
|
|
7
8
|
taskId: number;
|
|
8
|
-
profileId
|
|
9
|
+
profileId?: Nullable<number>;
|
|
9
10
|
programId: string;
|
|
10
11
|
formData: LeadFormState;
|
|
11
12
|
}
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useAsyncEffect } from '../../hooks/useAsyncEffect';
|
|
3
|
-
import { mockLocalStorage } from '../../retail/utils/mockLocalStorage';
|
|
4
2
|
import '../../setup-fixture';
|
|
5
3
|
import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
|
|
6
4
|
import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
|
|
7
5
|
import { CreditForm } from './CreditForm';
|
|
8
6
|
|
|
9
7
|
export default {
|
|
10
|
-
default: JSX(() =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<DialogManager />
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
}),
|
|
8
|
+
default: JSX(() => (
|
|
9
|
+
<div>
|
|
10
|
+
<CreditForm
|
|
11
|
+
className="col-span-12"
|
|
12
|
+
programsSource={{
|
|
13
|
+
$ref: '/wcms-resources/products-credit-calc-data.json',
|
|
14
|
+
}}
|
|
15
|
+
/>
|
|
16
|
+
<PopupManager />
|
|
17
|
+
<DialogManager />
|
|
18
|
+
</div>
|
|
19
|
+
)),
|
|
26
20
|
};
|
|
@@ -3,8 +3,10 @@ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { useInterval } from '../../hooks/useInterval';
|
|
4
4
|
import { type VNode } from '../../model/VNode';
|
|
5
5
|
import { getTaskStatus, STATUS_TYPE } from '../../retail/api/getTaskStatus';
|
|
6
|
+
import { sendMessage, type MessageName } from '../../retail/api/sendMessage';
|
|
6
7
|
import { sendSignalToProcess, type SignalType } from '../../retail/api/sendSignalToProcess';
|
|
7
8
|
import { useRetailFormStore } from '../../retail/hooks/useRetailFormStore';
|
|
9
|
+
import { checkNewMicroservice } from '../../retail/utils/checkNewMicroservice';
|
|
8
10
|
import { FailedStatusContent } from './FailedStatusContent';
|
|
9
11
|
import { PendingStatusContent } from './PendingStatusContent';
|
|
10
12
|
import { ReworkStatusContent } from './ReworkStatusContent';
|
|
@@ -14,14 +16,26 @@ const SIGNAL_TYPES: SignalType[] = [
|
|
|
14
16
|
'CREATE_APPLICATION_LOAN_V3_SIGNAL',
|
|
15
17
|
];
|
|
16
18
|
|
|
19
|
+
const MESSAGE_NAMES: MessageName[] = [
|
|
20
|
+
'CREATE_APPLICATION_SHORT_MESSAGE',
|
|
21
|
+
// 'CREATE_APPLICATION_LOAN_MESSAGE',
|
|
22
|
+
];
|
|
23
|
+
|
|
17
24
|
export const CreditFormStatusTracker = JSX(() => {
|
|
25
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
18
26
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
19
27
|
const { taskId } = useRetailFormStore();
|
|
20
28
|
|
|
21
29
|
useEffect(() => {
|
|
22
30
|
(async () => {
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
if (isNewMicroservice) {
|
|
32
|
+
for (const messageName of MESSAGE_NAMES) {
|
|
33
|
+
await sendMessage({ messageName, taskId });
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
for (const signalType of SIGNAL_TYPES) {
|
|
37
|
+
await sendSignalToProcess({ signalType, taskId });
|
|
38
|
+
}
|
|
25
39
|
}
|
|
26
40
|
})();
|
|
27
41
|
}, [taskId]);
|
|
@@ -55,7 +55,7 @@ export const useCreditFormAPI = ({
|
|
|
55
55
|
|
|
56
56
|
try {
|
|
57
57
|
const { taskId, profileId, participantId } = retailFormStore;
|
|
58
|
-
if (taskId
|
|
58
|
+
if (taskId) {
|
|
59
59
|
const response = await updateUserTask(
|
|
60
60
|
getCreditFormTaskData({
|
|
61
61
|
participantId,
|
|
@@ -53,11 +53,9 @@ export const Footer = UniBlock<FooterProps>(({ className, footer, ...rest }) =>
|
|
|
53
53
|
{_?.title}
|
|
54
54
|
</SocialMedia>
|
|
55
55
|
))}
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
))}
|
|
60
|
-
</div>
|
|
56
|
+
{otherLinks.map((_, i) => (
|
|
57
|
+
<Link key={`${_.href}_${i}`} className="text-s font-light" {..._} />
|
|
58
|
+
))}
|
|
61
59
|
</div>
|
|
62
60
|
</div>
|
|
63
61
|
<HorizontalNavigation title={horizontalNavigationTitle} links={relatedEnterprises} />
|
|
@@ -5,19 +5,14 @@ import { SearchBar } from '../../ui-kit/SearchBar/SearchBar';
|
|
|
5
5
|
import { LEFT_COLUMN_STYLE } from './leftColumnStyle';
|
|
6
6
|
|
|
7
7
|
export const renderLogoSearchBar = (common?: CommonData, navigationItems?: TopMenuItemProps[]) => {
|
|
8
|
-
const { logo
|
|
8
|
+
const { logo } = common ?? {};
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
10
|
const { dataHeader, dataFooter, ...logoProps } = logo ?? {};
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
13
|
<div className="flex items-stretch gap-3xl">
|
|
14
14
|
<Logo className={LEFT_COLUMN_STYLE} logo={logoProps} data={dataFooter} showTitle={false} />
|
|
15
|
-
<SearchBar
|
|
16
|
-
className="grow"
|
|
17
|
-
navigationItems={navigationItems}
|
|
18
|
-
placeholder={search?.placeholder}
|
|
19
|
-
{...common}
|
|
20
|
-
/>
|
|
15
|
+
<SearchBar className="grow" navigationItems={navigationItems} {...common} />
|
|
21
16
|
</div>
|
|
22
17
|
);
|
|
23
18
|
};
|
|
@@ -13,7 +13,7 @@ export interface DropdownMenuProps extends ComponentType {
|
|
|
13
13
|
activeItem?: LinkProps;
|
|
14
14
|
ariaLabel?: string;
|
|
15
15
|
renderDropdownItem?: ({ item, i, activeItem, handlers }: renderDropdownItemProps) => void;
|
|
16
|
-
handlers?: Record<string, (ev
|
|
16
|
+
handlers?: Record<string, (ev?: PreventableEventWithTarget) => void>;
|
|
17
17
|
onItemClick?: () => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ export type renderDropdownItemProps = {
|
|
|
21
21
|
item?: LinkProps;
|
|
22
22
|
i?: number;
|
|
23
23
|
activeItem?: LinkProps;
|
|
24
|
-
handlers?: Record<string, (ev
|
|
24
|
+
handlers?: Record<string, (ev?: PreventableEventWithTarget) => void>;
|
|
25
25
|
closeDropdown?: () => void;
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -83,15 +83,15 @@ const renderQuickActionsDropdown = ({
|
|
|
83
83
|
}: renderDropdownItemProps) => {
|
|
84
84
|
const quickActionsMapping = {
|
|
85
85
|
call: {
|
|
86
|
-
handler: (
|
|
87
|
-
handlers?.call(
|
|
86
|
+
handler: () => {
|
|
87
|
+
handlers?.call();
|
|
88
88
|
closeDropdown();
|
|
89
89
|
},
|
|
90
90
|
text: 'Заказать звонок',
|
|
91
91
|
},
|
|
92
92
|
chat: {
|
|
93
|
-
handler: (
|
|
94
|
-
handlers?.chat(
|
|
93
|
+
handler: () => {
|
|
94
|
+
handlers?.chat();
|
|
95
95
|
closeDropdown();
|
|
96
96
|
},
|
|
97
97
|
text: 'Написать в чат',
|
|
@@ -117,14 +117,12 @@ export const useHandlers = () => {
|
|
|
117
117
|
const handleCallClick = useCallback(() => {
|
|
118
118
|
phoneCallRequestDialog.open({ onClose: () => phoneCallRequestDialog.close() });
|
|
119
119
|
}, []);
|
|
120
|
-
const aspects = useAspects();
|
|
121
120
|
|
|
122
|
-
const
|
|
123
|
-
console.log('chat click');
|
|
121
|
+
const aspects = useAspects();
|
|
124
122
|
|
|
123
|
+
const handleChatClick = useCallback((ev?: PreventableEventWithTarget) => {
|
|
125
124
|
const openChatBot = aspects[CHAT_BOT_ASPECT_NAME];
|
|
126
|
-
|
|
127
|
-
if (openChatBot) {
|
|
125
|
+
if (openChatBot && ev) {
|
|
128
126
|
openChatBot(ev).finally();
|
|
129
127
|
}
|
|
130
128
|
}, []);
|