@redneckz/wildless-cms-uni-blocks 0.14.836 → 0.14.838
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/bundle.umd.js +24 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/retail/components/Fields/RegionRetailField.js +8 -3
- package/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/retail/components/Fields/RegionRetailField.js +8 -3
- package/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +24 -24
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/dist/retail/components/Fields/RegionRetailField.js +8 -3
- package/mobile/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/lib/retail/components/Fields/RegionRetailField.js +8 -3
- package/mobile/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +12 -7
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +3 -13
- package/mobile/src/retail/components/Fields/RegionRetailField.tsx +12 -3
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +12 -7
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +3 -13
- package/src/retail/components/Fields/RegionRetailField.tsx +12 -3
|
@@ -34,8 +34,10 @@ export const parseEsiaProfile = async (
|
|
|
34
34
|
dulSubdivisionCode: document.dulSubdivisionCode,
|
|
35
35
|
birthPlace: addInfo.birthPlace,
|
|
36
36
|
addressRegistration: buildAddress(addressRegistration),
|
|
37
|
-
addressFact: buildAddress(addressFact),
|
|
38
37
|
esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
|
|
38
|
+
...(addressFact && {
|
|
39
|
+
addressFact: buildAddress(addressFact),
|
|
40
|
+
}),
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
return {
|
|
@@ -136,16 +138,6 @@ const saveDocuments = async (
|
|
|
136
138
|
category: 'CONFIRMING_INCOME_DOC',
|
|
137
139
|
isPDF: false,
|
|
138
140
|
},
|
|
139
|
-
{
|
|
140
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
141
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
142
|
-
isPDF: true,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
146
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
147
|
-
isPDF: false,
|
|
148
|
-
},
|
|
149
141
|
];
|
|
150
142
|
|
|
151
143
|
for (const doc of documents) {
|
|
@@ -200,8 +192,6 @@ const checkEsiaAdditionalDocument = (esiaProfile: EsiaRequestProfileResponse) =>
|
|
|
200
192
|
esiaAdditionalDocument?.xmlFilePayout,
|
|
201
193
|
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
202
194
|
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
203
|
-
esiaAdditionalDocument?.pdfFileSigWorkbook,
|
|
204
|
-
esiaAdditionalDocument?.xmlFileSigWorkbook,
|
|
205
195
|
];
|
|
206
196
|
|
|
207
197
|
return data.every(Boolean);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
4
|
+
import { type ProductType } from '../../../components/ApplicationLeadForm/ApplicationLeadFormContent';
|
|
4
5
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
5
6
|
import { type Option } from '../../../ui-kit/Select/Option';
|
|
6
7
|
import { SelectControl } from '../../../ui-kit/Select/SelectControl';
|
|
@@ -9,12 +10,15 @@ import { useLeadFormData } from '../../hooks/useLeadFormData';
|
|
|
9
10
|
import { useRetailFormStore } from '../../hooks/useRetailFormStore';
|
|
10
11
|
|
|
11
12
|
export const RegionRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
13
|
+
const { programId, productType } = useRetailFormStore();
|
|
12
14
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
13
15
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
14
|
-
const {
|
|
16
|
+
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
15
17
|
|
|
16
18
|
const isSalaryCard = programId === '38';
|
|
17
19
|
const formatRegions = regions?.map(({ key, value }) => ({ key, text: value }));
|
|
20
|
+
const isDeliveryActive =
|
|
21
|
+
productSettings?.find((_) => _?.key === 'DELIVERY_ACTIVE')?.value === 'true';
|
|
18
22
|
|
|
19
23
|
const handleChangeRegion = field('regionRetail')?.onChange;
|
|
20
24
|
const handleChangeRegionHasDelivery = field('regionHasDelivery')?.onChange;
|
|
@@ -23,12 +27,14 @@ export const RegionRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
23
27
|
const onChange = useCallback(
|
|
24
28
|
(value: Option) => {
|
|
25
29
|
const regionHasDelivery =
|
|
26
|
-
|
|
30
|
+
isDeliveryActive &&
|
|
31
|
+
regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg &&
|
|
32
|
+
!isSalaryCard;
|
|
27
33
|
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
28
34
|
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
29
35
|
handleChangeRegion?.(value);
|
|
30
36
|
},
|
|
31
|
-
[regionsDelivery],
|
|
37
|
+
[regionsDelivery, isDeliveryActive],
|
|
32
38
|
);
|
|
33
39
|
|
|
34
40
|
return (
|
|
@@ -42,3 +48,6 @@ export const RegionRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
42
48
|
/>
|
|
43
49
|
);
|
|
44
50
|
});
|
|
51
|
+
|
|
52
|
+
const getCurrentProductSettings = (productType: ProductType | null) =>
|
|
53
|
+
productType === 'debitCard' ? 'DEBIT_CARD_LEAD_PROCESS_SETTINGS' : 'CREDIT_LEAD_PROCESS_SETTINGS';
|