@redneckz/wildless-cms-uni-blocks 0.14.722 → 0.14.724
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +136 -151
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/bundle/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
- package/bundle/hooks/useRetailFormStore.d.ts +2 -0
- package/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/bundle/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
- package/dist/components/CreditCardForm/SuccessStatusCardContent.js +37 -0
- package/dist/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js +0 -1
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/hooks/useRetailFormStore.d.ts +2 -0
- package/dist/hooks/useRetailFormStore.js.map +1 -1
- package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +5 -3
- package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/dist/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/dist/ui-kit/DraftDialog/utils.js +2 -1
- package/dist/ui-kit/DraftDialog/utils.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
- package/lib/components/CreditCardForm/SuccessStatusCardContent.js +35 -0
- package/lib/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js +0 -1
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/hooks/useRetailFormStore.d.ts +2 -0
- package/lib/hooks/useRetailFormStore.js.map +1 -1
- package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +3 -2
- package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/lib/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/lib/ui-kit/DraftDialog/utils.js +2 -1
- package/lib/ui-kit/DraftDialog/utils.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +136 -151
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/mobile/bundle/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
- package/mobile/bundle/hooks/useRetailFormStore.d.ts +2 -0
- package/mobile/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
- package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.js +37 -0
- package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +0 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/hooks/useRetailFormStore.d.ts +2 -0
- package/mobile/dist/hooks/useRetailFormStore.js.map +1 -1
- package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +5 -3
- package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.js +2 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/mobile/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
- package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.js +35 -0
- package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +0 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/hooks/useRetailFormStore.d.ts +2 -0
- package/mobile/lib/hooks/useRetailFormStore.js.map +1 -1
- package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +3 -2
- package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.js +2 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/mobile/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +0 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +3 -3
- package/mobile/src/components/CreditCardForm/SuccessStatusCardContent.tsx +45 -0
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -5
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +0 -1
- package/mobile/src/hooks/useRetailFormStore.tsx +2 -0
- package/mobile/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +4 -2
- package/mobile/src/ui-kit/DraftDialog/utils.ts +2 -3
- package/mobile/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +9 -25
- package/mobile/src/ui-kit/FormField/Fields/WagesField.tsx +9 -25
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +0 -1
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/LeadFormState.ts +0 -1
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +3 -3
- package/src/components/CreditCardForm/SuccessStatusCardContent.tsx +45 -0
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -5
- package/src/components/CreditForm/useCreditFormAPI.tsx +0 -1
- package/src/hooks/useRetailFormStore.tsx +2 -0
- package/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +4 -2
- package/src/ui-kit/DraftDialog/utils.ts +2 -3
- package/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +9 -25
- package/src/ui-kit/FormField/Fields/WagesField.tsx +9 -25
- package/src/ui-kit/FormField/NameFieldDef.ts +0 -1
- package/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
- package/dist/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
- package/dist/components/CreditCardForm/SuccessStatusContent.js +0 -32
- package/dist/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
- package/lib/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
- package/lib/components/CreditCardForm/SuccessStatusContent.js +0 -30
- package/lib/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
- package/mobile/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js +0 -32
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js +0 -30
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
- package/mobile/src/components/CreditCardForm/SuccessStatusContent.tsx +0 -37
- package/src/components/CreditCardForm/SuccessStatusContent.tsx +0 -37
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { countIncomeAverage } from '../../services/retail/adaptors/getFamilyStatusAndIncomeData.js';
|
|
1
2
|
export const creditCodesToProgrammIdMap = {
|
|
2
3
|
credit_cash: '10',
|
|
3
4
|
credit_cash_single_doc: '28',
|
|
@@ -23,12 +24,12 @@ export const creditProgramCodeToProductIdMap = {
|
|
|
23
24
|
export const getParticipantIncomes = (participantIncomes) => {
|
|
24
25
|
const wages = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "WAGES" /* EIncomesType.WAGES */)?.value;
|
|
25
26
|
const mandatoryPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "MANDATORY_PAYMENTS" /* EIncomesType.MANDATORY_PAYMENTS */)?.value;
|
|
26
|
-
const incomeAverage = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "INCOME_AVERAGE" /* EIncomesType.INCOME_AVERAGE */)?.value;
|
|
27
27
|
const additionalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "ADDITIONAL_INCOME" /* EIncomesType.ADDITIONAL_INCOME */)?.value;
|
|
28
28
|
const otherIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_INCOME" /* EIncomesType.OTHER_INCOME */)?.value;
|
|
29
29
|
const otherPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_PAYMENTS" /* EIncomesType.OTHER_PAYMENTS */)?.value;
|
|
30
30
|
const rentalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RENTAL_INCOME" /* EIncomesType.RENTAL_INCOME */)?.value;
|
|
31
31
|
const retirementIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RETIREMENT_INCOME" /* EIncomesType.RETIREMENT_INCOME */)?.value;
|
|
32
|
+
const incomeAverage = countIncomeAverage(wages, retirementIncome);
|
|
32
33
|
return {
|
|
33
34
|
wages,
|
|
34
35
|
mandatoryPayments,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/utils.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
3
|
import { InputControl } from '../../Input/InputControl.js';
|
|
5
4
|
import { validatorObj } from '../getObjectValidator.js';
|
|
6
5
|
import { getValidation } from '../getValidation.js';
|
|
7
|
-
export const RetirementIncomeField = JSX(({ field, input }) => {
|
|
8
|
-
const currentWages = field('wages')?.value;
|
|
9
|
-
const onChange = useCallback((_) => {
|
|
10
|
-
const incomesSum = Number(_) + Number(currentWages || 0);
|
|
11
|
-
field('retirementIncome')?.onChange?.(_);
|
|
12
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
13
|
-
}, [currentWages]);
|
|
14
|
-
return (_jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input, onChange: onChange }));
|
|
15
|
-
});
|
|
6
|
+
export const RetirementIncomeField = JSX(({ field, input }) => (_jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input })));
|
|
16
7
|
//# sourceMappingURL=RetirementIncomeField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RetirementIncomeField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/RetirementIncomeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"RetirementIncomeField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/RetirementIncomeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC/E,KAAC,YAAY,IACX,KAAK,EAAC,mGAAmB,EACzB,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,aAAa,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,KAAK,EAAE,QAAQ,CAAC,KACxF,KAAK,GACT,CACH,CAAC,CAAC"}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
3
|
import { InputControl } from '../../Input/InputControl.js';
|
|
5
4
|
import { validatorObj } from '../getObjectValidator.js';
|
|
6
5
|
import { getValidation } from '../getValidation.js';
|
|
7
|
-
export const WagesField = JSX(({ field, input }) => {
|
|
8
|
-
const currentRetirementIncome = field('retirementIncome')?.value;
|
|
9
|
-
const onChange = useCallback((_) => {
|
|
10
|
-
const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
|
|
11
|
-
field('wages')?.onChange?.(_);
|
|
12
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
13
|
-
}, [currentRetirementIncome]);
|
|
14
|
-
return (_jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input, onChange: onChange }));
|
|
15
|
-
});
|
|
6
|
+
export const WagesField = JSX(({ field, input }) => (_jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input })));
|
|
16
7
|
//# sourceMappingURL=WagesField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WagesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/WagesField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"WagesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/WagesField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACpE,KAAC,YAAY,IACX,KAAK,EAAC,2UAAkE,EACxE,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,KAClE,KAAK,GACT,CACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type NameFieldDef = 'surname' | 'name' | 'middleName' | 'education' | 'housing' | 'employment' | 'organization' | 'organizationPhone' | 'organizationAddress' | 'amountWorkers' | 'employerActivities' | 'employerOrganization' | 'positionOrganization' | 'dulSerie' | 'dulNumber' | 'dulIssueDateField' | 'dulSubdivisionCode' | 'dulIssuedBy' | 'email' | 'phone' | 'fullName' | 'inn' | 'comment' | 'region' | 'addressBranch' | 'typeForm' | 'registrationDate' | 'birthday' | 'limitedBirthday' | 'birthPlace' | 'sex' | 'isClient' | 'consentToReceiveMaterials' | 'acquiringType' | 'onlineCheckout' | 'posTerminal' | 'serviceDirection' | 'serviceType' | 'feedbackMethod' | 'bankEmpolee' | 'applicationDate' | 'secondaryPhone' | 'vedTypes' | 'term' | 'amount' | 'annualRevenue' | 'collectionCount' | 'desiredMeetingDate' | 'product' | 'localities' | 'partnerComments' | 'consentDataProcessing' | 'consentInformFlg' | 'consentOthersFlg' | 'consentPfrFlg' | 'consentProviderFlg' | 'processPersonalDataFlg' | 'legalForm' | 'organizationName' | 'generalSeniority' | 'lastJobExperience' | 'experience5Years' | 'jobsNumber' | 'beginDate' | 'addressFact' | 'familyStatus' | 'children' | 'familyMembers' | 'dependents' | 'totalIncome' | 'expenses' | 'snils' | 'conscription' | 'armyIdFlg' | 'addressRegistration' | 'participantDateRegistration' | 'retirementIncome' | 'otherIncome' | '
|
|
1
|
+
export declare type NameFieldDef = 'surname' | 'name' | 'middleName' | 'education' | 'housing' | 'employment' | 'organization' | 'organizationPhone' | 'organizationAddress' | 'amountWorkers' | 'employerActivities' | 'employerOrganization' | 'positionOrganization' | 'dulSerie' | 'dulNumber' | 'dulIssueDateField' | 'dulSubdivisionCode' | 'dulIssuedBy' | 'email' | 'phone' | 'fullName' | 'inn' | 'comment' | 'region' | 'addressBranch' | 'typeForm' | 'registrationDate' | 'birthday' | 'limitedBirthday' | 'birthPlace' | 'sex' | 'isClient' | 'consentToReceiveMaterials' | 'acquiringType' | 'onlineCheckout' | 'posTerminal' | 'serviceDirection' | 'serviceType' | 'feedbackMethod' | 'bankEmpolee' | 'applicationDate' | 'secondaryPhone' | 'vedTypes' | 'term' | 'amount' | 'annualRevenue' | 'collectionCount' | 'desiredMeetingDate' | 'product' | 'localities' | 'partnerComments' | 'consentDataProcessing' | 'consentInformFlg' | 'consentOthersFlg' | 'consentPfrFlg' | 'consentProviderFlg' | 'processPersonalDataFlg' | 'legalForm' | 'organizationName' | 'generalSeniority' | 'lastJobExperience' | 'experience5Years' | 'jobsNumber' | 'beginDate' | 'addressFact' | 'familyStatus' | 'children' | 'familyMembers' | 'dependents' | 'totalIncome' | 'expenses' | 'snils' | 'conscription' | 'armyIdFlg' | 'addressRegistration' | 'participantDateRegistration' | 'retirementIncome' | 'otherIncome' | 'mandatoryPayments' | 'additionalIncome' | 'otherPayments' | 'rentalIncome' | 'wages' | 'creditInRshbCd' | 'disablePeopleFlg' | 'bankruptcyFlg' | 'shareholderFlg' | 'legalEntityName' | 'bankEmployeeCode' | 'partInBusiness' | 'regionRetail' | 'addressRetail' | 'addressMatch' | 'addressCourier' | 'deliveryDate' | 'methodObtain' | 'paymentSystem' | 'currency' | 'cardCategory' | 'codeWord' | 'calculator' | 'confirmationIncome';
|
|
@@ -4065,15 +4065,7 @@
|
|
|
4065
4065
|
return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: formatRegions, ...getValidation(field('regionRetail'), validatorObj.regionRetail, input?.required) }));
|
|
4066
4066
|
});
|
|
4067
4067
|
|
|
4068
|
-
const RetirementIncomeField = JSX(({ field, input }) => {
|
|
4069
|
-
const currentWages = field('wages')?.value;
|
|
4070
|
-
const onChange = useCallback((_) => {
|
|
4071
|
-
const incomesSum = Number(_) + Number(currentWages || 0);
|
|
4072
|
-
field('retirementIncome')?.onChange?.(_);
|
|
4073
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
4074
|
-
}, [currentWages]);
|
|
4075
|
-
return (jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input, onChange: onChange }));
|
|
4076
|
-
});
|
|
4068
|
+
const RetirementIncomeField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input })));
|
|
4077
4069
|
|
|
4078
4070
|
const SecondaryPhoneField = JSX(({ field }) => {
|
|
4079
4071
|
const fieldPhone = field('secondaryPhone');
|
|
@@ -4162,15 +4154,7 @@
|
|
|
4162
4154
|
return (jsx("div", { className: "py-m gap-m grid @xl:flex @xl:items-center", children: jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: VED_TYPES, value: value, onChange: (_) => onChange && onChange(_) }) }));
|
|
4163
4155
|
});
|
|
4164
4156
|
|
|
4165
|
-
const WagesField = JSX(({ field, input }) => {
|
|
4166
|
-
const currentRetirementIncome = field('retirementIncome')?.value;
|
|
4167
|
-
const onChange = useCallback((_) => {
|
|
4168
|
-
const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
|
|
4169
|
-
field('wages')?.onChange?.(_);
|
|
4170
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
4171
|
-
}, [currentRetirementIncome]);
|
|
4172
|
-
return (jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input, onChange: onChange }));
|
|
4173
|
-
});
|
|
4157
|
+
const WagesField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input })));
|
|
4174
4158
|
|
|
4175
4159
|
function isRenderField({ input, field, }) {
|
|
4176
4160
|
const { condition } = input;
|
|
@@ -4800,6 +4784,98 @@
|
|
|
4800
4784
|
|
|
4801
4785
|
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: { icon: icon, iconVersion: 'black' }, width: "78", height: "78" }), jsxs("div", { className: "w-full md:w-auto", children: [jsx(Heading, { className: "text-center md:text-left", title: title, headingType: "h5" }), description ? (jsx(Paragraph, { color: "text-secondary-text", size: "text-m", children: description })) : null] })] })));
|
|
4802
4786
|
|
|
4787
|
+
const fieldsNamesToContactKeysMap = {
|
|
4788
|
+
email: 'EMAIL',
|
|
4789
|
+
phone: 'MAIN_PHONE',
|
|
4790
|
+
organizationPhone: 'ORGANIZATION_PHONE',
|
|
4791
|
+
};
|
|
4792
|
+
const fieldsNamesToAddressKeysMap = {
|
|
4793
|
+
addressRegistration: 'REGISTRATION',
|
|
4794
|
+
addressFact: 'RESIDENTAL',
|
|
4795
|
+
organizationAddress: 'WORK',
|
|
4796
|
+
addressCourier: 'DELIVERY',
|
|
4797
|
+
};
|
|
4798
|
+
const fieldsNamesToIncomeKeysMap = {
|
|
4799
|
+
incomeAverage: 'INCOME_AVERAGE',
|
|
4800
|
+
mandatoryPayments: 'MANDATORY_PAYMENTS',
|
|
4801
|
+
additionalIncome: 'ADDITIONAL_INCOME',
|
|
4802
|
+
otherIncome: 'OTHER_INCOME',
|
|
4803
|
+
otherPayments: 'OTHER_PAYMENTS',
|
|
4804
|
+
rentalIncome: 'RENTAL_INCOME',
|
|
4805
|
+
wages: 'WAGES',
|
|
4806
|
+
retirementIncome: 'RETIREMENT_INCOME',
|
|
4807
|
+
};
|
|
4808
|
+
const getParticipantContacts$1 = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
4809
|
+
if (key in fieldsNamesToContactKeysMap) {
|
|
4810
|
+
return [
|
|
4811
|
+
...acc,
|
|
4812
|
+
{
|
|
4813
|
+
contactTypeCd: {
|
|
4814
|
+
key: fieldsNamesToContactKeysMap[key],
|
|
4815
|
+
},
|
|
4816
|
+
value,
|
|
4817
|
+
},
|
|
4818
|
+
];
|
|
4819
|
+
}
|
|
4820
|
+
return acc;
|
|
4821
|
+
}, []);
|
|
4822
|
+
const getParticipantAddresses$1 = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
4823
|
+
if (key in fieldsNamesToAddressKeysMap) {
|
|
4824
|
+
const address = Object.fromEntries(Object.entries(value ?? {})
|
|
4825
|
+
.filter(([k]) => !k.startsWith('qc')) // exclude dadata fields
|
|
4826
|
+
.map(([k, v]) => [k, v ?? '']));
|
|
4827
|
+
return [
|
|
4828
|
+
...acc,
|
|
4829
|
+
{
|
|
4830
|
+
addressType: {
|
|
4831
|
+
key: fieldsNamesToAddressKeysMap[key],
|
|
4832
|
+
},
|
|
4833
|
+
...address,
|
|
4834
|
+
},
|
|
4835
|
+
];
|
|
4836
|
+
}
|
|
4837
|
+
return acc;
|
|
4838
|
+
}, []);
|
|
4839
|
+
const getParticipantIncomes$1 = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
4840
|
+
if (key in fieldsNamesToIncomeKeysMap) {
|
|
4841
|
+
return [
|
|
4842
|
+
...acc,
|
|
4843
|
+
{
|
|
4844
|
+
incomeTypeCd: {
|
|
4845
|
+
key: fieldsNamesToIncomeKeysMap[key],
|
|
4846
|
+
},
|
|
4847
|
+
value: Number(value || 0),
|
|
4848
|
+
},
|
|
4849
|
+
];
|
|
4850
|
+
}
|
|
4851
|
+
return acc;
|
|
4852
|
+
}, []);
|
|
4853
|
+
|
|
4854
|
+
const getFamilyStatusAndIncomeData = (formData) => {
|
|
4855
|
+
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
4856
|
+
return {
|
|
4857
|
+
maritalStatusCd: familyStatus,
|
|
4858
|
+
totalDependents: familyMembers,
|
|
4859
|
+
incomeCertificateCd: confirmationIncome,
|
|
4860
|
+
otherDependents: dependents,
|
|
4861
|
+
childrenDependents: children,
|
|
4862
|
+
militaryStatusCd: conscription,
|
|
4863
|
+
participantIncomes: getParticipantIncomes$1({
|
|
4864
|
+
wages,
|
|
4865
|
+
mandatoryPayments,
|
|
4866
|
+
incomeAverage: countIncomeAverage(wages, retirementIncome),
|
|
4867
|
+
additionalIncome,
|
|
4868
|
+
otherIncome,
|
|
4869
|
+
otherPayments,
|
|
4870
|
+
rentalIncome,
|
|
4871
|
+
retirementIncome,
|
|
4872
|
+
}),
|
|
4873
|
+
snils: snils?.replaceAll(' ', '').replaceAll('-', ''),
|
|
4874
|
+
armyIdFlg,
|
|
4875
|
+
};
|
|
4876
|
+
};
|
|
4877
|
+
const countIncomeAverage = (wages, retirementIncome) => Number(wages) + Number(retirementIncome);
|
|
4878
|
+
|
|
4803
4879
|
const creditCodesToProgrammIdMap = {
|
|
4804
4880
|
credit_cash: '10',
|
|
4805
4881
|
credit_cash_single_doc: '28',
|
|
@@ -4822,15 +4898,15 @@
|
|
|
4822
4898
|
...creditCodesToProgrammIdMap,
|
|
4823
4899
|
...cardCodesToProgrammIdMap,
|
|
4824
4900
|
};
|
|
4825
|
-
const getParticipantIncomes
|
|
4901
|
+
const getParticipantIncomes = (participantIncomes) => {
|
|
4826
4902
|
const wages = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "WAGES" /* EIncomesType.WAGES */)?.value;
|
|
4827
4903
|
const mandatoryPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "MANDATORY_PAYMENTS" /* EIncomesType.MANDATORY_PAYMENTS */)?.value;
|
|
4828
|
-
const incomeAverage = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "INCOME_AVERAGE" /* EIncomesType.INCOME_AVERAGE */)?.value;
|
|
4829
4904
|
const additionalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "ADDITIONAL_INCOME" /* EIncomesType.ADDITIONAL_INCOME */)?.value;
|
|
4830
4905
|
const otherIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_INCOME" /* EIncomesType.OTHER_INCOME */)?.value;
|
|
4831
4906
|
const otherPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_PAYMENTS" /* EIncomesType.OTHER_PAYMENTS */)?.value;
|
|
4832
4907
|
const rentalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RENTAL_INCOME" /* EIncomesType.RENTAL_INCOME */)?.value;
|
|
4833
4908
|
const retirementIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RETIREMENT_INCOME" /* EIncomesType.RETIREMENT_INCOME */)?.value;
|
|
4909
|
+
const incomeAverage = countIncomeAverage(wages, retirementIncome);
|
|
4834
4910
|
return {
|
|
4835
4911
|
wages,
|
|
4836
4912
|
mandatoryPayments,
|
|
@@ -4842,7 +4918,7 @@
|
|
|
4842
4918
|
retirementIncome,
|
|
4843
4919
|
};
|
|
4844
4920
|
};
|
|
4845
|
-
const getParticipantAddresses
|
|
4921
|
+
const getParticipantAddresses = (participantAddresses) => {
|
|
4846
4922
|
const addressRegistration = participantAddresses?.find((address) => address.addressType.key === "REGISTRATION" /* EAddressType.REGISTRATION */);
|
|
4847
4923
|
const addressFact = participantAddresses?.find((address) => address.addressType.key === "RESIDENTAL" /* EAddressType.RESIDENTAL */);
|
|
4848
4924
|
const organizationAddress = participantAddresses?.find((address) => address.addressType.key === "WORK" /* EAddressType.WORK */);
|
|
@@ -4852,7 +4928,7 @@
|
|
|
4852
4928
|
organizationAddress,
|
|
4853
4929
|
};
|
|
4854
4930
|
};
|
|
4855
|
-
const getParticipantContacts
|
|
4931
|
+
const getParticipantContacts = (participantContacts) => {
|
|
4856
4932
|
const email = participantContacts?.find((contact) => contact.contactTypeCd.key === "EMAIL" /* EContactType.EMail */)?.value;
|
|
4857
4933
|
const phone = participantContacts?.find((contact) => contact.contactTypeCd.key === "MAIN_PHONE" /* EContactType.MainPhone */)?.value;
|
|
4858
4934
|
const organizationPhone = participantContacts?.find((contact) => contact.contactTypeCd.key === "ORGANIZATION_PHONE" /* EContactType.OrganizationPhone */)?.value;
|
|
@@ -4934,9 +5010,9 @@
|
|
|
4934
5010
|
monthsValue,
|
|
4935
5011
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
4936
5012
|
},
|
|
4937
|
-
...getParticipantIncomes
|
|
4938
|
-
...getParticipantAddresses
|
|
4939
|
-
...getParticipantContacts
|
|
5013
|
+
...getParticipantIncomes(participantIncomes),
|
|
5014
|
+
...getParticipantAddresses(participantAddresses),
|
|
5015
|
+
...getParticipantContacts(participantContacts),
|
|
4940
5016
|
...getParticipantGender(genderCd),
|
|
4941
5017
|
};
|
|
4942
5018
|
};
|
|
@@ -5021,73 +5097,6 @@
|
|
|
5021
5097
|
}, [open, nextStepLink]);
|
|
5022
5098
|
};
|
|
5023
5099
|
|
|
5024
|
-
const fieldsNamesToContactKeysMap = {
|
|
5025
|
-
email: 'EMAIL',
|
|
5026
|
-
phone: 'MAIN_PHONE',
|
|
5027
|
-
organizationPhone: 'ORGANIZATION_PHONE',
|
|
5028
|
-
};
|
|
5029
|
-
const fieldsNamesToAddressKeysMap = {
|
|
5030
|
-
addressRegistration: 'REGISTRATION',
|
|
5031
|
-
addressFact: 'RESIDENTAL',
|
|
5032
|
-
organizationAddress: 'WORK',
|
|
5033
|
-
addressCourier: 'DELIVERY',
|
|
5034
|
-
};
|
|
5035
|
-
const fieldsNamesToIncomeKeysMap = {
|
|
5036
|
-
incomeAverage: 'INCOME_AVERAGE',
|
|
5037
|
-
mandatoryPayments: 'MANDATORY_PAYMENTS',
|
|
5038
|
-
additionalIncome: 'ADDITIONAL_INCOME',
|
|
5039
|
-
otherIncome: 'OTHER_INCOME',
|
|
5040
|
-
otherPayments: 'OTHER_PAYMENTS',
|
|
5041
|
-
rentalIncome: 'RENTAL_INCOME',
|
|
5042
|
-
wages: 'WAGES',
|
|
5043
|
-
retirementIncome: 'RETIREMENT_INCOME',
|
|
5044
|
-
};
|
|
5045
|
-
const getParticipantContacts = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
5046
|
-
if (key in fieldsNamesToContactKeysMap) {
|
|
5047
|
-
return [
|
|
5048
|
-
...acc,
|
|
5049
|
-
{
|
|
5050
|
-
contactTypeCd: {
|
|
5051
|
-
key: fieldsNamesToContactKeysMap[key],
|
|
5052
|
-
},
|
|
5053
|
-
value,
|
|
5054
|
-
},
|
|
5055
|
-
];
|
|
5056
|
-
}
|
|
5057
|
-
return acc;
|
|
5058
|
-
}, []);
|
|
5059
|
-
const getParticipantAddresses = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
5060
|
-
if (key in fieldsNamesToAddressKeysMap) {
|
|
5061
|
-
const address = Object.fromEntries(Object.entries(value ?? {})
|
|
5062
|
-
.filter(([k]) => !k.startsWith('qc')) // exclude dadata fields
|
|
5063
|
-
.map(([k, v]) => [k, v ?? '']));
|
|
5064
|
-
return [
|
|
5065
|
-
...acc,
|
|
5066
|
-
{
|
|
5067
|
-
addressType: {
|
|
5068
|
-
key: fieldsNamesToAddressKeysMap[key],
|
|
5069
|
-
},
|
|
5070
|
-
...address,
|
|
5071
|
-
},
|
|
5072
|
-
];
|
|
5073
|
-
}
|
|
5074
|
-
return acc;
|
|
5075
|
-
}, []);
|
|
5076
|
-
const getParticipantIncomes = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
5077
|
-
if (key in fieldsNamesToIncomeKeysMap) {
|
|
5078
|
-
return [
|
|
5079
|
-
...acc,
|
|
5080
|
-
{
|
|
5081
|
-
incomeTypeCd: {
|
|
5082
|
-
key: fieldsNamesToIncomeKeysMap[key],
|
|
5083
|
-
},
|
|
5084
|
-
value: Number(value || 0),
|
|
5085
|
-
},
|
|
5086
|
-
];
|
|
5087
|
-
}
|
|
5088
|
-
return acc;
|
|
5089
|
-
}, []);
|
|
5090
|
-
|
|
5091
5100
|
const getLeadFormTaskData = ({ participantId, taskId, profileId, formData, }) => {
|
|
5092
5101
|
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
5093
5102
|
const navigator = locationNavigator();
|
|
@@ -5107,7 +5116,7 @@
|
|
|
5107
5116
|
profile: {
|
|
5108
5117
|
id: profileId,
|
|
5109
5118
|
},
|
|
5110
|
-
participantContacts: getParticipantContacts({
|
|
5119
|
+
participantContacts: getParticipantContacts$1({
|
|
5111
5120
|
phone: phone && formatPhone(phone),
|
|
5112
5121
|
email,
|
|
5113
5122
|
}),
|
|
@@ -6879,31 +6888,35 @@
|
|
|
6879
6888
|
], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
|
|
6880
6889
|
});
|
|
6881
6890
|
|
|
6882
|
-
const
|
|
6891
|
+
const SuccessStatusCardContent = JSX(() => {
|
|
6883
6892
|
const { statusInfo } = useRetailFormStore();
|
|
6884
|
-
return (jsx(CreditCardFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo:
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6893
|
+
return (jsx(CreditCardFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo: getSectionInfo(statusInfo), buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
|
|
6894
|
+
});
|
|
6895
|
+
const getSectionInfo = (statusInfo) => {
|
|
6896
|
+
const sectionInfo = [
|
|
6897
|
+
{
|
|
6898
|
+
label: 'Название продукта',
|
|
6899
|
+
description: 'Кредитная карта',
|
|
6900
|
+
},
|
|
6901
|
+
{
|
|
6902
|
+
label: 'Категория',
|
|
6903
|
+
description: statusInfo?.cardCategory,
|
|
6904
|
+
},
|
|
6905
|
+
];
|
|
6906
|
+
if (statusInfo?.deliveryAddress && statusInfo?.deliveryDate) {
|
|
6907
|
+
return sectionInfo.concat([
|
|
6897
6908
|
{
|
|
6898
|
-
label: '
|
|
6899
|
-
description: statusInfo?.
|
|
6909
|
+
label: 'Адрес доставки',
|
|
6910
|
+
description: statusInfo?.deliveryAddress,
|
|
6900
6911
|
},
|
|
6901
6912
|
{
|
|
6902
|
-
label: '
|
|
6903
|
-
description: statusInfo?.
|
|
6913
|
+
label: 'Дата доставки',
|
|
6914
|
+
description: formatDate(statusInfo?.deliveryDate),
|
|
6904
6915
|
},
|
|
6905
|
-
]
|
|
6906
|
-
|
|
6916
|
+
]);
|
|
6917
|
+
}
|
|
6918
|
+
return sectionInfo;
|
|
6919
|
+
};
|
|
6907
6920
|
|
|
6908
6921
|
const SIGNAL_TYPES$1 = [
|
|
6909
6922
|
'CREATE_APPLICATION_SHORT_SIGNAL',
|
|
@@ -6936,8 +6949,8 @@
|
|
|
6936
6949
|
CANCELLED: jsx(FailedStatusContent$1, {}),
|
|
6937
6950
|
FAILED: jsx(FailedStatusContent$1, {}),
|
|
6938
6951
|
DRAFT: jsx(FailedStatusContent$1, {}),
|
|
6939
|
-
APPROVED: jsx(
|
|
6940
|
-
PRE_DECISION: jsx(
|
|
6952
|
+
APPROVED: jsx(SuccessStatusCardContent, {}),
|
|
6953
|
+
PRE_DECISION: jsx(SuccessStatusCardContent, {}),
|
|
6941
6954
|
REVISION: jsx(ReworkStatusContent$1, {}),
|
|
6942
6955
|
};
|
|
6943
6956
|
return statusesMap[status] || jsx(ReworkStatusContent$1, {});
|
|
@@ -7029,38 +7042,14 @@
|
|
|
7029
7042
|
jobsNumber,
|
|
7030
7043
|
lastWorkDuration: lastJobExperience,
|
|
7031
7044
|
positionCd: positionOrganization,
|
|
7032
|
-
participantContacts: getParticipantContacts({
|
|
7045
|
+
participantContacts: getParticipantContacts$1({
|
|
7033
7046
|
organizationPhone: organizationPhone && formatPhone(organizationPhone),
|
|
7034
7047
|
}),
|
|
7035
|
-
participantAddresses: getParticipantAddresses({ organizationAddress }),
|
|
7048
|
+
participantAddresses: getParticipantAddresses$1({ organizationAddress }),
|
|
7036
7049
|
ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : '',
|
|
7037
7050
|
};
|
|
7038
7051
|
};
|
|
7039
7052
|
|
|
7040
|
-
const getFamilyStatusAndIncomeData = (formData) => {
|
|
7041
|
-
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, incomeAverage, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
7042
|
-
return {
|
|
7043
|
-
maritalStatusCd: familyStatus,
|
|
7044
|
-
totalDependents: familyMembers,
|
|
7045
|
-
incomeCertificateCd: confirmationIncome,
|
|
7046
|
-
otherDependents: dependents,
|
|
7047
|
-
childrenDependents: children,
|
|
7048
|
-
militaryStatusCd: conscription,
|
|
7049
|
-
participantIncomes: getParticipantIncomes({
|
|
7050
|
-
wages,
|
|
7051
|
-
mandatoryPayments,
|
|
7052
|
-
incomeAverage,
|
|
7053
|
-
additionalIncome,
|
|
7054
|
-
otherIncome,
|
|
7055
|
-
otherPayments,
|
|
7056
|
-
rentalIncome,
|
|
7057
|
-
retirementIncome,
|
|
7058
|
-
}),
|
|
7059
|
-
snils: snils?.replaceAll(' ', '').replaceAll('-', ''),
|
|
7060
|
-
armyIdFlg,
|
|
7061
|
-
};
|
|
7062
|
-
};
|
|
7063
|
-
|
|
7064
7053
|
const getPersonalInfoData = (formData) => {
|
|
7065
7054
|
const { name, surname, middleName, limitedBirthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
|
|
7066
7055
|
return {
|
|
@@ -7077,11 +7066,11 @@
|
|
|
7077
7066
|
educationLevelCd: education,
|
|
7078
7067
|
registrationDate: formatDate(participantDateRegistration, true),
|
|
7079
7068
|
houseTypeCd: housing,
|
|
7080
|
-
participantContacts: getParticipantContacts({
|
|
7069
|
+
participantContacts: getParticipantContacts$1({
|
|
7081
7070
|
phone: formatPhone(phone),
|
|
7082
7071
|
email,
|
|
7083
7072
|
}),
|
|
7084
|
-
participantAddresses: getParticipantAddresses({ addressRegistration, addressFact }),
|
|
7073
|
+
participantAddresses: getParticipantAddresses$1({ addressRegistration, addressFact }),
|
|
7085
7074
|
genderCd: sex
|
|
7086
7075
|
? {
|
|
7087
7076
|
key: sex === 'male' ? 'MAN' : 'WOMAN',
|
|
@@ -7122,7 +7111,7 @@
|
|
|
7122
7111
|
const isCourierDelivery = methodObtain === 'courier';
|
|
7123
7112
|
return isCourierDelivery
|
|
7124
7113
|
? {
|
|
7125
|
-
participantAddresses: getParticipantAddresses({ addressCourier }),
|
|
7114
|
+
participantAddresses: getParticipantAddresses$1({ addressCourier }),
|
|
7126
7115
|
}
|
|
7127
7116
|
: {};
|
|
7128
7117
|
};
|
|
@@ -7290,12 +7279,9 @@
|
|
|
7290
7279
|
retailFormStore.statusInfo = {
|
|
7291
7280
|
regionRetail: leadForm?.regionRetail?.text,
|
|
7292
7281
|
addressRetail: leadForm?.addressRetail?.text,
|
|
7282
|
+
deliveryAddress: leadForm?.addressCourier?.fullAddress,
|
|
7293
7283
|
cardCategory: leadForm?.cardCategory?.text,
|
|
7294
|
-
|
|
7295
|
-
monthsValue: leadForm?.calculator?.monthsValue,
|
|
7296
|
-
moneyValue: leadForm?.calculator?.moneyValue,
|
|
7297
|
-
isAnnuity: leadForm?.calculator?.isAnnuity,
|
|
7298
|
-
},
|
|
7284
|
+
deliveryDate: leadForm?.deliveryDate,
|
|
7299
7285
|
};
|
|
7300
7286
|
retailFormStore.leadForm = initialState;
|
|
7301
7287
|
}
|
|
@@ -8134,7 +8120,6 @@
|
|
|
8134
8120
|
retailFormStore.statusInfo = {
|
|
8135
8121
|
regionRetail: leadForm?.regionRetail?.text,
|
|
8136
8122
|
addressRetail: leadForm?.addressRetail?.text,
|
|
8137
|
-
cardCategory: leadForm?.cardCategory?.text,
|
|
8138
8123
|
calculator: {
|
|
8139
8124
|
monthsValue: leadForm?.calculator?.monthsValue,
|
|
8140
8125
|
moneyValue: leadForm?.calculator?.moneyValue,
|
|
@@ -10133,7 +10118,7 @@
|
|
|
10133
10118
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10134
10119
|
});
|
|
10135
10120
|
|
|
10136
|
-
const packageVersion = "0.14.
|
|
10121
|
+
const packageVersion = "0.14.723";
|
|
10137
10122
|
|
|
10138
10123
|
exports.Blocks = Blocks;
|
|
10139
10124
|
exports.ContentPage = ContentPage;
|