@redneckz/wildless-cms-uni-blocks 0.14.723 → 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 +108 -123
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- 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/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/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 +108 -123
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- 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/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/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/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/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
|
@@ -112,7 +112,6 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
112
112
|
participantDateRegistration?: Date | string;
|
|
113
113
|
retirementIncome?: number;
|
|
114
114
|
otherIncome?: number;
|
|
115
|
-
incomeAverage?: number;
|
|
116
115
|
mandatoryPayments?: number;
|
|
117
116
|
additionalIncome?: number;
|
|
118
117
|
otherPayments?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type Participant } from '../../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { type LeadFormState } from '../../../components/ApplicationLeadForm/LeadFormState';
|
|
3
3
|
export declare const getFamilyStatusAndIncomeData: (formData: LeadFormState) => Partial<Participant>;
|
|
4
|
+
export declare const countIncomeAverage: (wages?: number, retirementIncome?: number) => number;
|
|
@@ -61,7 +61,7 @@ export declare const creditProgramCodeToProductIdMap: {
|
|
|
61
61
|
export declare const getParticipantIncomes: (participantIncomes: Participant['participantIncomes']) => {
|
|
62
62
|
wages: number | undefined;
|
|
63
63
|
mandatoryPayments: number | undefined;
|
|
64
|
-
incomeAverage: number
|
|
64
|
+
incomeAverage: number;
|
|
65
65
|
additionalIncome: number | undefined;
|
|
66
66
|
otherIncome: number | undefined;
|
|
67
67
|
otherPayments: number | undefined;
|
|
@@ -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';
|
|
@@ -112,7 +112,6 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
112
112
|
participantDateRegistration?: Date | string;
|
|
113
113
|
retirementIncome?: number;
|
|
114
114
|
otherIncome?: number;
|
|
115
|
-
incomeAverage?: number;
|
|
116
115
|
mandatoryPayments?: number;
|
|
117
116
|
additionalIncome?: number;
|
|
118
117
|
otherPayments?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type Participant } from '../../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { type LeadFormState } from '../../../components/ApplicationLeadForm/LeadFormState';
|
|
3
3
|
export declare const getFamilyStatusAndIncomeData: (formData: LeadFormState) => Partial<Participant>;
|
|
4
|
+
export declare const countIncomeAverage: (wages?: number, retirementIncome?: number) => number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.getFamilyStatusAndIncomeData = void 0;
|
|
2
|
+
exports.countIncomeAverage = exports.getFamilyStatusAndIncomeData = void 0;
|
|
3
3
|
const utils_1 = require("../../../components/CreditForm/utils");
|
|
4
4
|
const getFamilyStatusAndIncomeData = (formData) => {
|
|
5
|
-
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments,
|
|
5
|
+
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
6
6
|
return {
|
|
7
7
|
maritalStatusCd: familyStatus,
|
|
8
8
|
totalDependents: familyMembers,
|
|
@@ -13,7 +13,7 @@ const getFamilyStatusAndIncomeData = (formData) => {
|
|
|
13
13
|
participantIncomes: (0, utils_1.getParticipantIncomes)({
|
|
14
14
|
wages,
|
|
15
15
|
mandatoryPayments,
|
|
16
|
-
incomeAverage,
|
|
16
|
+
incomeAverage: (0, exports.countIncomeAverage)(wages, retirementIncome),
|
|
17
17
|
additionalIncome,
|
|
18
18
|
otherIncome,
|
|
19
19
|
otherPayments,
|
|
@@ -25,4 +25,6 @@ const getFamilyStatusAndIncomeData = (formData) => {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
exports.getFamilyStatusAndIncomeData = getFamilyStatusAndIncomeData;
|
|
28
|
+
const countIncomeAverage = (wages, retirementIncome) => Number(wages) + Number(retirementIncome);
|
|
29
|
+
exports.countIncomeAverage = countIncomeAverage;
|
|
28
30
|
//# sourceMappingURL=getFamilyStatusAndIncomeData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFamilyStatusAndIncomeData.js","sourceRoot":"","sources":["../../../../src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts"],"names":[],"mappings":";;AAEA,gEAA6E;AAEtE,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAwB,EAAE;IAC5F,MAAM,EACJ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"getFamilyStatusAndIncomeData.js","sourceRoot":"","sources":["../../../../src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts"],"names":[],"mappings":";;AAEA,gEAA6E;AAEtE,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAwB,EAAE;IAC5F,MAAM,EACJ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,YAAY,GACb,GAAG,QAAQ,CAAC;IAEb,OAAO;QACL,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,aAAa;QAC9B,mBAAmB,EAAE,kBAAkB;QACvC,eAAe,EAAE,UAAU;QAC3B,kBAAkB,EAAE,QAAQ;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,kBAAkB,EAAE,IAAA,6BAAqB,EAAC;YACxC,KAAK;YACL,iBAAiB;YACjB,aAAa,EAAE,IAAA,0BAAkB,EAAC,KAAK,EAAE,gBAAgB,CAAC;YAC1D,gBAAgB;YAChB,WAAW;YACX,aAAa;YACb,YAAY;YACZ,gBAAgB;SACjB,CAAC;QACF,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC;QACrD,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,4BAA4B,gCAuCvC;AAEK,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAE,gBAAyB,EAAE,EAAE,CAC9E,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAD9B,QAAA,kBAAkB,sBACY"}
|
|
@@ -61,7 +61,7 @@ export declare const creditProgramCodeToProductIdMap: {
|
|
|
61
61
|
export declare const getParticipantIncomes: (participantIncomes: Participant['participantIncomes']) => {
|
|
62
62
|
wages: number | undefined;
|
|
63
63
|
mandatoryPayments: number | undefined;
|
|
64
|
-
incomeAverage: number
|
|
64
|
+
incomeAverage: number;
|
|
65
65
|
additionalIncome: number | undefined;
|
|
66
66
|
otherIncome: number | undefined;
|
|
67
67
|
otherPayments: number | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.getSelectValue = exports.getParticipantGender = exports.getParticipantContacts = exports.getParticipantAddresses = exports.getParticipantIncomes = exports.creditProgramCodeToProductIdMap = exports.cardCodesToProgrammIdMap = exports.creditCodesToProgrammIdMap = void 0;
|
|
3
|
+
const getFamilyStatusAndIncomeData_1 = require("../../services/retail/adaptors/getFamilyStatusAndIncomeData");
|
|
3
4
|
exports.creditCodesToProgrammIdMap = {
|
|
4
5
|
credit_cash: '10',
|
|
5
6
|
credit_cash_single_doc: '28',
|
|
@@ -25,12 +26,12 @@ exports.creditProgramCodeToProductIdMap = {
|
|
|
25
26
|
const getParticipantIncomes = (participantIncomes) => {
|
|
26
27
|
const wages = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "WAGES" /* EIncomesType.WAGES */)?.value;
|
|
27
28
|
const mandatoryPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "MANDATORY_PAYMENTS" /* EIncomesType.MANDATORY_PAYMENTS */)?.value;
|
|
28
|
-
const incomeAverage = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "INCOME_AVERAGE" /* EIncomesType.INCOME_AVERAGE */)?.value;
|
|
29
29
|
const additionalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "ADDITIONAL_INCOME" /* EIncomesType.ADDITIONAL_INCOME */)?.value;
|
|
30
30
|
const otherIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_INCOME" /* EIncomesType.OTHER_INCOME */)?.value;
|
|
31
31
|
const otherPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_PAYMENTS" /* EIncomesType.OTHER_PAYMENTS */)?.value;
|
|
32
32
|
const rentalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RENTAL_INCOME" /* EIncomesType.RENTAL_INCOME */)?.value;
|
|
33
33
|
const retirementIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RETIREMENT_INCOME" /* EIncomesType.RETIREMENT_INCOME */)?.value;
|
|
34
|
+
const incomeAverage = (0, getFamilyStatusAndIncomeData_1.countIncomeAverage)(wages, retirementIncome);
|
|
34
35
|
return {
|
|
35
36
|
wages,
|
|
36
37
|
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":";;AAGA,8GAAiG;AA6BpF,QA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AAI,CACrC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,qCAAuB,CAC9D,EAAE,KAAK,CAAC;IACT,MAAM,KAAK,GAAG,mBAAmB,EAAE,IAAI,CACrC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,8CAA2B,CAClE,EAAE,KAAK,CAAC;IACT,MAAM,iBAAiB,GAAG,mBAAmB,EAAE,IAAI,CACjD,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,8DAAmC,CAC1E,EAAE,KAAK,CAAC;IAET,OAAO;QACL,KAAK;QACL,KAAK;QACL,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,sBAAsB,0BAgBjC;AAEK,MAAM,oBAAoB,GAAG,CAAC,MAA+B,EAAE,EAAE;IACtE,OAAO,MAAM,EAAE,GAAG;QAChB,CAAC,CAAC;YACE,GAAG,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;SAC9C;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AANW,QAAA,oBAAoB,wBAM/B;AAEK,MAAM,cAAc,GAAG,CAAC,MAAkB,EAAsB,EAAE;IACvE,OAAO,MAAM,EAAE,GAAG;QAChB,CAAC,CAAC;YACE,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,IAAI,EAAE,MAAM,CAAC,KAAK;SACnB;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB"}
|
|
@@ -2,17 +2,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.RetirementIncomeField = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
5
|
const InputControl_1 = require("../../Input/InputControl");
|
|
7
6
|
const getObjectValidator_1 = require("../getObjectValidator");
|
|
8
7
|
const getValidation_1 = require("../getValidation");
|
|
9
|
-
exports.RetirementIncomeField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
10
|
-
const currentWages = field('wages')?.value;
|
|
11
|
-
const onChange = (0, hooks_1.useCallback)((_) => {
|
|
12
|
-
const incomesSum = Number(_) + Number(currentWages || 0);
|
|
13
|
-
field('retirementIncome')?.onChange?.(_);
|
|
14
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
15
|
-
}, [currentWages]);
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(InputControl_1.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, ...(0, getValidation_1.getValidation)(field('retirementIncome'), getObjectValidator_1.validatorObj.retirementIncome, input?.required), ...input, onChange: onChange }));
|
|
17
|
-
});
|
|
8
|
+
exports.RetirementIncomeField = (0, uni_jsx_1.JSX)(({ field, input }) => ((0, jsx_runtime_1.jsx)(InputControl_1.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, ...(0, getValidation_1.getValidation)(field('retirementIncome'), getObjectValidator_1.validatorObj.retirementIncome, input?.required), ...input })));
|
|
18
9
|
//# sourceMappingURL=RetirementIncomeField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RetirementIncomeField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/RetirementIncomeField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"RetirementIncomeField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/RetirementIncomeField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,2DAAwD;AAExD,8DAAqD;AACrD,oDAAiD;AAEpC,QAAA,qBAAqB,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC/E,uBAAC,2BAAY,IACX,KAAK,EAAC,mGAAmB,EACzB,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,IAAA,6BAAa,EAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,iCAAY,CAAC,gBAAgB,EAAE,KAAK,EAAE,QAAQ,CAAC,KACxF,KAAK,GACT,CACH,CAAC,CAAC"}
|
|
@@ -2,17 +2,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.WagesField = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
5
|
const InputControl_1 = require("../../Input/InputControl");
|
|
7
6
|
const getObjectValidator_1 = require("../getObjectValidator");
|
|
8
7
|
const getValidation_1 = require("../getValidation");
|
|
9
|
-
exports.WagesField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
10
|
-
const currentRetirementIncome = field('retirementIncome')?.value;
|
|
11
|
-
const onChange = (0, hooks_1.useCallback)((_) => {
|
|
12
|
-
const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
|
|
13
|
-
field('wages')?.onChange?.(_);
|
|
14
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
15
|
-
}, [currentRetirementIncome]);
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(InputControl_1.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, ...(0, getValidation_1.getValidation)(field('wages'), getObjectValidator_1.validatorObj.wages, input?.required), ...input, onChange: onChange }));
|
|
17
|
-
});
|
|
8
|
+
exports.WagesField = (0, uni_jsx_1.JSX)(({ field, input }) => ((0, jsx_runtime_1.jsx)(InputControl_1.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, ...(0, getValidation_1.getValidation)(field('wages'), getObjectValidator_1.validatorObj.wages, input?.required), ...input })));
|
|
18
9
|
//# sourceMappingURL=WagesField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WagesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/WagesField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"WagesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/WagesField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,2DAAwD;AAExD,8DAAqD;AACrD,oDAAiD;AAEpC,QAAA,UAAU,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACpE,uBAAC,2BAAY,IACX,KAAK,EAAC,2UAAkE,EACxE,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,IAAA,6BAAa,EAAC,KAAK,CAAC,OAAO,CAAC,EAAE,iCAAY,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';
|
|
@@ -112,7 +112,6 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
|
|
|
112
112
|
participantDateRegistration?: Date | string;
|
|
113
113
|
retirementIncome?: number;
|
|
114
114
|
otherIncome?: number;
|
|
115
|
-
incomeAverage?: number;
|
|
116
115
|
mandatoryPayments?: number;
|
|
117
116
|
additionalIncome?: number;
|
|
118
117
|
otherPayments?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type Participant } from '../../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { type LeadFormState } from '../../../components/ApplicationLeadForm/LeadFormState';
|
|
3
3
|
export declare const getFamilyStatusAndIncomeData: (formData: LeadFormState) => Partial<Participant>;
|
|
4
|
+
export declare const countIncomeAverage: (wages?: number, retirementIncome?: number) => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getParticipantIncomes } from '../../../components/CreditForm/utils.js';
|
|
2
2
|
export const getFamilyStatusAndIncomeData = (formData) => {
|
|
3
|
-
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments,
|
|
3
|
+
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
4
4
|
return {
|
|
5
5
|
maritalStatusCd: familyStatus,
|
|
6
6
|
totalDependents: familyMembers,
|
|
@@ -11,7 +11,7 @@ export const getFamilyStatusAndIncomeData = (formData) => {
|
|
|
11
11
|
participantIncomes: getParticipantIncomes({
|
|
12
12
|
wages,
|
|
13
13
|
mandatoryPayments,
|
|
14
|
-
incomeAverage,
|
|
14
|
+
incomeAverage: countIncomeAverage(wages, retirementIncome),
|
|
15
15
|
additionalIncome,
|
|
16
16
|
otherIncome,
|
|
17
17
|
otherPayments,
|
|
@@ -22,4 +22,5 @@ export const getFamilyStatusAndIncomeData = (formData) => {
|
|
|
22
22
|
armyIdFlg,
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
export const countIncomeAverage = (wages, retirementIncome) => Number(wages) + Number(retirementIncome);
|
|
25
26
|
//# sourceMappingURL=getFamilyStatusAndIncomeData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFamilyStatusAndIncomeData.js","sourceRoot":"","sources":["../../../../src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAwB,EAAE;IAC5F,MAAM,EACJ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"getFamilyStatusAndIncomeData.js","sourceRoot":"","sources":["../../../../src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAwB,EAAE;IAC5F,MAAM,EACJ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,YAAY,GACb,GAAG,QAAQ,CAAC;IAEb,OAAO;QACL,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,aAAa;QAC9B,mBAAmB,EAAE,kBAAkB;QACvC,eAAe,EAAE,UAAU;QAC3B,kBAAkB,EAAE,QAAQ;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,kBAAkB,EAAE,qBAAqB,CAAC;YACxC,KAAK;YACL,iBAAiB;YACjB,aAAa,EAAE,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,CAAC;YAC1D,gBAAgB;YAChB,WAAW;YACX,aAAa;YACb,YAAY;YACZ,gBAAgB;SACjB,CAAC;QACF,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC;QACrD,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAE,gBAAyB,EAAE,EAAE,CAC9E,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -61,7 +61,7 @@ export declare const creditProgramCodeToProductIdMap: {
|
|
|
61
61
|
export declare const getParticipantIncomes: (participantIncomes: Participant['participantIncomes']) => {
|
|
62
62
|
wages: number | undefined;
|
|
63
63
|
mandatoryPayments: number | undefined;
|
|
64
|
-
incomeAverage: number
|
|
64
|
+
incomeAverage: number;
|
|
65
65
|
additionalIncome: number | undefined;
|
|
66
66
|
otherIncome: number | undefined;
|
|
67
67
|
otherPayments: number | undefined;
|
|
@@ -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":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AA6BjG,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,WAAW,EAAE,IAAI;IACjB,sBAAsB,EAAE,IAAI;IAC5B,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,IAAI;IAChB,qBAAqB,EAAE,IAAI;IAC3B,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAA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C,GAAG,8DAAmC,CAC1E,EAAE,KAAK,CAAC;IAET,OAAO;QACL,KAAK;QACL,KAAK;QACL,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAA+B,EAAE,EAAE;IACtE,OAAO,MAAM,EAAE,GAAG;QAChB,CAAC,CAAC;YACE,GAAG,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;SAC9C;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAkB,EAAsB,EAAE;IACvE,OAAO,MAAM,EAAE,GAAG;QAChB,CAAC,CAAC;YACE,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,IAAI,EAAE,MAAM,CAAC,KAAK;SACnB;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,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 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';
|