@redneckz/wildless-cms-uni-blocks 0.14.974 → 0.14.975
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 +15 -133
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/bundle/retail/api/createUserTaskDebit.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/retail/api/createUserTaskDebit.d.ts +0 -1
- package/dist/retail/api/createUserTaskDebit.js.map +1 -1
- package/dist/retail/components/Fields/AddressRetailField.js +0 -20
- package/dist/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/dist/retail/components/Fields/PaymentSystemField.js +2 -14
- package/dist/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/dist/retail/components/Fields/RegionRetailField.js +7 -20
- package/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/retail/api/createUserTaskDebit.d.ts +0 -1
- package/lib/retail/api/createUserTaskDebit.js.map +1 -1
- package/lib/retail/components/Fields/AddressRetailField.js +0 -20
- package/lib/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/lib/retail/components/Fields/PaymentSystemField.js +2 -14
- package/lib/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/lib/retail/components/Fields/RegionRetailField.js +7 -20
- package/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +15 -133
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/mobile/bundle/retail/api/createUserTaskDebit.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/retail/api/createUserTaskDebit.d.ts +0 -1
- package/mobile/dist/retail/api/createUserTaskDebit.js.map +1 -1
- package/mobile/dist/retail/components/Fields/AddressRetailField.js +0 -20
- package/mobile/dist/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/PaymentSystemField.js +2 -14
- package/mobile/dist/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/RegionRetailField.js +7 -20
- package/mobile/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/retail/api/createUserTaskDebit.d.ts +0 -1
- package/mobile/lib/retail/api/createUserTaskDebit.js.map +1 -1
- package/mobile/lib/retail/components/Fields/AddressRetailField.js +0 -20
- package/mobile/lib/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/PaymentSystemField.js +2 -14
- package/mobile/lib/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/RegionRetailField.js +7 -20
- package/mobile/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +5 -14
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -32
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -6
- package/mobile/src/retail/api/createUserTaskDebit.ts +0 -1
- package/mobile/src/retail/components/Fields/AddressRetailField.tsx +0 -26
- package/mobile/src/retail/components/Fields/PaymentSystemField.tsx +2 -21
- package/mobile/src/retail/components/Fields/RegionRetailField.tsx +7 -22
- package/package.json +2 -2
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +5 -14
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -32
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -6
- package/src/retail/api/createUserTaskDebit.ts +0 -1
- package/src/retail/components/Fields/AddressRetailField.tsx +0 -26
- package/src/retail/components/Fields/PaymentSystemField.tsx +2 -21
- package/src/retail/components/Fields/RegionRetailField.tsx +7 -22
- package/bundle/retail/api/getClaimChannel.d.ts +0 -8
- package/bundle/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/bundle/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/bundle/retail/utils/hasDelivery.d.ts +0 -10
- package/bundle/utils/getSlugFromUrl.d.ts +0 -1
- package/dist/retail/api/getClaimChannel.d.ts +0 -8
- package/dist/retail/api/getClaimChannel.js +0 -9
- package/dist/retail/api/getClaimChannel.js.map +0 -1
- package/dist/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/dist/retail/hooks/useBiblioglobusDefaultRegion.js +0 -34
- package/dist/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/dist/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/dist/retail/utils/filterPaymentSystems.js +0 -13
- package/dist/retail/utils/filterPaymentSystems.js.map +0 -1
- package/dist/retail/utils/hasDelivery.d.ts +0 -10
- package/dist/retail/utils/hasDelivery.js +0 -13
- package/dist/retail/utils/hasDelivery.js.map +0 -1
- package/dist/utils/getSlugFromUrl.d.ts +0 -1
- package/dist/utils/getSlugFromUrl.js +0 -12
- package/dist/utils/getSlugFromUrl.js.map +0 -1
- package/lib/retail/api/getClaimChannel.d.ts +0 -8
- package/lib/retail/api/getClaimChannel.js +0 -6
- package/lib/retail/api/getClaimChannel.js.map +0 -1
- package/lib/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/lib/retail/hooks/useBiblioglobusDefaultRegion.js +0 -31
- package/lib/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/lib/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/lib/retail/utils/filterPaymentSystems.js +0 -10
- package/lib/retail/utils/filterPaymentSystems.js.map +0 -1
- package/lib/retail/utils/hasDelivery.d.ts +0 -10
- package/lib/retail/utils/hasDelivery.js +0 -9
- package/lib/retail/utils/hasDelivery.js.map +0 -1
- package/lib/utils/getSlugFromUrl.d.ts +0 -1
- package/lib/utils/getSlugFromUrl.js +0 -9
- package/lib/utils/getSlugFromUrl.js.map +0 -1
- package/mobile/bundle/retail/api/getClaimChannel.d.ts +0 -8
- package/mobile/bundle/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/mobile/bundle/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/mobile/bundle/retail/utils/hasDelivery.d.ts +0 -10
- package/mobile/bundle/utils/getSlugFromUrl.d.ts +0 -1
- package/mobile/dist/retail/api/getClaimChannel.d.ts +0 -8
- package/mobile/dist/retail/api/getClaimChannel.js +0 -9
- package/mobile/dist/retail/api/getClaimChannel.js.map +0 -1
- package/mobile/dist/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/mobile/dist/retail/hooks/useBiblioglobusDefaultRegion.js +0 -34
- package/mobile/dist/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/mobile/dist/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/mobile/dist/retail/utils/filterPaymentSystems.js +0 -13
- package/mobile/dist/retail/utils/filterPaymentSystems.js.map +0 -1
- package/mobile/dist/retail/utils/hasDelivery.d.ts +0 -10
- package/mobile/dist/retail/utils/hasDelivery.js +0 -13
- package/mobile/dist/retail/utils/hasDelivery.js.map +0 -1
- package/mobile/dist/utils/getSlugFromUrl.d.ts +0 -1
- package/mobile/dist/utils/getSlugFromUrl.js +0 -12
- package/mobile/dist/utils/getSlugFromUrl.js.map +0 -1
- package/mobile/lib/retail/api/getClaimChannel.d.ts +0 -8
- package/mobile/lib/retail/api/getClaimChannel.js +0 -6
- package/mobile/lib/retail/api/getClaimChannel.js.map +0 -1
- package/mobile/lib/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/mobile/lib/retail/hooks/useBiblioglobusDefaultRegion.js +0 -31
- package/mobile/lib/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/mobile/lib/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/mobile/lib/retail/utils/filterPaymentSystems.js +0 -10
- package/mobile/lib/retail/utils/filterPaymentSystems.js.map +0 -1
- package/mobile/lib/retail/utils/hasDelivery.d.ts +0 -10
- package/mobile/lib/retail/utils/hasDelivery.js +0 -9
- package/mobile/lib/retail/utils/hasDelivery.js.map +0 -1
- package/mobile/lib/utils/getSlugFromUrl.d.ts +0 -1
- package/mobile/lib/utils/getSlugFromUrl.js +0 -9
- package/mobile/lib/utils/getSlugFromUrl.js.map +0 -1
- package/mobile/src/retail/api/getClaimChannel.ts +0 -18
- package/mobile/src/retail/hooks/useBiblioglobusDefaultRegion.ts +0 -56
- package/mobile/src/retail/utils/filterPaymentSystems.ts +0 -14
- package/mobile/src/retail/utils/hasDelivery.ts +0 -22
- package/mobile/src/utils/getSlugFromUrl.ts +0 -10
- package/src/retail/api/getClaimChannel.ts +0 -18
- package/src/retail/hooks/useBiblioglobusDefaultRegion.ts +0 -56
- package/src/retail/utils/filterPaymentSystems.ts +0 -14
- package/src/retail/utils/hasDelivery.ts +0 -22
- package/src/utils/getSlugFromUrl.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInitApplicationLead.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useInitApplicationLead.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAG3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAoB,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"useInitApplicationLead.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useInitApplicationLead.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAG3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAoB,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAgBtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,GACQ,EAAiB,EAAE;IAC5C,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,QAAQ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,CAAC;YAC5C,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC;YACtC,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC;YACtC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC;SACnC,CAAC;AACR,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUserTaskDebit.js","sourceRoot":"","sources":["../../../src/retail/api/createUserTaskDebit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"createUserTaskDebit.js","sourceRoot":"","sources":["../../../src/retail/api/createUserTaskDebit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmB9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAA6B,EACS,EAAE;IACxC,MAAM,GAAG,GAAG,MAAM,eAAe,CAC/B,gCAAgC,EAChC,KAAK,EACL,IAAI,CACL,CAAC;IAEF,OAAO,GAAG,IAAK,EAAkC,CAAC;AACpD,CAAC,CAAC"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
-
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
5
4
|
import { getOfficePoint } from '../../../components/OfficesAtmsMap/renderOfficeCard.js';
|
|
6
5
|
import { useOfficesAtmsMapData } from '../../../components/OfficesAtmsMap/useOfficesAtmsMapData.js';
|
|
7
6
|
import { ClientOnly } from '../../../ui-kit/ClientOnly.js';
|
|
8
7
|
import { SelectControl } from '../../../ui-kit/Select/SelectControl.js';
|
|
9
8
|
import { YandexMap } from '../../../ui-kit/YandexMap/YandexMap.js';
|
|
10
|
-
import { getCardSlugFromUrl } from '../../../utils/getSlugFromUrl.js';
|
|
11
9
|
import { fetchRegionOffices } from '../../api/regionOffices.js';
|
|
12
10
|
import { useLeadFormData } from '../../hooks/useLeadFormData.js';
|
|
13
|
-
import { BIBLIOGLOBUS_SLUG } from '../../utils/filterPaymentSystems.js';
|
|
14
|
-
const BIBLIOGLOBUS_OFFICE_ID = '714680716';
|
|
15
11
|
export const AddressRetailField = JSX(({ field, input }) => {
|
|
16
12
|
const [offices, setOffices] = useState([]);
|
|
17
13
|
const { data } = useLeadFormData('REGION_RF');
|
|
18
|
-
const sessionStore = useSessionStore();
|
|
19
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
20
14
|
const regionValue = field('regionRetail')?.value || {};
|
|
21
15
|
const addressField = field(input?.name ?? '');
|
|
22
16
|
useEffect(() => {
|
|
@@ -28,20 +22,6 @@ export const AddressRetailField = JSX(({ field, input }) => {
|
|
|
28
22
|
addressField.onChange?.('');
|
|
29
23
|
}
|
|
30
24
|
}, [regionValue.key]);
|
|
31
|
-
// Логика для biblioglobus - выбор отделения по умолчанию
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (!referrerUrl || !offices.length) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
37
|
-
if (slug === BIBLIOGLOBUS_SLUG) {
|
|
38
|
-
const defaultOffice = offices.find((office) => office.id?.toString() === BIBLIOGLOBUS_OFFICE_ID);
|
|
39
|
-
addressField.onChange?.({
|
|
40
|
-
key: defaultOffice?.id?.toString() || '',
|
|
41
|
-
text: defaultOffice?.address || '',
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}, [referrerUrl, offices]);
|
|
45
25
|
const { points } = useOfficesAtmsMapData({
|
|
46
26
|
data: offices,
|
|
47
27
|
filtrationState: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressRetailField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/AddressRetailField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AddressRetailField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/AddressRetailField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAmB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAe,EAAE,CAAC,CAAC;IACzD,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAE9C,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IACvD,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IAE9C,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAAE,WAAW,EAAE,GAAc,IAAI,EAAE,CAAC,CAAC;YACjF,UAAU,CAAC,WAAW,CAAC,CAAC;QAC1B,CAAC,CAAC,EAAE,CAAC;QAEL,IAAI,WAAW,EAAE,GAAG,EAAE;YACpB,YAAY,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;SAC7B;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAEtB,MAAM,EAAE,MAAM,EAAE,GAAG,qBAAqB,CAAC;QACvC,IAAI,EAAE,OAAO;QACb,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,cAAc;KAC3B,CAAC,CAAC;IAEH,OAAO,CACL,0BACE,KAAC,aAAa,IACZ,KAAK,EAAC,uFAAiB,EACvB,WAAW,EAAC,yGAAoB,EAChC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;oBAC9C,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACzB,IAAI,EAAE,OAAO;iBACd,CAAC,CAAC,KACC,YAAY,EAChB,QAAQ,EAAE,IAAI,GACd,EACF,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,UAAU,cACT,KAAC,SAAS,IACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,IAAI,EACb,SAAS,EAAC,QAAQ,EAClB,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,GAC1C,GACS,GACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -2,31 +2,19 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
4
|
import { useLocalStore } from '@redneckz/uni-jsx/lib/Store/useLocalStore';
|
|
5
|
-
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
6
5
|
import { useAsyncEffect } from '../../../hooks/useAsyncEffect.js';
|
|
7
6
|
import { RadioButtonGroupControl } from '../../../ui-kit/RadioButtonGroup/RadioButtonGroupControl.js';
|
|
8
|
-
import { getCardSlugFromUrl } from '../../../utils/getSlugFromUrl.js';
|
|
9
7
|
import { getPaymentSystems } from '../../api/getPaymentSystems.js';
|
|
10
|
-
import { filterPaymentSystems } from '../../utils/filterPaymentSystems.js';
|
|
11
8
|
const optionKey = (option) => option?.key;
|
|
12
9
|
export const PaymentSystemField = JSX(({ field, input }) => {
|
|
13
10
|
const [paymentSystemOptions, setPaymentSystemOptions] = useState([]);
|
|
14
11
|
const localStore = useLocalStore();
|
|
15
|
-
const sessionStore = useSessionStore();
|
|
16
12
|
useAsyncEffect(async () => {
|
|
17
13
|
const { programId } = localStore;
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
const fetchedPaymentSystems = await getPaymentSystems(programId);
|
|
22
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
23
|
-
if (!referrerUrl) {
|
|
14
|
+
if (programId) {
|
|
15
|
+
const fetchedPaymentSystems = await getPaymentSystems(programId);
|
|
24
16
|
setPaymentSystemOptions(fetchedPaymentSystems ?? []);
|
|
25
|
-
return;
|
|
26
17
|
}
|
|
27
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
28
|
-
const filteredSystems = filterPaymentSystems(fetchedPaymentSystems ?? [], slug);
|
|
29
|
-
setPaymentSystemOptions(filteredSystems);
|
|
30
18
|
}, []);
|
|
31
19
|
const items = useMemo(() => paymentSystemOptions?.map((_) => ({ id: _.key, text: _.text })) ?? [], [paymentSystemOptions]);
|
|
32
20
|
return (_jsx(RadioButtonGroupControl, { label: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430", orientation: "horizontal", items: items, ...field(input?.name ?? '', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentSystemField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/PaymentSystemField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PaymentSystemField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/PaymentSystemField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AAEnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,SAAS,GAAG,CAAC,MAAoC,EAAE,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;AAExE,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAE/E,MAAM,UAAU,GAAG,aAAa,EAAyB,CAAC;IAC1D,cAAc,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;QACjC,IAAI,SAAS,EAAE;YACb,MAAM,qBAAqB,GAAG,MAAM,iBAAiB,CAAC,SAAS,CAAC,CAAC;YACjE,uBAAuB,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;SACtD;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAC3E,CAAC,oBAAoB,CAAC,CACvB,CAAC;IAEF,OAAO,CACL,KAAC,uBAAuB,IACtB,KAAK,EAAC,mGAAmB,EACzB,WAAW,EAAC,YAAY,EACxB,KAAK,EAAE,KAAK,KACR,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,EAAE;YAC3B,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;SAC1E,CAAC,KACE,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -2,19 +2,15 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
4
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
5
|
-
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
6
5
|
import { SelectControl } from '../../../ui-kit/Select/SelectControl.js';
|
|
7
6
|
import { getRegionsCardDelivery } from '../../api/getRegionsCardDelivery.js';
|
|
8
|
-
import { useBiblioglobusDefaultRegion } from '../../hooks/useBiblioglobusDefaultRegion.js';
|
|
9
7
|
import { useLeadFormData } from '../../hooks/useLeadFormData.js';
|
|
10
8
|
import { useRetailFormStore } from '../../hooks/useRetailFormStore.js';
|
|
11
|
-
import { calculateRegionHasDelivery, getRegionDeliveryStatus } from '../../utils/hasDelivery.js';
|
|
12
9
|
export const RegionRetailField = JSX(({ field, input }) => {
|
|
13
10
|
const { programId, productType } = useRetailFormStore();
|
|
14
11
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
15
12
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
16
13
|
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
17
|
-
const sessionStore = useSessionStore();
|
|
18
14
|
const isDebit = productType === 'debitCard';
|
|
19
15
|
const isSalaryCard = programId === '38';
|
|
20
16
|
const isEsiaAuth = Boolean(field('esiaAccountTypeCd')?.value?.key);
|
|
@@ -23,26 +19,17 @@ export const RegionRetailField = JSX(({ field, input }) => {
|
|
|
23
19
|
const handleChangeRegion = field('regionRetail')?.onChange;
|
|
24
20
|
const handleChangeRegionHasDelivery = field('regionHasDelivery')?.onChange;
|
|
25
21
|
const handleChangeMethodObtain = field('methodObtain')?.onChange;
|
|
26
|
-
useBiblioglobusDefaultRegion({
|
|
27
|
-
referrerUrl: sessionStore.referrerUrl ?? undefined,
|
|
28
|
-
regions,
|
|
29
|
-
regionsDelivery,
|
|
30
|
-
onRegionChange: handleChangeRegion,
|
|
31
|
-
onRegionHasDeliveryChange: handleChangeRegionHasDelivery,
|
|
32
|
-
onMethodObtainChange: handleChangeMethodObtain,
|
|
33
|
-
});
|
|
34
22
|
const onChange = useCallback((value) => {
|
|
35
|
-
const regionHasDelivery =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
23
|
+
const regionHasDelivery = isDebit
|
|
24
|
+
? isEsiaAuth &&
|
|
25
|
+
!isSalaryCard &&
|
|
26
|
+
isDeliveryActive &&
|
|
27
|
+
regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg
|
|
28
|
+
: isDeliveryActive && regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg;
|
|
42
29
|
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
43
30
|
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
44
31
|
handleChangeRegion?.(value);
|
|
45
|
-
}, [
|
|
32
|
+
}, [regionsDelivery, isDeliveryActive, isEsiaAuth]);
|
|
46
33
|
useEffect(() => {
|
|
47
34
|
if (!isEsiaAuth && isDebit) {
|
|
48
35
|
handleChangeRegionHasDelivery?.(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionRetailField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/RegionRetailField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"RegionRetailField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/RegionRetailField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAIxE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EA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
};
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
formData: LeadFormState
|
|
88
|
-
programId: string
|
|
89
|
-
marketingInfo: MarketingInfo | null
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const getDebitLeadFormTaskData = ({
|
|
94
|
-
formData,
|
|
95
|
-
programId,
|
|
96
|
-
marketingInfo,
|
|
97
|
-
claimChannelCode,
|
|
98
|
-
}: GetDebitLeadFormTaskDataProps): CreateUserTaskDebitBody => {
|
|
86
|
+
export const getDebitLeadFormTaskData = (
|
|
87
|
+
formData: LeadFormState,
|
|
88
|
+
programId: string,
|
|
89
|
+
marketingInfo: MarketingInfo | null,
|
|
90
|
+
): CreateUserTaskDebitBody => {
|
|
99
91
|
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
100
92
|
const taskSource = getTaskSource(marketingInfo?.utm_source);
|
|
101
93
|
|
|
@@ -119,7 +111,6 @@ export const getDebitLeadFormTaskData = ({
|
|
|
119
111
|
],
|
|
120
112
|
marketingInfo,
|
|
121
113
|
},
|
|
122
|
-
...(claimChannelCode ? { claimChannelCode } : {}),
|
|
123
114
|
};
|
|
124
115
|
};
|
|
125
116
|
|
|
@@ -8,7 +8,6 @@ import { createDraftTask } from '../../retail/api/createDraftTask';
|
|
|
8
8
|
import { createParticipant } from '../../retail/api/createParticipant';
|
|
9
9
|
import { createUserProfile } from '../../retail/api/createUserProfile';
|
|
10
10
|
import { createUserTaskDebit } from '../../retail/api/createUserTaskDebit';
|
|
11
|
-
import { getClaimChannel } from '../../retail/api/getClaimChannel';
|
|
12
11
|
import { getLastTaskStatus } from '../../retail/api/getLastTaskStatus';
|
|
13
12
|
import { getTaskById } from '../../retail/api/getTaskById';
|
|
14
13
|
import { saveReferalInfo } from '../../retail/api/saveReferalInfo';
|
|
@@ -19,11 +18,9 @@ import { useDraftDialog } from '../../retail/components/DraftDialog/useDraftDial
|
|
|
19
18
|
import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/VerifyPhoneDialog';
|
|
20
19
|
import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
|
|
21
20
|
import { type ReferalData } from '../../retail/model/ReferalData';
|
|
22
|
-
import { BIBLIOGLOBUS_SLUG } from '../../retail/utils/filterPaymentSystems';
|
|
23
21
|
import { getUpdateUserProfileData } from '../../retail/utils/getUpdateUserProfile';
|
|
24
22
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
25
23
|
import { formatPhone } from '../../utils/formatPhone';
|
|
26
|
-
import { getCardSlugFromUrl } from '../../utils/getSlugFromUrl';
|
|
27
24
|
import { type ProductType } from './ApplicationLeadFormContent';
|
|
28
25
|
import { productTypeToConsentsMap } from './consents';
|
|
29
26
|
import { getCreditLeadFormTaskData, getDebitLeadFormTaskData } from './getLeadFormTaskData';
|
|
@@ -79,7 +76,6 @@ export const useApplicationLeadApi = ({
|
|
|
79
76
|
|
|
80
77
|
const referalData = leadFormStore.referalData;
|
|
81
78
|
const marketingInfo = sessionStore.marketingInfo;
|
|
82
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
83
79
|
|
|
84
80
|
if (!profileId) {
|
|
85
81
|
throw new Error();
|
|
@@ -95,7 +91,6 @@ export const useApplicationLeadApi = ({
|
|
|
95
91
|
marketingInfo,
|
|
96
92
|
saveUserData,
|
|
97
93
|
sendAspects,
|
|
98
|
-
referrerUrl,
|
|
99
94
|
});
|
|
100
95
|
verifyPhoneDialog.close();
|
|
101
96
|
if (productType === 'debitCard') {
|
|
@@ -219,18 +214,6 @@ const getAcceptedConsents = (formData: LeadFormState, productType: ProductType):
|
|
|
219
214
|
.map((_) => consents[_]?.text);
|
|
220
215
|
};
|
|
221
216
|
|
|
222
|
-
// Padding line to fix eslint padding-line-between-statements
|
|
223
|
-
|
|
224
|
-
const computeClaimChannel = async (slug: string | null): Promise<string | undefined> => {
|
|
225
|
-
if (slug !== BIBLIOGLOBUS_SLUG) {
|
|
226
|
-
return undefined;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const claimData = await getClaimChannel();
|
|
230
|
-
|
|
231
|
-
return claimData.find((item) => item.key === slug)?.code;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
217
|
const updateUserData = async ({
|
|
235
218
|
programId,
|
|
236
219
|
profileId,
|
|
@@ -240,7 +223,6 @@ const updateUserData = async ({
|
|
|
240
223
|
marketingInfo,
|
|
241
224
|
saveUserData,
|
|
242
225
|
sendAspects,
|
|
243
|
-
referrerUrl,
|
|
244
226
|
}: {
|
|
245
227
|
programId: string;
|
|
246
228
|
profileId: number;
|
|
@@ -250,27 +232,17 @@ const updateUserData = async ({
|
|
|
250
232
|
marketingInfo: MarketingInfo | null;
|
|
251
233
|
saveUserData: (userData: UserData) => void;
|
|
252
234
|
sendAspects: (profileId: number, taskId: number) => void;
|
|
253
|
-
referrerUrl: string | null;
|
|
254
235
|
}) => {
|
|
236
|
+
let taskId: number;
|
|
237
|
+
let participantId: number;
|
|
255
238
|
const transformedConsents = transformConsentsFields(formData, productType);
|
|
256
|
-
const slug = getCardSlugFromUrl(referrerUrl as string);
|
|
257
239
|
|
|
258
240
|
await updateUserProfile(getUpdateUserProfileData(profileId, formData, transformedConsents));
|
|
259
241
|
|
|
260
242
|
try {
|
|
261
|
-
let taskId: number;
|
|
262
|
-
let participantId: number;
|
|
263
|
-
|
|
264
243
|
if (productType === 'debitCard') {
|
|
265
|
-
const claimChannelCode = await computeClaimChannel(slug);
|
|
266
|
-
|
|
267
244
|
const debitData = await createUserTaskDebit(
|
|
268
|
-
getDebitLeadFormTaskData(
|
|
269
|
-
formData,
|
|
270
|
-
programId,
|
|
271
|
-
marketingInfo,
|
|
272
|
-
claimChannelCode,
|
|
273
|
-
}),
|
|
245
|
+
getDebitLeadFormTaskData(formData, programId, marketingInfo),
|
|
274
246
|
);
|
|
275
247
|
|
|
276
248
|
taskId = debitData.taskId;
|
|
@@ -293,7 +265,6 @@ const updateUserData = async ({
|
|
|
293
265
|
}),
|
|
294
266
|
);
|
|
295
267
|
}
|
|
296
|
-
|
|
297
268
|
if (referalData?.referalCode) {
|
|
298
269
|
await saveReferalInfo({
|
|
299
270
|
taskId,
|
|
@@ -25,7 +25,6 @@ type InitApplicationLeadProps = {
|
|
|
25
25
|
export interface ApplicationLeadStore {
|
|
26
26
|
marketingInfo: MarketingInfo | null;
|
|
27
27
|
isNewMicroservice: boolean | null;
|
|
28
|
-
referrerUrl: string | null;
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
export const useInitApplicationLead = ({
|
|
@@ -79,11 +78,6 @@ export const useInitApplicationLead = ({
|
|
|
79
78
|
|
|
80
79
|
sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
|
|
81
80
|
sessionStore.isNewMicroservice = isNewMicroservice || null;
|
|
82
|
-
|
|
83
|
-
const referrer = globalThis.document.referrer;
|
|
84
|
-
if (referrer) {
|
|
85
|
-
sessionStore.referrerUrl = referrer as string;
|
|
86
|
-
}
|
|
87
81
|
}, [queryFromStorage]);
|
|
88
82
|
|
|
89
83
|
useEffect(() => {
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
4
3
|
import { getOfficePoint } from '../../../components/OfficesAtmsMap/renderOfficeCard';
|
|
5
4
|
import { useOfficesAtmsMapData } from '../../../components/OfficesAtmsMap/useOfficesAtmsMapData';
|
|
6
5
|
import { ClientOnly } from '../../../ui-kit/ClientOnly';
|
|
7
6
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
8
7
|
import { SelectControl } from '../../../ui-kit/Select/SelectControl';
|
|
9
8
|
import { YandexMap } from '../../../ui-kit/YandexMap/YandexMap';
|
|
10
|
-
import { getCardSlugFromUrl } from '../../../utils/getSlugFromUrl';
|
|
11
9
|
import { fetchRegionOffices, type OfficeType } from '../../api/regionOffices';
|
|
12
10
|
import { useLeadFormData } from '../../hooks/useLeadFormData';
|
|
13
|
-
import { BIBLIOGLOBUS_SLUG } from '../../utils/filterPaymentSystems';
|
|
14
|
-
|
|
15
|
-
const BIBLIOGLOBUS_OFFICE_ID = '714680716';
|
|
16
11
|
|
|
17
12
|
export const AddressRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
18
13
|
const [offices, setOffices] = useState<OfficeType[]>([]);
|
|
19
14
|
const { data } = useLeadFormData('REGION_RF');
|
|
20
15
|
|
|
21
|
-
const sessionStore = useSessionStore<{ referrerUrl?: string }>();
|
|
22
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
23
|
-
|
|
24
16
|
const regionValue = field('regionRetail')?.value || {};
|
|
25
17
|
const addressField = field(input?.name ?? '');
|
|
26
18
|
|
|
@@ -35,24 +27,6 @@ export const AddressRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
35
27
|
}
|
|
36
28
|
}, [regionValue.key]);
|
|
37
29
|
|
|
38
|
-
// Логика для biblioglobus - выбор отделения по умолчанию
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (!referrerUrl || !offices.length) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
45
|
-
if (slug === BIBLIOGLOBUS_SLUG) {
|
|
46
|
-
const defaultOffice = offices.find(
|
|
47
|
-
(office) => office.id?.toString() === BIBLIOGLOBUS_OFFICE_ID,
|
|
48
|
-
);
|
|
49
|
-
addressField.onChange?.({
|
|
50
|
-
key: defaultOffice?.id?.toString() || '',
|
|
51
|
-
text: defaultOffice?.address || '',
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}, [referrerUrl, offices]);
|
|
55
|
-
|
|
56
30
|
const { points } = useOfficesAtmsMapData({
|
|
57
31
|
data: offices,
|
|
58
32
|
filtrationState: {},
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useLocalStore } from '@redneckz/uni-jsx/lib/Store/useLocalStore';
|
|
4
|
-
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
5
4
|
import { useAsyncEffect } from '../../../hooks/useAsyncEffect';
|
|
6
5
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
7
6
|
import { RadioButtonGroupControl } from '../../../ui-kit/RadioButtonGroup/RadioButtonGroupControl';
|
|
8
7
|
import { type Option } from '../../../ui-kit/Select/Option';
|
|
9
|
-
import { getCardSlugFromUrl } from '../../../utils/getSlugFromUrl';
|
|
10
8
|
import { getPaymentSystems } from '../../api/getPaymentSystems';
|
|
11
|
-
import { filterPaymentSystems } from '../../utils/filterPaymentSystems';
|
|
12
9
|
|
|
13
10
|
const optionKey = (option: { key?: string } | undefined) => option?.key;
|
|
14
11
|
|
|
@@ -16,28 +13,12 @@ export const PaymentSystemField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
16
13
|
const [paymentSystemOptions, setPaymentSystemOptions] = useState<Option[]>([]);
|
|
17
14
|
|
|
18
15
|
const localStore = useLocalStore<{ programId: string }>();
|
|
19
|
-
const sessionStore = useSessionStore<{ referrerUrl?: string }>();
|
|
20
|
-
|
|
21
16
|
useAsyncEffect(async () => {
|
|
22
17
|
const { programId } = localStore;
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const fetchedPaymentSystems = await getPaymentSystems(programId);
|
|
28
|
-
|
|
29
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
30
|
-
|
|
31
|
-
if (!referrerUrl) {
|
|
18
|
+
if (programId) {
|
|
19
|
+
const fetchedPaymentSystems = await getPaymentSystems(programId);
|
|
32
20
|
setPaymentSystemOptions(fetchedPaymentSystems ?? []);
|
|
33
|
-
|
|
34
|
-
return;
|
|
35
21
|
}
|
|
36
|
-
|
|
37
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
38
|
-
const filteredSystems = filterPaymentSystems(fetchedPaymentSystems ?? [], slug);
|
|
39
|
-
|
|
40
|
-
setPaymentSystemOptions(filteredSystems);
|
|
41
22
|
}, []);
|
|
42
23
|
|
|
43
24
|
const items = useMemo(
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
4
|
-
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
5
4
|
import { type ProductType } from '../../../components/ApplicationLeadForm/ApplicationLeadFormContent';
|
|
6
5
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
7
6
|
import { type Option } from '../../../ui-kit/Select/Option';
|
|
8
7
|
import { SelectControl } from '../../../ui-kit/Select/SelectControl';
|
|
9
8
|
import { getRegionsCardDelivery } from '../../api/getRegionsCardDelivery';
|
|
10
|
-
import { useBiblioglobusDefaultRegion } from '../../hooks/useBiblioglobusDefaultRegion';
|
|
11
9
|
import { useLeadFormData } from '../../hooks/useLeadFormData';
|
|
12
10
|
import { useRetailFormStore } from '../../hooks/useRetailFormStore';
|
|
13
|
-
import { calculateRegionHasDelivery, getRegionDeliveryStatus } from '../../utils/hasDelivery';
|
|
14
11
|
|
|
15
12
|
export const RegionRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
16
13
|
const { programId, productType } = useRetailFormStore();
|
|
17
14
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
18
15
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
19
16
|
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
20
|
-
const sessionStore = useSessionStore<{ referrerUrl?: string }>();
|
|
21
|
-
|
|
22
17
|
const isDebit = productType === 'debitCard';
|
|
23
18
|
const isSalaryCard = programId === '38';
|
|
24
19
|
const isEsiaAuth = Boolean(field('esiaAccountTypeCd')?.value?.key);
|
|
@@ -29,30 +24,20 @@ export const RegionRetailField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
29
24
|
const handleChangeRegionHasDelivery = field('regionHasDelivery')?.onChange;
|
|
30
25
|
const handleChangeMethodObtain = field('methodObtain')?.onChange;
|
|
31
26
|
|
|
32
|
-
useBiblioglobusDefaultRegion({
|
|
33
|
-
referrerUrl: sessionStore.referrerUrl ?? undefined,
|
|
34
|
-
regions,
|
|
35
|
-
regionsDelivery,
|
|
36
|
-
onRegionChange: handleChangeRegion,
|
|
37
|
-
onRegionHasDeliveryChange: handleChangeRegionHasDelivery,
|
|
38
|
-
onMethodObtainChange: handleChangeMethodObtain,
|
|
39
|
-
});
|
|
40
|
-
|
|
41
27
|
const onChange = useCallback(
|
|
42
28
|
(value: Option) => {
|
|
43
|
-
const regionHasDelivery =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
29
|
+
const regionHasDelivery = isDebit
|
|
30
|
+
? isEsiaAuth &&
|
|
31
|
+
!isSalaryCard &&
|
|
32
|
+
isDeliveryActive &&
|
|
33
|
+
regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg
|
|
34
|
+
: isDeliveryActive && regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg;
|
|
50
35
|
|
|
51
36
|
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
52
37
|
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
53
38
|
handleChangeRegion?.(value);
|
|
54
39
|
},
|
|
55
|
-
[
|
|
40
|
+
[regionsDelivery, isDeliveryActive, isEsiaAuth],
|
|
56
41
|
);
|
|
57
42
|
|
|
58
43
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.975",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"path": "lib/common.css"
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
|
-
"limit": "
|
|
208
|
+
"limit": "105 kB",
|
|
209
209
|
"path": "bundle/bundle.umd.min.js"
|
|
210
210
|
}
|
|
211
211
|
],
|
|
@@ -83,19 +83,11 @@ export const getParticipant = ({
|
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
formData: LeadFormState
|
|
88
|
-
programId: string
|
|
89
|
-
marketingInfo: MarketingInfo | null
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const getDebitLeadFormTaskData = ({
|
|
94
|
-
formData,
|
|
95
|
-
programId,
|
|
96
|
-
marketingInfo,
|
|
97
|
-
claimChannelCode,
|
|
98
|
-
}: GetDebitLeadFormTaskDataProps): CreateUserTaskDebitBody => {
|
|
86
|
+
export const getDebitLeadFormTaskData = (
|
|
87
|
+
formData: LeadFormState,
|
|
88
|
+
programId: string,
|
|
89
|
+
marketingInfo: MarketingInfo | null,
|
|
90
|
+
): CreateUserTaskDebitBody => {
|
|
99
91
|
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
100
92
|
const taskSource = getTaskSource(marketingInfo?.utm_source);
|
|
101
93
|
|
|
@@ -119,7 +111,6 @@ export const getDebitLeadFormTaskData = ({
|
|
|
119
111
|
],
|
|
120
112
|
marketingInfo,
|
|
121
113
|
},
|
|
122
|
-
...(claimChannelCode ? { claimChannelCode } : {}),
|
|
123
114
|
};
|
|
124
115
|
};
|
|
125
116
|
|