@redneckz/wildless-cms-uni-blocks 0.14.699 → 0.14.701
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/draftTasksKZO.d.ts +26 -0
- package/bundle/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
- package/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/bundle/api/RetailAPI/getTaskById.d.ts +6 -0
- package/bundle/api/RetailAPI/updateUserTask.d.ts +13 -9
- package/bundle/bundle.umd.js +271 -50
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
- package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
- package/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
- package/bundle/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
- package/bundle/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
- package/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
- package/bundle/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
- package/bundle/ui-kit/DraftDialog/utils.d.ts +138 -0
- package/dist/api/RetailAPI/draftTasksKZO.d.ts +26 -0
- package/dist/api/RetailAPI/draftTasksKZO.js +9 -0
- package/dist/api/RetailAPI/draftTasksKZO.js.map +1 -0
- package/dist/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
- package/dist/api/RetailAPI/getLastTaskStatus.js +9 -0
- package/dist/api/RetailAPI/getLastTaskStatus.js.map +1 -0
- package/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/dist/api/RetailAPI/getPaymentSystems.js +1 -4
- package/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
- package/dist/api/RetailAPI/getTaskById.d.ts +6 -0
- package/dist/api/RetailAPI/getTaskById.js +9 -0
- package/dist/api/RetailAPI/getTaskById.js.map +1 -0
- package/dist/api/RetailAPI/updateUserTask.d.ts +13 -9
- package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
- package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
- package/dist/components/ApplicationLeadForm/useSaveUserData.js +19 -0
- package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
- package/dist/components/CreditCardForm/formStateMap.js +1 -1
- package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/dist/components/GrantSupport/GrantSupport.js +1 -1
- package/dist/components/GrantSupport/GrantSupport.js.map +1 -1
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
- package/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
- package/dist/ui-kit/DraftDialog/DraftActionButton.js +10 -0
- package/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
- package/dist/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
- package/dist/ui-kit/DraftDialog/DraftDialog.js +43 -0
- package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
- package/dist/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
- package/dist/ui-kit/DraftDialog/EmptyDraftDialog.js +22 -0
- package/dist/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
- package/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
- package/dist/ui-kit/DraftDialog/parseDraftTask.js +65 -0
- package/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
- package/dist/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
- package/dist/ui-kit/DraftDialog/useDraftDialog.js +16 -0
- package/dist/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
- package/dist/ui-kit/DraftDialog/utils.d.ts +138 -0
- package/dist/ui-kit/DraftDialog/utils.js +85 -0
- package/dist/ui-kit/DraftDialog/utils.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
- package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -1
- package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +10 -10
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/api/RetailAPI/draftTasksKZO.d.ts +26 -0
- package/lib/api/RetailAPI/draftTasksKZO.js +6 -0
- package/lib/api/RetailAPI/draftTasksKZO.js.map +1 -0
- package/lib/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
- package/lib/api/RetailAPI/getLastTaskStatus.js +6 -0
- package/lib/api/RetailAPI/getLastTaskStatus.js.map +1 -0
- package/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/lib/api/RetailAPI/getPaymentSystems.js +1 -4
- package/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
- package/lib/api/RetailAPI/getTaskById.d.ts +6 -0
- package/lib/api/RetailAPI/getTaskById.js +6 -0
- package/lib/api/RetailAPI/getTaskById.js.map +1 -0
- package/lib/api/RetailAPI/updateUserTask.d.ts +13 -9
- package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
- package/lib/components/ApplicationLeadForm/useSaveUserData.js +16 -0
- package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
- package/lib/components/CreditCardForm/formStateMap.js +1 -1
- package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/lib/components/GrantSupport/GrantSupport.js +1 -1
- package/lib/components/GrantSupport/GrantSupport.js.map +1 -1
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
- package/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
- package/lib/ui-kit/DraftDialog/DraftActionButton.js +8 -0
- package/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
- package/lib/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
- package/lib/ui-kit/DraftDialog/DraftDialog.js +41 -0
- package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
- package/lib/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
- package/lib/ui-kit/DraftDialog/EmptyDraftDialog.js +20 -0
- package/lib/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
- package/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
- package/lib/ui-kit/DraftDialog/parseDraftTask.js +62 -0
- package/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
- package/lib/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
- package/lib/ui-kit/DraftDialog/useDraftDialog.js +13 -0
- package/lib/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
- package/lib/ui-kit/DraftDialog/utils.d.ts +138 -0
- package/lib/ui-kit/DraftDialog/utils.js +78 -0
- package/lib/ui-kit/DraftDialog/utils.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
- package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +4 -2
- package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +10 -10
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/draftTasksKZO.d.ts +26 -0
- package/mobile/bundle/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
- package/mobile/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/mobile/bundle/api/RetailAPI/getTaskById.d.ts +6 -0
- package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +13 -9
- package/mobile/bundle/bundle.umd.js +271 -50
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
- package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
- package/mobile/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
- package/mobile/bundle/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
- package/mobile/bundle/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
- package/mobile/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
- package/mobile/bundle/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
- package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +138 -0
- package/mobile/dist/api/RetailAPI/draftTasksKZO.d.ts +26 -0
- package/mobile/dist/api/RetailAPI/draftTasksKZO.js +9 -0
- package/mobile/dist/api/RetailAPI/draftTasksKZO.js.map +1 -0
- package/mobile/dist/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
- package/mobile/dist/api/RetailAPI/getLastTaskStatus.js +9 -0
- package/mobile/dist/api/RetailAPI/getLastTaskStatus.js.map +1 -0
- package/mobile/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/mobile/dist/api/RetailAPI/getPaymentSystems.js +1 -4
- package/mobile/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
- package/mobile/dist/api/RetailAPI/getTaskById.d.ts +6 -0
- package/mobile/dist/api/RetailAPI/getTaskById.js +9 -0
- package/mobile/dist/api/RetailAPI/getTaskById.js.map +1 -0
- package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +13 -9
- package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +19 -0
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
- package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -1
- package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/GrantSupport/GrantSupport.js +1 -1
- package/mobile/dist/components/GrantSupport/GrantSupport.js.map +1 -1
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js +10 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +43 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
- package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.js +22 -0
- package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
- package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js +65 -0
- package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
- package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.js +16 -0
- package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +138 -0
- package/mobile/dist/ui-kit/DraftDialog/utils.js +85 -0
- package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -1
- package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +10 -10
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/api/RetailAPI/draftTasksKZO.d.ts +26 -0
- package/mobile/lib/api/RetailAPI/draftTasksKZO.js +6 -0
- package/mobile/lib/api/RetailAPI/draftTasksKZO.js.map +1 -0
- package/mobile/lib/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
- package/mobile/lib/api/RetailAPI/getLastTaskStatus.js +6 -0
- package/mobile/lib/api/RetailAPI/getLastTaskStatus.js.map +1 -0
- package/mobile/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/mobile/lib/api/RetailAPI/getPaymentSystems.js +1 -4
- package/mobile/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
- package/mobile/lib/api/RetailAPI/getTaskById.d.ts +6 -0
- package/mobile/lib/api/RetailAPI/getTaskById.js +6 -0
- package/mobile/lib/api/RetailAPI/getTaskById.js.map +1 -0
- package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +13 -9
- package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +16 -0
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
- package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -1
- package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/GrantSupport/GrantSupport.js +1 -1
- package/mobile/lib/components/GrantSupport/GrantSupport.js.map +1 -1
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js +8 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +41 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
- package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.js +20 -0
- package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
- package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js +62 -0
- package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
- package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.js +13 -0
- package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +138 -0
- package/mobile/lib/ui-kit/DraftDialog/utils.js +78 -0
- package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +4 -2
- package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +10 -10
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/api/RetailAPI/draftTasksKZO.ts +33 -0
- package/mobile/src/api/RetailAPI/getLastTaskStatus.ts +21 -0
- package/mobile/src/api/RetailAPI/getPaymentSystems.ts +3 -10
- package/mobile/src/api/RetailAPI/getTaskById.ts +12 -0
- package/mobile/src/api/RetailAPI/updateUserTask.ts +14 -9
- package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +8 -8
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +31 -33
- package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +29 -0
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -1
- package/mobile/src/components/GrantSupport/GrantSupport.tsx +1 -1
- package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +1 -1
- package/mobile/src/ui-kit/DraftDialog/DraftActionButton.tsx +32 -0
- package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +91 -0
- package/mobile/src/ui-kit/DraftDialog/EmptyDraftDialog.tsx +47 -0
- package/mobile/src/ui-kit/DraftDialog/parseDraftTask.ts +123 -0
- package/mobile/src/ui-kit/DraftDialog/useDraftDialog.tsx +21 -0
- package/mobile/src/ui-kit/DraftDialog/utils.ts +148 -0
- package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -6
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
- package/package.json +1 -1
- package/src/api/RetailAPI/draftTasksKZO.ts +33 -0
- package/src/api/RetailAPI/getLastTaskStatus.ts +21 -0
- package/src/api/RetailAPI/getPaymentSystems.ts +3 -10
- package/src/api/RetailAPI/getTaskById.ts +12 -0
- package/src/api/RetailAPI/updateUserTask.ts +14 -9
- package/src/components/ApplicationLeadForm/LeadFormState.ts +8 -8
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +31 -33
- package/src/components/ApplicationLeadForm/useSaveUserData.ts +29 -0
- package/src/components/CreditCardForm/formStateMap.tsx +1 -1
- package/src/components/GrantSupport/GrantSupport.tsx +1 -1
- package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +1 -1
- package/src/ui-kit/DraftDialog/DraftActionButton.tsx +32 -0
- package/src/ui-kit/DraftDialog/DraftDialog.tsx +91 -0
- package/src/ui-kit/DraftDialog/EmptyDraftDialog.tsx +47 -0
- package/src/ui-kit/DraftDialog/parseDraftTask.ts +123 -0
- package/src/ui-kit/DraftDialog/useDraftDialog.tsx +21 -0
- package/src/ui-kit/DraftDialog/utils.ts +148 -0
- package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -6
- package/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PaymentType } from '../../api/RetailAPI/updateUserTask';
|
|
1
|
+
import { type PaymentSystem, type PaymentType } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
3
3
|
export interface FormConsents {
|
|
4
4
|
processPersonalDataFlg?: boolean;
|
|
@@ -79,9 +79,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
79
79
|
legalForm?: string;
|
|
80
80
|
organizationName?: string;
|
|
81
81
|
generalSeniority?: string;
|
|
82
|
-
lastJobExperience?:
|
|
83
|
-
experience5Years?:
|
|
84
|
-
jobsNumber?:
|
|
82
|
+
lastJobExperience?: string;
|
|
83
|
+
experience5Years?: string;
|
|
84
|
+
jobsNumber?: string;
|
|
85
85
|
organizationAddress?: Address;
|
|
86
86
|
beginDate?: Date | string;
|
|
87
87
|
addressFact?: Address;
|
|
@@ -100,9 +100,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
100
100
|
consentAssignmentClaimsFlg?: boolean;
|
|
101
101
|
consentCollectionFlg?: boolean;
|
|
102
102
|
familyStatus?: Option;
|
|
103
|
-
children?:
|
|
104
|
-
familyMembers?:
|
|
105
|
-
dependents?:
|
|
103
|
+
children?: string;
|
|
104
|
+
familyMembers?: string;
|
|
105
|
+
dependents?: string;
|
|
106
106
|
totalIncome?: number;
|
|
107
107
|
expenses?: number;
|
|
108
108
|
snils?: string;
|
|
@@ -127,7 +127,7 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
127
127
|
addressMatch?: boolean;
|
|
128
128
|
confirmationIncome?: Option;
|
|
129
129
|
currency?: string;
|
|
130
|
-
paymentSystem?:
|
|
130
|
+
paymentSystem?: PaymentSystem;
|
|
131
131
|
cardCategory?: Option;
|
|
132
132
|
codeWord?: string;
|
|
133
133
|
esiaAccountTypeCd?: Option;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type LeadFormState } from './LeadFormState';
|
|
2
|
+
export interface UserData {
|
|
3
|
+
participantId: number;
|
|
4
|
+
taskId: number;
|
|
5
|
+
profileId: number;
|
|
6
|
+
programId: string;
|
|
7
|
+
formData: LeadFormState;
|
|
8
|
+
}
|
|
9
|
+
export declare const useSaveUserData: () => ({ participantId, taskId, profileId, formData, programId: programNumber }: UserData) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Task } from '../../api/RetailAPI/draftTasksKZO';
|
|
2
|
+
export interface DraftDialogProps {
|
|
3
|
+
task: Task;
|
|
4
|
+
isFromLead?: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DraftDialog: import("@redneckz/uni-jsx").UNIComponent<DraftDialogProps, any, any>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Task } from '../../api/RetailAPI/draftTasksKZO';
|
|
2
|
+
declare type useDraftDialogOpenProps = {
|
|
3
|
+
task?: Task;
|
|
4
|
+
isFromLead?: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const useDraftDialog: () => {
|
|
8
|
+
open: ({ task, isFromLead, onClose }: useDraftDialogOpenProps) => void;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { type LeadProps } from '../../api/RetailAPI/model/LeadFormData';
|
|
2
|
+
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
3
|
+
import { type Option } from '../Select/Option';
|
|
4
|
+
export declare const enum EContactType {
|
|
5
|
+
MainPhone = "MAIN_PHONE",
|
|
6
|
+
SecondPhone = "SECOND_PHONE",
|
|
7
|
+
HomePhoneFact = "HOME_PHONE_FACT",
|
|
8
|
+
HomePhoneReg = "HOME_PHONE_REG",
|
|
9
|
+
OrganizationPhone = "ORGANIZATION_PHONE",
|
|
10
|
+
EMail = "EMAIL"
|
|
11
|
+
}
|
|
12
|
+
export declare const enum EAddressType {
|
|
13
|
+
REGISTRATION = "REGISTRATION",
|
|
14
|
+
RESIDENTAL = "RESIDENTAL",
|
|
15
|
+
WORK = "WORK"
|
|
16
|
+
}
|
|
17
|
+
export declare const enum EIncomesType {
|
|
18
|
+
INCOME_AVERAGE = "INCOME_AVERAGE",
|
|
19
|
+
MANDATORY_PAYMENTS = "MANDATORY_PAYMENTS",
|
|
20
|
+
ADDITIONAL_INCOME = "ADDITIONAL_INCOME",
|
|
21
|
+
OTHER_INCOME = "OTHER_INCOME",
|
|
22
|
+
OTHER_PAYMENTS = "OTHER_PAYMENTS",
|
|
23
|
+
RENTAL_INCOME = "RENTAL_INCOME",
|
|
24
|
+
WAGES = "WAGES",
|
|
25
|
+
RETIREMENT_INCOME = "RETIREMENT_INCOME"
|
|
26
|
+
}
|
|
27
|
+
export declare const creditCodesToProgrammIdMap: {
|
|
28
|
+
credit_cash: string;
|
|
29
|
+
credit_cash_single_doc: string;
|
|
30
|
+
credit_mcx: string;
|
|
31
|
+
family_offer_credit: string;
|
|
32
|
+
gas_engine_fuel: string;
|
|
33
|
+
pension_credit: string;
|
|
34
|
+
ref_credit: string;
|
|
35
|
+
ref_credit_single_doc: string;
|
|
36
|
+
self_employed: string;
|
|
37
|
+
summer_cash: string;
|
|
38
|
+
summer_cash_pens: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const cardCodesToProgrammIdMap: {
|
|
41
|
+
amur_card: string;
|
|
42
|
+
owner_card: string;
|
|
43
|
+
travel_card: string;
|
|
44
|
+
};
|
|
45
|
+
export declare const creditProgramCodeToProductIdMap: {
|
|
46
|
+
amur_card: string;
|
|
47
|
+
owner_card: string;
|
|
48
|
+
travel_card: string;
|
|
49
|
+
credit_cash: string;
|
|
50
|
+
credit_cash_single_doc: string;
|
|
51
|
+
credit_mcx: string;
|
|
52
|
+
family_offer_credit: string;
|
|
53
|
+
gas_engine_fuel: string;
|
|
54
|
+
pension_credit: string;
|
|
55
|
+
ref_credit: string;
|
|
56
|
+
ref_credit_single_doc: string;
|
|
57
|
+
self_employed: string;
|
|
58
|
+
summer_cash: string;
|
|
59
|
+
summer_cash_pens: string;
|
|
60
|
+
};
|
|
61
|
+
export declare const getParticipantIncomes: (participantIncomes: Participant['participantIncomes']) => {
|
|
62
|
+
wages: number | undefined;
|
|
63
|
+
mandatoryPayments: number | undefined;
|
|
64
|
+
incomeAverage: number | undefined;
|
|
65
|
+
additionalIncome: number | undefined;
|
|
66
|
+
otherIncome: number | undefined;
|
|
67
|
+
otherPayments: number | undefined;
|
|
68
|
+
rentalIncome: number | undefined;
|
|
69
|
+
retirementIncome: number | undefined;
|
|
70
|
+
};
|
|
71
|
+
export declare const getParticipantAddresses: (participantAddresses: Participant['participantAddresses']) => {
|
|
72
|
+
addressRegistration: {
|
|
73
|
+
addressType: {
|
|
74
|
+
key: "REGISTRATION" | "RESIDENTAL" | "WORK";
|
|
75
|
+
};
|
|
76
|
+
apartment: string;
|
|
77
|
+
block: string;
|
|
78
|
+
building: string;
|
|
79
|
+
city: string;
|
|
80
|
+
district: string;
|
|
81
|
+
fiasCode: string;
|
|
82
|
+
fullAddress: string;
|
|
83
|
+
house: string;
|
|
84
|
+
locality: string;
|
|
85
|
+
okatoRegionCode: string;
|
|
86
|
+
postcode: string;
|
|
87
|
+
region: string;
|
|
88
|
+
regionCode: string;
|
|
89
|
+
street: string;
|
|
90
|
+
} | undefined;
|
|
91
|
+
addressFact: {
|
|
92
|
+
addressType: {
|
|
93
|
+
key: "REGISTRATION" | "RESIDENTAL" | "WORK";
|
|
94
|
+
};
|
|
95
|
+
apartment: string;
|
|
96
|
+
block: string;
|
|
97
|
+
building: string;
|
|
98
|
+
city: string;
|
|
99
|
+
district: string;
|
|
100
|
+
fiasCode: string;
|
|
101
|
+
fullAddress: string;
|
|
102
|
+
house: string;
|
|
103
|
+
locality: string;
|
|
104
|
+
okatoRegionCode: string;
|
|
105
|
+
postcode: string;
|
|
106
|
+
region: string;
|
|
107
|
+
regionCode: string;
|
|
108
|
+
street: string;
|
|
109
|
+
} | undefined;
|
|
110
|
+
organizationAddress: {
|
|
111
|
+
addressType: {
|
|
112
|
+
key: "REGISTRATION" | "RESIDENTAL" | "WORK";
|
|
113
|
+
};
|
|
114
|
+
apartment: string;
|
|
115
|
+
block: string;
|
|
116
|
+
building: string;
|
|
117
|
+
city: string;
|
|
118
|
+
district: string;
|
|
119
|
+
fiasCode: string;
|
|
120
|
+
fullAddress: string;
|
|
121
|
+
house: string;
|
|
122
|
+
locality: string;
|
|
123
|
+
okatoRegionCode: string;
|
|
124
|
+
postcode: string;
|
|
125
|
+
region: string;
|
|
126
|
+
regionCode: string;
|
|
127
|
+
street: string;
|
|
128
|
+
} | undefined;
|
|
129
|
+
};
|
|
130
|
+
export declare const getParticipantContacts: (participantContacts: Participant['participantContacts']) => {
|
|
131
|
+
email: string | undefined;
|
|
132
|
+
phone: string | undefined;
|
|
133
|
+
organizationPhone: string | undefined;
|
|
134
|
+
};
|
|
135
|
+
export declare const getParticipantGender: (gender: Participant['genderCd']) => {
|
|
136
|
+
sex: string;
|
|
137
|
+
} | null;
|
|
138
|
+
export declare const getSelectValue: (option?: LeadProps) => Option | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Participant, type PaymentType } from './updateUserTask';
|
|
2
|
+
export declare type Task = {
|
|
3
|
+
courierDeliveryFlg?: boolean;
|
|
4
|
+
creditPeriod?: number;
|
|
5
|
+
creditProgram: {
|
|
6
|
+
code: string;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
deliveryComment?: string;
|
|
10
|
+
deliveryDate?: string;
|
|
11
|
+
deliveryTimeCd?: {
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
id: number;
|
|
15
|
+
loanAmount?: number;
|
|
16
|
+
office?: {
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
participants: Participant[];
|
|
20
|
+
paymentTypeCd?: PaymentType;
|
|
21
|
+
};
|
|
22
|
+
declare type DraftTaskKZOResponse = {
|
|
23
|
+
tasks: Array<Task>;
|
|
24
|
+
};
|
|
25
|
+
export declare const draftTasksKZO: () => Promise<DraftTaskKZOResponse['tasks']>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.draftTasksKZO = void 0;
|
|
3
|
+
const doRequest_1 = require("./doRequest");
|
|
4
|
+
const draftTasksKZO = async () => {
|
|
5
|
+
const res = await (0, doRequest_1.fetchRetailJSON)('/user-data/draftTasksKZO', 'GET');
|
|
6
|
+
return res?.tasks || [];
|
|
7
|
+
};
|
|
8
|
+
exports.draftTasksKZO = draftTasksKZO;
|
|
9
|
+
//# sourceMappingURL=draftTasksKZO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draftTasksKZO.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/draftTasksKZO.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AA4BvC,MAAM,aAAa,GAAG,KAAK,IAA4C,EAAE;IAC9E,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAe,EAAuB,0BAA0B,EAAE,KAAK,CAAC,CAAC;IAE3F,OAAO,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.getLastTaskStatus = void 0;
|
|
3
|
+
const doRequest_1 = require("./doRequest");
|
|
4
|
+
const getLastTaskStatus = async (body) => {
|
|
5
|
+
const res = await (0, doRequest_1.fetchRetailJSON)('/user-data/getLastStatus', 'POST', body);
|
|
6
|
+
return res?.statusCd === 'DRAFT' ? res?.taskId : null;
|
|
7
|
+
};
|
|
8
|
+
exports.getLastTaskStatus = getLastTaskStatus;
|
|
9
|
+
//# sourceMappingURL=getLastTaskStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLastTaskStatus.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/getLastTaskStatus.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AAYvC,MAAM,iBAAiB,GAAG,KAAK,EAAE,IAA2B,EAA0B,EAAE;IAC7F,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAe,EAC/B,0BAA0B,EAC1B,MAAM,EACN,IAAI,CACL,CAAC;IAEF,OAAO,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
text: string;
|
|
4
|
-
}[]>;
|
|
1
|
+
import { type PaymentSystem } from './updateUserTask';
|
|
2
|
+
export declare const getPaymentSystems: (creditProgramId: string) => Promise<PaymentSystem[]>;
|
|
@@ -5,10 +5,7 @@ const getPaymentSystems = async (creditProgramId) => {
|
|
|
5
5
|
const data = await (0, doRequest_1.fetchRetailJSON)('/public-data/creditProgramConditions', 'POST', {
|
|
6
6
|
creditProgramId,
|
|
7
7
|
});
|
|
8
|
-
return
|
|
9
|
-
id: paymentSystem.type,
|
|
10
|
-
text: paymentSystem.name,
|
|
11
|
-
})) ?? []);
|
|
8
|
+
return data?.paymentSystems || [];
|
|
12
9
|
};
|
|
13
10
|
exports.getPaymentSystems = getPaymentSystems;
|
|
14
11
|
//# sourceMappingURL=getPaymentSystems.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPaymentSystems.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/getPaymentSystems.ts"],"names":[],"mappings":";;AAAA,2CAA8C;
|
|
1
|
+
{"version":3,"file":"getPaymentSystems.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/getPaymentSystems.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AAOvC,MAAM,iBAAiB,GAAG,KAAK,EAAE,eAAuB,EAAE,EAAE;IACjE,MAAM,IAAI,GAAG,MAAM,IAAA,2BAAe,EAChC,sCAAsC,EACtC,MAAM,EACN;QACE,eAAe;KAChB,CACF,CAAC;IAEF,OAAO,IAAI,EAAE,cAAc,IAAI,EAAE,CAAC;AACpC,CAAC,CAAC;AAVW,QAAA,iBAAiB,qBAU5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.getTaskById = void 0;
|
|
3
|
+
const doRequest_1 = require("./doRequest");
|
|
4
|
+
const getTaskById = async (body) => {
|
|
5
|
+
const res = await (0, doRequest_1.fetchRetailJSON)('/user-data/getTaskById', 'POST', body);
|
|
6
|
+
return res || undefined;
|
|
7
|
+
};
|
|
8
|
+
exports.getTaskById = getTaskById;
|
|
9
|
+
//# sourceMappingURL=getTaskById.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTaskById.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/getTaskById.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AAOvC,MAAM,WAAW,GAAG,KAAK,EAAE,IAAqB,EAA6B,EAAE;IACpF,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAe,EAAO,wBAAwB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAEhF,OAAO,GAAG,IAAI,SAAS,CAAC;AAC1B,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB"}
|
|
@@ -28,18 +28,22 @@ export declare type PaymentType = {
|
|
|
28
28
|
key: 'ANNUITY' | 'DIFFERENTIAL';
|
|
29
29
|
value: string;
|
|
30
30
|
};
|
|
31
|
+
export declare type PaymentSystem = {
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
31
35
|
export declare type Participant = {
|
|
32
36
|
birthDate?: string;
|
|
33
37
|
id: number;
|
|
34
38
|
midname?: string;
|
|
35
39
|
name?: string;
|
|
36
40
|
surname?: string;
|
|
37
|
-
profile
|
|
41
|
+
profile: {
|
|
38
42
|
id: number;
|
|
39
43
|
};
|
|
40
44
|
armyIdFlg?: boolean;
|
|
41
45
|
birthPlace?: string;
|
|
42
|
-
childrenDependents?:
|
|
46
|
+
childrenDependents?: string;
|
|
43
47
|
genderCd?: Option;
|
|
44
48
|
dulIssueDate?: string;
|
|
45
49
|
dulIssuedBy?: string;
|
|
@@ -50,13 +54,13 @@ export declare type Participant = {
|
|
|
50
54
|
employeesNumberCd?: Option;
|
|
51
55
|
employmentContractDate?: string;
|
|
52
56
|
employmentTypeCd?: Option;
|
|
53
|
-
generalSeniority?:
|
|
57
|
+
generalSeniority?: string;
|
|
54
58
|
homeMatchFlg?: boolean;
|
|
55
59
|
houseTypeCd?: Option;
|
|
56
60
|
incomeCertificateCd?: Option;
|
|
57
61
|
initiateBankruptcyFlg?: boolean;
|
|
58
|
-
jobsNumber?:
|
|
59
|
-
lastWorkDuration?:
|
|
62
|
+
jobsNumber?: string;
|
|
63
|
+
lastWorkDuration?: string;
|
|
60
64
|
maritalStatusCd?: Option;
|
|
61
65
|
militaryStatusCd?: Option;
|
|
62
66
|
organizationActivityTypeCd?: Option;
|
|
@@ -64,7 +68,7 @@ export declare type Participant = {
|
|
|
64
68
|
organizationKindCd?: Option;
|
|
65
69
|
organizationName?: string;
|
|
66
70
|
organizationTypeCd?: Option;
|
|
67
|
-
otherDependents?:
|
|
71
|
+
otherDependents?: string;
|
|
68
72
|
ownershipShare?: string;
|
|
69
73
|
opf?: string;
|
|
70
74
|
participantAddresses?: ParticipantAddress[];
|
|
@@ -76,14 +80,14 @@ export declare type Participant = {
|
|
|
76
80
|
seniority?: string;
|
|
77
81
|
seniorityInterruptionsFlg?: boolean;
|
|
78
82
|
snils?: string;
|
|
79
|
-
totalDependents?:
|
|
83
|
+
totalDependents?: string;
|
|
80
84
|
bankruptcyFlg?: boolean;
|
|
81
85
|
shareholderFlg?: boolean;
|
|
82
86
|
nameLegalEntity?: string;
|
|
83
87
|
creditInRshbCd?: Option;
|
|
84
88
|
participantContacts?: Array<{
|
|
85
89
|
contactTypeCd: {
|
|
86
|
-
key: 'EMAIL' | 'MAIN_PHONE';
|
|
90
|
+
key: 'EMAIL' | 'MAIN_PHONE' | 'ORGANIZATION_PHONE';
|
|
87
91
|
};
|
|
88
92
|
value: string;
|
|
89
93
|
}>;
|
|
@@ -94,7 +98,7 @@ export declare type Participant = {
|
|
|
94
98
|
currencyCode?: {
|
|
95
99
|
key: string;
|
|
96
100
|
};
|
|
97
|
-
paymentSystemTypeCd?:
|
|
101
|
+
paymentSystemTypeCd?: PaymentSystem;
|
|
98
102
|
classCard?: Option;
|
|
99
103
|
codeWord?: string;
|
|
100
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateUserTask.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/updateUserTask.ts"],"names":[],"mappings":";;AACA,2CAAwC;
|
|
1
|
+
{"version":3,"file":"updateUserTask.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/updateUserTask.ts"],"names":[],"mappings":";;AACA,2CAAwC;AAmJjC,MAAM,cAAc,GAAG,CAAC,IAAwB,EAAE,EAAE,CACzD,IAAA,qBAAS,EAAC,2BAA2B,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AADzC,QAAA,cAAc,kBAC2B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PaymentType } from '../../api/RetailAPI/updateUserTask';
|
|
1
|
+
import { type PaymentSystem, type PaymentType } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
3
3
|
export interface FormConsents {
|
|
4
4
|
processPersonalDataFlg?: boolean;
|
|
@@ -79,9 +79,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
79
79
|
legalForm?: string;
|
|
80
80
|
organizationName?: string;
|
|
81
81
|
generalSeniority?: string;
|
|
82
|
-
lastJobExperience?:
|
|
83
|
-
experience5Years?:
|
|
84
|
-
jobsNumber?:
|
|
82
|
+
lastJobExperience?: string;
|
|
83
|
+
experience5Years?: string;
|
|
84
|
+
jobsNumber?: string;
|
|
85
85
|
organizationAddress?: Address;
|
|
86
86
|
beginDate?: Date | string;
|
|
87
87
|
addressFact?: Address;
|
|
@@ -100,9 +100,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
100
100
|
consentAssignmentClaimsFlg?: boolean;
|
|
101
101
|
consentCollectionFlg?: boolean;
|
|
102
102
|
familyStatus?: Option;
|
|
103
|
-
children?:
|
|
104
|
-
familyMembers?:
|
|
105
|
-
dependents?:
|
|
103
|
+
children?: string;
|
|
104
|
+
familyMembers?: string;
|
|
105
|
+
dependents?: string;
|
|
106
106
|
totalIncome?: number;
|
|
107
107
|
expenses?: number;
|
|
108
108
|
snils?: string;
|
|
@@ -127,7 +127,7 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
127
127
|
addressMatch?: boolean;
|
|
128
128
|
confirmationIncome?: Option;
|
|
129
129
|
currency?: string;
|
|
130
|
-
paymentSystem?:
|
|
130
|
+
paymentSystem?: PaymentSystem;
|
|
131
131
|
cardCategory?: Option;
|
|
132
132
|
codeWord?: string;
|
|
133
133
|
esiaAccountTypeCd?: Option;
|
|
@@ -37,7 +37,7 @@ const initialFormState = {
|
|
|
37
37
|
addressRegistration: '',
|
|
38
38
|
participantDateRegistration: undefined,
|
|
39
39
|
currency: '',
|
|
40
|
-
paymentSystem: '',
|
|
40
|
+
paymentSystem: { name: '', type: '' },
|
|
41
41
|
cardCategory: { key: '', text: '' },
|
|
42
42
|
codeWord: '',
|
|
43
43
|
addressRetail: { key: '', text: '' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialFormState.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/getInitialFormState.tsx"],"names":[],"mappings":";;AAAA,gEAI0C;AAC1C,iFAA+E;AAC/E,qEAAmE;AAInE,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7B,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACpC,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;IACnB,aAAa,EAAE,EAAE;IACjB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,MAAM;IACd,aAAa,EAAE,gCAAe,CAAC,CAAC,CAAC;IACjC,WAAW,EAAE,yBAAa,CAAC,CAAC,CAAC;IAC7B,cAAc,EAAE,2BAAe,CAAC,CAAC,CAAC;IAClC,gBAAgB,EAAE,8BAAkB,CAAC,CAAC,CAAC;IACvC,QAAQ,EAAE,oBAAS,CAAC,CAAC,CAAC;IACtB,QAAQ,EAAE,SAAS;IACnB,eAAe,EAAE,SAAS;IAC1B,QAAQ,EAAE,KAAK;IACf,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE,KAAK;IAClB,yBAAyB,EAAE,KAAK;IAChC,qBAAqB,EAAE,KAAK;IAC5B,sBAAsB,EAAE,KAAK;IAC7B,kBAAkB,EAAE,KAAK;IACzB,gBAAgB,EAAE,KAAK;IACvB,gBAAgB,EAAE,KAAK;IACvB,mBAAmB,EAAE,EAAE;IACvB,2BAA2B,EAAE,SAAS;IACtC,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"getInitialFormState.js","sourceRoot":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AE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;CACrC,CAAC;AAEK,MAAM,mBAAmB,GAAG,CACjC,MAAkB,EAClB,SAA+B,EAChB,EAAE;IACjB,IAAI,SAAS,EAAE;QACb,OAAO,EAAE,GAAG,SAAS,EAAE,eAAe,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,eAAe,IAAI,CAAC,CAAC,EAAE,CAAC;KACrF;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAClC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAChB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,SAAS,KAAK,KAAK,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;KAC7E,CAAC,CACH,CAAC;IAEF,OAAO,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;AAC3D,CAAC,CAAC;AAhBW,QAAA,mBAAmB,uBAgB9B"}
|
|
@@ -3,12 +3,14 @@ exports.useApplicationLeadApi = void 0;
|
|
|
3
3
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
4
4
|
const createDraftTask_1 = require("../../api/RetailAPI/createDraftTask");
|
|
5
5
|
const createUserProfile_1 = require("../../api/RetailAPI/createUserProfile");
|
|
6
|
+
const getLastTaskStatus_1 = require("../../api/RetailAPI/getLastTaskStatus");
|
|
7
|
+
const getTaskById_1 = require("../../api/RetailAPI/getTaskById");
|
|
6
8
|
const updateUserProfile_1 = require("../../api/RetailAPI/updateUserProfile");
|
|
7
9
|
const updateUserTask_1 = require("../../api/RetailAPI/updateUserTask");
|
|
8
10
|
const getUpdateUserProfile_1 = require("../../api/RetailAPI/utils/getUpdateUserProfile");
|
|
9
|
-
const useSetter_1 = require("../../hooks/useSetter");
|
|
10
11
|
const useConsentBkiDialog_1 = require("../../ui-kit/ConsentBkiDialog/useConsentBkiDialog");
|
|
11
12
|
const useDialog_1 = require("../../ui-kit/DialogManager/useDialog");
|
|
13
|
+
const useDraftDialog_1 = require("../../ui-kit/DraftDialog/useDraftDialog");
|
|
12
14
|
const useEsiaLoginDialog_1 = require("../../ui-kit/EsiaLoginDialog/useEsiaLoginDialog");
|
|
13
15
|
const getObjectValidator_1 = require("../../ui-kit/FormField/getObjectValidator");
|
|
14
16
|
const VerifyPhoneDialog_1 = require("../../ui-kit/VerifyPhoneDialog/VerifyPhoneDialog");
|
|
@@ -17,21 +19,14 @@ const objectValidator_1 = require("../../validation/objectValidator");
|
|
|
17
19
|
const validator_1 = require("../../validation/validator");
|
|
18
20
|
const consents_1 = require("./consents");
|
|
19
21
|
const getLeadFormTaskData_1 = require("./getLeadFormTaskData");
|
|
20
|
-
const
|
|
22
|
+
const useSaveUserData_1 = require("./useSaveUserData");
|
|
21
23
|
const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
|
|
22
24
|
const [responseStatus, setResponseStatus] = (0, hooks_1.useState)('');
|
|
23
|
-
const
|
|
24
|
-
const saveForm = (0, useSetter_1.useSetter)(leadFormStore, 'leadForm');
|
|
25
|
+
const saveUserData = (0, useSaveUserData_1.useSaveUserData)();
|
|
25
26
|
const openEsiaLoginDialog = (0, useEsiaLoginDialog_1.useEsiaLoginDialog)(nextStepLink);
|
|
26
27
|
const consentBkiDialog = (0, useConsentBkiDialog_1.useConsentBkiDialog)(openEsiaLoginDialog);
|
|
27
28
|
const verifyPhoneDialog = (0, useDialog_1.useDialog)(VerifyPhoneDialog_1.VerifyPhoneDialog);
|
|
28
|
-
const
|
|
29
|
-
leadFormStore.participantId = participantId;
|
|
30
|
-
leadFormStore.taskId = taskId;
|
|
31
|
-
leadFormStore.profileId = profileId;
|
|
32
|
-
leadFormStore.programId = programNumber;
|
|
33
|
-
}, []);
|
|
34
|
-
// eslint-disable-next-line consistent-return
|
|
29
|
+
const draftDialog = (0, useDraftDialog_1.useDraftDialog)();
|
|
35
30
|
const handleSubmit = (0, hooks_1.useCallback)(async (formData) => {
|
|
36
31
|
const feedbackValidator = (0, objectValidator_1.objectValidator)((0, getObjectValidator_1.getObjectValidator)(inputs));
|
|
37
32
|
if (!(0, validator_1.isValidationSuccess)(feedbackValidator(formData))) {
|
|
@@ -42,17 +37,34 @@ const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
|
|
|
42
37
|
profile: { phone: (0, formatPhone_1.formatPhone)(formData.phone) },
|
|
43
38
|
});
|
|
44
39
|
if (profileId && formData?.phone) {
|
|
40
|
+
const sendCurrentTask = async () => {
|
|
41
|
+
await updateUserData({
|
|
42
|
+
programId,
|
|
43
|
+
profileId,
|
|
44
|
+
formData,
|
|
45
|
+
saveUserData,
|
|
46
|
+
});
|
|
47
|
+
verifyPhoneDialog.close();
|
|
48
|
+
consentBkiDialog.open(formData.phone, profileId);
|
|
49
|
+
};
|
|
45
50
|
const handleSuccessVerify = async () => {
|
|
46
51
|
try {
|
|
47
|
-
await
|
|
48
|
-
programId,
|
|
52
|
+
const lastTaskId = await (0, getLastTaskStatus_1.getLastTaskStatus)({
|
|
49
53
|
profileId,
|
|
50
|
-
|
|
51
|
-
saveUserData,
|
|
52
|
-
saveForm,
|
|
54
|
+
programId,
|
|
53
55
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
if (lastTaskId) {
|
|
57
|
+
const task = await (0, getTaskById_1.getTaskById)({ taskId: lastTaskId });
|
|
58
|
+
verifyPhoneDialog.close();
|
|
59
|
+
draftDialog.open({
|
|
60
|
+
task,
|
|
61
|
+
isFromLead: true,
|
|
62
|
+
onClose: sendCurrentTask,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
await sendCurrentTask();
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
catch {
|
|
58
70
|
setResponseStatus('Fail');
|
|
@@ -78,7 +90,7 @@ const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
|
|
|
78
90
|
};
|
|
79
91
|
};
|
|
80
92
|
exports.useApplicationLeadApi = useApplicationLeadApi;
|
|
81
|
-
const updateUserData = async ({ programId, profileId, formData, saveUserData,
|
|
93
|
+
const updateUserData = async ({ programId, profileId, formData, saveUserData, }) => {
|
|
82
94
|
const transformedForm = transformOtherConsentsField(formData);
|
|
83
95
|
await (0, updateUserProfile_1.updateUserProfile)((0, getUpdateUserProfile_1.getUpdateUserProfileData)(profileId, transformedForm));
|
|
84
96
|
const { taskId, participantId } = await (0, createDraftTask_1.createDraftTask)({
|
|
@@ -96,8 +108,7 @@ const updateUserData = async ({ programId, profileId, formData, saveUserData, sa
|
|
|
96
108
|
catch (ex) {
|
|
97
109
|
console.log(ex);
|
|
98
110
|
}
|
|
99
|
-
saveUserData({ participantId, taskId, profileId, programId });
|
|
100
|
-
saveForm(formData);
|
|
111
|
+
saveUserData({ participantId, taskId, profileId, programId, formData });
|
|
101
112
|
};
|
|
102
113
|
const transformOtherConsentsField = (formData) => {
|
|
103
114
|
const { consentOthersFlg, ...form } = formData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApplicationLeadApi.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useApplicationLeadApi.tsx"],"names":[],"mappings":";;AAAA,uDAAoE;AACpE,yEAAsE;AACtE,6EAA0E;AAC1E,6EAA0E;AAC1E,uEAAoE;AACpE,yFAA0F;AAC1F,
|
|
1
|
+
{"version":3,"file":"useApplicationLeadApi.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useApplicationLeadApi.tsx"],"names":[],"mappings":";;AAAA,uDAAoE;AACpE,yEAAsE;AACtE,6EAA0E;AAC1E,6EAA0E;AAC1E,iEAA8D;AAC9D,6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
|
|
5
|
+
profileId: number;
|
|
6
|
+
programId: string;
|
|
7
|
+
formData: LeadFormState;
|
|
8
|
+
}
|
|
9
|
+
export declare const useSaveUserData: () => ({ participantId, taskId, profileId, formData, programId: programNumber }: UserData) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.useSaveUserData = void 0;
|
|
3
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
4
|
+
const useSetter_1 = require("../../hooks/useSetter");
|
|
5
|
+
const useLeadFormStore_1 = require("./useLeadFormStore");
|
|
6
|
+
const useSaveUserData = () => {
|
|
7
|
+
const leadFormStore = (0, useLeadFormStore_1.useLeadFormStore)();
|
|
8
|
+
const saveForm = (0, useSetter_1.useSetter)(leadFormStore, 'leadForm');
|
|
9
|
+
const saveUserData = (0, hooks_1.useCallback)(({ participantId, taskId, profileId, formData, programId: programNumber }) => {
|
|
10
|
+
leadFormStore.participantId = participantId;
|
|
11
|
+
leadFormStore.taskId = taskId;
|
|
12
|
+
leadFormStore.profileId = profileId;
|
|
13
|
+
leadFormStore.programId = programNumber;
|
|
14
|
+
saveForm(formData);
|
|
15
|
+
}, []);
|
|
16
|
+
return saveUserData;
|
|
17
|
+
};
|
|
18
|
+
exports.useSaveUserData = useSaveUserData;
|
|
19
|
+
//# sourceMappingURL=useSaveUserData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSaveUserData.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useSaveUserData.ts"],"names":[],"mappings":";;AAAA,uDAA0D;AAC1D,qDAAkD;AAElD,yDAAsD;AAS/C,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,aAAa,GAAG,IAAA,mCAAgB,GAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAA,qBAAS,EAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAEtD,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAY,EAAE,EAAE;QACrF,aAAa,CAAC,aAAa,GAAG,aAAa,CAAC;QAC5C,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,aAAa,CAAC;QACxC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrB,CAAC,EACD,EAAE,CACH,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAhBW,QAAA,eAAe,mBAgB1B"}
|