@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
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { type LeadProps } from '../../api/RetailAPI/model/LeadFormData';
|
|
3
|
+
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
4
|
+
import { type Option } from '../Select/Option';
|
|
5
|
+
|
|
6
|
+
export const enum EContactType {
|
|
7
|
+
MainPhone = 'MAIN_PHONE',
|
|
8
|
+
SecondPhone = 'SECOND_PHONE',
|
|
9
|
+
HomePhoneFact = 'HOME_PHONE_FACT',
|
|
10
|
+
HomePhoneReg = 'HOME_PHONE_REG',
|
|
11
|
+
OrganizationPhone = 'ORGANIZATION_PHONE',
|
|
12
|
+
EMail = 'EMAIL',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const enum EAddressType {
|
|
16
|
+
REGISTRATION = 'REGISTRATION',
|
|
17
|
+
RESIDENTAL = 'RESIDENTAL',
|
|
18
|
+
WORK = 'WORK',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const enum EIncomesType {
|
|
22
|
+
INCOME_AVERAGE = 'INCOME_AVERAGE',
|
|
23
|
+
MANDATORY_PAYMENTS = 'MANDATORY_PAYMENTS',
|
|
24
|
+
ADDITIONAL_INCOME = 'ADDITIONAL_INCOME',
|
|
25
|
+
OTHER_INCOME = 'OTHER_INCOME',
|
|
26
|
+
OTHER_PAYMENTS = 'OTHER_PAYMENTS',
|
|
27
|
+
RENTAL_INCOME = 'RENTAL_INCOME',
|
|
28
|
+
WAGES = 'WAGES',
|
|
29
|
+
RETIREMENT_INCOME = 'RETIREMENT_INCOME',
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const creditCodesToProgrammIdMap = {
|
|
33
|
+
credit_cash: '10',
|
|
34
|
+
credit_cash_single_doc: '28',
|
|
35
|
+
credit_mcx: '39',
|
|
36
|
+
family_offer_credit: '41',
|
|
37
|
+
gas_engine_fuel: '33',
|
|
38
|
+
pension_credit: '12',
|
|
39
|
+
ref_credit: '11',
|
|
40
|
+
ref_credit_single_doc: '29',
|
|
41
|
+
self_employed: '34',
|
|
42
|
+
summer_cash: '35',
|
|
43
|
+
summer_cash_pens: '36',
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const cardCodesToProgrammIdMap = {
|
|
47
|
+
amur_card: '14',
|
|
48
|
+
owner_card: '13',
|
|
49
|
+
travel_card: '15',
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const creditProgramCodeToProductIdMap = {
|
|
53
|
+
...creditCodesToProgrammIdMap,
|
|
54
|
+
...cardCodesToProgrammIdMap,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const getParticipantIncomes = (participantIncomes: Participant['participantIncomes']) => {
|
|
58
|
+
const wages = participantIncomes?.find(
|
|
59
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.WAGES,
|
|
60
|
+
)?.value;
|
|
61
|
+
const mandatoryPayments = participantIncomes?.find(
|
|
62
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.MANDATORY_PAYMENTS,
|
|
63
|
+
)?.value;
|
|
64
|
+
const incomeAverage = participantIncomes?.find(
|
|
65
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.INCOME_AVERAGE,
|
|
66
|
+
)?.value;
|
|
67
|
+
const additionalIncome = participantIncomes?.find(
|
|
68
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.ADDITIONAL_INCOME,
|
|
69
|
+
)?.value;
|
|
70
|
+
const otherIncome = participantIncomes?.find(
|
|
71
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.OTHER_INCOME,
|
|
72
|
+
)?.value;
|
|
73
|
+
const otherPayments = participantIncomes?.find(
|
|
74
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.OTHER_PAYMENTS,
|
|
75
|
+
)?.value;
|
|
76
|
+
const rentalIncome = participantIncomes?.find(
|
|
77
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.RENTAL_INCOME,
|
|
78
|
+
)?.value;
|
|
79
|
+
const retirementIncome = participantIncomes?.find(
|
|
80
|
+
(contact) => contact.incomeTypeCd.key === EIncomesType.RETIREMENT_INCOME,
|
|
81
|
+
)?.value;
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
wages,
|
|
85
|
+
mandatoryPayments,
|
|
86
|
+
incomeAverage,
|
|
87
|
+
additionalIncome,
|
|
88
|
+
otherIncome,
|
|
89
|
+
otherPayments,
|
|
90
|
+
rentalIncome,
|
|
91
|
+
retirementIncome,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const getParticipantAddresses = (
|
|
96
|
+
participantAddresses: Participant['participantAddresses'],
|
|
97
|
+
) => {
|
|
98
|
+
const addressRegistration = participantAddresses?.find(
|
|
99
|
+
(address) => address.addressType.key === EAddressType.REGISTRATION,
|
|
100
|
+
);
|
|
101
|
+
const addressFact = participantAddresses?.find(
|
|
102
|
+
(address) => address.addressType.key === EAddressType.RESIDENTAL,
|
|
103
|
+
);
|
|
104
|
+
const organizationAddress = participantAddresses?.find(
|
|
105
|
+
(address) => address.addressType.key === EAddressType.WORK,
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
addressRegistration,
|
|
110
|
+
addressFact,
|
|
111
|
+
organizationAddress,
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const getParticipantContacts = (participantContacts: Participant['participantContacts']) => {
|
|
116
|
+
const email = participantContacts?.find(
|
|
117
|
+
(contact) => contact.contactTypeCd.key === EContactType.EMail,
|
|
118
|
+
)?.value;
|
|
119
|
+
const phone = participantContacts?.find(
|
|
120
|
+
(contact) => contact.contactTypeCd.key === EContactType.MainPhone,
|
|
121
|
+
)?.value;
|
|
122
|
+
const organizationPhone = participantContacts?.find(
|
|
123
|
+
(contact) => contact.contactTypeCd.key === EContactType.OrganizationPhone,
|
|
124
|
+
)?.value;
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
email,
|
|
128
|
+
phone,
|
|
129
|
+
organizationPhone,
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const getParticipantGender = (gender: Participant['genderCd']) => {
|
|
134
|
+
return gender?.key
|
|
135
|
+
? {
|
|
136
|
+
sex: gender.key === 'MAN' ? 'male' : 'female',
|
|
137
|
+
}
|
|
138
|
+
: null;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const getSelectValue = (option?: LeadProps): Option | undefined => {
|
|
142
|
+
return option?.key
|
|
143
|
+
? {
|
|
144
|
+
key: option.key,
|
|
145
|
+
text: option.value,
|
|
146
|
+
}
|
|
147
|
+
: undefined;
|
|
148
|
+
};
|
|
@@ -10,7 +10,7 @@ export const CardCategoryField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
10
10
|
const [cardTypes, setCardTypes] = useState<CardTypeData[]>([]);
|
|
11
11
|
const [programId] = useLocalStorage<string>('programId');
|
|
12
12
|
const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
|
|
13
|
-
const selectedPaymentSystem = field('paymentSystem')
|
|
13
|
+
const selectedPaymentSystem = field('paymentSystem')?.value?.type;
|
|
14
14
|
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
if (selectedPaymentSystem && programId) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { getPaymentSystems } from '../../../api/RetailAPI/getPaymentSystems';
|
|
4
|
+
import { type PaymentSystem } from '../../../api/RetailAPI/updateUserTask';
|
|
4
5
|
import { useLocalStorage } from '../../../hooks/useLocalStorage';
|
|
5
|
-
import { type RadioButtonItem } from '../../RadioButtonGroup/RadioButtonGroup';
|
|
6
6
|
import { RadioButtonGroupControl } from '../../RadioButtonGroup/RadioButtonGroupControl';
|
|
7
7
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
8
8
|
import { validatorObj } from '../getObjectValidator';
|
|
@@ -12,7 +12,7 @@ export const PaymentSystemField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
12
12
|
const { value, onChange } = field('paymentSystem');
|
|
13
13
|
const [programId] = useLocalStorage<string>('programId');
|
|
14
14
|
|
|
15
|
-
const [paymentSystemOptions, setPaymentSystemOptions] = useState<
|
|
15
|
+
const [paymentSystemOptions, setPaymentSystemOptions] = useState<PaymentSystem[]>([]);
|
|
16
16
|
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
if (programId) {
|
|
@@ -23,14 +23,22 @@ export const PaymentSystemField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
23
23
|
}
|
|
24
24
|
}, []);
|
|
25
25
|
|
|
26
|
+
const handleChange = useCallback(
|
|
27
|
+
(type: string) => onChange?.(paymentSystemOptions?.find((_) => _.type === type)),
|
|
28
|
+
[paymentSystemOptions, onChange],
|
|
29
|
+
);
|
|
30
|
+
|
|
26
31
|
return (
|
|
27
32
|
<RadioButtonGroupControl
|
|
28
33
|
label="Платежная система"
|
|
29
34
|
orientation="horizontal"
|
|
30
|
-
items={paymentSystemOptions}
|
|
31
|
-
value={value}
|
|
32
|
-
onChange={(_) => onChange?.(_)}
|
|
35
|
+
items={formatPaymentSystems(paymentSystemOptions)}
|
|
33
36
|
{...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required)}
|
|
37
|
+
value={value?.type}
|
|
38
|
+
onChange={handleChange}
|
|
34
39
|
/>
|
|
35
40
|
);
|
|
36
41
|
});
|
|
42
|
+
|
|
43
|
+
const formatPaymentSystems = (paymentSystems: PaymentSystem[]) =>
|
|
44
|
+
paymentSystems?.map((_) => ({ id: _.type, text: _.name })) ?? [];
|
|
@@ -33,14 +33,14 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
33
33
|
birthday: defaultValidator('Укажите дату рождения'),
|
|
34
34
|
limitedBirthday: limitedBirthdayValidator(),
|
|
35
35
|
birthPlace: defaultValidator('Укажите место рождения'),
|
|
36
|
-
education:
|
|
37
|
-
housing:
|
|
38
|
-
employment:
|
|
39
|
-
organization:
|
|
40
|
-
amountWorkers:
|
|
41
|
-
employerActivities:
|
|
42
|
-
employerOrganization:
|
|
43
|
-
positionOrganization:
|
|
36
|
+
education: defaultSelectValidator('Выберите ваше образование'),
|
|
37
|
+
housing: defaultSelectValidator('Выберите тип жилья'),
|
|
38
|
+
employment: defaultSelectValidator('Выберите информацию о трудоустройстве'),
|
|
39
|
+
organization: defaultSelectValidator('Выберите тип организации'),
|
|
40
|
+
amountWorkers: defaultSelectValidator('Выберите информацию о количестве сотрудников'),
|
|
41
|
+
employerActivities: defaultSelectValidator('Выберите вид деятельности организации'),
|
|
42
|
+
employerOrganization: defaultSelectValidator('Выберите вид организации'),
|
|
43
|
+
positionOrganization: defaultSelectValidator('Выберите вашу должность'),
|
|
44
44
|
dulSerie: serieValidator('Укажите серию паспорта'),
|
|
45
45
|
dulNumber: numberValidator('Укажите номер паспорта'),
|
|
46
46
|
dulIssueDateField: defaultValidator('Укажите дату выдачи паспорта'),
|
|
@@ -76,7 +76,7 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
76
76
|
consentPfrFlg: agreementValidator,
|
|
77
77
|
consentOthersFlg: agreementValidator,
|
|
78
78
|
consentInformFlg: agreementValidator,
|
|
79
|
-
familyStatus:
|
|
79
|
+
familyStatus: defaultSelectValidator('Выберите семейное положение'),
|
|
80
80
|
children: lengthStringValidator(2, 'Укажите количество детей'),
|
|
81
81
|
familyMembers: lengthStringValidator(2, 'Укажите количество членов семьи'),
|
|
82
82
|
dependents: lengthStringValidator(2, 'Укажите количество иждивенцев'),
|
|
@@ -102,7 +102,7 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
102
102
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
103
103
|
addressMatch: defaultValidator(),
|
|
104
104
|
codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
|
|
105
|
-
confirmationIncome:
|
|
105
|
+
confirmationIncome: defaultSelectValidator(),
|
|
106
106
|
deliveryDate: defaultValidator('Укажите дату доставки'),
|
|
107
107
|
addressCourier: addressDaDataValidator(),
|
|
108
108
|
cardCategory: defaultValidator('Укажите категорию карты'),
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { fetchRetailJSON } from './doRequest';
|
|
2
|
+
import { type Participant, type PaymentType } from './updateUserTask';
|
|
3
|
+
|
|
4
|
+
export type Task = {
|
|
5
|
+
courierDeliveryFlg?: boolean;
|
|
6
|
+
creditPeriod?: number;
|
|
7
|
+
creditProgram: {
|
|
8
|
+
code: string;
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
deliveryComment?: string;
|
|
12
|
+
deliveryDate?: string;
|
|
13
|
+
deliveryTimeCd?: {
|
|
14
|
+
value: string;
|
|
15
|
+
};
|
|
16
|
+
id: number;
|
|
17
|
+
loanAmount?: number;
|
|
18
|
+
office?: {
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
participants: Participant[];
|
|
22
|
+
paymentTypeCd?: PaymentType;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type DraftTaskKZOResponse = {
|
|
26
|
+
tasks: Array<Task>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const draftTasksKZO = async (): Promise<DraftTaskKZOResponse['tasks']> => {
|
|
30
|
+
const res = await fetchRetailJSON<DraftTaskKZOResponse>('/user-data/draftTasksKZO', 'GET');
|
|
31
|
+
|
|
32
|
+
return res?.tasks || [];
|
|
33
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { fetchRetailJSON } from './doRequest';
|
|
2
|
+
|
|
3
|
+
type GetLastTaskStatusBody = {
|
|
4
|
+
profileId: number;
|
|
5
|
+
programId: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type GetLastTaskStatusResponse = {
|
|
9
|
+
statusCd: string;
|
|
10
|
+
taskId: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const getLastTaskStatus = async (body: GetLastTaskStatusBody): Promise<number | null> => {
|
|
14
|
+
const res = await fetchRetailJSON<GetLastTaskStatusResponse>(
|
|
15
|
+
'/user-data/getLastStatus',
|
|
16
|
+
'POST',
|
|
17
|
+
body,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
return res?.statusCd === 'DRAFT' ? res?.taskId : null;
|
|
21
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { fetchRetailJSON } from './doRequest';
|
|
2
|
+
import { type PaymentSystem } from './updateUserTask';
|
|
2
3
|
|
|
3
4
|
type PaymentSystemResponse = {
|
|
4
|
-
paymentSystems?:
|
|
5
|
-
name: string;
|
|
6
|
-
type: string;
|
|
7
|
-
}[];
|
|
5
|
+
paymentSystems?: PaymentSystem[];
|
|
8
6
|
};
|
|
9
7
|
|
|
10
8
|
export const getPaymentSystems = async (creditProgramId: string) => {
|
|
@@ -16,10 +14,5 @@ export const getPaymentSystems = async (creditProgramId: string) => {
|
|
|
16
14
|
},
|
|
17
15
|
);
|
|
18
16
|
|
|
19
|
-
return
|
|
20
|
-
data?.paymentSystems?.map((paymentSystem) => ({
|
|
21
|
-
id: paymentSystem.type,
|
|
22
|
-
text: paymentSystem.name,
|
|
23
|
-
})) ?? []
|
|
24
|
-
);
|
|
17
|
+
return data?.paymentSystems || [];
|
|
25
18
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { fetchRetailJSON } from './doRequest';
|
|
2
|
+
import { type Task } from './draftTasksKZO';
|
|
3
|
+
|
|
4
|
+
type GetTaskByIdBody = {
|
|
5
|
+
taskId: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const getTaskById = async (body: GetTaskByIdBody): Promise<Task | undefined> => {
|
|
9
|
+
const res = await fetchRetailJSON<Task>('/user-data/getTaskById', 'POST', body);
|
|
10
|
+
|
|
11
|
+
return res || undefined;
|
|
12
|
+
};
|