@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -2807,7 +2807,7 @@
|
|
|
2807
2807
|
return useStore(localStore, methods);
|
|
2808
2808
|
}
|
|
2809
2809
|
|
|
2810
|
-
const
|
|
2810
|
+
const useRetailFormStore = () => {
|
|
2811
2811
|
return useLocalStore();
|
|
2812
2812
|
};
|
|
2813
2813
|
|
|
@@ -2823,7 +2823,7 @@
|
|
|
2823
2823
|
|
|
2824
2824
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
2825
2825
|
const { data } = useLeadFormData('EMPLOYEES_NUMBER');
|
|
2826
|
-
const store =
|
|
2826
|
+
const store = useRetailFormStore();
|
|
2827
2827
|
useEffect(() => {
|
|
2828
2828
|
if (data) {
|
|
2829
2829
|
store.amountWorkers = data;
|
|
@@ -3659,7 +3659,7 @@
|
|
|
3659
3659
|
|
|
3660
3660
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
3661
3661
|
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
3662
|
-
const store =
|
|
3662
|
+
const store = useRetailFormStore();
|
|
3663
3663
|
useEffect(() => {
|
|
3664
3664
|
if (data) {
|
|
3665
3665
|
store.employerActivities = data;
|
|
@@ -3670,7 +3670,7 @@
|
|
|
3670
3670
|
|
|
3671
3671
|
const EmployerOrganizationField = JSX(({ field, input }) => {
|
|
3672
3672
|
const { data } = useLeadFormData('ORGANIZATION_KIND');
|
|
3673
|
-
const store =
|
|
3673
|
+
const store = useRetailFormStore();
|
|
3674
3674
|
useEffect(() => {
|
|
3675
3675
|
if (data) {
|
|
3676
3676
|
store.employerOrganization = data;
|
|
@@ -3797,7 +3797,10 @@
|
|
|
3797
3797
|
}
|
|
3798
3798
|
};
|
|
3799
3799
|
const getEmployeesNumberOption = (options, count) => {
|
|
3800
|
-
|
|
3800
|
+
if (!count) {
|
|
3801
|
+
return null;
|
|
3802
|
+
}
|
|
3803
|
+
const [option] = [options?.find((_) => count <= Number(_.description))].map((_) => ({
|
|
3801
3804
|
key: _?.key ?? '',
|
|
3802
3805
|
text: _?.value ?? '',
|
|
3803
3806
|
}));
|
|
@@ -3823,22 +3826,32 @@
|
|
|
3823
3826
|
}
|
|
3824
3827
|
return getOptionByKey('COMMERCIAL');
|
|
3825
3828
|
};
|
|
3826
|
-
const getOptionOp = (options) => (key) => options
|
|
3829
|
+
const getOptionOp = (options) => (key) => options
|
|
3830
|
+
.map((_) => ({ key: _.key, text: _.value }))
|
|
3831
|
+
.find((_) => _.key === key) ?? null;
|
|
3827
3832
|
|
|
3828
3833
|
const updateOrganizationFields = (store, field, item) => {
|
|
3829
|
-
const inn = item
|
|
3830
|
-
const okopf = Number(item.data?.opf?.code);
|
|
3831
|
-
const okved = item.data?.okved ?? '';
|
|
3834
|
+
const { okved, okopf, inn } = getOrganizationRequisites(item);
|
|
3832
3835
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
3833
3836
|
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3837
|
+
const organizationData = {
|
|
3838
|
+
amountWorkers: getEmployeesNumberOption(store?.amountWorkers, item.data?.employee_count),
|
|
3839
|
+
employerActivities: getOrganizationActivityType(store?.employerActivities ?? [], okved),
|
|
3840
|
+
organization: getOrganizationType(store?.organization ?? [], okopf, inn),
|
|
3841
|
+
employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
|
|
3842
|
+
};
|
|
3843
|
+
for (const fieldName in organizationData) {
|
|
3844
|
+
organizationData[fieldName] && field?.(fieldName)?.onChange?.(organizationData[fieldName]);
|
|
3845
|
+
}
|
|
3838
3846
|
};
|
|
3847
|
+
const getOrganizationRequisites = (item) => ({
|
|
3848
|
+
inn: item.data?.inn ?? '',
|
|
3849
|
+
okopf: Number(item.data?.opf?.code),
|
|
3850
|
+
okved: item.data?.okved ?? '',
|
|
3851
|
+
});
|
|
3839
3852
|
|
|
3840
3853
|
const InnField = JSX(({ field, input }) => {
|
|
3841
|
-
const store =
|
|
3854
|
+
const store = useRetailFormStore();
|
|
3842
3855
|
const onDaDataChange = useCallback((item) => {
|
|
3843
3856
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
3844
3857
|
updateOrganizationFields(store, field, item);
|
|
@@ -3902,7 +3915,7 @@
|
|
|
3902
3915
|
|
|
3903
3916
|
const OrganizationField = JSX(({ field, input }) => {
|
|
3904
3917
|
const { data } = useLeadFormData('ORGANIZATION_TYPE');
|
|
3905
|
-
const store =
|
|
3918
|
+
const store = useRetailFormStore();
|
|
3906
3919
|
useEffect(() => {
|
|
3907
3920
|
if (data) {
|
|
3908
3921
|
store.organization = data;
|
|
@@ -3912,7 +3925,7 @@
|
|
|
3912
3925
|
});
|
|
3913
3926
|
|
|
3914
3927
|
const OrganizationNameField = JSX(({ field, input }) => {
|
|
3915
|
-
const store =
|
|
3928
|
+
const store = useRetailFormStore();
|
|
3916
3929
|
const onDaDataChange = useCallback((item) => {
|
|
3917
3930
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
3918
3931
|
updateOrganizationFields(store, field, item);
|
|
@@ -4772,18 +4785,6 @@
|
|
|
4772
4785
|
};
|
|
4773
4786
|
};
|
|
4774
4787
|
|
|
4775
|
-
const useLeadFormStore = () => useLocalStore();
|
|
4776
|
-
|
|
4777
|
-
const useSetter = (target, key) => useCallback((value) => {
|
|
4778
|
-
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
4779
|
-
if (newValue !== null && newValue !== undefined) {
|
|
4780
|
-
target[key] = newValue;
|
|
4781
|
-
}
|
|
4782
|
-
else {
|
|
4783
|
-
delete target[key];
|
|
4784
|
-
}
|
|
4785
|
-
}, [target, key]);
|
|
4786
|
-
|
|
4787
4788
|
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] })] })));
|
|
4788
4789
|
|
|
4789
4790
|
const creditCodesToProgrammIdMap = {
|
|
@@ -4926,8 +4927,7 @@
|
|
|
4926
4927
|
};
|
|
4927
4928
|
|
|
4928
4929
|
const DraftDialog = JSX(function ({ task, isFromLead = false, onClose = noop, }) {
|
|
4929
|
-
const
|
|
4930
|
-
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
4930
|
+
const retailFormStore = useRetailFormStore();
|
|
4931
4931
|
const navigator = locationNavigator();
|
|
4932
4932
|
const { participants, creditProgram, id: taskId } = task;
|
|
4933
4933
|
const programmId = creditProgramCodeToProductIdMap[creditProgram.code];
|
|
@@ -4936,11 +4936,11 @@
|
|
|
4936
4936
|
const { name, midname, id: participantId, profile } = participants[0];
|
|
4937
4937
|
const handleGoToDraft = useCallback(() => {
|
|
4938
4938
|
const taskFromDraft = parseDraftTask(task);
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4939
|
+
retailFormStore.participantId = participantId;
|
|
4940
|
+
retailFormStore.taskId = taskId;
|
|
4941
|
+
retailFormStore.profileId = profile?.id;
|
|
4942
|
+
retailFormStore.programId = programmId;
|
|
4943
|
+
retailFormStore.leadForm = taskFromDraft;
|
|
4944
4944
|
navigator.assign(nextStepLink);
|
|
4945
4945
|
}, []);
|
|
4946
4946
|
const handleGoToNewTask = useCallback(() => {
|
|
@@ -4978,7 +4978,7 @@
|
|
|
4978
4978
|
|
|
4979
4979
|
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
4980
4980
|
const navigator = locationNavigator();
|
|
4981
|
-
const
|
|
4981
|
+
const retailFormStore = useRetailFormStore();
|
|
4982
4982
|
const handleAuth = useCallback(async () => {
|
|
4983
4983
|
const resp = await getLink({
|
|
4984
4984
|
redirectUri: navigator.href,
|
|
@@ -4988,10 +4988,10 @@
|
|
|
4988
4988
|
}
|
|
4989
4989
|
}, []);
|
|
4990
4990
|
const handleClose = useCallback(() => {
|
|
4991
|
-
if (leadForm
|
|
4992
|
-
const
|
|
4993
|
-
|
|
4994
|
-
|
|
4991
|
+
if (retailFormStore.leadForm) {
|
|
4992
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
4993
|
+
delete leadForm.esiaAccountTypeCd;
|
|
4994
|
+
retailFormStore.leadForm = leadForm;
|
|
4995
4995
|
}
|
|
4996
4996
|
onClose?.();
|
|
4997
4997
|
}, []);
|
|
@@ -5105,15 +5105,16 @@
|
|
|
5105
5105
|
};
|
|
5106
5106
|
};
|
|
5107
5107
|
|
|
5108
|
+
const useLeadFormStore = () => useLocalStore();
|
|
5109
|
+
|
|
5108
5110
|
const useSaveUserData = () => {
|
|
5109
5111
|
const leadFormStore = useLeadFormStore();
|
|
5110
|
-
const
|
|
5111
|
-
const saveUserData = useCallback(({ participantId, taskId, profileId, formData, programId: programNumber }) => {
|
|
5112
|
+
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber, formData }) => {
|
|
5112
5113
|
leadFormStore.participantId = participantId;
|
|
5113
5114
|
leadFormStore.taskId = taskId;
|
|
5114
5115
|
leadFormStore.profileId = profileId;
|
|
5115
5116
|
leadFormStore.programId = programNumber;
|
|
5116
|
-
|
|
5117
|
+
leadFormStore.leadForm = formData;
|
|
5117
5118
|
}, []);
|
|
5118
5119
|
return saveUserData;
|
|
5119
5120
|
};
|
|
@@ -5219,6 +5220,16 @@
|
|
|
5219
5220
|
|
|
5220
5221
|
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
5221
5222
|
|
|
5223
|
+
const useSetter = (target, key) => useCallback((value) => {
|
|
5224
|
+
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
5225
|
+
if (newValue !== null && newValue !== undefined) {
|
|
5226
|
+
target[key] = newValue;
|
|
5227
|
+
}
|
|
5228
|
+
else {
|
|
5229
|
+
delete target[key];
|
|
5230
|
+
}
|
|
5231
|
+
}, [target, key]);
|
|
5232
|
+
|
|
5222
5233
|
const initialFormState = {
|
|
5223
5234
|
typeForm: '',
|
|
5224
5235
|
region: { key: '', text: '' },
|
|
@@ -6818,7 +6829,7 @@
|
|
|
6818
6829
|
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" })));
|
|
6819
6830
|
|
|
6820
6831
|
const PendingStatusContent$1 = JSX(({ handleExpireTimer }) => {
|
|
6821
|
-
const
|
|
6832
|
+
const { statusInfo } = useRetailFormStore();
|
|
6822
6833
|
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: [
|
|
6823
6834
|
{
|
|
6824
6835
|
label: 'Название продукта',
|
|
@@ -6832,7 +6843,7 @@
|
|
|
6832
6843
|
});
|
|
6833
6844
|
|
|
6834
6845
|
const ReworkStatusContent$1 = JSX(() => {
|
|
6835
|
-
const
|
|
6846
|
+
const { statusInfo } = useRetailFormStore();
|
|
6836
6847
|
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: [
|
|
6837
6848
|
{
|
|
6838
6849
|
label: 'Регион',
|
|
@@ -6851,7 +6862,7 @@
|
|
|
6851
6862
|
});
|
|
6852
6863
|
|
|
6853
6864
|
const SuccessStatusContent$1 = JSX(() => {
|
|
6854
|
-
const
|
|
6865
|
+
const { statusInfo } = useRetailFormStore();
|
|
6855
6866
|
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: [
|
|
6856
6867
|
{
|
|
6857
6868
|
label: 'Название продукта',
|
|
@@ -6882,7 +6893,7 @@
|
|
|
6882
6893
|
];
|
|
6883
6894
|
const CreditCardFormStatusTracker = JSX(() => {
|
|
6884
6895
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
6885
|
-
const
|
|
6896
|
+
const { taskId } = useRetailFormStore();
|
|
6886
6897
|
useEffect(() => {
|
|
6887
6898
|
(async () => {
|
|
6888
6899
|
for (const signalType of SIGNAL_TYPES$1) {
|
|
@@ -6911,117 +6922,6 @@
|
|
|
6911
6922
|
return statusesMap[status] || jsx(ReworkStatusContent$1, {});
|
|
6912
6923
|
};
|
|
6913
6924
|
|
|
6914
|
-
const formStateMap$1 = [
|
|
6915
|
-
{
|
|
6916
|
-
paymentSystem: { name: '', type: '' },
|
|
6917
|
-
currency: '810',
|
|
6918
|
-
codeWord: '',
|
|
6919
|
-
},
|
|
6920
|
-
{
|
|
6921
|
-
surname: '',
|
|
6922
|
-
name: '',
|
|
6923
|
-
middleName: '',
|
|
6924
|
-
sex: '',
|
|
6925
|
-
limitedBirthday: undefined,
|
|
6926
|
-
birthPlace: '',
|
|
6927
|
-
phone: '',
|
|
6928
|
-
email: '',
|
|
6929
|
-
dulSerie: undefined,
|
|
6930
|
-
dulNumber: undefined,
|
|
6931
|
-
dulIssueDateField: undefined,
|
|
6932
|
-
dulSubdivisionCode: '',
|
|
6933
|
-
dulIssuedBy: '',
|
|
6934
|
-
addressRegistration: {
|
|
6935
|
-
fullAddress: '',
|
|
6936
|
-
fiasCode: '',
|
|
6937
|
-
},
|
|
6938
|
-
participantDateRegistration: undefined,
|
|
6939
|
-
addressFact: {
|
|
6940
|
-
fullAddress: '',
|
|
6941
|
-
fiasCode: '',
|
|
6942
|
-
},
|
|
6943
|
-
housing: undefined,
|
|
6944
|
-
methodObtain: 'office',
|
|
6945
|
-
addressCourier: {
|
|
6946
|
-
fullAddress: '',
|
|
6947
|
-
fiasCode: '',
|
|
6948
|
-
},
|
|
6949
|
-
},
|
|
6950
|
-
{
|
|
6951
|
-
amountWorkers: { key: '', text: '' },
|
|
6952
|
-
beginDate: undefined,
|
|
6953
|
-
employerActivities: { key: '', text: '' },
|
|
6954
|
-
employerOrganization: { key: '', text: '' },
|
|
6955
|
-
employment: { key: '', text: '' },
|
|
6956
|
-
experience5Years: undefined,
|
|
6957
|
-
inn: undefined,
|
|
6958
|
-
jobsNumber: undefined,
|
|
6959
|
-
lastJobExperience: undefined,
|
|
6960
|
-
legalForm: '',
|
|
6961
|
-
organization: { key: '', text: '' },
|
|
6962
|
-
organizationAddress: {
|
|
6963
|
-
fullAddress: '',
|
|
6964
|
-
fiasCode: '',
|
|
6965
|
-
},
|
|
6966
|
-
organizationName: '',
|
|
6967
|
-
organizationPhone: '',
|
|
6968
|
-
partInBusiness: undefined,
|
|
6969
|
-
positionOrganization: { key: '', text: '' },
|
|
6970
|
-
},
|
|
6971
|
-
{
|
|
6972
|
-
familyStatus: { key: '', text: '' },
|
|
6973
|
-
dependents: undefined,
|
|
6974
|
-
familyMembers: undefined,
|
|
6975
|
-
confirmationIncome: { key: '', text: '' },
|
|
6976
|
-
wages: undefined,
|
|
6977
|
-
mandatoryPayments: undefined,
|
|
6978
|
-
snils: '',
|
|
6979
|
-
armyIdFlg: false,
|
|
6980
|
-
},
|
|
6981
|
-
{
|
|
6982
|
-
disablePeopleFlg: false,
|
|
6983
|
-
bankruptcyFlg: false,
|
|
6984
|
-
shareholderFlg: false,
|
|
6985
|
-
legalEntityName: '',
|
|
6986
|
-
creditInRshbCd: undefined,
|
|
6987
|
-
},
|
|
6988
|
-
{
|
|
6989
|
-
regionRetail: { key: '', text: '' },
|
|
6990
|
-
addressRetail: {
|
|
6991
|
-
key: '',
|
|
6992
|
-
text: '',
|
|
6993
|
-
},
|
|
6994
|
-
bankEmployeeCode: undefined,
|
|
6995
|
-
addressCourier: {
|
|
6996
|
-
fullAddress: '',
|
|
6997
|
-
fiasCode: '',
|
|
6998
|
-
},
|
|
6999
|
-
methodObtain: 'office',
|
|
7000
|
-
deliveryDate: undefined,
|
|
7001
|
-
},
|
|
7002
|
-
];
|
|
7003
|
-
|
|
7004
|
-
const getInitialFormState$1 = (step, localStorageData) => ({
|
|
7005
|
-
...formStateMap$1[step],
|
|
7006
|
-
...localStorageData,
|
|
7007
|
-
limitedBirthday: transformStringToData$1(localStorageData?.limitedBirthday),
|
|
7008
|
-
dulIssueDateField: transformStringToData$1(localStorageData?.dulIssueDateField),
|
|
7009
|
-
participantDateRegistration: transformStringToData$1(localStorageData?.participantDateRegistration),
|
|
7010
|
-
beginDate: transformStringToData$1(localStorageData?.beginDate),
|
|
7011
|
-
deliveryDate: transformStringToData$1(localStorageData?.deliveryDate),
|
|
7012
|
-
});
|
|
7013
|
-
const transformStringToData$1 = (text) => {
|
|
7014
|
-
if (!text) {
|
|
7015
|
-
return undefined;
|
|
7016
|
-
}
|
|
7017
|
-
try {
|
|
7018
|
-
return new Date(text);
|
|
7019
|
-
}
|
|
7020
|
-
catch (_) {
|
|
7021
|
-
return undefined;
|
|
7022
|
-
}
|
|
7023
|
-
};
|
|
7024
|
-
|
|
7025
6925
|
const calculateInputs$1 = (getValue) => (inputs, step) => inputs
|
|
7026
6926
|
.filter((_) => _)
|
|
7027
6927
|
.map((_) => {
|
|
@@ -7252,20 +7152,139 @@
|
|
|
7252
7152
|
}
|
|
7253
7153
|
};
|
|
7254
7154
|
|
|
7255
|
-
const
|
|
7155
|
+
const formStateMap$1 = [
|
|
7156
|
+
{
|
|
7157
|
+
paymentSystem: { name: '', type: '' },
|
|
7158
|
+
currency: '810',
|
|
7159
|
+
codeWord: '',
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
surname: '',
|
|
7163
|
+
name: '',
|
|
7164
|
+
middleName: '',
|
|
7165
|
+
sex: '',
|
|
7166
|
+
limitedBirthday: undefined,
|
|
7167
|
+
birthPlace: '',
|
|
7168
|
+
phone: '',
|
|
7169
|
+
email: '',
|
|
7170
|
+
dulSerie: undefined,
|
|
7171
|
+
dulNumber: undefined,
|
|
7172
|
+
dulIssueDateField: undefined,
|
|
7173
|
+
dulSubdivisionCode: '',
|
|
7174
|
+
dulIssuedBy: '',
|
|
7175
|
+
addressRegistration: {
|
|
7176
|
+
fullAddress: '',
|
|
7177
|
+
fiasCode: '',
|
|
7178
|
+
},
|
|
7179
|
+
participantDateRegistration: undefined,
|
|
7180
|
+
addressFact: {
|
|
7181
|
+
fullAddress: '',
|
|
7182
|
+
fiasCode: '',
|
|
7183
|
+
},
|
|
7184
|
+
housing: undefined,
|
|
7185
|
+
methodObtain: 'office',
|
|
7186
|
+
addressCourier: {
|
|
7187
|
+
fullAddress: '',
|
|
7188
|
+
fiasCode: '',
|
|
7189
|
+
},
|
|
7190
|
+
},
|
|
7191
|
+
{
|
|
7192
|
+
amountWorkers: { key: '', text: '' },
|
|
7193
|
+
beginDate: undefined,
|
|
7194
|
+
employerActivities: { key: '', text: '' },
|
|
7195
|
+
employerOrganization: { key: '', text: '' },
|
|
7196
|
+
employment: { key: '', text: '' },
|
|
7197
|
+
experience5Years: undefined,
|
|
7198
|
+
inn: undefined,
|
|
7199
|
+
jobsNumber: undefined,
|
|
7200
|
+
lastJobExperience: undefined,
|
|
7201
|
+
legalForm: '',
|
|
7202
|
+
organization: { key: '', text: '' },
|
|
7203
|
+
organizationAddress: {
|
|
7204
|
+
fullAddress: '',
|
|
7205
|
+
fiasCode: '',
|
|
7206
|
+
},
|
|
7207
|
+
organizationName: '',
|
|
7208
|
+
organizationPhone: '',
|
|
7209
|
+
partInBusiness: undefined,
|
|
7210
|
+
positionOrganization: { key: '', text: '' },
|
|
7211
|
+
},
|
|
7212
|
+
{
|
|
7213
|
+
familyStatus: { key: '', text: '' },
|
|
7214
|
+
dependents: undefined,
|
|
7215
|
+
familyMembers: undefined,
|
|
7216
|
+
confirmationIncome: { key: '', text: '' },
|
|
7217
|
+
wages: undefined,
|
|
7218
|
+
mandatoryPayments: undefined,
|
|
7219
|
+
snils: '',
|
|
7220
|
+
armyIdFlg: false,
|
|
7221
|
+
},
|
|
7222
|
+
{
|
|
7223
|
+
disablePeopleFlg: false,
|
|
7224
|
+
bankruptcyFlg: false,
|
|
7225
|
+
shareholderFlg: false,
|
|
7226
|
+
legalEntityName: '',
|
|
7227
|
+
creditInRshbCd: undefined,
|
|
7228
|
+
},
|
|
7229
|
+
{
|
|
7230
|
+
regionRetail: { key: '', text: '' },
|
|
7231
|
+
addressRetail: { key: '', text: '' },
|
|
7232
|
+
bankEmployeeCode: undefined,
|
|
7233
|
+
addressCourier: {
|
|
7234
|
+
fullAddress: '',
|
|
7235
|
+
fiasCode: '',
|
|
7236
|
+
},
|
|
7237
|
+
methodObtain: 'office',
|
|
7238
|
+
deliveryDate: undefined,
|
|
7239
|
+
},
|
|
7240
|
+
];
|
|
7241
|
+
|
|
7242
|
+
const getInitialFormState$1 = (step, formState) => ({
|
|
7243
|
+
...formStateMap$1[step],
|
|
7244
|
+
...formState,
|
|
7245
|
+
limitedBirthday: transformStringToData$1(formState?.limitedBirthday),
|
|
7246
|
+
dulIssueDateField: transformStringToData$1(formState?.dulIssueDateField),
|
|
7247
|
+
participantDateRegistration: transformStringToData$1(formState?.participantDateRegistration),
|
|
7248
|
+
beginDate: transformStringToData$1(formState?.beginDate),
|
|
7249
|
+
deliveryDate: transformStringToData$1(formState?.deliveryDate),
|
|
7250
|
+
});
|
|
7251
|
+
const transformStringToData$1 = (text) => {
|
|
7252
|
+
try {
|
|
7253
|
+
return text ? new Date(text) : undefined;
|
|
7254
|
+
}
|
|
7255
|
+
catch (_) {
|
|
7256
|
+
return undefined;
|
|
7257
|
+
}
|
|
7258
|
+
};
|
|
7259
|
+
|
|
7260
|
+
const useCreditCardFormAPI = ({ step, inputs, onNextStep, onFinish, }) => {
|
|
7256
7261
|
const isFinalStep = step === 5;
|
|
7257
|
-
const
|
|
7258
|
-
const
|
|
7259
|
-
const
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
+
const retailFormStore = useRetailFormStore();
|
|
7263
|
+
const initialState = useMemo(() => getInitialFormState$1(step, retailFormStore.leadForm), [step, retailFormStore.leadForm]);
|
|
7264
|
+
const resetForm = useCallback((response) => {
|
|
7265
|
+
const { leadForm } = retailFormStore;
|
|
7266
|
+
if (isFinalStep && response.ok && leadForm) {
|
|
7267
|
+
retailFormStore.statusInfo = {
|
|
7268
|
+
regionRetail: leadForm?.regionRetail?.text,
|
|
7269
|
+
addressRetail: leadForm?.addressRetail?.text,
|
|
7270
|
+
cardCategory: leadForm?.cardCategory?.text,
|
|
7271
|
+
calculator: {
|
|
7272
|
+
monthsValue: leadForm?.calculator?.monthsValue,
|
|
7273
|
+
moneyValue: leadForm?.calculator?.moneyValue,
|
|
7274
|
+
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
7275
|
+
},
|
|
7276
|
+
};
|
|
7277
|
+
retailFormStore.leadForm = initialState;
|
|
7278
|
+
}
|
|
7279
|
+
}, [isFinalStep, initialState]);
|
|
7262
7280
|
const handleSubmit = useCallback(async (formData) => {
|
|
7263
7281
|
const feedbackValidator = objectValidator(getObjectValidator(calculateInputs$1(getValue$2(formData))(inputs, step)));
|
|
7264
7282
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
7265
|
-
return
|
|
7283
|
+
return;
|
|
7266
7284
|
}
|
|
7267
|
-
|
|
7285
|
+
retailFormStore.leadForm = formData;
|
|
7268
7286
|
try {
|
|
7287
|
+
const { taskId, profileId, participantId } = retailFormStore;
|
|
7269
7288
|
if (taskId && profileId && participantId) {
|
|
7270
7289
|
const response = await updateUserTask(getCreditCardFormTaskData({
|
|
7271
7290
|
participantId,
|
|
@@ -7274,53 +7293,31 @@
|
|
|
7274
7293
|
step,
|
|
7275
7294
|
formData: formData,
|
|
7276
7295
|
}));
|
|
7277
|
-
resetForm
|
|
7296
|
+
resetForm(response);
|
|
7297
|
+
}
|
|
7298
|
+
onNextStep();
|
|
7299
|
+
if (isFinalStep) {
|
|
7300
|
+
onFinish?.();
|
|
7278
7301
|
}
|
|
7279
7302
|
}
|
|
7280
7303
|
catch (ex) {
|
|
7281
|
-
|
|
7282
|
-
}
|
|
7283
|
-
onNextStep();
|
|
7284
|
-
if (isFinalStep) {
|
|
7285
|
-
finishForm?.(true);
|
|
7304
|
+
// Do nothing
|
|
7286
7305
|
}
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
return {
|
|
7290
|
-
handleSubmit,
|
|
7291
|
-
};
|
|
7292
|
-
};
|
|
7293
|
-
const resetForm$1 = ({ isFinalStep, response, leadForm, setStatusInfo, }) => {
|
|
7294
|
-
if (isFinalStep && response.ok && leadForm) {
|
|
7295
|
-
const regionRetail = leadForm?.regionRetail?.text;
|
|
7296
|
-
const addressRetail = leadForm?.addressRetail?.text;
|
|
7297
|
-
const cardCategory = leadForm?.cardCategory?.text;
|
|
7298
|
-
const calculator = {
|
|
7299
|
-
monthsValue: leadForm?.calculator?.monthsValue,
|
|
7300
|
-
moneyValue: leadForm?.calculator?.moneyValue,
|
|
7301
|
-
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
7302
|
-
};
|
|
7303
|
-
setStatusInfo({ regionRetail, addressRetail, cardCategory, calculator });
|
|
7304
|
-
globalThis.localStorage.removeItem('leadForm');
|
|
7305
|
-
}
|
|
7306
|
+
}, [isFinalStep, resetForm]);
|
|
7307
|
+
return [initialState, handleSubmit];
|
|
7306
7308
|
};
|
|
7307
7309
|
const getValue$2 = (formData) => (name) => formData[name];
|
|
7308
7310
|
|
|
7309
|
-
const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep,
|
|
7310
|
-
const
|
|
7311
|
-
const initialState =
|
|
7312
|
-
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
7313
|
-
const { handleSubmit } = useCreditCardFormAPI({
|
|
7311
|
+
const CreditCardFormStep = JSX(({ step, sections, isFormFinished, onPrevStep, onNextStep, onFinish }) => {
|
|
7312
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
7313
|
+
const [initialState, onSubmit] = useCreditCardFormAPI({
|
|
7314
7314
|
step,
|
|
7315
7315
|
inputs,
|
|
7316
7316
|
onNextStep,
|
|
7317
|
-
|
|
7318
|
-
finishForm,
|
|
7319
|
-
});
|
|
7320
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
7321
|
-
onSubmit: handleSubmit,
|
|
7317
|
+
onFinish,
|
|
7322
7318
|
});
|
|
7323
|
-
|
|
7319
|
+
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
7320
|
+
return isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$2({ sections, field, step }), jsx(StepsNavigationButtons$1, { step: step, onPrevStep: onPrevStep })] }));
|
|
7324
7321
|
});
|
|
7325
7322
|
|
|
7326
7323
|
/* eslint-disable max-lines */
|
|
@@ -7696,8 +7693,8 @@
|
|
|
7696
7693
|
scrollToTop();
|
|
7697
7694
|
}, []);
|
|
7698
7695
|
const sections = useMemo(() => stepsSectionsMap$1[step], [step]);
|
|
7699
|
-
const [isFormFinished,
|
|
7700
|
-
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,
|
|
7696
|
+
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
7697
|
+
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)) })] }) }));
|
|
7701
7698
|
});
|
|
7702
7699
|
|
|
7703
7700
|
const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
|
|
@@ -7724,7 +7721,7 @@
|
|
|
7724
7721
|
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" })));
|
|
7725
7722
|
|
|
7726
7723
|
const PendingStatusContent = JSX(({ handleExpireTimer }) => {
|
|
7727
|
-
const
|
|
7724
|
+
const { statusInfo } = useRetailFormStore();
|
|
7728
7725
|
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: [
|
|
7729
7726
|
{
|
|
7730
7727
|
label: 'Название продукта',
|
|
@@ -7750,7 +7747,7 @@
|
|
|
7750
7747
|
});
|
|
7751
7748
|
|
|
7752
7749
|
const ReworkStatusContent = JSX(() => {
|
|
7753
|
-
const
|
|
7750
|
+
const { statusInfo } = useRetailFormStore();
|
|
7754
7751
|
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: [
|
|
7755
7752
|
{
|
|
7756
7753
|
label: 'Регион',
|
|
@@ -7769,7 +7766,7 @@
|
|
|
7769
7766
|
});
|
|
7770
7767
|
|
|
7771
7768
|
const SuccessStatusContent = JSX(() => {
|
|
7772
|
-
const
|
|
7769
|
+
const { statusInfo } = useRetailFormStore();
|
|
7773
7770
|
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: [
|
|
7774
7771
|
{
|
|
7775
7772
|
label: 'Название продукта',
|
|
@@ -7800,7 +7797,7 @@
|
|
|
7800
7797
|
];
|
|
7801
7798
|
const CreditFormStatusTracker = JSX(() => {
|
|
7802
7799
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
7803
|
-
const
|
|
7800
|
+
const { taskId } = useRetailFormStore();
|
|
7804
7801
|
useEffect(() => {
|
|
7805
7802
|
(async () => {
|
|
7806
7803
|
for (const signalType of SIGNAL_TYPES) {
|
|
@@ -7829,109 +7826,6 @@
|
|
|
7829
7826
|
return statusesMap[status] || jsx(ReworkStatusContent, {});
|
|
7830
7827
|
};
|
|
7831
7828
|
|
|
7832
|
-
const formStateMap = [
|
|
7833
|
-
{
|
|
7834
|
-
calculator: {
|
|
7835
|
-
moneyValue: 0,
|
|
7836
|
-
monthsValue: 0,
|
|
7837
|
-
isAnnuity: false,
|
|
7838
|
-
isInsurance: false,
|
|
7839
|
-
isSalaryClient: false,
|
|
7840
|
-
isPensionClient: false,
|
|
7841
|
-
isStateEmployee: false,
|
|
7842
|
-
},
|
|
7843
|
-
},
|
|
7844
|
-
{
|
|
7845
|
-
surname: '',
|
|
7846
|
-
name: '',
|
|
7847
|
-
middleName: '',
|
|
7848
|
-
sex: '',
|
|
7849
|
-
limitedBirthday: undefined,
|
|
7850
|
-
birthPlace: '',
|
|
7851
|
-
phone: '',
|
|
7852
|
-
email: '',
|
|
7853
|
-
dulSerie: undefined,
|
|
7854
|
-
dulNumber: undefined,
|
|
7855
|
-
dulIssueDateField: undefined,
|
|
7856
|
-
dulSubdivisionCode: '',
|
|
7857
|
-
dulIssuedBy: '',
|
|
7858
|
-
addressRegistration: {
|
|
7859
|
-
fullAddress: '',
|
|
7860
|
-
fiasCode: '',
|
|
7861
|
-
},
|
|
7862
|
-
participantDateRegistration: undefined,
|
|
7863
|
-
addressFact: {
|
|
7864
|
-
fullAddress: '',
|
|
7865
|
-
fiasCode: '',
|
|
7866
|
-
},
|
|
7867
|
-
housing: undefined,
|
|
7868
|
-
},
|
|
7869
|
-
{
|
|
7870
|
-
amountWorkers: { key: '', text: '' },
|
|
7871
|
-
beginDate: undefined,
|
|
7872
|
-
employerActivities: { key: '', text: '' },
|
|
7873
|
-
employerOrganization: { key: '', text: '' },
|
|
7874
|
-
employment: { key: '', text: '' },
|
|
7875
|
-
experience5Years: undefined,
|
|
7876
|
-
inn: undefined,
|
|
7877
|
-
jobsNumber: undefined,
|
|
7878
|
-
lastJobExperience: undefined,
|
|
7879
|
-
legalForm: '',
|
|
7880
|
-
organization: { key: '', text: '' },
|
|
7881
|
-
organizationAddress: {
|
|
7882
|
-
fullAddress: '',
|
|
7883
|
-
fiasCode: '',
|
|
7884
|
-
},
|
|
7885
|
-
organizationName: '',
|
|
7886
|
-
organizationPhone: '',
|
|
7887
|
-
partInBusiness: undefined,
|
|
7888
|
-
positionOrganization: { key: '', text: '' },
|
|
7889
|
-
},
|
|
7890
|
-
{
|
|
7891
|
-
familyStatus: { key: '', text: '' },
|
|
7892
|
-
dependents: undefined,
|
|
7893
|
-
familyMembers: undefined,
|
|
7894
|
-
confirmationIncome: { key: '', text: '' },
|
|
7895
|
-
wages: undefined,
|
|
7896
|
-
mandatoryPayments: undefined,
|
|
7897
|
-
snils: '',
|
|
7898
|
-
armyIdFlg: false,
|
|
7899
|
-
},
|
|
7900
|
-
{
|
|
7901
|
-
disablePeopleFlg: false,
|
|
7902
|
-
bankruptcyFlg: false,
|
|
7903
|
-
shareholderFlg: false,
|
|
7904
|
-
legalEntityName: '',
|
|
7905
|
-
creditInRshbCd: undefined,
|
|
7906
|
-
},
|
|
7907
|
-
{
|
|
7908
|
-
regionRetail: { key: '', text: '' },
|
|
7909
|
-
addressRetail: undefined,
|
|
7910
|
-
bankEmployeeCode: undefined,
|
|
7911
|
-
},
|
|
7912
|
-
];
|
|
7913
|
-
|
|
7914
|
-
const getInitialFormState = (step, localStorageData) => ({
|
|
7915
|
-
...formStateMap[step],
|
|
7916
|
-
...localStorageData,
|
|
7917
|
-
limitedBirthday: transformStringToData(localStorageData?.limitedBirthday),
|
|
7918
|
-
dulIssueDateField: transformStringToData(localStorageData?.dulIssueDateField),
|
|
7919
|
-
participantDateRegistration: transformStringToData(localStorageData?.participantDateRegistration),
|
|
7920
|
-
beginDate: transformStringToData(localStorageData?.beginDate),
|
|
7921
|
-
deliveryDate: transformStringToData(localStorageData?.deliveryDate),
|
|
7922
|
-
});
|
|
7923
|
-
const transformStringToData = (text) => {
|
|
7924
|
-
if (!text) {
|
|
7925
|
-
return undefined;
|
|
7926
|
-
}
|
|
7927
|
-
try {
|
|
7928
|
-
return new Date(text);
|
|
7929
|
-
}
|
|
7930
|
-
catch (_) {
|
|
7931
|
-
return undefined;
|
|
7932
|
-
}
|
|
7933
|
-
};
|
|
7934
|
-
|
|
7935
7829
|
const calculateInputs = (getValue) => (inputs, step) => inputs
|
|
7936
7830
|
.filter((_) => _)
|
|
7937
7831
|
.map((_) => {
|
|
@@ -8142,20 +8036,134 @@
|
|
|
8142
8036
|
}
|
|
8143
8037
|
};
|
|
8144
8038
|
|
|
8145
|
-
const
|
|
8039
|
+
const formStateMap = [
|
|
8040
|
+
{
|
|
8041
|
+
calculator: {
|
|
8042
|
+
moneyValue: 0,
|
|
8043
|
+
monthsValue: 0,
|
|
8044
|
+
isAnnuity: false,
|
|
8045
|
+
isInsurance: false,
|
|
8046
|
+
isSalaryClient: false,
|
|
8047
|
+
isPensionClient: false,
|
|
8048
|
+
isStateEmployee: false,
|
|
8049
|
+
},
|
|
8050
|
+
},
|
|
8051
|
+
{
|
|
8052
|
+
surname: '',
|
|
8053
|
+
name: '',
|
|
8054
|
+
middleName: '',
|
|
8055
|
+
sex: '',
|
|
8056
|
+
limitedBirthday: undefined,
|
|
8057
|
+
birthPlace: '',
|
|
8058
|
+
phone: '',
|
|
8059
|
+
email: '',
|
|
8060
|
+
dulSerie: undefined,
|
|
8061
|
+
dulNumber: undefined,
|
|
8062
|
+
dulIssueDateField: undefined,
|
|
8063
|
+
dulSubdivisionCode: '',
|
|
8064
|
+
dulIssuedBy: '',
|
|
8065
|
+
addressRegistration: {
|
|
8066
|
+
fullAddress: '',
|
|
8067
|
+
fiasCode: '',
|
|
8068
|
+
},
|
|
8069
|
+
participantDateRegistration: undefined,
|
|
8070
|
+
addressFact: {
|
|
8071
|
+
fullAddress: '',
|
|
8072
|
+
fiasCode: '',
|
|
8073
|
+
},
|
|
8074
|
+
housing: undefined,
|
|
8075
|
+
},
|
|
8076
|
+
{
|
|
8077
|
+
amountWorkers: { key: '', text: '' },
|
|
8078
|
+
beginDate: undefined,
|
|
8079
|
+
employerActivities: { key: '', text: '' },
|
|
8080
|
+
employerOrganization: { key: '', text: '' },
|
|
8081
|
+
employment: { key: '', text: '' },
|
|
8082
|
+
experience5Years: undefined,
|
|
8083
|
+
inn: undefined,
|
|
8084
|
+
jobsNumber: undefined,
|
|
8085
|
+
lastJobExperience: undefined,
|
|
8086
|
+
legalForm: '',
|
|
8087
|
+
organization: { key: '', text: '' },
|
|
8088
|
+
organizationAddress: {
|
|
8089
|
+
fullAddress: '',
|
|
8090
|
+
fiasCode: '',
|
|
8091
|
+
},
|
|
8092
|
+
organizationName: '',
|
|
8093
|
+
organizationPhone: '',
|
|
8094
|
+
partInBusiness: undefined,
|
|
8095
|
+
positionOrganization: { key: '', text: '' },
|
|
8096
|
+
},
|
|
8097
|
+
{
|
|
8098
|
+
familyStatus: { key: '', text: '' },
|
|
8099
|
+
dependents: undefined,
|
|
8100
|
+
familyMembers: undefined,
|
|
8101
|
+
confirmationIncome: { key: '', text: '' },
|
|
8102
|
+
wages: undefined,
|
|
8103
|
+
mandatoryPayments: undefined,
|
|
8104
|
+
snils: '',
|
|
8105
|
+
armyIdFlg: false,
|
|
8106
|
+
},
|
|
8107
|
+
{
|
|
8108
|
+
disablePeopleFlg: false,
|
|
8109
|
+
bankruptcyFlg: false,
|
|
8110
|
+
shareholderFlg: false,
|
|
8111
|
+
legalEntityName: '',
|
|
8112
|
+
creditInRshbCd: undefined,
|
|
8113
|
+
},
|
|
8114
|
+
{
|
|
8115
|
+
regionRetail: { key: '', text: '' },
|
|
8116
|
+
addressRetail: undefined,
|
|
8117
|
+
bankEmployeeCode: undefined,
|
|
8118
|
+
},
|
|
8119
|
+
];
|
|
8120
|
+
|
|
8121
|
+
const getInitialFormState = (step, formState) => ({
|
|
8122
|
+
...formStateMap[step],
|
|
8123
|
+
...formState,
|
|
8124
|
+
limitedBirthday: transformStringToData(formState?.limitedBirthday),
|
|
8125
|
+
dulIssueDateField: transformStringToData(formState?.dulIssueDateField),
|
|
8126
|
+
participantDateRegistration: transformStringToData(formState?.participantDateRegistration),
|
|
8127
|
+
beginDate: transformStringToData(formState?.beginDate),
|
|
8128
|
+
deliveryDate: transformStringToData(formState?.deliveryDate),
|
|
8129
|
+
});
|
|
8130
|
+
const transformStringToData = (text) => {
|
|
8131
|
+
try {
|
|
8132
|
+
return text ? new Date(text) : undefined;
|
|
8133
|
+
}
|
|
8134
|
+
catch (_) {
|
|
8135
|
+
return undefined;
|
|
8136
|
+
}
|
|
8137
|
+
};
|
|
8138
|
+
|
|
8139
|
+
const useCreditFormAPI = ({ step, inputs, onNextStep, onFinish, }) => {
|
|
8146
8140
|
const isFinalStep = step === 5;
|
|
8147
|
-
const
|
|
8148
|
-
const
|
|
8149
|
-
const
|
|
8150
|
-
|
|
8151
|
-
|
|
8141
|
+
const retailFormStore = useRetailFormStore();
|
|
8142
|
+
const initialState = useMemo(() => getInitialFormState(step, retailFormStore.leadForm), [step, retailFormStore.leadForm]);
|
|
8143
|
+
const resetForm = useCallback((response) => {
|
|
8144
|
+
const { leadForm } = retailFormStore;
|
|
8145
|
+
if (isFinalStep && response.ok && leadForm) {
|
|
8146
|
+
retailFormStore.statusInfo = {
|
|
8147
|
+
regionRetail: leadForm?.regionRetail?.text,
|
|
8148
|
+
addressRetail: leadForm?.addressRetail?.text,
|
|
8149
|
+
cardCategory: leadForm?.cardCategory?.text,
|
|
8150
|
+
calculator: {
|
|
8151
|
+
monthsValue: leadForm?.calculator?.monthsValue,
|
|
8152
|
+
moneyValue: leadForm?.calculator?.moneyValue,
|
|
8153
|
+
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
8154
|
+
},
|
|
8155
|
+
};
|
|
8156
|
+
retailFormStore.leadForm = initialState;
|
|
8157
|
+
}
|
|
8158
|
+
}, [isFinalStep, initialState]);
|
|
8152
8159
|
const handleSubmit = useCallback(async (formData) => {
|
|
8153
8160
|
const feedbackValidator = objectValidator(getObjectValidator(calculateInputs(getValue(formData))(inputs, step)));
|
|
8154
8161
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
8155
|
-
return
|
|
8162
|
+
return;
|
|
8156
8163
|
}
|
|
8157
|
-
|
|
8164
|
+
retailFormStore.leadForm = formData;
|
|
8158
8165
|
try {
|
|
8166
|
+
const { taskId, profileId, participantId } = retailFormStore;
|
|
8159
8167
|
if (taskId && profileId && participantId) {
|
|
8160
8168
|
const response = await updateUserTask(getCreditFormTaskData({
|
|
8161
8169
|
participantId,
|
|
@@ -8164,60 +8172,33 @@
|
|
|
8164
8172
|
step,
|
|
8165
8173
|
formData: formData,
|
|
8166
8174
|
}));
|
|
8167
|
-
resetForm(
|
|
8175
|
+
resetForm(response);
|
|
8176
|
+
}
|
|
8177
|
+
onNextStep();
|
|
8178
|
+
if (isFinalStep) {
|
|
8179
|
+
onFinish?.();
|
|
8168
8180
|
}
|
|
8169
8181
|
}
|
|
8170
8182
|
catch (ex) {
|
|
8171
|
-
|
|
8183
|
+
// Do nothing
|
|
8172
8184
|
}
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
finishForm?.(true);
|
|
8176
|
-
}
|
|
8177
|
-
return 'OK';
|
|
8178
|
-
}, []);
|
|
8179
|
-
return {
|
|
8180
|
-
handleSubmit,
|
|
8181
|
-
};
|
|
8182
|
-
};
|
|
8183
|
-
const resetForm = ({ isFinalStep, response, leadForm, setStatusInfo, }) => {
|
|
8184
|
-
if (isFinalStep && response.ok && leadForm !== null) {
|
|
8185
|
-
const regionRetail = leadForm?.regionRetail?.text;
|
|
8186
|
-
const addressRetail = leadForm?.addressRetail?.text;
|
|
8187
|
-
const cardCategory = leadForm?.cardCategory?.text;
|
|
8188
|
-
const calculator = {
|
|
8189
|
-
monthsValue: leadForm?.calculator?.monthsValue,
|
|
8190
|
-
moneyValue: leadForm?.calculator?.moneyValue,
|
|
8191
|
-
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
8192
|
-
};
|
|
8193
|
-
setStatusInfo({
|
|
8194
|
-
regionRetail,
|
|
8195
|
-
addressRetail,
|
|
8196
|
-
cardCategory,
|
|
8197
|
-
calculator,
|
|
8198
|
-
});
|
|
8199
|
-
globalThis.localStorage.removeItem('leadForm');
|
|
8200
|
-
}
|
|
8185
|
+
}, [isFinalStep, resetForm]);
|
|
8186
|
+
return [initialState, handleSubmit];
|
|
8201
8187
|
};
|
|
8202
8188
|
const getValue = (formData) => (name) => formData[name];
|
|
8203
8189
|
|
|
8204
|
-
const CreditFormStep = JSX(({ step, sections,
|
|
8205
|
-
const
|
|
8206
|
-
const [programId] = useLocalStorage('programId');
|
|
8190
|
+
const CreditFormStep = JSX(({ step, sections, isFormFinished, programsSource, onPrevStep, onNextStep, onFinish }) => {
|
|
8191
|
+
const { programId } = useRetailFormStore();
|
|
8207
8192
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
8208
|
-
const
|
|
8209
|
-
const
|
|
8210
|
-
const { handleSubmit } = useCreditFormAPI({
|
|
8193
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
8194
|
+
const [initialState, onSubmit] = useCreditFormAPI({
|
|
8211
8195
|
step,
|
|
8212
8196
|
inputs,
|
|
8213
8197
|
onNextStep,
|
|
8214
|
-
|
|
8215
|
-
finishForm,
|
|
8216
|
-
});
|
|
8217
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
8218
|
-
onSubmit: handleSubmit,
|
|
8198
|
+
onFinish,
|
|
8219
8199
|
});
|
|
8220
|
-
|
|
8200
|
+
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
8201
|
+
return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step, params: { calcData } }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
8221
8202
|
});
|
|
8222
8203
|
|
|
8223
8204
|
/* eslint-disable max-lines */
|
|
@@ -8527,8 +8508,8 @@
|
|
|
8527
8508
|
}, []);
|
|
8528
8509
|
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
8529
8510
|
const isStartStep = step === 0;
|
|
8530
|
-
const [isFormFinished,
|
|
8531
|
-
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,
|
|
8511
|
+
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
8512
|
+
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)) })] }) }));
|
|
8532
8513
|
});
|
|
8533
8514
|
|
|
8534
8515
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
@@ -10805,7 +10786,7 @@
|
|
|
10805
10786
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10806
10787
|
});
|
|
10807
10788
|
|
|
10808
|
-
const packageVersion = "0.14.
|
|
10789
|
+
const packageVersion = "0.14.709";
|
|
10809
10790
|
|
|
10810
10791
|
exports.Blocks = Blocks;
|
|
10811
10792
|
exports.ContentPage = ContentPage;
|