@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
|
@@ -41,18 +41,23 @@ export type PaymentType = {
|
|
|
41
41
|
value: string;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
export type PaymentSystem = {
|
|
45
|
+
name: string;
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
44
49
|
export type Participant = {
|
|
45
50
|
birthDate?: string;
|
|
46
51
|
id: number;
|
|
47
52
|
midname?: string;
|
|
48
53
|
name?: string;
|
|
49
54
|
surname?: string;
|
|
50
|
-
profile
|
|
55
|
+
profile: {
|
|
51
56
|
id: number;
|
|
52
57
|
};
|
|
53
58
|
armyIdFlg?: boolean;
|
|
54
59
|
birthPlace?: string;
|
|
55
|
-
childrenDependents?:
|
|
60
|
+
childrenDependents?: string;
|
|
56
61
|
genderCd?: Option;
|
|
57
62
|
dulIssueDate?: string;
|
|
58
63
|
dulIssuedBy?: string;
|
|
@@ -63,13 +68,13 @@ export type Participant = {
|
|
|
63
68
|
employeesNumberCd?: Option;
|
|
64
69
|
employmentContractDate?: string;
|
|
65
70
|
employmentTypeCd?: Option;
|
|
66
|
-
generalSeniority?:
|
|
71
|
+
generalSeniority?: string;
|
|
67
72
|
homeMatchFlg?: boolean;
|
|
68
73
|
houseTypeCd?: Option;
|
|
69
74
|
incomeCertificateCd?: Option;
|
|
70
75
|
initiateBankruptcyFlg?: boolean;
|
|
71
|
-
jobsNumber?:
|
|
72
|
-
lastWorkDuration?:
|
|
76
|
+
jobsNumber?: string;
|
|
77
|
+
lastWorkDuration?: string;
|
|
73
78
|
maritalStatusCd?: Option;
|
|
74
79
|
militaryStatusCd?: Option;
|
|
75
80
|
organizationActivityTypeCd?: Option;
|
|
@@ -77,7 +82,7 @@ export type Participant = {
|
|
|
77
82
|
organizationKindCd?: Option;
|
|
78
83
|
organizationName?: string;
|
|
79
84
|
organizationTypeCd?: Option;
|
|
80
|
-
otherDependents?:
|
|
85
|
+
otherDependents?: string;
|
|
81
86
|
ownershipShare?: string;
|
|
82
87
|
opf?: string;
|
|
83
88
|
participantAddresses?: ParticipantAddress[];
|
|
@@ -89,14 +94,14 @@ export type Participant = {
|
|
|
89
94
|
seniority?: string;
|
|
90
95
|
seniorityInterruptionsFlg?: boolean;
|
|
91
96
|
snils?: string;
|
|
92
|
-
totalDependents?:
|
|
97
|
+
totalDependents?: string;
|
|
93
98
|
bankruptcyFlg?: boolean;
|
|
94
99
|
shareholderFlg?: boolean;
|
|
95
100
|
nameLegalEntity?: string;
|
|
96
101
|
creditInRshbCd?: Option;
|
|
97
102
|
participantContacts?: Array<{
|
|
98
103
|
contactTypeCd: {
|
|
99
|
-
key: 'EMAIL' | 'MAIN_PHONE';
|
|
104
|
+
key: 'EMAIL' | 'MAIN_PHONE' | 'ORGANIZATION_PHONE';
|
|
100
105
|
};
|
|
101
106
|
value: string;
|
|
102
107
|
}>;
|
|
@@ -105,7 +110,7 @@ export type Participant = {
|
|
|
105
110
|
value: string;
|
|
106
111
|
};
|
|
107
112
|
currencyCode?: { key: string };
|
|
108
|
-
paymentSystemTypeCd?:
|
|
113
|
+
paymentSystemTypeCd?: PaymentSystem;
|
|
109
114
|
classCard?: Option;
|
|
110
115
|
codeWord?: string;
|
|
111
116
|
};
|
|
@@ -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
|
|
|
4
4
|
export interface FormConsents {
|
|
@@ -84,9 +84,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
84
84
|
legalForm?: string;
|
|
85
85
|
organizationName?: string;
|
|
86
86
|
generalSeniority?: string;
|
|
87
|
-
lastJobExperience?:
|
|
88
|
-
experience5Years?:
|
|
89
|
-
jobsNumber?:
|
|
87
|
+
lastJobExperience?: string;
|
|
88
|
+
experience5Years?: string;
|
|
89
|
+
jobsNumber?: string;
|
|
90
90
|
organizationAddress?: Address;
|
|
91
91
|
beginDate?: Date | string;
|
|
92
92
|
addressFact?: Address;
|
|
@@ -105,9 +105,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
105
105
|
consentAssignmentClaimsFlg?: boolean;
|
|
106
106
|
consentCollectionFlg?: boolean;
|
|
107
107
|
familyStatus?: Option;
|
|
108
|
-
children?:
|
|
109
|
-
familyMembers?:
|
|
110
|
-
dependents?:
|
|
108
|
+
children?: string;
|
|
109
|
+
familyMembers?: string;
|
|
110
|
+
dependents?: string;
|
|
111
111
|
totalIncome?: number;
|
|
112
112
|
expenses?: number;
|
|
113
113
|
snils?: string;
|
|
@@ -132,7 +132,7 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
132
132
|
addressMatch?: boolean;
|
|
133
133
|
confirmationIncome?: Option;
|
|
134
134
|
currency?: string;
|
|
135
|
-
paymentSystem?:
|
|
135
|
+
paymentSystem?: PaymentSystem;
|
|
136
136
|
cardCategory?: Option;
|
|
137
137
|
codeWord?: string;
|
|
138
138
|
esiaAccountTypeCd?: Option;
|
|
@@ -42,7 +42,7 @@ const initialFormState = {
|
|
|
42
42
|
addressRegistration: '',
|
|
43
43
|
participantDateRegistration: undefined,
|
|
44
44
|
currency: '',
|
|
45
|
-
paymentSystem: '',
|
|
45
|
+
paymentSystem: { name: '', type: '' },
|
|
46
46
|
cardCategory: { key: '', text: '' },
|
|
47
47
|
codeWord: '',
|
|
48
48
|
addressRetail: { key: '', text: '' },
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
import { createDraftTask } from '../../api/RetailAPI/createDraftTask';
|
|
3
3
|
import { createUserProfile } from '../../api/RetailAPI/createUserProfile';
|
|
4
|
+
import { getLastTaskStatus } from '../../api/RetailAPI/getLastTaskStatus';
|
|
5
|
+
import { getTaskById } from '../../api/RetailAPI/getTaskById';
|
|
4
6
|
import { updateUserProfile } from '../../api/RetailAPI/updateUserProfile';
|
|
5
7
|
import { updateUserTask } from '../../api/RetailAPI/updateUserTask';
|
|
6
8
|
import { getUpdateUserProfileData } from '../../api/RetailAPI/utils/getUpdateUserProfile';
|
|
7
|
-
import { useSetter } from '../../hooks/useSetter';
|
|
8
9
|
import { useConsentBkiDialog } from '../../ui-kit/ConsentBkiDialog/useConsentBkiDialog';
|
|
9
10
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
11
|
+
import { useDraftDialog } from '../../ui-kit/DraftDialog/useDraftDialog';
|
|
10
12
|
import { useEsiaLoginDialog } from '../../ui-kit/EsiaLoginDialog/useEsiaLoginDialog';
|
|
11
13
|
import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
|
|
12
14
|
import { VerifyPhoneDialog } from '../../ui-kit/VerifyPhoneDialog/VerifyPhoneDialog';
|
|
@@ -17,7 +19,7 @@ import { type FieldDef } from './ApplicationLeadFormContent';
|
|
|
17
19
|
import { CONSENTS } from './consents';
|
|
18
20
|
import { getLeadFormTaskData } from './getLeadFormTaskData';
|
|
19
21
|
import { type LeadFormState } from './LeadFormState';
|
|
20
|
-
import {
|
|
22
|
+
import { useSaveUserData, type UserData } from './useSaveUserData';
|
|
21
23
|
|
|
22
24
|
interface ApplicationLeadApiProps {
|
|
23
25
|
inputs: FieldDef[];
|
|
@@ -25,37 +27,19 @@ interface ApplicationLeadApiProps {
|
|
|
25
27
|
nextStepLink: string;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
interface UserData {
|
|
29
|
-
participantId: number;
|
|
30
|
-
taskId: number;
|
|
31
|
-
profileId: number;
|
|
32
|
-
programId: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
30
|
export const useApplicationLeadApi = ({
|
|
36
31
|
inputs,
|
|
37
32
|
programId,
|
|
38
33
|
nextStepLink,
|
|
39
34
|
}: ApplicationLeadApiProps) => {
|
|
40
35
|
const [responseStatus, setResponseStatus] = useState<'OK' | 'Fail' | ''>('');
|
|
41
|
-
const
|
|
42
|
-
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
36
|
+
const saveUserData = useSaveUserData();
|
|
43
37
|
|
|
44
38
|
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
45
39
|
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
46
40
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
41
|
+
const draftDialog = useDraftDialog();
|
|
47
42
|
|
|
48
|
-
const saveUserData = useCallback(
|
|
49
|
-
({ participantId, taskId, profileId, programId: programNumber }: UserData) => {
|
|
50
|
-
leadFormStore.participantId = participantId;
|
|
51
|
-
leadFormStore.taskId = taskId;
|
|
52
|
-
leadFormStore.profileId = profileId;
|
|
53
|
-
leadFormStore.programId = programNumber;
|
|
54
|
-
},
|
|
55
|
-
[],
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
// eslint-disable-next-line consistent-return
|
|
59
43
|
const handleSubmit = useCallback(async (formData: LeadFormState) => {
|
|
60
44
|
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
61
45
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
@@ -68,17 +52,34 @@ export const useApplicationLeadApi = ({
|
|
|
68
52
|
});
|
|
69
53
|
|
|
70
54
|
if (profileId && formData?.phone) {
|
|
55
|
+
const sendCurrentTask = async () => {
|
|
56
|
+
await updateUserData({
|
|
57
|
+
programId,
|
|
58
|
+
profileId,
|
|
59
|
+
formData,
|
|
60
|
+
saveUserData,
|
|
61
|
+
});
|
|
62
|
+
verifyPhoneDialog.close();
|
|
63
|
+
consentBkiDialog.open(formData.phone, profileId);
|
|
64
|
+
};
|
|
71
65
|
const handleSuccessVerify = async () => {
|
|
72
66
|
try {
|
|
73
|
-
await
|
|
74
|
-
programId,
|
|
67
|
+
const lastTaskId = await getLastTaskStatus({
|
|
75
68
|
profileId,
|
|
76
|
-
|
|
77
|
-
saveUserData,
|
|
78
|
-
saveForm,
|
|
69
|
+
programId,
|
|
79
70
|
});
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
|
|
72
|
+
if (lastTaskId) {
|
|
73
|
+
const task = await getTaskById({ taskId: lastTaskId });
|
|
74
|
+
verifyPhoneDialog.close();
|
|
75
|
+
draftDialog.open({
|
|
76
|
+
task,
|
|
77
|
+
isFromLead: true,
|
|
78
|
+
onClose: sendCurrentTask,
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
await sendCurrentTask();
|
|
82
|
+
}
|
|
82
83
|
} catch {
|
|
83
84
|
setResponseStatus('Fail');
|
|
84
85
|
}
|
|
@@ -110,13 +111,11 @@ const updateUserData = async ({
|
|
|
110
111
|
profileId,
|
|
111
112
|
formData,
|
|
112
113
|
saveUserData,
|
|
113
|
-
saveForm,
|
|
114
114
|
}: {
|
|
115
115
|
programId: string;
|
|
116
116
|
profileId: number;
|
|
117
117
|
formData: LeadFormState;
|
|
118
118
|
saveUserData: (userData: UserData) => void;
|
|
119
|
-
saveForm: (formData: LeadFormState) => void;
|
|
120
119
|
}) => {
|
|
121
120
|
const transformedForm = transformOtherConsentsField(formData);
|
|
122
121
|
|
|
@@ -140,8 +139,7 @@ const updateUserData = async ({
|
|
|
140
139
|
console.log(ex);
|
|
141
140
|
}
|
|
142
141
|
|
|
143
|
-
saveUserData({ participantId, taskId, profileId, programId });
|
|
144
|
-
saveForm(formData);
|
|
142
|
+
saveUserData({ participantId, taskId, profileId, programId, formData });
|
|
145
143
|
};
|
|
146
144
|
|
|
147
145
|
const transformOtherConsentsField = (formData: LeadFormState): LeadFormState => {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useSetter } from '../../hooks/useSetter';
|
|
3
|
+
import { type LeadFormState } from './LeadFormState';
|
|
4
|
+
import { useLeadFormStore } from './useLeadFormStore';
|
|
5
|
+
|
|
6
|
+
export interface UserData {
|
|
7
|
+
participantId: number;
|
|
8
|
+
taskId: number;
|
|
9
|
+
profileId: number;
|
|
10
|
+
programId: string;
|
|
11
|
+
formData: LeadFormState;
|
|
12
|
+
}
|
|
13
|
+
export const useSaveUserData = () => {
|
|
14
|
+
const leadFormStore = useLeadFormStore();
|
|
15
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
16
|
+
|
|
17
|
+
const saveUserData = useCallback(
|
|
18
|
+
({ participantId, taskId, profileId, formData, programId: programNumber }: UserData) => {
|
|
19
|
+
leadFormStore.participantId = participantId;
|
|
20
|
+
leadFormStore.taskId = taskId;
|
|
21
|
+
leadFormStore.profileId = profileId;
|
|
22
|
+
leadFormStore.programId = programNumber;
|
|
23
|
+
saveForm(formData);
|
|
24
|
+
},
|
|
25
|
+
[],
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return saveUserData;
|
|
29
|
+
};
|
|
@@ -26,7 +26,7 @@ export const GrantSupport = UniBlock<GrantSupportProps>(
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<BlockWrapper className={className} defaultPadding="p-6xl" {...rest}>
|
|
29
|
-
<div className="container
|
|
29
|
+
<div className="container space-y-m">
|
|
30
30
|
{title ? <Heading headingType="h3" title={title} className="@xl:text-center" /> : null}
|
|
31
31
|
{regions ? (
|
|
32
32
|
<SelectControl
|
|
@@ -11,7 +11,7 @@ export const ApplicationFormLayout = JSX<ApplicationFormProps>((props) => {
|
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
13
|
<BlockWrapper className={className} defaultPadding="p-6xl" {...rest}>
|
|
14
|
-
<div className="container
|
|
14
|
+
<div className="container space-y-lg">
|
|
15
15
|
{title ? <Heading headingType="h3" title={title} className="@xl:text-center" /> : null}
|
|
16
16
|
{children}
|
|
17
17
|
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { noop } from '../../utils/noop';
|
|
3
|
+
import { Heading } from '../Heading/Heading';
|
|
4
|
+
import { Img } from '../Img/Img';
|
|
5
|
+
import { Paragraph } from '../Paragraph/Paragraph';
|
|
6
|
+
|
|
7
|
+
export interface DraftActionButtonProps {
|
|
8
|
+
title: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const DraftActionButton = JSX<DraftActionButtonProps>(
|
|
15
|
+
({ title, icon, description, onClick = noop }) => (
|
|
16
|
+
<button
|
|
17
|
+
className="flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green"
|
|
18
|
+
type="button"
|
|
19
|
+
onClick={onClick}
|
|
20
|
+
>
|
|
21
|
+
<Img image={{ src: icon }} width="78" height="78" />
|
|
22
|
+
<div>
|
|
23
|
+
<Heading className="text-left" title={title} headingType="h5" />
|
|
24
|
+
{description ? (
|
|
25
|
+
<Paragraph color="text-secondary-text" size="text-m">
|
|
26
|
+
{description}
|
|
27
|
+
</Paragraph>
|
|
28
|
+
) : null}
|
|
29
|
+
</div>
|
|
30
|
+
</button>
|
|
31
|
+
),
|
|
32
|
+
);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { type Task } from '../../api/RetailAPI/draftTasksKZO';
|
|
4
|
+
import { useLeadFormStore } from '../../components/ApplicationLeadForm/useLeadFormStore';
|
|
5
|
+
import { locationNavigator } from '../../external/locationNavigator';
|
|
6
|
+
import { useSetter } from '../../hooks/useSetter';
|
|
7
|
+
import { noop } from '../../utils/noop';
|
|
8
|
+
import { Button } from '../Button/Button';
|
|
9
|
+
import { Dialog } from '../DialogManager/Dialog';
|
|
10
|
+
import { Heading } from '../Heading/Heading';
|
|
11
|
+
import { DraftActionButton } from './DraftActionButton';
|
|
12
|
+
import { parseDraftTask } from './parseDraftTask';
|
|
13
|
+
import { creditCodesToProgrammIdMap, creditProgramCodeToProductIdMap } from './utils';
|
|
14
|
+
|
|
15
|
+
export interface DraftDialogProps {
|
|
16
|
+
task: Task;
|
|
17
|
+
isFromLead?: boolean;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const DraftDialog = JSX<DraftDialogProps>(function ({
|
|
22
|
+
task,
|
|
23
|
+
isFromLead = false,
|
|
24
|
+
onClose = noop,
|
|
25
|
+
}) {
|
|
26
|
+
const leadFormStore = useLeadFormStore();
|
|
27
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
28
|
+
const navigator = locationNavigator();
|
|
29
|
+
|
|
30
|
+
const { participants, creditProgram, id: taskId } = task;
|
|
31
|
+
|
|
32
|
+
const programmId: string = creditProgramCodeToProductIdMap[creditProgram.code];
|
|
33
|
+
const isCredit = Boolean(creditCodesToProgrammIdMap[creditProgram.code]);
|
|
34
|
+
const nextStepLink = isCredit ? '/credit-lead' : '/credit-card-lead';
|
|
35
|
+
|
|
36
|
+
const { name, midname, id: participantId, profile } = participants[0];
|
|
37
|
+
|
|
38
|
+
const handleGoToDraft = useCallback(() => {
|
|
39
|
+
const taskFromDraft = parseDraftTask(task);
|
|
40
|
+
leadFormStore.participantId = participantId;
|
|
41
|
+
leadFormStore.taskId = taskId;
|
|
42
|
+
leadFormStore.profileId = profile?.id;
|
|
43
|
+
leadFormStore.programId = programmId;
|
|
44
|
+
saveForm(taskFromDraft);
|
|
45
|
+
navigator.assign(nextStepLink);
|
|
46
|
+
}, []);
|
|
47
|
+
|
|
48
|
+
const handleGoToNewTask = useCallback(() => {
|
|
49
|
+
navigator.assign(isCredit ? '/natural/loans/all-goals' : '/natural/creditcards/svoya');
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const handleGoToMainPage = useCallback(() => {
|
|
53
|
+
navigator.assign('/');
|
|
54
|
+
}, []);
|
|
55
|
+
|
|
56
|
+
const appeal = name && midname ? `${name} ${midname}, ` : '';
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Dialog
|
|
60
|
+
className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl"
|
|
61
|
+
onClose={onClose}
|
|
62
|
+
>
|
|
63
|
+
<div className="flex flex-col gap-lg">
|
|
64
|
+
<Heading
|
|
65
|
+
className="whitespace-pre-wrap"
|
|
66
|
+
title={`${appeal}мы нашли черновик вашей заявки.\nПродолжите заполнение?`}
|
|
67
|
+
headingType="h5"
|
|
68
|
+
/>
|
|
69
|
+
<DraftActionButton
|
|
70
|
+
title="Перейти к черновику"
|
|
71
|
+
icon="api/v1/wcms-file-storage/72d06937-5d8b-4996-9503-52389b93919e/file.svg"
|
|
72
|
+
description="Продолжайте заполнять заявку из черновика"
|
|
73
|
+
onClick={handleGoToDraft}
|
|
74
|
+
/>
|
|
75
|
+
<DraftActionButton
|
|
76
|
+
title={isFromLead ? 'Продолжить заполнение текущей заявки' : 'Заполнить новую заявку'}
|
|
77
|
+
icon="api/v1/wcms-file-storage/796c3e8d-341a-480b-b52f-3aa5784ed623/file.svg"
|
|
78
|
+
onClick={isFromLead ? onClose : handleGoToNewTask}
|
|
79
|
+
/>
|
|
80
|
+
<Button
|
|
81
|
+
type="button"
|
|
82
|
+
version="secondary"
|
|
83
|
+
className="w-full text-h5"
|
|
84
|
+
onClick={handleGoToMainPage}
|
|
85
|
+
>
|
|
86
|
+
Вернуться на главную
|
|
87
|
+
</Button>
|
|
88
|
+
</div>
|
|
89
|
+
</Dialog>
|
|
90
|
+
);
|
|
91
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { locationNavigator } from '../../external/locationNavigator';
|
|
4
|
+
import { noop } from '../../utils/noop';
|
|
5
|
+
import { Button } from '../Button/Button';
|
|
6
|
+
import { Dialog } from '../DialogManager/Dialog';
|
|
7
|
+
import { Heading } from '../Heading/Heading';
|
|
8
|
+
import { Paragraph } from '../Paragraph/Paragraph';
|
|
9
|
+
|
|
10
|
+
export interface EmptyDraftDialogProps {
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const EmptyDraftDialog = JSX<EmptyDraftDialogProps>(function ({ onClose = noop }) {
|
|
15
|
+
const navigator = locationNavigator();
|
|
16
|
+
|
|
17
|
+
const handleGoNewTask = useCallback(() => {
|
|
18
|
+
navigator.assign('/natural/loans/all-goals');
|
|
19
|
+
}, []);
|
|
20
|
+
|
|
21
|
+
const handleGoMainPage = useCallback(() => {
|
|
22
|
+
navigator.assign('/');
|
|
23
|
+
}, []);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Dialog
|
|
27
|
+
className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl"
|
|
28
|
+
onClose={onClose}
|
|
29
|
+
>
|
|
30
|
+
<div className="flex flex-col gap-lg">
|
|
31
|
+
<Heading className="text-center" title="Заявки не найдены" headingType="h3" />
|
|
32
|
+
<Paragraph size="text-l" align="text-center">
|
|
33
|
+
По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или
|
|
34
|
+
вернуться на главную страницу
|
|
35
|
+
</Paragraph>
|
|
36
|
+
|
|
37
|
+
<Button type="button" className="w-full" onClick={handleGoNewTask}>
|
|
38
|
+
Заполнить новую заявку
|
|
39
|
+
</Button>
|
|
40
|
+
|
|
41
|
+
<Button type="button" version="secondary" className="w-full" onClick={handleGoMainPage}>
|
|
42
|
+
Вернуться на главную
|
|
43
|
+
</Button>
|
|
44
|
+
</div>
|
|
45
|
+
</Dialog>
|
|
46
|
+
);
|
|
47
|
+
});
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* eslint-disable max-lines-per-function */
|
|
2
|
+
import { type Task } from '../../api/RetailAPI/draftTasksKZO';
|
|
3
|
+
import { type LeadFormState } from '../../components/ApplicationLeadForm/LeadFormState';
|
|
4
|
+
import {
|
|
5
|
+
getParticipantAddresses,
|
|
6
|
+
getParticipantContacts,
|
|
7
|
+
getParticipantGender,
|
|
8
|
+
getParticipantIncomes,
|
|
9
|
+
getSelectValue,
|
|
10
|
+
} from './utils';
|
|
11
|
+
|
|
12
|
+
export const parseDraftTask = (task: Task): LeadFormState => {
|
|
13
|
+
const participant = task.participants[0];
|
|
14
|
+
|
|
15
|
+
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
currencyCode: currency,
|
|
19
|
+
paymentSystemTypeCd: paymentSystem,
|
|
20
|
+
classCard: cardCategory,
|
|
21
|
+
codeWord,
|
|
22
|
+
birthDate: limitedBirthday,
|
|
23
|
+
midname: middleName,
|
|
24
|
+
name,
|
|
25
|
+
surname,
|
|
26
|
+
birthPlace,
|
|
27
|
+
dulIssueDate: dulIssueDateField,
|
|
28
|
+
dulIssuedBy,
|
|
29
|
+
dulNumber,
|
|
30
|
+
dulSerie,
|
|
31
|
+
dulSubdivisionCode,
|
|
32
|
+
educationLevelCd: education,
|
|
33
|
+
registrationDate: participantDateRegistration,
|
|
34
|
+
houseTypeCd: housing,
|
|
35
|
+
genderCd,
|
|
36
|
+
participantContacts = [],
|
|
37
|
+
participantAddresses = [],
|
|
38
|
+
employmentContractDate: beginDate,
|
|
39
|
+
employmentTypeCd: employment,
|
|
40
|
+
organizationName,
|
|
41
|
+
organizationInn: inn,
|
|
42
|
+
organizationActivityTypeCd: employerActivities,
|
|
43
|
+
organizationTypeCd: organization,
|
|
44
|
+
organizationKindCd: employerOrganization,
|
|
45
|
+
employeesNumberCd: amountWorkers,
|
|
46
|
+
opf: legalForm,
|
|
47
|
+
seniority: generalSeniority,
|
|
48
|
+
generalSeniority: experience5Years,
|
|
49
|
+
jobsNumber,
|
|
50
|
+
lastWorkDuration: lastJobExperience,
|
|
51
|
+
positionCd: positionOrganization,
|
|
52
|
+
maritalStatusCd: familyStatus,
|
|
53
|
+
childrenDependents: children,
|
|
54
|
+
totalDependents: familyMembers,
|
|
55
|
+
otherDependents: dependents,
|
|
56
|
+
militaryStatusCd: conscription,
|
|
57
|
+
participantIncomes,
|
|
58
|
+
snils,
|
|
59
|
+
armyIdFlg,
|
|
60
|
+
bankruptcyFlg,
|
|
61
|
+
shareholderFlg,
|
|
62
|
+
nameLegalEntity: legalEntityName,
|
|
63
|
+
creditInRshbCd,
|
|
64
|
+
payrollCardRshbFlg: isInsurance,
|
|
65
|
+
consentInsuranceFlg: isSalaryClient,
|
|
66
|
+
} = participant;
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
currency: currency?.key,
|
|
70
|
+
paymentSystem,
|
|
71
|
+
cardCategory: getSelectValue(cardCategory),
|
|
72
|
+
codeWord,
|
|
73
|
+
limitedBirthday,
|
|
74
|
+
middleName,
|
|
75
|
+
name,
|
|
76
|
+
surname,
|
|
77
|
+
birthPlace,
|
|
78
|
+
dulIssueDateField,
|
|
79
|
+
dulIssuedBy,
|
|
80
|
+
dulNumber,
|
|
81
|
+
dulSerie,
|
|
82
|
+
dulSubdivisionCode,
|
|
83
|
+
education: getSelectValue(education),
|
|
84
|
+
participantDateRegistration,
|
|
85
|
+
housing: getSelectValue(housing),
|
|
86
|
+
beginDate,
|
|
87
|
+
employment: getSelectValue(employment),
|
|
88
|
+
organizationName,
|
|
89
|
+
inn,
|
|
90
|
+
employerActivities: getSelectValue(employerActivities),
|
|
91
|
+
organization: getSelectValue(organization),
|
|
92
|
+
employerOrganization: getSelectValue(employerOrganization),
|
|
93
|
+
amountWorkers: getSelectValue(amountWorkers),
|
|
94
|
+
legalForm,
|
|
95
|
+
generalSeniority: generalSeniority?.toString(),
|
|
96
|
+
experience5Years: experience5Years?.toString(),
|
|
97
|
+
jobsNumber: jobsNumber?.toString(),
|
|
98
|
+
lastJobExperience: lastJobExperience?.toString(),
|
|
99
|
+
positionOrganization: getSelectValue(positionOrganization),
|
|
100
|
+
familyStatus: getSelectValue(familyStatus),
|
|
101
|
+
children: children?.toString(),
|
|
102
|
+
familyMembers: familyMembers?.toString(),
|
|
103
|
+
dependents: dependents?.toString(),
|
|
104
|
+
conscription: getSelectValue(conscription),
|
|
105
|
+
snils,
|
|
106
|
+
armyIdFlg,
|
|
107
|
+
bankruptcyFlg,
|
|
108
|
+
shareholderFlg,
|
|
109
|
+
legalEntityName,
|
|
110
|
+
creditInRshbCd: getSelectValue(creditInRshbCd),
|
|
111
|
+
calculator: {
|
|
112
|
+
isInsurance,
|
|
113
|
+
isSalaryClient,
|
|
114
|
+
moneyValue,
|
|
115
|
+
monthsValue,
|
|
116
|
+
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
117
|
+
},
|
|
118
|
+
...getParticipantIncomes(participantIncomes),
|
|
119
|
+
...getParticipantAddresses(participantAddresses),
|
|
120
|
+
...getParticipantContacts(participantContacts),
|
|
121
|
+
...getParticipantGender(genderCd),
|
|
122
|
+
};
|
|
123
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Task } from '../../api/RetailAPI/draftTasksKZO';
|
|
2
|
+
import { useDialog } from '../DialogManager/useDialog';
|
|
3
|
+
import { DraftDialog } from './DraftDialog';
|
|
4
|
+
import { EmptyDraftDialog } from './EmptyDraftDialog';
|
|
5
|
+
|
|
6
|
+
type useDraftDialogOpenProps = {
|
|
7
|
+
task?: Task;
|
|
8
|
+
isFromLead?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const useDraftDialog = () => {
|
|
13
|
+
const { open: openDraftDialog } = useDialog(DraftDialog);
|
|
14
|
+
const { open: openEmptyDraftDialog } = useDialog(EmptyDraftDialog);
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
open: ({ task, isFromLead, onClose }: useDraftDialogOpenProps) => {
|
|
18
|
+
task ? openDraftDialog({ task, isFromLead, onClose }) : openEmptyDraftDialog({});
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
};
|