@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
|
@@ -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
|
}),
|
|
@@ -7033,38 +7042,14 @@
|
|
|
7033
7042
|
jobsNumber,
|
|
7034
7043
|
lastWorkDuration: lastJobExperience,
|
|
7035
7044
|
positionCd: positionOrganization,
|
|
7036
|
-
participantContacts: getParticipantContacts({
|
|
7045
|
+
participantContacts: getParticipantContacts$1({
|
|
7037
7046
|
organizationPhone: organizationPhone && formatPhone(organizationPhone),
|
|
7038
7047
|
}),
|
|
7039
|
-
participantAddresses: getParticipantAddresses({ organizationAddress }),
|
|
7048
|
+
participantAddresses: getParticipantAddresses$1({ organizationAddress }),
|
|
7040
7049
|
ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : '',
|
|
7041
7050
|
};
|
|
7042
7051
|
};
|
|
7043
7052
|
|
|
7044
|
-
const getFamilyStatusAndIncomeData = (formData) => {
|
|
7045
|
-
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, incomeAverage, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
7046
|
-
return {
|
|
7047
|
-
maritalStatusCd: familyStatus,
|
|
7048
|
-
totalDependents: familyMembers,
|
|
7049
|
-
incomeCertificateCd: confirmationIncome,
|
|
7050
|
-
otherDependents: dependents,
|
|
7051
|
-
childrenDependents: children,
|
|
7052
|
-
militaryStatusCd: conscription,
|
|
7053
|
-
participantIncomes: getParticipantIncomes({
|
|
7054
|
-
wages,
|
|
7055
|
-
mandatoryPayments,
|
|
7056
|
-
incomeAverage,
|
|
7057
|
-
additionalIncome,
|
|
7058
|
-
otherIncome,
|
|
7059
|
-
otherPayments,
|
|
7060
|
-
rentalIncome,
|
|
7061
|
-
retirementIncome,
|
|
7062
|
-
}),
|
|
7063
|
-
snils: snils?.replaceAll(' ', '').replaceAll('-', ''),
|
|
7064
|
-
armyIdFlg,
|
|
7065
|
-
};
|
|
7066
|
-
};
|
|
7067
|
-
|
|
7068
7053
|
const getPersonalInfoData = (formData) => {
|
|
7069
7054
|
const { name, surname, middleName, limitedBirthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
|
|
7070
7055
|
return {
|
|
@@ -7081,11 +7066,11 @@
|
|
|
7081
7066
|
educationLevelCd: education,
|
|
7082
7067
|
registrationDate: formatDate(participantDateRegistration, true),
|
|
7083
7068
|
houseTypeCd: housing,
|
|
7084
|
-
participantContacts: getParticipantContacts({
|
|
7069
|
+
participantContacts: getParticipantContacts$1({
|
|
7085
7070
|
phone: formatPhone(phone),
|
|
7086
7071
|
email,
|
|
7087
7072
|
}),
|
|
7088
|
-
participantAddresses: getParticipantAddresses({ addressRegistration, addressFact }),
|
|
7073
|
+
participantAddresses: getParticipantAddresses$1({ addressRegistration, addressFact }),
|
|
7089
7074
|
genderCd: sex
|
|
7090
7075
|
? {
|
|
7091
7076
|
key: sex === 'male' ? 'MAN' : 'WOMAN',
|
|
@@ -7126,7 +7111,7 @@
|
|
|
7126
7111
|
const isCourierDelivery = methodObtain === 'courier';
|
|
7127
7112
|
return isCourierDelivery
|
|
7128
7113
|
? {
|
|
7129
|
-
participantAddresses: getParticipantAddresses({ addressCourier }),
|
|
7114
|
+
participantAddresses: getParticipantAddresses$1({ addressCourier }),
|
|
7130
7115
|
}
|
|
7131
7116
|
: {};
|
|
7132
7117
|
};
|
|
@@ -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;
|