@redneckz/wildless-cms-uni-blocks 0.14.708 → 0.14.710
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/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/bundle/bundle.umd.js +345 -364
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/bundle/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/bundle/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/bundle/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/bundle/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/bundle/hooks/useRetailFormStore.d.ts +33 -0
- package/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/dist/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardForm.js +3 -2
- package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/formStateMap.js +1 -4
- package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/dist/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/dist/components/CreditCardForm/getInitialFormState.js +8 -11
- package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +32 -34
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.js +3 -2
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/dist/components/CreditForm/CreditFormStep.js +9 -14
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/PendingStatusContent.js +2 -2
- package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditForm/ReworkStatusContent.js +2 -2
- package/dist/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/dist/components/CreditForm/SuccessStatusContent.js +2 -2
- package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/dist/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/dist/components/CreditForm/getInitialFormState.js +8 -11
- package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/dist/components/CreditForm/useCreditFormAPI.js +32 -39
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/hooks/useRetailFormStore.d.ts +33 -0
- package/{mobile/dist/hooks/useCreditFormStore.js → dist/hooks/useRetailFormStore.js} +4 -4
- package/dist/hooks/useRetailFormStore.js.map +1 -0
- package/dist/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +2 -2
- package/dist/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/dist/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/lib/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardForm.js +3 -2
- package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/lib/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/formStateMap.js +1 -4
- package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/lib/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/lib/components/CreditCardForm/getInitialFormState.js +8 -11
- package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +33 -35
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.js +3 -2
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/lib/components/CreditForm/CreditFormStep.js +9 -14
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/PendingStatusContent.js +2 -2
- package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditForm/ReworkStatusContent.js +2 -2
- package/lib/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/lib/components/CreditForm/SuccessStatusContent.js +2 -2
- package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/lib/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/lib/components/CreditForm/getInitialFormState.js +8 -11
- package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/lib/components/CreditForm/useCreditFormAPI.js +33 -40
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/hooks/useRetailFormStore.d.ts +33 -0
- package/lib/hooks/{useCreditFormStore.js → useRetailFormStore.js} +2 -2
- package/lib/hooks/useRetailFormStore.js.map +1 -0
- package/lib/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +2 -2
- package/lib/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/lib/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +345 -364
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/mobile/bundle/hooks/useRetailFormStore.d.ts +33 -0
- package/mobile/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js +3 -2
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -4
- package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js +8 -11
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +32 -34
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.js +3 -2
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/mobile/dist/components/CreditForm/CreditFormStep.js +9 -14
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/PendingStatusContent.js +2 -2
- package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/ReworkStatusContent.js +2 -2
- package/mobile/dist/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js +2 -2
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/mobile/dist/components/CreditForm/getInitialFormState.js +8 -11
- package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +32 -39
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/hooks/useRetailFormStore.d.ts +33 -0
- package/{dist/hooks/useCreditFormStore.js → mobile/dist/hooks/useRetailFormStore.js} +4 -4
- package/mobile/dist/hooks/useRetailFormStore.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js +3 -2
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -4
- package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js +8 -11
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +33 -35
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.js +3 -2
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/mobile/lib/components/CreditForm/CreditFormStep.js +9 -14
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/PendingStatusContent.js +2 -2
- package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/ReworkStatusContent.js +2 -2
- package/mobile/lib/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js +2 -2
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/mobile/lib/components/CreditForm/getInitialFormState.js +8 -11
- package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +33 -40
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/hooks/useRetailFormStore.d.ts +33 -0
- package/mobile/lib/hooks/{useCreditFormStore.js → useRetailFormStore.js} +2 -2
- package/mobile/lib/hooks/useRetailFormStore.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/src/api/RetailAPI/utils/getOrganizationParams.ts +9 -3
- package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -4
- package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +4 -3
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +2 -2
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +12 -16
- package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +2 -3
- package/mobile/src/components/CreditCardForm/ReworkStatusContent.tsx +2 -3
- package/mobile/src/components/CreditCardForm/SuccessStatusContent.tsx +2 -3
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -4
- package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +8 -12
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +65 -84
- package/mobile/src/components/CreditForm/CreditForm.tsx +5 -4
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +2 -2
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +15 -19
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +2 -3
- package/mobile/src/components/CreditForm/ReworkStatusContent.tsx +2 -3
- package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +2 -3
- package/mobile/src/components/CreditForm/getInitialFormState.tsx +8 -12
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +65 -88
- package/mobile/src/hooks/useRetailFormStore.tsx +29 -0
- package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +7 -9
- package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +7 -7
- package/mobile/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/OrganizationField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +18 -17
- package/package.json +1 -1
- package/src/api/RetailAPI/utils/getOrganizationParams.ts +9 -3
- package/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -4
- package/src/components/CreditCardForm/CreditCardForm.tsx +4 -3
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +2 -2
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +12 -16
- package/src/components/CreditCardForm/PendingStatusContent.tsx +2 -3
- package/src/components/CreditCardForm/ReworkStatusContent.tsx +2 -3
- package/src/components/CreditCardForm/SuccessStatusContent.tsx +2 -3
- package/src/components/CreditCardForm/formStateMap.tsx +1 -4
- package/src/components/CreditCardForm/getInitialFormState.tsx +8 -12
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +65 -84
- package/src/components/CreditForm/CreditForm.tsx +5 -4
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +2 -2
- package/src/components/CreditForm/CreditFormStep.tsx +15 -19
- package/src/components/CreditForm/PendingStatusContent.tsx +2 -3
- package/src/components/CreditForm/ReworkStatusContent.tsx +2 -3
- package/src/components/CreditForm/SuccessStatusContent.tsx +2 -3
- package/src/components/CreditForm/getInitialFormState.tsx +8 -12
- package/src/components/CreditForm/useCreditFormAPI.tsx +65 -88
- package/src/hooks/useRetailFormStore.tsx +29 -0
- package/src/icons/IconName.ts +4 -4
- package/src/ui-kit/DraftDialog/DraftDialog.tsx +7 -9
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +7 -7
- package/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/InnField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/OrganizationField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +2 -2
- package/src/ui-kit/FormField/updateOrganizationFields.ts +18 -17
- package/bundle/hooks/useCreditFormStore.d.ts +0 -13
- package/dist/hooks/useCreditFormStore.d.ts +0 -13
- package/dist/hooks/useCreditFormStore.js.map +0 -1
- package/lib/hooks/useCreditFormStore.d.ts +0 -13
- package/lib/hooks/useCreditFormStore.js.map +0 -1
- package/mobile/bundle/hooks/useCreditFormStore.d.ts +0 -13
- package/mobile/dist/hooks/useCreditFormStore.d.ts +0 -13
- package/mobile/dist/hooks/useCreditFormStore.js.map +0 -1
- package/mobile/lib/hooks/useCreditFormStore.d.ts +0 -13
- package/mobile/lib/hooks/useCreditFormStore.js.map +0 -1
- package/mobile/src/hooks/useCreditFormStore.tsx +0 -13
- package/src/hooks/useCreditFormStore.tsx +0 -13
|
@@ -2815,7 +2815,7 @@
|
|
|
2815
2815
|
return useStore(localStore, methods);
|
|
2816
2816
|
}
|
|
2817
2817
|
|
|
2818
|
-
const
|
|
2818
|
+
const useRetailFormStore = () => {
|
|
2819
2819
|
return useLocalStore();
|
|
2820
2820
|
};
|
|
2821
2821
|
|
|
@@ -2831,7 +2831,7 @@
|
|
|
2831
2831
|
|
|
2832
2832
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
2833
2833
|
const { data } = useLeadFormData('EMPLOYEES_NUMBER');
|
|
2834
|
-
const store =
|
|
2834
|
+
const store = useRetailFormStore();
|
|
2835
2835
|
useEffect(() => {
|
|
2836
2836
|
if (data) {
|
|
2837
2837
|
store.amountWorkers = data;
|
|
@@ -3667,7 +3667,7 @@
|
|
|
3667
3667
|
|
|
3668
3668
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
3669
3669
|
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
3670
|
-
const store =
|
|
3670
|
+
const store = useRetailFormStore();
|
|
3671
3671
|
useEffect(() => {
|
|
3672
3672
|
if (data) {
|
|
3673
3673
|
store.employerActivities = data;
|
|
@@ -3678,7 +3678,7 @@
|
|
|
3678
3678
|
|
|
3679
3679
|
const EmployerOrganizationField = JSX(({ field, input }) => {
|
|
3680
3680
|
const { data } = useLeadFormData('ORGANIZATION_KIND');
|
|
3681
|
-
const store =
|
|
3681
|
+
const store = useRetailFormStore();
|
|
3682
3682
|
useEffect(() => {
|
|
3683
3683
|
if (data) {
|
|
3684
3684
|
store.employerOrganization = data;
|
|
@@ -3805,7 +3805,10 @@
|
|
|
3805
3805
|
}
|
|
3806
3806
|
};
|
|
3807
3807
|
const getEmployeesNumberOption = (options, count) => {
|
|
3808
|
-
|
|
3808
|
+
if (!count) {
|
|
3809
|
+
return null;
|
|
3810
|
+
}
|
|
3811
|
+
const [option] = [options?.find((_) => count <= Number(_.description))].map((_) => ({
|
|
3809
3812
|
key: _?.key ?? '',
|
|
3810
3813
|
text: _?.value ?? '',
|
|
3811
3814
|
}));
|
|
@@ -3831,22 +3834,32 @@
|
|
|
3831
3834
|
}
|
|
3832
3835
|
return getOptionByKey('COMMERCIAL');
|
|
3833
3836
|
};
|
|
3834
|
-
const getOptionOp = (options) => (key) => options
|
|
3837
|
+
const getOptionOp = (options) => (key) => options
|
|
3838
|
+
.map((_) => ({ key: _.key, text: _.value }))
|
|
3839
|
+
.find((_) => _.key === key) ?? null;
|
|
3835
3840
|
|
|
3836
3841
|
const updateOrganizationFields = (store, field, item) => {
|
|
3837
|
-
const inn = item
|
|
3838
|
-
const okopf = Number(item.data?.opf?.code);
|
|
3839
|
-
const okved = item.data?.okved ?? '';
|
|
3842
|
+
const { okved, okopf, inn } = getOrganizationRequisites(item);
|
|
3840
3843
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
3841
3844
|
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3845
|
+
const organizationData = {
|
|
3846
|
+
amountWorkers: getEmployeesNumberOption(store?.amountWorkers, item.data?.employee_count),
|
|
3847
|
+
employerActivities: getOrganizationActivityType(store?.employerActivities ?? [], okved),
|
|
3848
|
+
organization: getOrganizationType(store?.organization ?? [], okopf, inn),
|
|
3849
|
+
employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
|
|
3850
|
+
};
|
|
3851
|
+
for (const fieldName in organizationData) {
|
|
3852
|
+
organizationData[fieldName] && field?.(fieldName)?.onChange?.(organizationData[fieldName]);
|
|
3853
|
+
}
|
|
3846
3854
|
};
|
|
3855
|
+
const getOrganizationRequisites = (item) => ({
|
|
3856
|
+
inn: item.data?.inn ?? '',
|
|
3857
|
+
okopf: Number(item.data?.opf?.code),
|
|
3858
|
+
okved: item.data?.okved ?? '',
|
|
3859
|
+
});
|
|
3847
3860
|
|
|
3848
3861
|
const InnField = JSX(({ field, input }) => {
|
|
3849
|
-
const store =
|
|
3862
|
+
const store = useRetailFormStore();
|
|
3850
3863
|
const onDaDataChange = useCallback((item) => {
|
|
3851
3864
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
3852
3865
|
updateOrganizationFields(store, field, item);
|
|
@@ -3910,7 +3923,7 @@
|
|
|
3910
3923
|
|
|
3911
3924
|
const OrganizationField = JSX(({ field, input }) => {
|
|
3912
3925
|
const { data } = useLeadFormData('ORGANIZATION_TYPE');
|
|
3913
|
-
const store =
|
|
3926
|
+
const store = useRetailFormStore();
|
|
3914
3927
|
useEffect(() => {
|
|
3915
3928
|
if (data) {
|
|
3916
3929
|
store.organization = data;
|
|
@@ -3920,7 +3933,7 @@
|
|
|
3920
3933
|
});
|
|
3921
3934
|
|
|
3922
3935
|
const OrganizationNameField = JSX(({ field, input }) => {
|
|
3923
|
-
const store =
|
|
3936
|
+
const store = useRetailFormStore();
|
|
3924
3937
|
const onDaDataChange = useCallback((item) => {
|
|
3925
3938
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
3926
3939
|
updateOrganizationFields(store, field, item);
|
|
@@ -4780,18 +4793,6 @@
|
|
|
4780
4793
|
};
|
|
4781
4794
|
};
|
|
4782
4795
|
|
|
4783
|
-
const useLeadFormStore = () => useLocalStore();
|
|
4784
|
-
|
|
4785
|
-
const useSetter = (target, key) => useCallback((value) => {
|
|
4786
|
-
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
4787
|
-
if (newValue !== null && newValue !== undefined) {
|
|
4788
|
-
target[key] = newValue;
|
|
4789
|
-
}
|
|
4790
|
-
else {
|
|
4791
|
-
delete target[key];
|
|
4792
|
-
}
|
|
4793
|
-
}, [target, key]);
|
|
4794
|
-
|
|
4795
4796
|
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: { icon: icon, iconVersion: 'black' }, width: "78", height: "78" }), jsxs("div", { children: [jsx(Heading, { className: "text-left", title: title, headingType: "h5" }), description ? (jsx(Paragraph, { color: "text-secondary-text", size: "text-m", children: description })) : null] })] })));
|
|
4796
4797
|
|
|
4797
4798
|
const creditCodesToProgrammIdMap = {
|
|
@@ -4934,8 +4935,7 @@
|
|
|
4934
4935
|
};
|
|
4935
4936
|
|
|
4936
4937
|
const DraftDialog = JSX(function ({ task, isFromLead = false, onClose = noop, }) {
|
|
4937
|
-
const
|
|
4938
|
-
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
4938
|
+
const retailFormStore = useRetailFormStore();
|
|
4939
4939
|
const navigator = locationNavigator();
|
|
4940
4940
|
const { participants, creditProgram, id: taskId } = task;
|
|
4941
4941
|
const programmId = creditProgramCodeToProductIdMap[creditProgram.code];
|
|
@@ -4944,11 +4944,11 @@
|
|
|
4944
4944
|
const { name, midname, id: participantId, profile } = participants[0];
|
|
4945
4945
|
const handleGoToDraft = useCallback(() => {
|
|
4946
4946
|
const taskFromDraft = parseDraftTask(task);
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4947
|
+
retailFormStore.participantId = participantId;
|
|
4948
|
+
retailFormStore.taskId = taskId;
|
|
4949
|
+
retailFormStore.profileId = profile?.id;
|
|
4950
|
+
retailFormStore.programId = programmId;
|
|
4951
|
+
retailFormStore.leadForm = taskFromDraft;
|
|
4952
4952
|
navigator.assign(nextStepLink);
|
|
4953
4953
|
}, []);
|
|
4954
4954
|
const handleGoToNewTask = useCallback(() => {
|
|
@@ -4986,7 +4986,7 @@
|
|
|
4986
4986
|
|
|
4987
4987
|
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
4988
4988
|
const navigator = locationNavigator();
|
|
4989
|
-
const
|
|
4989
|
+
const retailFormStore = useRetailFormStore();
|
|
4990
4990
|
const handleAuth = useCallback(async () => {
|
|
4991
4991
|
const resp = await getLink({
|
|
4992
4992
|
redirectUri: navigator.href,
|
|
@@ -4996,10 +4996,10 @@
|
|
|
4996
4996
|
}
|
|
4997
4997
|
}, []);
|
|
4998
4998
|
const handleClose = useCallback(() => {
|
|
4999
|
-
if (leadForm
|
|
5000
|
-
const
|
|
5001
|
-
|
|
5002
|
-
|
|
4999
|
+
if (retailFormStore.leadForm) {
|
|
5000
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
5001
|
+
delete leadForm.esiaAccountTypeCd;
|
|
5002
|
+
retailFormStore.leadForm = leadForm;
|
|
5003
5003
|
}
|
|
5004
5004
|
onClose?.();
|
|
5005
5005
|
}, []);
|
|
@@ -5113,15 +5113,16 @@
|
|
|
5113
5113
|
};
|
|
5114
5114
|
};
|
|
5115
5115
|
|
|
5116
|
+
const useLeadFormStore = () => useLocalStore();
|
|
5117
|
+
|
|
5116
5118
|
const useSaveUserData = () => {
|
|
5117
5119
|
const leadFormStore = useLeadFormStore();
|
|
5118
|
-
const
|
|
5119
|
-
const saveUserData = useCallback(({ participantId, taskId, profileId, formData, programId: programNumber }) => {
|
|
5120
|
+
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber, formData }) => {
|
|
5120
5121
|
leadFormStore.participantId = participantId;
|
|
5121
5122
|
leadFormStore.taskId = taskId;
|
|
5122
5123
|
leadFormStore.profileId = profileId;
|
|
5123
5124
|
leadFormStore.programId = programNumber;
|
|
5124
|
-
|
|
5125
|
+
leadFormStore.leadForm = formData;
|
|
5125
5126
|
}, []);
|
|
5126
5127
|
return saveUserData;
|
|
5127
5128
|
};
|
|
@@ -5227,6 +5228,16 @@
|
|
|
5227
5228
|
|
|
5228
5229
|
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5229
5230
|
|
|
5231
|
+
const useSetter = (target, key) => useCallback((value) => {
|
|
5232
|
+
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
5233
|
+
if (newValue !== null && newValue !== undefined) {
|
|
5234
|
+
target[key] = newValue;
|
|
5235
|
+
}
|
|
5236
|
+
else {
|
|
5237
|
+
delete target[key];
|
|
5238
|
+
}
|
|
5239
|
+
}, [target, key]);
|
|
5240
|
+
|
|
5230
5241
|
const initialFormState = {
|
|
5231
5242
|
typeForm: '',
|
|
5232
5243
|
region: { key: '', text: '' },
|
|
@@ -6810,7 +6821,7 @@
|
|
|
6810
6821
|
const FailedStatusContent$1 = JSX(() => (jsx(CreditCardFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0412\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", description: "\u0412 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u0411\u0430\u043D\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C \u0412\u0430\u0448\u0443 \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0434\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u043F\u043E\u0437\u0436\u0435. \u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u0432 \u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB.", buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })));
|
|
6811
6822
|
|
|
6812
6823
|
const PendingStatusContent$1 = JSX(({ handleExpireTimer }) => {
|
|
6813
|
-
const
|
|
6824
|
+
const { statusInfo } = useRetailFormStore();
|
|
6814
6825
|
return (jsx(CreditCardFormStatus, { interval: 300, intervalExpireAction: handleExpireTimer, title: "\u0417\u0430\u044F\u0432\u043A\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430", description: "\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u043E\u043A\u043D\u043E, \u0441\u043A\u043E\u0440\u043E \u0441\u043E\u043E\u0431\u0449\u0438\u043C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442", sectionInfoTitle: "\u0417\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u0443", sectionInfo: [
|
|
6815
6826
|
{
|
|
6816
6827
|
label: 'Название продукта',
|
|
@@ -6824,7 +6835,7 @@
|
|
|
6824
6835
|
});
|
|
6825
6836
|
|
|
6826
6837
|
const ReworkStatusContent$1 = JSX(() => {
|
|
6827
|
-
const
|
|
6838
|
+
const { statusInfo } = useRetailFormStore();
|
|
6828
6839
|
return (jsx(CreditCardFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0432\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435, \u043D\u043E \u043D\u0430\u043C \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0434\u043B\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u044F \u0440\u0435\u0448\u0435\u043D\u0438\u044F", description: "\u041F\u043E\u0441\u0435\u0442\u0438\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430 \u0441 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u043C\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0438 \u0442\u0430\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u0430.", sectionAdditionalTitle: "\u0412 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0438 \u0411\u0430\u043D\u043A\u0430", sectionInfoAdditional: [
|
|
6829
6840
|
{
|
|
6830
6841
|
label: 'Регион',
|
|
@@ -6843,7 +6854,7 @@
|
|
|
6843
6854
|
});
|
|
6844
6855
|
|
|
6845
6856
|
const SuccessStatusContent$1 = JSX(() => {
|
|
6846
|
-
const
|
|
6857
|
+
const { statusInfo } = useRetailFormStore();
|
|
6847
6858
|
return (jsx(CreditCardFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo: [
|
|
6848
6859
|
{
|
|
6849
6860
|
label: 'Название продукта',
|
|
@@ -6874,7 +6885,7 @@
|
|
|
6874
6885
|
];
|
|
6875
6886
|
const CreditCardFormStatusTracker = JSX(() => {
|
|
6876
6887
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
6877
|
-
const
|
|
6888
|
+
const { taskId } = useRetailFormStore();
|
|
6878
6889
|
useEffect(() => {
|
|
6879
6890
|
(async () => {
|
|
6880
6891
|
for (const signalType of SIGNAL_TYPES$1) {
|
|
@@ -6903,117 +6914,6 @@
|
|
|
6903
6914
|
return statusesMap[status] || jsx(ReworkStatusContent$1, {});
|
|
6904
6915
|
};
|
|
6905
6916
|
|
|
6906
|
-
const formStateMap$1 = [
|
|
6907
|
-
{
|
|
6908
|
-
paymentSystem: { name: '', type: '' },
|
|
6909
|
-
currency: '810',
|
|
6910
|
-
codeWord: '',
|
|
6911
|
-
},
|
|
6912
|
-
{
|
|
6913
|
-
surname: '',
|
|
6914
|
-
name: '',
|
|
6915
|
-
middleName: '',
|
|
6916
|
-
sex: '',
|
|
6917
|
-
limitedBirthday: undefined,
|
|
6918
|
-
birthPlace: '',
|
|
6919
|
-
phone: '',
|
|
6920
|
-
email: '',
|
|
6921
|
-
dulSerie: undefined,
|
|
6922
|
-
dulNumber: undefined,
|
|
6923
|
-
dulIssueDateField: undefined,
|
|
6924
|
-
dulSubdivisionCode: '',
|
|
6925
|
-
dulIssuedBy: '',
|
|
6926
|
-
addressRegistration: {
|
|
6927
|
-
fullAddress: '',
|
|
6928
|
-
fiasCode: '',
|
|
6929
|
-
},
|
|
6930
|
-
participantDateRegistration: undefined,
|
|
6931
|
-
addressFact: {
|
|
6932
|
-
fullAddress: '',
|
|
6933
|
-
fiasCode: '',
|
|
6934
|
-
},
|
|
6935
|
-
housing: undefined,
|
|
6936
|
-
methodObtain: 'office',
|
|
6937
|
-
addressCourier: {
|
|
6938
|
-
fullAddress: '',
|
|
6939
|
-
fiasCode: '',
|
|
6940
|
-
},
|
|
6941
|
-
},
|
|
6942
|
-
{
|
|
6943
|
-
amountWorkers: { key: '', text: '' },
|
|
6944
|
-
beginDate: undefined,
|
|
6945
|
-
employerActivities: { key: '', text: '' },
|
|
6946
|
-
employerOrganization: { key: '', text: '' },
|
|
6947
|
-
employment: { key: '', text: '' },
|
|
6948
|
-
experience5Years: undefined,
|
|
6949
|
-
inn: undefined,
|
|
6950
|
-
jobsNumber: undefined,
|
|
6951
|
-
lastJobExperience: undefined,
|
|
6952
|
-
legalForm: '',
|
|
6953
|
-
organization: { key: '', text: '' },
|
|
6954
|
-
organizationAddress: {
|
|
6955
|
-
fullAddress: '',
|
|
6956
|
-
fiasCode: '',
|
|
6957
|
-
},
|
|
6958
|
-
organizationName: '',
|
|
6959
|
-
organizationPhone: '',
|
|
6960
|
-
partInBusiness: undefined,
|
|
6961
|
-
positionOrganization: { key: '', text: '' },
|
|
6962
|
-
},
|
|
6963
|
-
{
|
|
6964
|
-
familyStatus: { key: '', text: '' },
|
|
6965
|
-
dependents: undefined,
|
|
6966
|
-
familyMembers: undefined,
|
|
6967
|
-
confirmationIncome: { key: '', text: '' },
|
|
6968
|
-
wages: undefined,
|
|
6969
|
-
mandatoryPayments: undefined,
|
|
6970
|
-
snils: '',
|
|
6971
|
-
armyIdFlg: false,
|
|
6972
|
-
},
|
|
6973
|
-
{
|
|
6974
|
-
disablePeopleFlg: false,
|
|
6975
|
-
bankruptcyFlg: false,
|
|
6976
|
-
shareholderFlg: false,
|
|
6977
|
-
legalEntityName: '',
|
|
6978
|
-
creditInRshbCd: undefined,
|
|
6979
|
-
},
|
|
6980
|
-
{
|
|
6981
|
-
regionRetail: { key: '', text: '' },
|
|
6982
|
-
addressRetail: {
|
|
6983
|
-
key: '',
|
|
6984
|
-
text: '',
|
|
6985
|
-
},
|
|
6986
|
-
bankEmployeeCode: undefined,
|
|
6987
|
-
addressCourier: {
|
|
6988
|
-
fullAddress: '',
|
|
6989
|
-
fiasCode: '',
|
|
6990
|
-
},
|
|
6991
|
-
methodObtain: 'office',
|
|
6992
|
-
deliveryDate: undefined,
|
|
6993
|
-
},
|
|
6994
|
-
];
|
|
6995
|
-
|
|
6996
|
-
const getInitialFormState$1 = (step, localStorageData) => ({
|
|
6997
|
-
...formStateMap$1[step],
|
|
6998
|
-
...localStorageData,
|
|
6999
|
-
limitedBirthday: transformStringToData$1(localStorageData?.limitedBirthday),
|
|
7000
|
-
dulIssueDateField: transformStringToData$1(localStorageData?.dulIssueDateField),
|
|
7001
|
-
participantDateRegistration: transformStringToData$1(localStorageData?.participantDateRegistration),
|
|
7002
|
-
beginDate: transformStringToData$1(localStorageData?.beginDate),
|
|
7003
|
-
deliveryDate: transformStringToData$1(localStorageData?.deliveryDate),
|
|
7004
|
-
});
|
|
7005
|
-
const transformStringToData$1 = (text) => {
|
|
7006
|
-
if (!text) {
|
|
7007
|
-
return undefined;
|
|
7008
|
-
}
|
|
7009
|
-
try {
|
|
7010
|
-
return new Date(text);
|
|
7011
|
-
}
|
|
7012
|
-
catch (_) {
|
|
7013
|
-
return undefined;
|
|
7014
|
-
}
|
|
7015
|
-
};
|
|
7016
|
-
|
|
7017
6917
|
const calculateInputs$1 = (getValue) => (inputs, step) => inputs
|
|
7018
6918
|
.filter((_) => _)
|
|
7019
6919
|
.map((_) => {
|
|
@@ -7244,20 +7144,139 @@
|
|
|
7244
7144
|
}
|
|
7245
7145
|
};
|
|
7246
7146
|
|
|
7247
|
-
const
|
|
7147
|
+
const formStateMap$1 = [
|
|
7148
|
+
{
|
|
7149
|
+
paymentSystem: { name: '', type: '' },
|
|
7150
|
+
currency: '810',
|
|
7151
|
+
codeWord: '',
|
|
7152
|
+
},
|
|
7153
|
+
{
|
|
7154
|
+
surname: '',
|
|
7155
|
+
name: '',
|
|
7156
|
+
middleName: '',
|
|
7157
|
+
sex: '',
|
|
7158
|
+
limitedBirthday: undefined,
|
|
7159
|
+
birthPlace: '',
|
|
7160
|
+
phone: '',
|
|
7161
|
+
email: '',
|
|
7162
|
+
dulSerie: undefined,
|
|
7163
|
+
dulNumber: undefined,
|
|
7164
|
+
dulIssueDateField: undefined,
|
|
7165
|
+
dulSubdivisionCode: '',
|
|
7166
|
+
dulIssuedBy: '',
|
|
7167
|
+
addressRegistration: {
|
|
7168
|
+
fullAddress: '',
|
|
7169
|
+
fiasCode: '',
|
|
7170
|
+
},
|
|
7171
|
+
participantDateRegistration: undefined,
|
|
7172
|
+
addressFact: {
|
|
7173
|
+
fullAddress: '',
|
|
7174
|
+
fiasCode: '',
|
|
7175
|
+
},
|
|
7176
|
+
housing: undefined,
|
|
7177
|
+
methodObtain: 'office',
|
|
7178
|
+
addressCourier: {
|
|
7179
|
+
fullAddress: '',
|
|
7180
|
+
fiasCode: '',
|
|
7181
|
+
},
|
|
7182
|
+
},
|
|
7183
|
+
{
|
|
7184
|
+
amountWorkers: { key: '', text: '' },
|
|
7185
|
+
beginDate: undefined,
|
|
7186
|
+
employerActivities: { key: '', text: '' },
|
|
7187
|
+
employerOrganization: { key: '', text: '' },
|
|
7188
|
+
employment: { key: '', text: '' },
|
|
7189
|
+
experience5Years: undefined,
|
|
7190
|
+
inn: undefined,
|
|
7191
|
+
jobsNumber: undefined,
|
|
7192
|
+
lastJobExperience: undefined,
|
|
7193
|
+
legalForm: '',
|
|
7194
|
+
organization: { key: '', text: '' },
|
|
7195
|
+
organizationAddress: {
|
|
7196
|
+
fullAddress: '',
|
|
7197
|
+
fiasCode: '',
|
|
7198
|
+
},
|
|
7199
|
+
organizationName: '',
|
|
7200
|
+
organizationPhone: '',
|
|
7201
|
+
partInBusiness: undefined,
|
|
7202
|
+
positionOrganization: { key: '', text: '' },
|
|
7203
|
+
},
|
|
7204
|
+
{
|
|
7205
|
+
familyStatus: { key: '', text: '' },
|
|
7206
|
+
dependents: undefined,
|
|
7207
|
+
familyMembers: undefined,
|
|
7208
|
+
confirmationIncome: { key: '', text: '' },
|
|
7209
|
+
wages: undefined,
|
|
7210
|
+
mandatoryPayments: undefined,
|
|
7211
|
+
snils: '',
|
|
7212
|
+
armyIdFlg: false,
|
|
7213
|
+
},
|
|
7214
|
+
{
|
|
7215
|
+
disablePeopleFlg: false,
|
|
7216
|
+
bankruptcyFlg: false,
|
|
7217
|
+
shareholderFlg: false,
|
|
7218
|
+
legalEntityName: '',
|
|
7219
|
+
creditInRshbCd: undefined,
|
|
7220
|
+
},
|
|
7221
|
+
{
|
|
7222
|
+
regionRetail: { key: '', text: '' },
|
|
7223
|
+
addressRetail: { key: '', text: '' },
|
|
7224
|
+
bankEmployeeCode: undefined,
|
|
7225
|
+
addressCourier: {
|
|
7226
|
+
fullAddress: '',
|
|
7227
|
+
fiasCode: '',
|
|
7228
|
+
},
|
|
7229
|
+
methodObtain: 'office',
|
|
7230
|
+
deliveryDate: undefined,
|
|
7231
|
+
},
|
|
7232
|
+
];
|
|
7233
|
+
|
|
7234
|
+
const getInitialFormState$1 = (step, formState) => ({
|
|
7235
|
+
...formStateMap$1[step],
|
|
7236
|
+
...formState,
|
|
7237
|
+
limitedBirthday: transformStringToData$1(formState?.limitedBirthday),
|
|
7238
|
+
dulIssueDateField: transformStringToData$1(formState?.dulIssueDateField),
|
|
7239
|
+
participantDateRegistration: transformStringToData$1(formState?.participantDateRegistration),
|
|
7240
|
+
beginDate: transformStringToData$1(formState?.beginDate),
|
|
7241
|
+
deliveryDate: transformStringToData$1(formState?.deliveryDate),
|
|
7242
|
+
});
|
|
7243
|
+
const transformStringToData$1 = (text) => {
|
|
7244
|
+
try {
|
|
7245
|
+
return text ? new Date(text) : undefined;
|
|
7246
|
+
}
|
|
7247
|
+
catch (_) {
|
|
7248
|
+
return undefined;
|
|
7249
|
+
}
|
|
7250
|
+
};
|
|
7251
|
+
|
|
7252
|
+
const useCreditCardFormAPI = ({ step, inputs, onNextStep, onFinish, }) => {
|
|
7248
7253
|
const isFinalStep = step === 5;
|
|
7249
|
-
const
|
|
7250
|
-
const
|
|
7251
|
-
const
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
+
const retailFormStore = useRetailFormStore();
|
|
7255
|
+
const initialState = useMemo(() => getInitialFormState$1(step, retailFormStore.leadForm), [step, retailFormStore.leadForm]);
|
|
7256
|
+
const resetForm = useCallback((response) => {
|
|
7257
|
+
const { leadForm } = retailFormStore;
|
|
7258
|
+
if (isFinalStep && response.ok && leadForm) {
|
|
7259
|
+
retailFormStore.statusInfo = {
|
|
7260
|
+
regionRetail: leadForm?.regionRetail?.text,
|
|
7261
|
+
addressRetail: leadForm?.addressRetail?.text,
|
|
7262
|
+
cardCategory: leadForm?.cardCategory?.text,
|
|
7263
|
+
calculator: {
|
|
7264
|
+
monthsValue: leadForm?.calculator?.monthsValue,
|
|
7265
|
+
moneyValue: leadForm?.calculator?.moneyValue,
|
|
7266
|
+
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
7267
|
+
},
|
|
7268
|
+
};
|
|
7269
|
+
retailFormStore.leadForm = initialState;
|
|
7270
|
+
}
|
|
7271
|
+
}, [isFinalStep, initialState]);
|
|
7254
7272
|
const handleSubmit = useCallback(async (formData) => {
|
|
7255
7273
|
const feedbackValidator = objectValidator(getObjectValidator(calculateInputs$1(getValue$2(formData))(inputs, step)));
|
|
7256
7274
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
7257
|
-
return
|
|
7275
|
+
return;
|
|
7258
7276
|
}
|
|
7259
|
-
|
|
7277
|
+
retailFormStore.leadForm = formData;
|
|
7260
7278
|
try {
|
|
7279
|
+
const { taskId, profileId, participantId } = retailFormStore;
|
|
7261
7280
|
if (taskId && profileId && participantId) {
|
|
7262
7281
|
const response = await updateUserTask(getCreditCardFormTaskData({
|
|
7263
7282
|
participantId,
|
|
@@ -7266,53 +7285,31 @@
|
|
|
7266
7285
|
step,
|
|
7267
7286
|
formData: formData,
|
|
7268
7287
|
}));
|
|
7269
|
-
resetForm
|
|
7288
|
+
resetForm(response);
|
|
7289
|
+
}
|
|
7290
|
+
onNextStep();
|
|
7291
|
+
if (isFinalStep) {
|
|
7292
|
+
onFinish?.();
|
|
7270
7293
|
}
|
|
7271
7294
|
}
|
|
7272
7295
|
catch (ex) {
|
|
7273
|
-
|
|
7274
|
-
}
|
|
7275
|
-
onNextStep();
|
|
7276
|
-
if (isFinalStep) {
|
|
7277
|
-
finishForm?.(true);
|
|
7296
|
+
// Do nothing
|
|
7278
7297
|
}
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
return {
|
|
7282
|
-
handleSubmit,
|
|
7283
|
-
};
|
|
7284
|
-
};
|
|
7285
|
-
const resetForm$1 = ({ isFinalStep, response, leadForm, setStatusInfo, }) => {
|
|
7286
|
-
if (isFinalStep && response.ok && leadForm) {
|
|
7287
|
-
const regionRetail = leadForm?.regionRetail?.text;
|
|
7288
|
-
const addressRetail = leadForm?.addressRetail?.text;
|
|
7289
|
-
const cardCategory = leadForm?.cardCategory?.text;
|
|
7290
|
-
const calculator = {
|
|
7291
|
-
monthsValue: leadForm?.calculator?.monthsValue,
|
|
7292
|
-
moneyValue: leadForm?.calculator?.moneyValue,
|
|
7293
|
-
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
7294
|
-
};
|
|
7295
|
-
setStatusInfo({ regionRetail, addressRetail, cardCategory, calculator });
|
|
7296
|
-
globalThis.localStorage.removeItem('leadForm');
|
|
7297
|
-
}
|
|
7298
|
+
}, [isFinalStep, resetForm]);
|
|
7299
|
+
return [initialState, handleSubmit];
|
|
7298
7300
|
};
|
|
7299
7301
|
const getValue$2 = (formData) => (name) => formData[name];
|
|
7300
7302
|
|
|
7301
|
-
const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep,
|
|
7302
|
-
const
|
|
7303
|
-
const initialState =
|
|
7304
|
-
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
7305
|
-
const { handleSubmit } = useCreditCardFormAPI({
|
|
7303
|
+
const CreditCardFormStep = JSX(({ step, sections, isFormFinished, onPrevStep, onNextStep, onFinish }) => {
|
|
7304
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
7305
|
+
const [initialState, onSubmit] = useCreditCardFormAPI({
|
|
7306
7306
|
step,
|
|
7307
7307
|
inputs,
|
|
7308
7308
|
onNextStep,
|
|
7309
|
-
|
|
7310
|
-
finishForm,
|
|
7311
|
-
});
|
|
7312
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
7313
|
-
onSubmit: handleSubmit,
|
|
7309
|
+
onFinish,
|
|
7314
7310
|
});
|
|
7315
|
-
|
|
7311
|
+
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
7312
|
+
return isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step }), jsx(StepsNavigationButtons$1, { step: step, onPrevStep: onPrevStep })] }));
|
|
7316
7313
|
});
|
|
7317
7314
|
|
|
7318
7315
|
/* eslint-disable max-lines */
|
|
@@ -7688,8 +7685,8 @@
|
|
|
7688
7685
|
scrollToTop();
|
|
7689
7686
|
}, []);
|
|
7690
7687
|
const sections = useMemo(() => stepsSectionsMap$1[step], [step]);
|
|
7691
|
-
const [isFormFinished,
|
|
7692
|
-
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isFormFinished ? null : (jsx(CreditCardFormProgress, { stepsTitles: TITLES, step: step, totalSteps: STEPS$1 })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditCardFormStep, { step: step, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep,
|
|
7688
|
+
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
7689
|
+
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isFormFinished ? null : (jsx(CreditCardFormProgress, { stepsTitles: TITLES, step: step, totalSteps: STEPS$1 })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditCardFormStep, { step: step, sections: sections, isFormFinished: isFormFinished, onNextStep: handleNextStep, onPrevStep: handlePrevStep, onFinish: handleFinish }, String(step)) })] }) }));
|
|
7693
7690
|
});
|
|
7694
7691
|
|
|
7695
7692
|
const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
|
|
@@ -7716,7 +7713,7 @@
|
|
|
7716
7713
|
const FailedStatusContent = JSX(() => (jsx(CreditFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0412\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", description: "\u0412 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u0411\u0430\u043D\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C \u0412\u0430\u0448\u0443 \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0434\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u043F\u043E\u0437\u0436\u0435. \u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u0432 \u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB.", buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })));
|
|
7717
7714
|
|
|
7718
7715
|
const PendingStatusContent = JSX(({ handleExpireTimer }) => {
|
|
7719
|
-
const
|
|
7716
|
+
const { statusInfo } = useRetailFormStore();
|
|
7720
7717
|
return (jsx(CreditFormStatus, { interval: 300, intervalExpireAction: handleExpireTimer, title: "\u0417\u0430\u044F\u0432\u043A\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430", description: "\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u043E\u043A\u043D\u043E, \u0441\u043A\u043E\u0440\u043E \u0441\u043E\u043E\u0431\u0449\u0438\u043C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442", sectionInfoTitle: "\u0417\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u0443", sectionInfo: [
|
|
7721
7718
|
{
|
|
7722
7719
|
label: 'Название продукта',
|
|
@@ -7742,7 +7739,7 @@
|
|
|
7742
7739
|
});
|
|
7743
7740
|
|
|
7744
7741
|
const ReworkStatusContent = JSX(() => {
|
|
7745
|
-
const
|
|
7742
|
+
const { statusInfo } = useRetailFormStore();
|
|
7746
7743
|
return (jsx(CreditFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0432\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435, \u043D\u043E \u043D\u0430\u043C \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0434\u043B\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u044F \u0440\u0435\u0448\u0435\u043D\u0438\u044F", description: "\u041F\u043E\u0441\u0435\u0442\u0438\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430 \u0441 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u043C\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0438 \u0442\u0430\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u0430.", sectionAdditionalTitle: "\u0412 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0438 \u0411\u0430\u043D\u043A\u0430", sectionInfoAdditional: [
|
|
7747
7744
|
{
|
|
7748
7745
|
label: 'Регион',
|
|
@@ -7761,7 +7758,7 @@
|
|
|
7761
7758
|
});
|
|
7762
7759
|
|
|
7763
7760
|
const SuccessStatusContent = JSX(() => {
|
|
7764
|
-
const
|
|
7761
|
+
const { statusInfo } = useRetailFormStore();
|
|
7765
7762
|
return (jsx(CreditFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo: [
|
|
7766
7763
|
{
|
|
7767
7764
|
label: 'Название продукта',
|
|
@@ -7792,7 +7789,7 @@
|
|
|
7792
7789
|
];
|
|
7793
7790
|
const CreditFormStatusTracker = JSX(() => {
|
|
7794
7791
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
7795
|
-
const
|
|
7792
|
+
const { taskId } = useRetailFormStore();
|
|
7796
7793
|
useEffect(() => {
|
|
7797
7794
|
(async () => {
|
|
7798
7795
|
for (const signalType of SIGNAL_TYPES) {
|
|
@@ -7821,109 +7818,6 @@
|
|
|
7821
7818
|
return statusesMap[status] || jsx(ReworkStatusContent, {});
|
|
7822
7819
|
};
|
|
7823
7820
|
|
|
7824
|
-
const formStateMap = [
|
|
7825
|
-
{
|
|
7826
|
-
calculator: {
|
|
7827
|
-
moneyValue: 0,
|
|
7828
|
-
monthsValue: 0,
|
|
7829
|
-
isAnnuity: false,
|
|
7830
|
-
isInsurance: false,
|
|
7831
|
-
isSalaryClient: false,
|
|
7832
|
-
isPensionClient: false,
|
|
7833
|
-
isStateEmployee: false,
|
|
7834
|
-
},
|
|
7835
|
-
},
|
|
7836
|
-
{
|
|
7837
|
-
surname: '',
|
|
7838
|
-
name: '',
|
|
7839
|
-
middleName: '',
|
|
7840
|
-
sex: '',
|
|
7841
|
-
limitedBirthday: undefined,
|
|
7842
|
-
birthPlace: '',
|
|
7843
|
-
phone: '',
|
|
7844
|
-
email: '',
|
|
7845
|
-
dulSerie: undefined,
|
|
7846
|
-
dulNumber: undefined,
|
|
7847
|
-
dulIssueDateField: undefined,
|
|
7848
|
-
dulSubdivisionCode: '',
|
|
7849
|
-
dulIssuedBy: '',
|
|
7850
|
-
addressRegistration: {
|
|
7851
|
-
fullAddress: '',
|
|
7852
|
-
fiasCode: '',
|
|
7853
|
-
},
|
|
7854
|
-
participantDateRegistration: undefined,
|
|
7855
|
-
addressFact: {
|
|
7856
|
-
fullAddress: '',
|
|
7857
|
-
fiasCode: '',
|
|
7858
|
-
},
|
|
7859
|
-
housing: undefined,
|
|
7860
|
-
},
|
|
7861
|
-
{
|
|
7862
|
-
amountWorkers: { key: '', text: '' },
|
|
7863
|
-
beginDate: undefined,
|
|
7864
|
-
employerActivities: { key: '', text: '' },
|
|
7865
|
-
employerOrganization: { key: '', text: '' },
|
|
7866
|
-
employment: { key: '', text: '' },
|
|
7867
|
-
experience5Years: undefined,
|
|
7868
|
-
inn: undefined,
|
|
7869
|
-
jobsNumber: undefined,
|
|
7870
|
-
lastJobExperience: undefined,
|
|
7871
|
-
legalForm: '',
|
|
7872
|
-
organization: { key: '', text: '' },
|
|
7873
|
-
organizationAddress: {
|
|
7874
|
-
fullAddress: '',
|
|
7875
|
-
fiasCode: '',
|
|
7876
|
-
},
|
|
7877
|
-
organizationName: '',
|
|
7878
|
-
organizationPhone: '',
|
|
7879
|
-
partInBusiness: undefined,
|
|
7880
|
-
positionOrganization: { key: '', text: '' },
|
|
7881
|
-
},
|
|
7882
|
-
{
|
|
7883
|
-
familyStatus: { key: '', text: '' },
|
|
7884
|
-
dependents: undefined,
|
|
7885
|
-
familyMembers: undefined,
|
|
7886
|
-
confirmationIncome: { key: '', text: '' },
|
|
7887
|
-
wages: undefined,
|
|
7888
|
-
mandatoryPayments: undefined,
|
|
7889
|
-
snils: '',
|
|
7890
|
-
armyIdFlg: false,
|
|
7891
|
-
},
|
|
7892
|
-
{
|
|
7893
|
-
disablePeopleFlg: false,
|
|
7894
|
-
bankruptcyFlg: false,
|
|
7895
|
-
shareholderFlg: false,
|
|
7896
|
-
legalEntityName: '',
|
|
7897
|
-
creditInRshbCd: undefined,
|
|
7898
|
-
},
|
|
7899
|
-
{
|
|
7900
|
-
regionRetail: { key: '', text: '' },
|
|
7901
|
-
addressRetail: undefined,
|
|
7902
|
-
bankEmployeeCode: undefined,
|
|
7903
|
-
},
|
|
7904
|
-
];
|
|
7905
|
-
|
|
7906
|
-
const getInitialFormState = (step, localStorageData) => ({
|
|
7907
|
-
...formStateMap[step],
|
|
7908
|
-
...localStorageData,
|
|
7909
|
-
limitedBirthday: transformStringToData(localStorageData?.limitedBirthday),
|
|
7910
|
-
dulIssueDateField: transformStringToData(localStorageData?.dulIssueDateField),
|
|
7911
|
-
participantDateRegistration: transformStringToData(localStorageData?.participantDateRegistration),
|
|
7912
|
-
beginDate: transformStringToData(localStorageData?.beginDate),
|
|
7913
|
-
deliveryDate: transformStringToData(localStorageData?.deliveryDate),
|
|
7914
|
-
});
|
|
7915
|
-
const transformStringToData = (text) => {
|
|
7916
|
-
if (!text) {
|
|
7917
|
-
return undefined;
|
|
7918
|
-
}
|
|
7919
|
-
try {
|
|
7920
|
-
return new Date(text);
|
|
7921
|
-
}
|
|
7922
|
-
catch (_) {
|
|
7923
|
-
return undefined;
|
|
7924
|
-
}
|
|
7925
|
-
};
|
|
7926
|
-
|
|
7927
7821
|
const calculateInputs = (getValue) => (inputs, step) => inputs
|
|
7928
7822
|
.filter((_) => _)
|
|
7929
7823
|
.map((_) => {
|
|
@@ -8134,20 +8028,134 @@
|
|
|
8134
8028
|
}
|
|
8135
8029
|
};
|
|
8136
8030
|
|
|
8137
|
-
const
|
|
8031
|
+
const formStateMap = [
|
|
8032
|
+
{
|
|
8033
|
+
calculator: {
|
|
8034
|
+
moneyValue: 0,
|
|
8035
|
+
monthsValue: 0,
|
|
8036
|
+
isAnnuity: false,
|
|
8037
|
+
isInsurance: false,
|
|
8038
|
+
isSalaryClient: false,
|
|
8039
|
+
isPensionClient: false,
|
|
8040
|
+
isStateEmployee: false,
|
|
8041
|
+
},
|
|
8042
|
+
},
|
|
8043
|
+
{
|
|
8044
|
+
surname: '',
|
|
8045
|
+
name: '',
|
|
8046
|
+
middleName: '',
|
|
8047
|
+
sex: '',
|
|
8048
|
+
limitedBirthday: undefined,
|
|
8049
|
+
birthPlace: '',
|
|
8050
|
+
phone: '',
|
|
8051
|
+
email: '',
|
|
8052
|
+
dulSerie: undefined,
|
|
8053
|
+
dulNumber: undefined,
|
|
8054
|
+
dulIssueDateField: undefined,
|
|
8055
|
+
dulSubdivisionCode: '',
|
|
8056
|
+
dulIssuedBy: '',
|
|
8057
|
+
addressRegistration: {
|
|
8058
|
+
fullAddress: '',
|
|
8059
|
+
fiasCode: '',
|
|
8060
|
+
},
|
|
8061
|
+
participantDateRegistration: undefined,
|
|
8062
|
+
addressFact: {
|
|
8063
|
+
fullAddress: '',
|
|
8064
|
+
fiasCode: '',
|
|
8065
|
+
},
|
|
8066
|
+
housing: undefined,
|
|
8067
|
+
},
|
|
8068
|
+
{
|
|
8069
|
+
amountWorkers: { key: '', text: '' },
|
|
8070
|
+
beginDate: undefined,
|
|
8071
|
+
employerActivities: { key: '', text: '' },
|
|
8072
|
+
employerOrganization: { key: '', text: '' },
|
|
8073
|
+
employment: { key: '', text: '' },
|
|
8074
|
+
experience5Years: undefined,
|
|
8075
|
+
inn: undefined,
|
|
8076
|
+
jobsNumber: undefined,
|
|
8077
|
+
lastJobExperience: undefined,
|
|
8078
|
+
legalForm: '',
|
|
8079
|
+
organization: { key: '', text: '' },
|
|
8080
|
+
organizationAddress: {
|
|
8081
|
+
fullAddress: '',
|
|
8082
|
+
fiasCode: '',
|
|
8083
|
+
},
|
|
8084
|
+
organizationName: '',
|
|
8085
|
+
organizationPhone: '',
|
|
8086
|
+
partInBusiness: undefined,
|
|
8087
|
+
positionOrganization: { key: '', text: '' },
|
|
8088
|
+
},
|
|
8089
|
+
{
|
|
8090
|
+
familyStatus: { key: '', text: '' },
|
|
8091
|
+
dependents: undefined,
|
|
8092
|
+
familyMembers: undefined,
|
|
8093
|
+
confirmationIncome: { key: '', text: '' },
|
|
8094
|
+
wages: undefined,
|
|
8095
|
+
mandatoryPayments: undefined,
|
|
8096
|
+
snils: '',
|
|
8097
|
+
armyIdFlg: false,
|
|
8098
|
+
},
|
|
8099
|
+
{
|
|
8100
|
+
disablePeopleFlg: false,
|
|
8101
|
+
bankruptcyFlg: false,
|
|
8102
|
+
shareholderFlg: false,
|
|
8103
|
+
legalEntityName: '',
|
|
8104
|
+
creditInRshbCd: undefined,
|
|
8105
|
+
},
|
|
8106
|
+
{
|
|
8107
|
+
regionRetail: { key: '', text: '' },
|
|
8108
|
+
addressRetail: undefined,
|
|
8109
|
+
bankEmployeeCode: undefined,
|
|
8110
|
+
},
|
|
8111
|
+
];
|
|
8112
|
+
|
|
8113
|
+
const getInitialFormState = (step, formState) => ({
|
|
8114
|
+
...formStateMap[step],
|
|
8115
|
+
...formState,
|
|
8116
|
+
limitedBirthday: transformStringToData(formState?.limitedBirthday),
|
|
8117
|
+
dulIssueDateField: transformStringToData(formState?.dulIssueDateField),
|
|
8118
|
+
participantDateRegistration: transformStringToData(formState?.participantDateRegistration),
|
|
8119
|
+
beginDate: transformStringToData(formState?.beginDate),
|
|
8120
|
+
deliveryDate: transformStringToData(formState?.deliveryDate),
|
|
8121
|
+
});
|
|
8122
|
+
const transformStringToData = (text) => {
|
|
8123
|
+
try {
|
|
8124
|
+
return text ? new Date(text) : undefined;
|
|
8125
|
+
}
|
|
8126
|
+
catch (_) {
|
|
8127
|
+
return undefined;
|
|
8128
|
+
}
|
|
8129
|
+
};
|
|
8130
|
+
|
|
8131
|
+
const useCreditFormAPI = ({ step, inputs, onNextStep, onFinish, }) => {
|
|
8138
8132
|
const isFinalStep = step === 5;
|
|
8139
|
-
const
|
|
8140
|
-
const
|
|
8141
|
-
const
|
|
8142
|
-
|
|
8143
|
-
|
|
8133
|
+
const retailFormStore = useRetailFormStore();
|
|
8134
|
+
const initialState = useMemo(() => getInitialFormState(step, retailFormStore.leadForm), [step, retailFormStore.leadForm]);
|
|
8135
|
+
const resetForm = useCallback((response) => {
|
|
8136
|
+
const { leadForm } = retailFormStore;
|
|
8137
|
+
if (isFinalStep && response.ok && leadForm) {
|
|
8138
|
+
retailFormStore.statusInfo = {
|
|
8139
|
+
regionRetail: leadForm?.regionRetail?.text,
|
|
8140
|
+
addressRetail: leadForm?.addressRetail?.text,
|
|
8141
|
+
cardCategory: leadForm?.cardCategory?.text,
|
|
8142
|
+
calculator: {
|
|
8143
|
+
monthsValue: leadForm?.calculator?.monthsValue,
|
|
8144
|
+
moneyValue: leadForm?.calculator?.moneyValue,
|
|
8145
|
+
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
8146
|
+
},
|
|
8147
|
+
};
|
|
8148
|
+
retailFormStore.leadForm = initialState;
|
|
8149
|
+
}
|
|
8150
|
+
}, [isFinalStep, initialState]);
|
|
8144
8151
|
const handleSubmit = useCallback(async (formData) => {
|
|
8145
8152
|
const feedbackValidator = objectValidator(getObjectValidator(calculateInputs(getValue(formData))(inputs, step)));
|
|
8146
8153
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
8147
|
-
return
|
|
8154
|
+
return;
|
|
8148
8155
|
}
|
|
8149
|
-
|
|
8156
|
+
retailFormStore.leadForm = formData;
|
|
8150
8157
|
try {
|
|
8158
|
+
const { taskId, profileId, participantId } = retailFormStore;
|
|
8151
8159
|
if (taskId && profileId && participantId) {
|
|
8152
8160
|
const response = await updateUserTask(getCreditFormTaskData({
|
|
8153
8161
|
participantId,
|
|
@@ -8156,60 +8164,33 @@
|
|
|
8156
8164
|
step,
|
|
8157
8165
|
formData: formData,
|
|
8158
8166
|
}));
|
|
8159
|
-
resetForm(
|
|
8167
|
+
resetForm(response);
|
|
8168
|
+
}
|
|
8169
|
+
onNextStep();
|
|
8170
|
+
if (isFinalStep) {
|
|
8171
|
+
onFinish?.();
|
|
8160
8172
|
}
|
|
8161
8173
|
}
|
|
8162
8174
|
catch (ex) {
|
|
8163
|
-
|
|
8175
|
+
// Do nothing
|
|
8164
8176
|
}
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
finishForm?.(true);
|
|
8168
|
-
}
|
|
8169
|
-
return 'OK';
|
|
8170
|
-
}, []);
|
|
8171
|
-
return {
|
|
8172
|
-
handleSubmit,
|
|
8173
|
-
};
|
|
8174
|
-
};
|
|
8175
|
-
const resetForm = ({ isFinalStep, response, leadForm, setStatusInfo, }) => {
|
|
8176
|
-
if (isFinalStep && response.ok && leadForm !== null) {
|
|
8177
|
-
const regionRetail = leadForm?.regionRetail?.text;
|
|
8178
|
-
const addressRetail = leadForm?.addressRetail?.text;
|
|
8179
|
-
const cardCategory = leadForm?.cardCategory?.text;
|
|
8180
|
-
const calculator = {
|
|
8181
|
-
monthsValue: leadForm?.calculator?.monthsValue,
|
|
8182
|
-
moneyValue: leadForm?.calculator?.moneyValue,
|
|
8183
|
-
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
8184
|
-
};
|
|
8185
|
-
setStatusInfo({
|
|
8186
|
-
regionRetail,
|
|
8187
|
-
addressRetail,
|
|
8188
|
-
cardCategory,
|
|
8189
|
-
calculator,
|
|
8190
|
-
});
|
|
8191
|
-
globalThis.localStorage.removeItem('leadForm');
|
|
8192
|
-
}
|
|
8177
|
+
}, [isFinalStep, resetForm]);
|
|
8178
|
+
return [initialState, handleSubmit];
|
|
8193
8179
|
};
|
|
8194
8180
|
const getValue = (formData) => (name) => formData[name];
|
|
8195
8181
|
|
|
8196
|
-
const CreditFormStep = JSX(({ step, sections,
|
|
8197
|
-
const
|
|
8198
|
-
const [programId] = useLocalStorage('programId');
|
|
8182
|
+
const CreditFormStep = JSX(({ step, sections, isFormFinished, programsSource, onPrevStep, onNextStep, onFinish }) => {
|
|
8183
|
+
const { programId } = useRetailFormStore();
|
|
8199
8184
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
8200
|
-
const
|
|
8201
|
-
const
|
|
8202
|
-
const { handleSubmit } = useCreditFormAPI({
|
|
8185
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
8186
|
+
const [initialState, onSubmit] = useCreditFormAPI({
|
|
8203
8187
|
step,
|
|
8204
8188
|
inputs,
|
|
8205
8189
|
onNextStep,
|
|
8206
|
-
|
|
8207
|
-
finishForm,
|
|
8208
|
-
});
|
|
8209
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
8210
|
-
onSubmit: handleSubmit,
|
|
8190
|
+
onFinish,
|
|
8211
8191
|
});
|
|
8212
|
-
|
|
8192
|
+
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
8193
|
+
return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep({ sections, field, step, params: { calcData } }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
8213
8194
|
});
|
|
8214
8195
|
|
|
8215
8196
|
/* eslint-disable max-lines */
|
|
@@ -8519,8 +8500,8 @@
|
|
|
8519
8500
|
}, []);
|
|
8520
8501
|
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
8521
8502
|
const isStartStep = step === 0;
|
|
8522
|
-
const [isFormFinished,
|
|
8523
|
-
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isStartStep || isFormFinished ? null : (jsx(CreditFormProgress, { stepsTitles: STEP_TITLES, step: step, totalSteps: STEPS })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { step: step, sections: sections,
|
|
8503
|
+
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
8504
|
+
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isStartStep || isFormFinished ? null : (jsx(CreditFormProgress, { stepsTitles: STEP_TITLES, step: step, totalSteps: STEPS })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { step: step, sections: sections, isFormFinished: isFormFinished, programsSource: programsSource, onNextStep: handleNextStep, onPrevStep: handlePrevStep, onFinish: handleFinish }, String(step)) })] }) }));
|
|
8524
8505
|
});
|
|
8525
8506
|
|
|
8526
8507
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
@@ -10428,7 +10409,7 @@
|
|
|
10428
10409
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10429
10410
|
});
|
|
10430
10411
|
|
|
10431
|
-
const packageVersion = "0.14.
|
|
10412
|
+
const packageVersion = "0.14.709";
|
|
10432
10413
|
|
|
10433
10414
|
exports.Blocks = Blocks;
|
|
10434
10415
|
exports.ContentPage = ContentPage;
|