@redneckz/wildless-cms-uni-blocks 0.14.1035 → 0.14.1037
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +128 -61
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -10
- package/bundle/retail/api/draftTaskCard.d.ts +2 -0
- package/bundle/retail/api/draftTaskCredit.d.ts +2 -0
- package/bundle/retail/api/draftTaskDebit.d.ts +2 -0
- package/bundle/retail/api/sendMessage.d.ts +2 -2
- package/bundle/retail/components/DraftDialog/DraftDialog.d.ts +3 -1
- package/bundle/retail/components/DraftDialog/EmptyDraftDialog.d.ts +2 -0
- package/bundle/retail/components/DraftDialog/useDraftDialog.d.ts +1 -1
- package/bundle/retail/components/DraftDialog/utils.d.ts +2 -1
- package/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +1 -1
- package/bundle/retail/hooks/useDraftSearch.d.ts +10 -0
- package/bundle/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/bundle/retail/model/ApplicationLeadFormTypes.d.ts +49 -0
- package/bundle/retail/model/DraftTaskType.d.ts +1 -0
- package/bundle/retail/validator/getLimitedBirthdayValidation.d.ts +1 -1
- package/bundle/retail/validator/getRetailFormValidator.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +37 -34
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -10
- package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/dist/retail/api/draftTaskCard.d.ts +2 -0
- package/dist/retail/api/draftTaskCard.js +8 -0
- package/dist/retail/api/draftTaskCard.js.map +1 -0
- package/dist/retail/api/draftTaskCredit.d.ts +2 -0
- package/dist/retail/api/draftTaskCredit.js +9 -0
- package/dist/retail/api/draftTaskCredit.js.map +1 -0
- package/dist/retail/api/draftTaskDebit.d.ts +2 -0
- package/dist/retail/api/draftTaskDebit.js +8 -0
- package/dist/retail/api/draftTaskDebit.js.map +1 -0
- package/dist/retail/api/sendMessage.d.ts +2 -2
- package/dist/retail/api/sendMessage.js.map +1 -1
- package/dist/retail/components/DraftDialog/DraftDialog.d.ts +3 -1
- package/dist/retail/components/DraftDialog/DraftDialog.js +21 -5
- package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/EmptyDraftDialog.d.ts +2 -0
- package/dist/retail/components/DraftDialog/EmptyDraftDialog.js +2 -2
- package/dist/retail/components/DraftDialog/EmptyDraftDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/useDraftDialog.d.ts +1 -1
- package/dist/retail/components/DraftDialog/useDraftDialog.js +3 -3
- package/dist/retail/components/DraftDialog/useDraftDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/utils.d.ts +2 -1
- package/dist/retail/components/DraftDialog/utils.js +3 -3
- package/dist/retail/components/DraftDialog/utils.js.map +1 -1
- package/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +1 -1
- package/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/dist/retail/hooks/useDraftSearch.d.ts +10 -0
- package/dist/retail/hooks/useDraftSearch.js +45 -0
- package/dist/retail/hooks/useDraftSearch.js.map +1 -0
- package/dist/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/dist/retail/model/ApplicationLeadFormTypes.d.ts +49 -0
- package/dist/retail/model/ApplicationLeadFormTypes.js +2 -0
- package/dist/retail/model/ApplicationLeadFormTypes.js.map +1 -0
- package/dist/retail/model/DraftTaskType.d.ts +1 -0
- package/dist/retail/model/DraftTaskType.js +2 -0
- package/dist/retail/model/DraftTaskType.js.map +1 -0
- package/dist/retail/validator/getLimitedBirthdayValidation.d.ts +1 -1
- package/dist/retail/validator/getRetailFormValidator.d.ts +1 -1
- package/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js +2 -2
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/dist/ui-kit/LinkButton/LinkButton.js +4 -6
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +37 -34
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -10
- package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/lib/retail/api/draftTaskCard.d.ts +2 -0
- package/lib/retail/api/draftTaskCard.js +5 -0
- package/lib/retail/api/draftTaskCard.js.map +1 -0
- package/lib/retail/api/draftTaskCredit.d.ts +2 -0
- package/lib/retail/api/draftTaskCredit.js +6 -0
- package/lib/retail/api/draftTaskCredit.js.map +1 -0
- package/lib/retail/api/draftTaskDebit.d.ts +2 -0
- package/lib/retail/api/draftTaskDebit.js +5 -0
- package/lib/retail/api/draftTaskDebit.js.map +1 -0
- package/lib/retail/api/sendMessage.d.ts +2 -2
- package/lib/retail/api/sendMessage.js.map +1 -1
- package/lib/retail/components/DraftDialog/DraftDialog.d.ts +3 -1
- package/lib/retail/components/DraftDialog/DraftDialog.js +22 -6
- package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/EmptyDraftDialog.d.ts +2 -0
- package/lib/retail/components/DraftDialog/EmptyDraftDialog.js +2 -2
- package/lib/retail/components/DraftDialog/EmptyDraftDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/useDraftDialog.d.ts +1 -1
- package/lib/retail/components/DraftDialog/useDraftDialog.js +3 -3
- package/lib/retail/components/DraftDialog/useDraftDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/utils.d.ts +2 -1
- package/lib/retail/components/DraftDialog/utils.js +3 -3
- package/lib/retail/components/DraftDialog/utils.js.map +1 -1
- package/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +1 -1
- package/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/lib/retail/hooks/useDraftSearch.d.ts +10 -0
- package/lib/retail/hooks/useDraftSearch.js +42 -0
- package/lib/retail/hooks/useDraftSearch.js.map +1 -0
- package/lib/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/lib/retail/model/ApplicationLeadFormTypes.d.ts +49 -0
- package/lib/retail/model/ApplicationLeadFormTypes.js +2 -0
- package/lib/retail/model/ApplicationLeadFormTypes.js.map +1 -0
- package/lib/retail/model/DraftTaskType.d.ts +1 -0
- package/lib/retail/model/DraftTaskType.js +2 -0
- package/lib/retail/model/DraftTaskType.js.map +1 -0
- package/lib/retail/validator/getLimitedBirthdayValidation.d.ts +1 -1
- package/lib/retail/validator/getRetailFormValidator.d.ts +1 -1
- package/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js +2 -2
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/ui-kit/LinkButton/LinkButton.js +4 -6
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +128 -61
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -10
- package/mobile/bundle/retail/api/draftTaskCard.d.ts +2 -0
- package/mobile/bundle/retail/api/draftTaskCredit.d.ts +2 -0
- package/mobile/bundle/retail/api/draftTaskDebit.d.ts +2 -0
- package/mobile/bundle/retail/api/sendMessage.d.ts +2 -2
- package/mobile/bundle/retail/components/DraftDialog/DraftDialog.d.ts +3 -1
- package/mobile/bundle/retail/components/DraftDialog/EmptyDraftDialog.d.ts +2 -0
- package/mobile/bundle/retail/components/DraftDialog/useDraftDialog.d.ts +1 -1
- package/mobile/bundle/retail/components/DraftDialog/utils.d.ts +2 -1
- package/mobile/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +1 -1
- package/mobile/bundle/retail/hooks/useDraftSearch.d.ts +10 -0
- package/mobile/bundle/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/mobile/bundle/retail/model/ApplicationLeadFormTypes.d.ts +49 -0
- package/mobile/bundle/retail/model/DraftTaskType.d.ts +1 -0
- package/mobile/bundle/retail/validator/getLimitedBirthdayValidation.d.ts +1 -1
- package/mobile/bundle/retail/validator/getRetailFormValidator.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +37 -34
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -10
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/dist/retail/api/draftTaskCard.d.ts +2 -0
- package/mobile/dist/retail/api/draftTaskCard.js +8 -0
- package/mobile/dist/retail/api/draftTaskCard.js.map +1 -0
- package/mobile/dist/retail/api/draftTaskCredit.d.ts +2 -0
- package/mobile/dist/retail/api/draftTaskCredit.js +9 -0
- package/mobile/dist/retail/api/draftTaskCredit.js.map +1 -0
- package/mobile/dist/retail/api/draftTaskDebit.d.ts +2 -0
- package/mobile/dist/retail/api/draftTaskDebit.js +8 -0
- package/mobile/dist/retail/api/draftTaskDebit.js.map +1 -0
- package/mobile/dist/retail/api/sendMessage.d.ts +2 -2
- package/mobile/dist/retail/api/sendMessage.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.d.ts +3 -1
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +21 -5
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/EmptyDraftDialog.d.ts +2 -0
- package/mobile/dist/retail/components/DraftDialog/EmptyDraftDialog.js +2 -2
- package/mobile/dist/retail/components/DraftDialog/EmptyDraftDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/useDraftDialog.d.ts +1 -1
- package/mobile/dist/retail/components/DraftDialog/useDraftDialog.js +3 -3
- package/mobile/dist/retail/components/DraftDialog/useDraftDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/utils.d.ts +2 -1
- package/mobile/dist/retail/components/DraftDialog/utils.js +3 -3
- package/mobile/dist/retail/components/DraftDialog/utils.js.map +1 -1
- package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +1 -1
- package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/mobile/dist/retail/hooks/useDraftSearch.d.ts +10 -0
- package/mobile/dist/retail/hooks/useDraftSearch.js +45 -0
- package/mobile/dist/retail/hooks/useDraftSearch.js.map +1 -0
- package/mobile/dist/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/mobile/dist/retail/model/ApplicationLeadFormTypes.d.ts +49 -0
- package/mobile/dist/retail/model/ApplicationLeadFormTypes.js +2 -0
- package/mobile/dist/retail/model/ApplicationLeadFormTypes.js.map +1 -0
- package/mobile/dist/retail/model/DraftTaskType.d.ts +1 -0
- package/mobile/dist/retail/model/DraftTaskType.js +2 -0
- package/mobile/dist/retail/model/DraftTaskType.js.map +1 -0
- package/mobile/dist/retail/validator/getLimitedBirthdayValidation.d.ts +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.d.ts +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +2 -2
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +4 -6
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +37 -34
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -10
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/lib/retail/api/draftTaskCard.d.ts +2 -0
- package/mobile/lib/retail/api/draftTaskCard.js +5 -0
- package/mobile/lib/retail/api/draftTaskCard.js.map +1 -0
- package/mobile/lib/retail/api/draftTaskCredit.d.ts +2 -0
- package/mobile/lib/retail/api/draftTaskCredit.js +6 -0
- package/mobile/lib/retail/api/draftTaskCredit.js.map +1 -0
- package/mobile/lib/retail/api/draftTaskDebit.d.ts +2 -0
- package/mobile/lib/retail/api/draftTaskDebit.js +5 -0
- package/mobile/lib/retail/api/draftTaskDebit.js.map +1 -0
- package/mobile/lib/retail/api/sendMessage.d.ts +2 -2
- package/mobile/lib/retail/api/sendMessage.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.d.ts +3 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +22 -6
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/EmptyDraftDialog.d.ts +2 -0
- package/mobile/lib/retail/components/DraftDialog/EmptyDraftDialog.js +2 -2
- package/mobile/lib/retail/components/DraftDialog/EmptyDraftDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/useDraftDialog.d.ts +1 -1
- package/mobile/lib/retail/components/DraftDialog/useDraftDialog.js +3 -3
- package/mobile/lib/retail/components/DraftDialog/useDraftDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/utils.d.ts +2 -1
- package/mobile/lib/retail/components/DraftDialog/utils.js +3 -3
- package/mobile/lib/retail/components/DraftDialog/utils.js.map +1 -1
- package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +1 -1
- package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/mobile/lib/retail/hooks/useDraftSearch.d.ts +10 -0
- package/mobile/lib/retail/hooks/useDraftSearch.js +42 -0
- package/mobile/lib/retail/hooks/useDraftSearch.js.map +1 -0
- package/mobile/lib/retail/hooks/useRetailFormStore.d.ts +1 -1
- package/mobile/lib/retail/model/ApplicationLeadFormTypes.d.ts +49 -0
- package/mobile/lib/retail/model/ApplicationLeadFormTypes.js +2 -0
- package/mobile/lib/retail/model/ApplicationLeadFormTypes.js.map +1 -0
- package/mobile/lib/retail/model/DraftTaskType.d.ts +1 -0
- package/mobile/lib/retail/model/DraftTaskType.js +2 -0
- package/mobile/lib/retail/model/DraftTaskType.js.map +1 -0
- package/mobile/lib/retail/validator/getLimitedBirthdayValidation.d.ts +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.d.ts +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +2 -2
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +4 -6
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -5
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +2 -1
- package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +2 -1
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/renderInputs.tsx +2 -1
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +62 -96
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +2 -1
- package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +1 -10
- package/mobile/src/retail/api/draftTaskCard.ts +6 -0
- package/mobile/src/retail/api/draftTaskCredit.ts +8 -0
- package/mobile/src/retail/api/draftTaskDebit.ts +6 -0
- package/mobile/src/retail/api/sendMessage.ts +5 -2
- package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +26 -7
- package/mobile/src/retail/components/DraftDialog/EmptyDraftDialog.tsx +8 -2
- package/mobile/src/retail/components/DraftDialog/useDraftDialog.tsx +10 -3
- package/mobile/src/retail/components/DraftDialog/utils.ts +4 -3
- package/mobile/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +2 -3
- package/mobile/src/retail/hooks/useDraftSearch.ts +67 -0
- package/mobile/src/retail/model/ApplicationLeadFormTypes.ts +56 -0
- package/mobile/src/retail/model/DraftTaskType.ts +1 -0
- package/mobile/src/retail/validator/getLimitedBirthdayValidation.ts +1 -1
- package/mobile/src/retail/validator/getRetailFormValidator.ts +1 -1
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +2 -2
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +5 -1
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +5 -7
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -5
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +2 -1
- package/src/components/ApplicationLeadForm/applicationFormData.tsx +2 -1
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +1 -1
- package/src/components/ApplicationLeadForm/renderInputs.tsx +2 -1
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +62 -96
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +2 -1
- package/src/components/ApplicationLeadForm/useLeadFormStore.ts +1 -1
- package/src/components/ApplicationLeadForm/useSaveUserData.ts +1 -10
- package/src/retail/api/draftTaskCard.ts +6 -0
- package/src/retail/api/draftTaskCredit.ts +8 -0
- package/src/retail/api/draftTaskDebit.ts +6 -0
- package/src/retail/api/sendMessage.ts +5 -2
- package/src/retail/components/DraftDialog/DraftDialog.tsx +26 -7
- package/src/retail/components/DraftDialog/EmptyDraftDialog.tsx +8 -2
- package/src/retail/components/DraftDialog/useDraftDialog.tsx +10 -3
- package/src/retail/components/DraftDialog/utils.ts +4 -3
- package/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +2 -3
- package/src/retail/hooks/useDraftSearch.ts +67 -0
- package/src/retail/model/ApplicationLeadFormTypes.ts +56 -0
- package/src/retail/model/DraftTaskType.ts +1 -0
- package/src/retail/validator/getLimitedBirthdayValidation.ts +1 -1
- package/src/retail/validator/getRetailFormValidator.ts +1 -1
- package/src/ui-kit/DialogManager/Dialog.tsx +2 -2
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +5 -1
- package/src/ui-kit/LinkButton/LinkButton.tsx +5 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
2
2
|
import { InputsApplicationLeadMap } from '../../retail/inputs';
|
|
3
|
+
import { type ProductType } from '../../retail/model/ApplicationLeadFormTypes';
|
|
3
4
|
import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
|
|
4
5
|
import { getField } from '../../ui-kit/FormField/getField';
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
import { productTypeToConsentsMap } from './consents';
|
|
7
8
|
import { GroupedConsents, type GroupedConsentsProps } from './GroupedConsents';
|
|
8
9
|
|
|
@@ -8,26 +8,34 @@ import { createDraftTask } from '../../retail/api/createDraftTask';
|
|
|
8
8
|
import { createParticipant } from '../../retail/api/createParticipant';
|
|
9
9
|
import { createUserProfile } from '../../retail/api/createUserProfile';
|
|
10
10
|
import { createUserTaskDebit } from '../../retail/api/createUserTaskDebit';
|
|
11
|
+
import { type Task } from '../../retail/api/draftTasksKZO';
|
|
11
12
|
import { getClaimChannel } from '../../retail/api/getClaimChannel';
|
|
12
13
|
import { getLastTaskStatus } from '../../retail/api/getLastTaskStatus';
|
|
13
14
|
import { getTaskById } from '../../retail/api/getTaskById';
|
|
14
15
|
import { saveReferalInfo } from '../../retail/api/saveReferalInfo';
|
|
15
16
|
import { updateUserProfile } from '../../retail/api/updateUserProfile';
|
|
16
|
-
import { updateUserTask
|
|
17
|
+
import { updateUserTask } from '../../retail/api/updateUserTask';
|
|
17
18
|
import { useConsentBkiDialog } from '../../retail/components/ConsentBkiDialog/useConsentBkiDialog';
|
|
18
19
|
import { useDraftDialog } from '../../retail/components/DraftDialog/useDraftDialog';
|
|
19
20
|
import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/VerifyPhoneDialog';
|
|
21
|
+
import { useDraftSearch } from '../../retail/hooks/useDraftSearch';
|
|
22
|
+
import {
|
|
23
|
+
type CommonLeadProps,
|
|
24
|
+
type ProductType,
|
|
25
|
+
type TaskDataProps,
|
|
26
|
+
type UpdateUserDataNewMicroserviceProps,
|
|
27
|
+
type UpdateUserDataProps,
|
|
28
|
+
} from '../../retail/model/ApplicationLeadFormTypes';
|
|
29
|
+
import { type DraftTaskType } from '../../retail/model/DraftTaskType';
|
|
20
30
|
import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
|
|
21
|
-
import { type ReferalData } from '../../retail/model/ReferalData';
|
|
22
31
|
import { getUpdateUserProfileData } from '../../retail/utils/getUpdateUserProfile';
|
|
23
32
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
24
33
|
import { formatPhone } from '../../utils/formatPhone';
|
|
25
|
-
import { type ProductType } from './ApplicationLeadFormContent';
|
|
26
34
|
import { productTypeToConsentsMap } from './consents';
|
|
27
35
|
import { getCreditLeadFormTaskData, getDebitLeadFormTaskData } from './getLeadFormTaskData';
|
|
28
36
|
import { type ApplicationLeadStore } from './useInitApplicationLead';
|
|
29
37
|
import { useLeadFormStore } from './useLeadFormStore';
|
|
30
|
-
import { useSaveUserData
|
|
38
|
+
import { useSaveUserData } from './useSaveUserData';
|
|
31
39
|
import { useSendLeadFormAspects } from './useSendLeadFormAspects';
|
|
32
40
|
|
|
33
41
|
interface ApplicationLeadApiProps extends AspectsProps {
|
|
@@ -62,6 +70,7 @@ export const useApplicationLeadApi = ({
|
|
|
62
70
|
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
63
71
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
64
72
|
const draftDialog = useDraftDialog();
|
|
73
|
+
const { searchDrafts } = useDraftSearch();
|
|
65
74
|
|
|
66
75
|
const handleFailSendForm = () => {
|
|
67
76
|
verifyPhoneDialog.close();
|
|
@@ -115,7 +124,7 @@ export const useApplicationLeadApi = ({
|
|
|
115
124
|
draftDialog.open({
|
|
116
125
|
task,
|
|
117
126
|
isFromLead: true,
|
|
118
|
-
|
|
127
|
+
taskType: productType === 'debitCard' ? 'debit' : 'credit',
|
|
119
128
|
sendAspects,
|
|
120
129
|
onClose: sendCurrentTask,
|
|
121
130
|
});
|
|
@@ -163,31 +172,34 @@ export const useApplicationLeadApi = ({
|
|
|
163
172
|
if (!participantId) {
|
|
164
173
|
throw new Error();
|
|
165
174
|
}
|
|
166
|
-
|
|
167
|
-
const sendCurrentTask = createSendCurrentTaskNew({
|
|
175
|
+
const common: CommonLeadProps = {
|
|
168
176
|
programId,
|
|
169
|
-
participantId,
|
|
170
177
|
userId,
|
|
178
|
+
productType,
|
|
179
|
+
sendAspects,
|
|
180
|
+
verifyPhoneDialog,
|
|
181
|
+
handleFailSendForm,
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const taskData: TaskDataProps = {
|
|
185
|
+
participantId,
|
|
171
186
|
formData: transformedFormData,
|
|
172
187
|
referalData,
|
|
173
|
-
productType,
|
|
174
188
|
marketingInfo,
|
|
175
189
|
saveUserData,
|
|
176
|
-
|
|
177
|
-
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const sendCurrentTask = createSendCurrentTaskNew({
|
|
193
|
+
common,
|
|
194
|
+
taskData,
|
|
178
195
|
consentBkiDialog,
|
|
179
|
-
handleFailSendForm,
|
|
180
196
|
});
|
|
181
197
|
|
|
182
198
|
const handleSuccessVerify = createHandleSuccessVerifyNew({
|
|
183
|
-
|
|
184
|
-
programId,
|
|
185
|
-
productType,
|
|
186
|
-
verifyPhoneDialog,
|
|
199
|
+
common,
|
|
187
200
|
draftDialog,
|
|
188
|
-
sendAspects,
|
|
189
201
|
sendCurrentTask,
|
|
190
|
-
|
|
202
|
+
searchDrafts,
|
|
191
203
|
});
|
|
192
204
|
|
|
193
205
|
const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
|
|
@@ -213,33 +225,18 @@ export const useApplicationLeadApi = ({
|
|
|
213
225
|
|
|
214
226
|
const createSendCurrentTaskNew =
|
|
215
227
|
({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
userId,
|
|
219
|
-
formData,
|
|
220
|
-
referalData,
|
|
221
|
-
productType,
|
|
222
|
-
marketingInfo,
|
|
223
|
-
saveUserData,
|
|
224
|
-
sendAspects,
|
|
225
|
-
verifyPhoneDialog,
|
|
228
|
+
common,
|
|
229
|
+
taskData,
|
|
226
230
|
consentBkiDialog,
|
|
227
|
-
handleFailSendForm,
|
|
228
231
|
}: {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
formData: LeadFormState;
|
|
233
|
-
referalData: ReferalData | null;
|
|
234
|
-
productType: ProductType;
|
|
235
|
-
marketingInfo: MarketingInfo | null;
|
|
236
|
-
saveUserData: (userData: UserData) => void;
|
|
237
|
-
sendAspects: (userId: string | number, taskId: number) => void;
|
|
238
|
-
verifyPhoneDialog: any;
|
|
239
|
-
consentBkiDialog: any;
|
|
240
|
-
handleFailSendForm: () => void;
|
|
232
|
+
common: CommonLeadProps;
|
|
233
|
+
taskData: TaskDataProps;
|
|
234
|
+
consentBkiDialog: ReturnType<typeof useConsentBkiDialog>;
|
|
241
235
|
}) =>
|
|
242
236
|
async () => {
|
|
237
|
+
const { programId, userId, productType, sendAspects, verifyPhoneDialog, handleFailSendForm } =
|
|
238
|
+
common;
|
|
239
|
+
const { participantId, formData, referalData, marketingInfo, saveUserData } = taskData;
|
|
243
240
|
const taskId = await updateUserDataNewMicroservice({
|
|
244
241
|
programId,
|
|
245
242
|
participantId,
|
|
@@ -254,9 +251,8 @@ const createSendCurrentTaskNew =
|
|
|
254
251
|
verifyPhoneDialog.close();
|
|
255
252
|
|
|
256
253
|
consentBkiDialog.open({
|
|
257
|
-
phone: formData.phone,
|
|
254
|
+
phone: formData.phone as string,
|
|
258
255
|
taskId,
|
|
259
|
-
userId,
|
|
260
256
|
participantId,
|
|
261
257
|
onFail: handleFailSendForm,
|
|
262
258
|
});
|
|
@@ -264,49 +260,38 @@ const createSendCurrentTaskNew =
|
|
|
264
260
|
|
|
265
261
|
const createHandleSuccessVerifyNew =
|
|
266
262
|
({
|
|
267
|
-
|
|
268
|
-
programId,
|
|
269
|
-
productType,
|
|
270
|
-
verifyPhoneDialog,
|
|
263
|
+
common,
|
|
271
264
|
draftDialog,
|
|
272
|
-
sendAspects,
|
|
273
265
|
sendCurrentTask,
|
|
274
|
-
|
|
266
|
+
searchDrafts,
|
|
275
267
|
}: {
|
|
276
|
-
|
|
277
|
-
programId: string;
|
|
278
|
-
productType: ProductType;
|
|
279
|
-
verifyPhoneDialog: any;
|
|
268
|
+
common: CommonLeadProps;
|
|
280
269
|
draftDialog: any;
|
|
281
|
-
sendAspects: (userId: string | number, taskId: number) => void;
|
|
282
270
|
sendCurrentTask: () => Promise<void>;
|
|
283
|
-
|
|
271
|
+
searchDrafts: () => Promise<{ draft: Task | null; taskType: DraftTaskType | undefined }>;
|
|
284
272
|
}) =>
|
|
285
273
|
async () => {
|
|
274
|
+
const { verifyPhoneDialog, sendAspects, handleFailSendForm } = common;
|
|
286
275
|
try {
|
|
287
|
-
const
|
|
288
|
-
userId,
|
|
289
|
-
programId,
|
|
290
|
-
});
|
|
276
|
+
const { draft, taskType } = await searchDrafts();
|
|
291
277
|
|
|
292
|
-
|
|
293
|
-
const task = await getTaskById({ taskId: lastTaskId });
|
|
294
|
-
|
|
295
|
-
if (task) {
|
|
296
|
-
verifyPhoneDialog.close();
|
|
297
|
-
draftDialog.open({
|
|
298
|
-
task,
|
|
299
|
-
isFromLead: true,
|
|
300
|
-
isDebit: productType === 'debitCard',
|
|
301
|
-
sendAspects,
|
|
302
|
-
onClose: sendCurrentTask,
|
|
303
|
-
});
|
|
278
|
+
verifyPhoneDialog.close();
|
|
304
279
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
280
|
+
if (!draft) {
|
|
281
|
+
draftDialog.open({
|
|
282
|
+
task: undefined,
|
|
283
|
+
taskType: null,
|
|
284
|
+
});
|
|
308
285
|
|
|
309
|
-
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
draftDialog.open({
|
|
289
|
+
task: draft,
|
|
290
|
+
taskType,
|
|
291
|
+
isFromLead: true,
|
|
292
|
+
sendAspects,
|
|
293
|
+
onClose: sendCurrentTask,
|
|
294
|
+
});
|
|
310
295
|
} catch {
|
|
311
296
|
handleFailSendForm();
|
|
312
297
|
}
|
|
@@ -329,16 +314,7 @@ const updateUserData = async ({
|
|
|
329
314
|
marketingInfo,
|
|
330
315
|
saveUserData,
|
|
331
316
|
sendAspects,
|
|
332
|
-
}: {
|
|
333
|
-
programId: string;
|
|
334
|
-
profileId: number;
|
|
335
|
-
formData: LeadFormState;
|
|
336
|
-
productType: ProductType;
|
|
337
|
-
referalData: ReferalData | null;
|
|
338
|
-
marketingInfo: MarketingInfo | null;
|
|
339
|
-
saveUserData: (userData: UserData) => void;
|
|
340
|
-
sendAspects: (profileId: number, taskId: number) => void;
|
|
341
|
-
}) => {
|
|
317
|
+
}: UpdateUserDataProps) => {
|
|
342
318
|
let taskId: number;
|
|
343
319
|
let participantId: number;
|
|
344
320
|
const transformedConsents = transformConsentsFields(formData, productType);
|
|
@@ -401,17 +377,7 @@ const updateUserDataNewMicroservice = async ({
|
|
|
401
377
|
marketingInfo,
|
|
402
378
|
saveUserData,
|
|
403
379
|
sendAspects,
|
|
404
|
-
}: {
|
|
405
|
-
programId: string;
|
|
406
|
-
participantId: string | number;
|
|
407
|
-
userId?: string | number;
|
|
408
|
-
formData: LeadFormState;
|
|
409
|
-
referalData: ReferalData | null;
|
|
410
|
-
productType: ProductType;
|
|
411
|
-
marketingInfo: MarketingInfo | null;
|
|
412
|
-
saveUserData: (userData: UserData) => void;
|
|
413
|
-
sendAspects: (userId: string | number, taskId: number) => void;
|
|
414
|
-
}): Promise<number> => {
|
|
380
|
+
}: UpdateUserDataNewMicroserviceProps): Promise<number> => {
|
|
415
381
|
let taskId: number;
|
|
416
382
|
const transformedConsents = transformConsentsFields(formData, productType);
|
|
417
383
|
|
|
@@ -5,10 +5,11 @@ import { useSetter } from '../../hooks/useSetter';
|
|
|
5
5
|
import { esiaRequestProfile } from '../../retail/api/esiaRequestProfile';
|
|
6
6
|
import { type MarketingInfo } from '../../retail/api/updateUserTask';
|
|
7
7
|
import { useReferalProgramm } from '../../retail/hooks/useReferalProgramm';
|
|
8
|
+
import { type ProductType } from '../../retail/model/ApplicationLeadFormTypes';
|
|
8
9
|
import { type LeadFormState } from '../../retail/model/LeadFormState';
|
|
9
10
|
import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
|
|
10
11
|
import { QUERY_STORAGE_KEY } from '../../utils/getSessionQuery';
|
|
11
|
-
import { EsiaStatuses
|
|
12
|
+
import { EsiaStatuses } from './ApplicationLeadFormContent';
|
|
12
13
|
import { getInitialFormState } from './getInitialFormState';
|
|
13
14
|
import { parseEsiaProfile } from './parseEsiaProfile';
|
|
14
15
|
import { useLeadFormStore } from './useLeadFormStore';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useLocalStore } from '@redneckz/uni-jsx/lib/Store/useLocalStore';
|
|
2
|
+
import { type ProductType } from '../../retail/model/ApplicationLeadFormTypes';
|
|
2
3
|
import { type LeadFormState } from '../../retail/model/LeadFormState';
|
|
3
4
|
import { type ReferalData } from '../../retail/model/ReferalData';
|
|
4
5
|
import { type Nullable } from '../../utils/Nullable';
|
|
5
|
-
import { type ProductType } from './ApplicationLeadFormContent';
|
|
6
6
|
|
|
7
7
|
export interface LeadFormStoreSlice {
|
|
8
8
|
leadForm: LeadFormState;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
-
import { type
|
|
3
|
-
import { type Nullable } from '../../utils/Nullable';
|
|
2
|
+
import { type UserData } from '../../retail/model/ApplicationLeadFormTypes';
|
|
4
3
|
import { useLeadFormStore } from './useLeadFormStore';
|
|
5
4
|
|
|
6
|
-
export interface UserData {
|
|
7
|
-
participantId: string | number;
|
|
8
|
-
taskId: number;
|
|
9
|
-
profileId?: Nullable<number>;
|
|
10
|
-
userId?: Nullable<string | number>;
|
|
11
|
-
programId: string;
|
|
12
|
-
formData: LeadFormState;
|
|
13
|
-
}
|
|
14
5
|
export const useSaveUserData = () => {
|
|
15
6
|
const leadFormStore = useLeadFormStore();
|
|
16
7
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { fetchRetailJSON } from './doRequest';
|
|
2
|
+
import { type Task } from './draftTasksKZO';
|
|
3
|
+
|
|
4
|
+
export const draftTaskCredit = async (): Promise<Task[]> => {
|
|
5
|
+
const res = await fetchRetailJSON<Task>('/public-data/draftTaskCredit', 'GET');
|
|
6
|
+
|
|
7
|
+
return res ? [res] : [];
|
|
8
|
+
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { doRequest } from './doRequest';
|
|
2
2
|
|
|
3
|
-
export type MessageName =
|
|
3
|
+
export type MessageName =
|
|
4
|
+
| 'CREATE_APPLICATION_SHORT_MESSAGE'
|
|
5
|
+
| 'CREATE_APPLICATION_LOAN_MESSAGE'
|
|
6
|
+
| 'KILL_DRAFT_PROCESS_MESSAGE';
|
|
4
7
|
|
|
5
8
|
interface SendMessage {
|
|
6
9
|
messageName: MessageName;
|
|
7
|
-
taskId: number | null;
|
|
10
|
+
taskId: string | number | null;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export const sendMessage = async (body: SendMessage) => {
|
|
@@ -7,34 +7,43 @@ import { Heading } from '../../../ui-kit/Heading/Heading';
|
|
|
7
7
|
import { formatDate } from '../../../utils/formatDate';
|
|
8
8
|
import { noop } from '../../../utils/noop';
|
|
9
9
|
import { type Task } from '../../api/draftTasksKZO';
|
|
10
|
+
import { sendMessage } from '../../api/sendMessage';
|
|
10
11
|
import { useRetailFormStore } from '../../hooks/useRetailFormStore';
|
|
11
|
-
import {
|
|
12
|
+
import { type DraftTaskType } from '../../model/DraftTaskType';
|
|
13
|
+
import { checkNewMicroservice } from '../../utils/checkNewMicroservice';
|
|
14
|
+
import { creditProgramCodeToProductIdMap } from './creditProgramCodes';
|
|
12
15
|
import { DraftActionButton } from './DraftActionButton';
|
|
13
16
|
import { parseDraftTask } from './parseDraftTask';
|
|
14
17
|
import { getProductData } from './utils';
|
|
15
18
|
|
|
16
19
|
export interface DraftDialogProps extends OnCloseProps {
|
|
17
20
|
task: Task;
|
|
18
|
-
|
|
21
|
+
taskType?: DraftTaskType;
|
|
19
22
|
isDebit?: boolean;
|
|
23
|
+
isFromLead?: boolean;
|
|
20
24
|
sendAspects?: (userId: number, taskId: number) => void;
|
|
21
25
|
}
|
|
22
26
|
|
|
27
|
+
const getTaskTypeOrDebit = (taskType?: DraftTaskType, isDebit?: boolean) => {
|
|
28
|
+
return taskType || (isDebit ? 'debit' : undefined);
|
|
29
|
+
};
|
|
30
|
+
|
|
23
31
|
export const DraftDialog = JSX<DraftDialogProps>(function ({
|
|
24
32
|
task,
|
|
33
|
+
taskType,
|
|
34
|
+
isDebit,
|
|
25
35
|
isFromLead = false,
|
|
26
|
-
isDebit = false,
|
|
27
36
|
sendAspects = noop,
|
|
28
37
|
onClose = noop,
|
|
29
38
|
}) {
|
|
30
39
|
const retailFormStore = useRetailFormStore();
|
|
31
40
|
const navigator = locationNavigator();
|
|
41
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
32
42
|
|
|
33
43
|
const { participants, participant, creditProgram, createdDate = '', id: taskId } = task;
|
|
34
44
|
|
|
35
45
|
const programmId: string = creditProgramCodeToProductIdMap[creditProgram.code];
|
|
36
|
-
const
|
|
37
|
-
const productData = getProductData(isDebit, isCredit);
|
|
46
|
+
const productData = getProductData(getTaskTypeOrDebit(taskType, isDebit));
|
|
38
47
|
|
|
39
48
|
const currentParticipant = participant || participants?.[0];
|
|
40
49
|
const { id: participantId, profile } = currentParticipant || {};
|
|
@@ -54,9 +63,19 @@ export const DraftDialog = JSX<DraftDialogProps>(function ({
|
|
|
54
63
|
navigator.assign(productData.nextStepLink);
|
|
55
64
|
}, []);
|
|
56
65
|
|
|
57
|
-
const handleGoToNewTask = useCallback(() => {
|
|
66
|
+
const handleGoToNewTask = useCallback(async () => {
|
|
67
|
+
if (isNewMicroservice) {
|
|
68
|
+
try {
|
|
69
|
+
await sendMessage({
|
|
70
|
+
messageName: 'KILL_DRAFT_PROCESS_MESSAGE',
|
|
71
|
+
taskId: task.id,
|
|
72
|
+
});
|
|
73
|
+
} catch (ex) {
|
|
74
|
+
console.error(ex);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
58
77
|
navigator.assign(productData.newTaskLink);
|
|
59
|
-
}, []);
|
|
78
|
+
}, [task.id, productData.newTaskLink, isNewMicroservice]);
|
|
60
79
|
|
|
61
80
|
return (
|
|
62
81
|
<Dialog onClose={onClose}>
|
|
@@ -7,15 +7,21 @@ import { Dialog } from '../../../ui-kit/DialogManager/Dialog';
|
|
|
7
7
|
import { Heading } from '../../../ui-kit/Heading/Heading';
|
|
8
8
|
import { Paragraph } from '../../../ui-kit/Paragraph/Paragraph';
|
|
9
9
|
import { noop } from '../../../utils/noop';
|
|
10
|
+
import { type DraftTaskType } from '../../model/DraftTaskType';
|
|
10
11
|
import { getProductData } from './utils';
|
|
11
12
|
|
|
12
13
|
export interface EmptyDraftDialogProps extends OnCloseProps {
|
|
14
|
+
taskType?: DraftTaskType;
|
|
13
15
|
isDebit?: boolean;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
export const EmptyDraftDialog = JSX<EmptyDraftDialogProps>(function ({
|
|
18
|
+
export const EmptyDraftDialog = JSX<EmptyDraftDialogProps>(function ({
|
|
19
|
+
taskType,
|
|
20
|
+
isDebit,
|
|
21
|
+
onClose = noop,
|
|
22
|
+
}) {
|
|
17
23
|
const navigator = locationNavigator();
|
|
18
|
-
const productData = getProductData(isDebit);
|
|
24
|
+
const productData = getProductData(taskType || (isDebit ? 'debit' : undefined));
|
|
19
25
|
|
|
20
26
|
const handleGoNewTask = useCallback(() => {
|
|
21
27
|
navigator.assign(productData.newTaskLink);
|
|
@@ -7,10 +7,17 @@ export const useDraftDialog = () => {
|
|
|
7
7
|
const { open: openEmptyDraftDialog } = useDialog(EmptyDraftDialog);
|
|
8
8
|
|
|
9
9
|
return {
|
|
10
|
-
open: ({
|
|
10
|
+
open: ({
|
|
11
|
+
task,
|
|
12
|
+
isFromLead,
|
|
13
|
+
taskType,
|
|
14
|
+
isDebit,
|
|
15
|
+
onClose,
|
|
16
|
+
sendAspects,
|
|
17
|
+
}: Partial<DraftDialogProps>) => {
|
|
11
18
|
task
|
|
12
|
-
? openDraftDialog({ task, isFromLead, isDebit, onClose, sendAspects })
|
|
13
|
-
: openEmptyDraftDialog({ isDebit });
|
|
19
|
+
? openDraftDialog({ task, isFromLead, taskType, isDebit, onClose, sendAspects })
|
|
20
|
+
: openEmptyDraftDialog({ taskType, isDebit });
|
|
14
21
|
},
|
|
15
22
|
};
|
|
16
23
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Option } from '../../../ui-kit/Select/Option';
|
|
2
2
|
import { countIncomeAverage } from '../../adaptors/getFamilyStatusAndIncomeData';
|
|
3
3
|
import { type Participant } from '../../api/updateUserTask';
|
|
4
|
+
import { type DraftTaskType } from '../../model/DraftTaskType';
|
|
4
5
|
import { type DictionaryItem } from '../../model/LeadFormData';
|
|
5
6
|
|
|
6
7
|
export const enum EContactType {
|
|
@@ -128,14 +129,14 @@ export const getSelectValue = (
|
|
|
128
129
|
: undefined;
|
|
129
130
|
};
|
|
130
131
|
|
|
131
|
-
export const getProductData = (
|
|
132
|
-
if (
|
|
132
|
+
export const getProductData = (taskType?: DraftTaskType) => {
|
|
133
|
+
if (taskType === 'debit') {
|
|
133
134
|
return {
|
|
134
135
|
nextStepLink: '/debit-card-lead',
|
|
135
136
|
newTaskLink: '/natural/debetcards',
|
|
136
137
|
description: 'На дебетовую карту',
|
|
137
138
|
};
|
|
138
|
-
} else if (
|
|
139
|
+
} else if (taskType === 'credit') {
|
|
139
140
|
return {
|
|
140
141
|
nextStepLink: '/credit-lead',
|
|
141
142
|
newTaskLink: '/natural/loans/all-goals',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import type { OnCloseProps } from '../../../model/OnCloseProps';
|
|
4
|
-
|
|
5
|
-
import { type ProductType } from '../../../components/ApplicationLeadForm/ApplicationLeadFormContent';
|
|
6
3
|
import { locationNavigator } from '../../../external/locationNavigator';
|
|
4
|
+
import type { OnCloseProps } from '../../../model/OnCloseProps';
|
|
7
5
|
import { Button } from '../../../ui-kit/Button/Button';
|
|
8
6
|
import { Dialog } from '../../../ui-kit/DialogManager/Dialog';
|
|
9
7
|
import { Paragraph } from '../../../ui-kit/Paragraph/Paragraph';
|
|
10
8
|
import { noop } from '../../../utils/noop';
|
|
9
|
+
import { type ProductType } from '../../model/ApplicationLeadFormTypes';
|
|
11
10
|
|
|
12
11
|
export interface NoConsentDialogProps extends OnCloseProps {
|
|
13
12
|
attempts: number;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { draftTaskCard } from '../api/draftTaskCard';
|
|
3
|
+
import { draftTaskCredit } from '../api/draftTaskCredit';
|
|
4
|
+
import { draftTaskDebit } from '../api/draftTaskDebit';
|
|
5
|
+
import { type Task } from '../api/draftTasksKZO';
|
|
6
|
+
import { type DraftTaskType } from '../model/DraftTaskType';
|
|
7
|
+
|
|
8
|
+
interface DraftSearchResult {
|
|
9
|
+
draft: Task | null;
|
|
10
|
+
taskType: DraftTaskType | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface DraftWithType {
|
|
14
|
+
task: Task;
|
|
15
|
+
type: DraftTaskType;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const collectDrafts = (
|
|
19
|
+
creditResults: PromiseSettledResult<Task[]>,
|
|
20
|
+
cardResults: PromiseSettledResult<Task[]>,
|
|
21
|
+
debitResults: PromiseSettledResult<Task[]>,
|
|
22
|
+
): DraftWithType[] => {
|
|
23
|
+
const drafts: DraftWithType[] = [];
|
|
24
|
+
const results = [
|
|
25
|
+
{ result: creditResults, type: 'credit' as const },
|
|
26
|
+
{ result: cardResults, type: 'card' as const },
|
|
27
|
+
{ result: debitResults, type: 'debit' as const },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
results.forEach(({ result, type }) => {
|
|
31
|
+
if (result.status === 'fulfilled' && result.value.length > 0) {
|
|
32
|
+
drafts.push({ task: result.value[0], type });
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return drafts;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const findLatestDraft = (drafts: DraftWithType[]): DraftWithType => {
|
|
40
|
+
return drafts.reduce((latest, current) => {
|
|
41
|
+
const latestDate = new Date(latest.task.createdDate || 0);
|
|
42
|
+
const currentDate = new Date(current.task.createdDate || 0);
|
|
43
|
+
|
|
44
|
+
return currentDate > latestDate ? current : latest;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const useDraftSearch = () => {
|
|
49
|
+
const searchDrafts = useCallback(async (): Promise<DraftSearchResult> => {
|
|
50
|
+
const [creditResults, cardResults, debitResults] = await Promise.allSettled([
|
|
51
|
+
draftTaskCredit(),
|
|
52
|
+
draftTaskCard(),
|
|
53
|
+
draftTaskDebit(),
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
const drafts = collectDrafts(creditResults, cardResults, debitResults);
|
|
57
|
+
|
|
58
|
+
if (drafts.length === 0) {
|
|
59
|
+
return { draft: null, taskType: undefined };
|
|
60
|
+
}
|
|
61
|
+
const latestDraft = findLatestDraft(drafts);
|
|
62
|
+
|
|
63
|
+
return { draft: latestDraft.task, taskType: latestDraft.type };
|
|
64
|
+
}, []);
|
|
65
|
+
|
|
66
|
+
return { searchDrafts };
|
|
67
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type DialogOptions } from '../../ui-kit/DialogManager/DialogAction';
|
|
2
|
+
import { type VerifyPhoneDialogProps } from '../../ui-kit/VerifyPhoneDialogLayout/VerfiyPhoneDialogLayout';
|
|
3
|
+
import { type Nullable } from '../../utils/Nullable';
|
|
4
|
+
import { type MarketingInfo } from '../api/updateUserTask';
|
|
5
|
+
import { type LeadFormState } from './LeadFormState';
|
|
6
|
+
import { type ReferalData } from './ReferalData';
|
|
7
|
+
|
|
8
|
+
export interface UserData {
|
|
9
|
+
participantId: string | number;
|
|
10
|
+
taskId: number;
|
|
11
|
+
profileId?: Nullable<number>;
|
|
12
|
+
userId?: Nullable<string | number>;
|
|
13
|
+
programId: string;
|
|
14
|
+
formData: LeadFormState;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ProductType = 'credit' | 'creditCard' | 'debitCard';
|
|
18
|
+
|
|
19
|
+
export interface CommonLeadProps {
|
|
20
|
+
programId: string;
|
|
21
|
+
userId?: string | number;
|
|
22
|
+
productType: ProductType;
|
|
23
|
+
sendAspects: (userId: string | number, taskId: number) => void;
|
|
24
|
+
verifyPhoneDialog: {
|
|
25
|
+
open: (props: VerifyPhoneDialogProps, options?: Partial<DialogOptions>) => void;
|
|
26
|
+
close: () => void;
|
|
27
|
+
};
|
|
28
|
+
handleFailSendForm: () => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface TaskDataProps {
|
|
32
|
+
participantId: string | number;
|
|
33
|
+
formData: LeadFormState;
|
|
34
|
+
referalData: ReferalData | null;
|
|
35
|
+
marketingInfo: MarketingInfo | null;
|
|
36
|
+
saveUserData: (userData: UserData) => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface BaseUpdateUserDataProps {
|
|
40
|
+
programId: string;
|
|
41
|
+
formData: LeadFormState;
|
|
42
|
+
productType: ProductType;
|
|
43
|
+
referalData: ReferalData | null;
|
|
44
|
+
marketingInfo: MarketingInfo | null;
|
|
45
|
+
saveUserData: (userData: UserData) => void;
|
|
46
|
+
sendAspects: (userId: string | number, taskId: number) => void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UpdateUserDataProps extends BaseUpdateUserDataProps {
|
|
50
|
+
profileId: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface UpdateUserDataNewMicroserviceProps extends BaseUpdateUserDataProps {
|
|
54
|
+
participantId: string | number;
|
|
55
|
+
userId?: string | number;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DraftTaskType = 'credit' | 'card' | 'debit';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ProductType } from '
|
|
1
|
+
import { type ProductType } from '../model/ApplicationLeadFormTypes';
|
|
2
2
|
import { limitedBirthdayValidator, type LimitedBirthdayValidationParams } from './validators';
|
|
3
3
|
|
|
4
4
|
const limitedBirthdayValidationData: Record<ProductType, LimitedBirthdayValidationParams> = {
|