@redneckz/wildless-cms-uni-blocks 0.14.217 → 0.14.218
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 +58 -9
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +18 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/dist/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +24 -2
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/dist/components/SafeDepositRental/utils.js +3 -1
- package/dist/components/SafeDepositRental/utils.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +19 -2
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/lib/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +22 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/components/SafeDepositRental/utils.js +3 -1
- package/lib/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +62 -13
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +18 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +24 -2
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/utils.js +3 -1
- package/mobile/dist/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +19 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +22 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/utils.js +3 -1
- package/mobile/lib/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +56 -2
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +7 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +15 -2
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +73 -17
- package/mobile/src/components/SafeDepositRental/utils.ts +4 -1
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +56 -2
- package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +7 -0
- package/src/components/OfficesAtmsMap/OfficesMap.tsx +15 -2
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +73 -17
- package/src/components/SafeDepositRental/utils.ts +4 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox.js';
|
|
3
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable.js';
|
|
4
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection.js';
|
|
3
5
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
6
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton.js';
|
|
5
7
|
const FILTRATION_LABELS = {
|
|
@@ -9,6 +11,25 @@ const FILTRATION_LABELS = {
|
|
|
9
11
|
terminalTypeTerm: 'Терминалы',
|
|
10
12
|
workAllTime: 'Круглосуточно',
|
|
11
13
|
billAcceptorEnable: 'Прием наличных',
|
|
14
|
+
premiumService: 'Премиальное обслуживание',
|
|
15
|
+
privateBanking: 'Услуга Private banking',
|
|
16
|
+
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
17
|
+
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
18
|
+
bullionOperations: 'Операции со слитками',
|
|
19
|
+
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
20
|
+
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
21
|
+
};
|
|
22
|
+
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
23
|
+
export const renderFiltrationForm = (filters, { field, reset }, visibleFiltersNum = 3) => {
|
|
24
|
+
const filtersCheckbox = (filters || []).map((key) => (_jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key)));
|
|
25
|
+
const [visibleFilters, hiddenFilters] = visibleFiltersNum > 0
|
|
26
|
+
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
27
|
+
: [filtersCheckbox, []];
|
|
28
|
+
return (_jsx("div", { children: filters?.length ? (_jsx("div", { children: hiddenFilters.length > 0 ? (_jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (_jsxs("div", { children: [_jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters }), _jsx(FoldableSection, { className: COMMON_FILTERS_STYLES, isUnfolded: isUnfolded, children: hiddenFilters })] })), renderFoldButton: renderFoldButton(reset) })) : (_jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters })) })) : null }));
|
|
29
|
+
};
|
|
30
|
+
export const renderFoldButton = (reset) => ({ isUnfolded, onToggle }) => {
|
|
31
|
+
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
32
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
33
|
+
return (_jsxs("div", { className: "flex", children: [_jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0 mr-lg", appendRight: _jsx(Icon, { name: icons[Number(isUnfolded)], width: "16", height: "16" }), text: labels[Number(isUnfolded)], onClick: onToggle }), _jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: _jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
12
34
|
};
|
|
13
|
-
export const renderFiltrationForm = (filters, { field, reset }) => (_jsxs("div", { className: "pb-2xl", children: [filters?.length ? (_jsx("div", { className: "flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl", children: filters.map((key) => (_jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key))) })) : null, _jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: _jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
14
35
|
//# sourceMappingURL=renderFiltrationForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderFiltrationForm.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderFiltrationForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"renderFiltrationForm.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderFiltrationForm.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export const getCoordinates = (data) => {
|
|
2
|
+
const getBalloon = () => void 0;
|
|
2
3
|
if (Array.isArray(data)) {
|
|
3
4
|
return data
|
|
4
5
|
.map((_) => ({
|
|
5
|
-
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]
|
|
6
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)].filter(Boolean),
|
|
7
|
+
content: getBalloon(),
|
|
6
8
|
}))
|
|
7
9
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/SafeDepositRental/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAwB,EAAmB,EAAE;IAC1E,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,OAAO,IAAI;aACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACX,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/SafeDepositRental/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAwB,EAAmB,EAAE;IAC1E,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IAEhC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,OAAO,IAAI;aACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACX,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;YACvE,OAAO,EAAE,UAAU,EAAE;SACtB,CAAC,CAAC;aACF,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;KACrD;IAED,IAAI,IAAI,EAAE,WAAW,IAAI,IAAI,EAAE,YAAY,EAAE;QAC3C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;KAC5D;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAkB,EAAE,cAAsB,EAAE,EAAE,CACtE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,cAAc,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useForm } from '../../hooks/useForm';
|
|
4
4
|
import { type VNode } from '../../model/VNode';
|
|
5
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
5
6
|
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
6
7
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
8
|
import { Img } from '../../ui-kit/Img/Img';
|
|
@@ -30,6 +31,9 @@ export interface OfficesAtmsMapLayoutProps<T> {
|
|
|
30
31
|
title?: string;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
const filtersVisibleStyles = (activeButton: string) =>
|
|
35
|
+
activeButton === 'all' ? 'block' : 'hidden';
|
|
36
|
+
|
|
33
37
|
export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>(
|
|
34
38
|
({
|
|
35
39
|
className,
|
|
@@ -56,6 +60,8 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
56
60
|
return [_filteredItems, _points, _filteredItems.length];
|
|
57
61
|
}, [data, filtrationState]);
|
|
58
62
|
|
|
63
|
+
const [activeButton, setActiveButton] = useState('all');
|
|
64
|
+
|
|
59
65
|
return (
|
|
60
66
|
<div className={style('space-y-1', className)}>
|
|
61
67
|
<div className="bg-white">
|
|
@@ -67,7 +73,10 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
67
73
|
) : null}
|
|
68
74
|
</div>
|
|
69
75
|
{descriptionData ? renderDescriptionBlock(descriptionData) : null}
|
|
70
|
-
{
|
|
76
|
+
{renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
77
|
+
<div className={style('pb-2xl', filtersVisibleStyles(activeButton))}>
|
|
78
|
+
{renderFiltrationForm(Object.keys(initFilterState), { field, reset })}
|
|
79
|
+
</div>
|
|
71
80
|
</div>
|
|
72
81
|
<div className="h-[600px]">
|
|
73
82
|
<ClientOnly>
|
|
@@ -81,6 +90,51 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
81
90
|
},
|
|
82
91
|
);
|
|
83
92
|
|
|
93
|
+
const renderButtonsGroup = (
|
|
94
|
+
data: Branch[],
|
|
95
|
+
activeButton: string,
|
|
96
|
+
setActiveButton: (item: string) => void,
|
|
97
|
+
) => {
|
|
98
|
+
const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
|
|
99
|
+
|
|
100
|
+
const businessButtonVersion = activeButton === 'business' ? 'primary' : 'secondary';
|
|
101
|
+
|
|
102
|
+
const handleOnClick = (e: any, key: string, branches: Branch[]) => {
|
|
103
|
+
if (e.currentTarget === e.target && key === 'business') {
|
|
104
|
+
branches.filter(
|
|
105
|
+
(branch) =>
|
|
106
|
+
branch.workSchedule &&
|
|
107
|
+
branch.workSchedule.businessScheduleVisibleTag &&
|
|
108
|
+
!branch.workSchedule.businessScheduleDescription,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
setActiveButton(key);
|
|
113
|
+
|
|
114
|
+
return branches;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<div className="flex pb-lg">
|
|
119
|
+
<Button
|
|
120
|
+
className="mr-m"
|
|
121
|
+
data-id="all"
|
|
122
|
+
onClick={(e) => handleOnClick(e, 'all', data)}
|
|
123
|
+
version={allButtonVersion}
|
|
124
|
+
>
|
|
125
|
+
Для физических лиц
|
|
126
|
+
</Button>
|
|
127
|
+
<Button
|
|
128
|
+
data-id="business"
|
|
129
|
+
onClick={(e) => handleOnClick(e, 'business', data)}
|
|
130
|
+
version={businessButtonVersion}
|
|
131
|
+
>
|
|
132
|
+
Для юридических лиц
|
|
133
|
+
</Button>
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
84
138
|
const renderDescriptionBlock = ({ __html, list }: AtmsDef) =>
|
|
85
139
|
__html || list?.length ? (
|
|
86
140
|
<div className="mb-2xl border-b sm:border border-main-divider sm:rounded-md">
|
|
@@ -47,6 +47,13 @@ export type WorkSchedule = {
|
|
|
47
47
|
isMatchesPattern?: boolean;
|
|
48
48
|
businessScheduleVisibleTag?: boolean;
|
|
49
49
|
businessScheduleDescription?: string;
|
|
50
|
+
premiumService?: boolean;
|
|
51
|
+
privateBanking?: boolean;
|
|
52
|
+
sellingCoins?: boolean;
|
|
53
|
+
buyingCoins?: boolean;
|
|
54
|
+
bullionOperations?: boolean;
|
|
55
|
+
preciousMetalsOperations?: boolean;
|
|
56
|
+
transferringDataToBiometricSystem?: boolean;
|
|
50
57
|
};
|
|
51
58
|
|
|
52
59
|
export type SafeBoxCaseTariff = {
|
|
@@ -6,13 +6,26 @@ import { getOfficePoint, renderOfficeCard } from './renderOfficeCard';
|
|
|
6
6
|
import { useOffices } from './useOffices';
|
|
7
7
|
|
|
8
8
|
const INITIAL_FILTRATION_STATE = {
|
|
9
|
-
//safeBoxCaseVolumes: false, //TODO: temp hide
|
|
10
9
|
workingSaturday: false,
|
|
10
|
+
premiumService: false,
|
|
11
|
+
privateBanking: false,
|
|
12
|
+
sellingCoins: false,
|
|
13
|
+
buyingCoins: false,
|
|
14
|
+
bullionOperations: false,
|
|
15
|
+
preciousMetalsOperations: false,
|
|
16
|
+
transferringDataToBiometricSystem: false,
|
|
11
17
|
};
|
|
12
18
|
|
|
13
19
|
const FILTRATION_PREDICATES = {
|
|
14
|
-
//safeBoxCaseVolumes: (item: Branch) => Boolean(item.safeBoxCaseVolumes), //TODO: temp hide
|
|
15
20
|
workingSaturday: (item: Branch) => Boolean(item.workSchedule?.workingSaturday),
|
|
21
|
+
premiumService: (item: Branch) => Boolean(item.workSchedule?.premiumService),
|
|
22
|
+
privateBanking: (item: Branch) => Boolean(item.workSchedule?.privateBanking),
|
|
23
|
+
sellingCoins: (item: Branch) => Boolean(item.workSchedule?.sellingCoins),
|
|
24
|
+
buyingCoins: (item: Branch) => Boolean(item.workSchedule?.buyingCoins),
|
|
25
|
+
bullionOperations: (item: Branch) => Boolean(item.workSchedule?.bullionOperations),
|
|
26
|
+
preciousMetalsOperations: (item: Branch) => Boolean(item.workSchedule?.preciousMetalsOperations),
|
|
27
|
+
transferringDataToBiometricSystem: (item: Branch) =>
|
|
28
|
+
Boolean(item.workSchedule?.transferringDataToBiometricSystem),
|
|
16
29
|
};
|
|
17
30
|
|
|
18
31
|
export interface OfficesMapProps {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
3
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
4
|
+
import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
|
|
5
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
3
6
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
7
|
+
import { type IconName } from '../../ui-kit/Icon/IconProps';
|
|
4
8
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
5
9
|
|
|
6
10
|
const FILTRATION_LABELS = {
|
|
@@ -10,26 +14,78 @@ const FILTRATION_LABELS = {
|
|
|
10
14
|
terminalTypeTerm: 'Терминалы',
|
|
11
15
|
workAllTime: 'Круглосуточно',
|
|
12
16
|
billAcceptorEnable: 'Прием наличных',
|
|
17
|
+
premiumService: 'Премиальное обслуживание',
|
|
18
|
+
privateBanking: 'Услуга Private banking',
|
|
19
|
+
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
20
|
+
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
21
|
+
bullionOperations: 'Операции со слитками',
|
|
22
|
+
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
23
|
+
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
13
24
|
};
|
|
14
25
|
|
|
26
|
+
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
27
|
+
|
|
15
28
|
export const renderFiltrationForm = (
|
|
16
29
|
filters: string[],
|
|
17
30
|
{ field, reset }: { field: FormFieldRegisterer<any>; reset: () => void },
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
visibleFiltersNum = 3,
|
|
32
|
+
) => {
|
|
33
|
+
const filtersCheckbox = (filters || []).map((key) => (
|
|
34
|
+
<Checkbox key={key} text={FILTRATION_LABELS[key]} {...field(key)} />
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
const [visibleFilters, hiddenFilters] =
|
|
38
|
+
visibleFiltersNum > 0
|
|
39
|
+
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
40
|
+
: [filtersCheckbox, []];
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div>
|
|
44
|
+
{filters?.length ? (
|
|
45
|
+
<div>
|
|
46
|
+
{hiddenFilters.length > 0 ? (
|
|
47
|
+
<Foldable
|
|
48
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
49
|
+
<div>
|
|
50
|
+
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
51
|
+
<FoldableSection className={COMMON_FILTERS_STYLES} isUnfolded={isUnfolded}>
|
|
52
|
+
{hiddenFilters}
|
|
53
|
+
</FoldableSection>
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
56
|
+
renderFoldButton={renderFoldButton(reset)}
|
|
57
|
+
/>
|
|
58
|
+
) : (
|
|
59
|
+
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
) : null}
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const renderFoldButton =
|
|
68
|
+
(reset: () => void) =>
|
|
69
|
+
({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
70
|
+
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
71
|
+
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div className="flex">
|
|
75
|
+
<LinkButton
|
|
76
|
+
version="transparent"
|
|
77
|
+
className="text-secondary-text [&>*]:p-0 mr-lg"
|
|
78
|
+
appendRight={<Icon name={icons[Number(isUnfolded)]} width="16" height="16" />}
|
|
79
|
+
text={labels[Number(isUnfolded)]}
|
|
80
|
+
onClick={onToggle}
|
|
81
|
+
/>
|
|
82
|
+
<LinkButton
|
|
83
|
+
version="transparent"
|
|
84
|
+
className="text-secondary-text [&>*]:p-0"
|
|
85
|
+
onClick={reset}
|
|
86
|
+
text="Очистить фильтр"
|
|
87
|
+
appendRight={<Icon name="CloseIcon" width="16" height="16" />}
|
|
88
|
+
/>
|
|
25
89
|
</div>
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
version="transparent"
|
|
29
|
-
className="text-secondary-text [&>*]:p-0"
|
|
30
|
-
onClick={reset}
|
|
31
|
-
text="Очистить фильтр"
|
|
32
|
-
appendRight={<Icon name="CloseIcon" width="16" height="16" />}
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
90
|
+
);
|
|
91
|
+
};
|
|
@@ -2,10 +2,13 @@ import { type BalloonPoints } from '../OfficesAtmsMap/YandexMapProps';
|
|
|
2
2
|
import { type Branch } from './useSafeBoxes';
|
|
3
3
|
|
|
4
4
|
export const getCoordinates = (data?: Branch | Branch[]): BalloonPoints[] => {
|
|
5
|
+
const getBalloon = () => void 0;
|
|
6
|
+
|
|
5
7
|
if (Array.isArray(data)) {
|
|
6
8
|
return data
|
|
7
9
|
.map((_) => ({
|
|
8
|
-
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]
|
|
10
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)].filter(Boolean),
|
|
11
|
+
content: getBalloon(),
|
|
9
12
|
}))
|
|
10
13
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
11
14
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useForm } from '../../hooks/useForm';
|
|
4
4
|
import { type VNode } from '../../model/VNode';
|
|
5
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
5
6
|
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
6
7
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
8
|
import { Img } from '../../ui-kit/Img/Img';
|
|
@@ -30,6 +31,9 @@ export interface OfficesAtmsMapLayoutProps<T> {
|
|
|
30
31
|
title?: string;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
const filtersVisibleStyles = (activeButton: string) =>
|
|
35
|
+
activeButton === 'all' ? 'block' : 'hidden';
|
|
36
|
+
|
|
33
37
|
export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>(
|
|
34
38
|
({
|
|
35
39
|
className,
|
|
@@ -56,6 +60,8 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
56
60
|
return [_filteredItems, _points, _filteredItems.length];
|
|
57
61
|
}, [data, filtrationState]);
|
|
58
62
|
|
|
63
|
+
const [activeButton, setActiveButton] = useState('all');
|
|
64
|
+
|
|
59
65
|
return (
|
|
60
66
|
<div className={style('space-y-1', className)}>
|
|
61
67
|
<div className="bg-white">
|
|
@@ -67,7 +73,10 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
67
73
|
) : null}
|
|
68
74
|
</div>
|
|
69
75
|
{descriptionData ? renderDescriptionBlock(descriptionData) : null}
|
|
70
|
-
{
|
|
76
|
+
{renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
77
|
+
<div className={style('pb-2xl', filtersVisibleStyles(activeButton))}>
|
|
78
|
+
{renderFiltrationForm(Object.keys(initFilterState), { field, reset })}
|
|
79
|
+
</div>
|
|
71
80
|
</div>
|
|
72
81
|
<div className="h-[600px]">
|
|
73
82
|
<ClientOnly>
|
|
@@ -81,6 +90,51 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
81
90
|
},
|
|
82
91
|
);
|
|
83
92
|
|
|
93
|
+
const renderButtonsGroup = (
|
|
94
|
+
data: Branch[],
|
|
95
|
+
activeButton: string,
|
|
96
|
+
setActiveButton: (item: string) => void,
|
|
97
|
+
) => {
|
|
98
|
+
const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
|
|
99
|
+
|
|
100
|
+
const businessButtonVersion = activeButton === 'business' ? 'primary' : 'secondary';
|
|
101
|
+
|
|
102
|
+
const handleOnClick = (e: any, key: string, branches: Branch[]) => {
|
|
103
|
+
if (e.currentTarget === e.target && key === 'business') {
|
|
104
|
+
branches.filter(
|
|
105
|
+
(branch) =>
|
|
106
|
+
branch.workSchedule &&
|
|
107
|
+
branch.workSchedule.businessScheduleVisibleTag &&
|
|
108
|
+
!branch.workSchedule.businessScheduleDescription,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
setActiveButton(key);
|
|
113
|
+
|
|
114
|
+
return branches;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<div className="flex pb-lg">
|
|
119
|
+
<Button
|
|
120
|
+
className="mr-m"
|
|
121
|
+
data-id="all"
|
|
122
|
+
onClick={(e) => handleOnClick(e, 'all', data)}
|
|
123
|
+
version={allButtonVersion}
|
|
124
|
+
>
|
|
125
|
+
Для физических лиц
|
|
126
|
+
</Button>
|
|
127
|
+
<Button
|
|
128
|
+
data-id="business"
|
|
129
|
+
onClick={(e) => handleOnClick(e, 'business', data)}
|
|
130
|
+
version={businessButtonVersion}
|
|
131
|
+
>
|
|
132
|
+
Для юридических лиц
|
|
133
|
+
</Button>
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
84
138
|
const renderDescriptionBlock = ({ __html, list }: AtmsDef) =>
|
|
85
139
|
__html || list?.length ? (
|
|
86
140
|
<div className="mb-2xl border-b sm:border border-main-divider sm:rounded-md">
|
|
@@ -47,6 +47,13 @@ export type WorkSchedule = {
|
|
|
47
47
|
isMatchesPattern?: boolean;
|
|
48
48
|
businessScheduleVisibleTag?: boolean;
|
|
49
49
|
businessScheduleDescription?: string;
|
|
50
|
+
premiumService?: boolean;
|
|
51
|
+
privateBanking?: boolean;
|
|
52
|
+
sellingCoins?: boolean;
|
|
53
|
+
buyingCoins?: boolean;
|
|
54
|
+
bullionOperations?: boolean;
|
|
55
|
+
preciousMetalsOperations?: boolean;
|
|
56
|
+
transferringDataToBiometricSystem?: boolean;
|
|
50
57
|
};
|
|
51
58
|
|
|
52
59
|
export type SafeBoxCaseTariff = {
|
|
@@ -6,13 +6,26 @@ import { getOfficePoint, renderOfficeCard } from './renderOfficeCard';
|
|
|
6
6
|
import { useOffices } from './useOffices';
|
|
7
7
|
|
|
8
8
|
const INITIAL_FILTRATION_STATE = {
|
|
9
|
-
//safeBoxCaseVolumes: false, //TODO: temp hide
|
|
10
9
|
workingSaturday: false,
|
|
10
|
+
premiumService: false,
|
|
11
|
+
privateBanking: false,
|
|
12
|
+
sellingCoins: false,
|
|
13
|
+
buyingCoins: false,
|
|
14
|
+
bullionOperations: false,
|
|
15
|
+
preciousMetalsOperations: false,
|
|
16
|
+
transferringDataToBiometricSystem: false,
|
|
11
17
|
};
|
|
12
18
|
|
|
13
19
|
const FILTRATION_PREDICATES = {
|
|
14
|
-
//safeBoxCaseVolumes: (item: Branch) => Boolean(item.safeBoxCaseVolumes), //TODO: temp hide
|
|
15
20
|
workingSaturday: (item: Branch) => Boolean(item.workSchedule?.workingSaturday),
|
|
21
|
+
premiumService: (item: Branch) => Boolean(item.workSchedule?.premiumService),
|
|
22
|
+
privateBanking: (item: Branch) => Boolean(item.workSchedule?.privateBanking),
|
|
23
|
+
sellingCoins: (item: Branch) => Boolean(item.workSchedule?.sellingCoins),
|
|
24
|
+
buyingCoins: (item: Branch) => Boolean(item.workSchedule?.buyingCoins),
|
|
25
|
+
bullionOperations: (item: Branch) => Boolean(item.workSchedule?.bullionOperations),
|
|
26
|
+
preciousMetalsOperations: (item: Branch) => Boolean(item.workSchedule?.preciousMetalsOperations),
|
|
27
|
+
transferringDataToBiometricSystem: (item: Branch) =>
|
|
28
|
+
Boolean(item.workSchedule?.transferringDataToBiometricSystem),
|
|
16
29
|
};
|
|
17
30
|
|
|
18
31
|
export interface OfficesMapProps {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
3
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
4
|
+
import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
|
|
5
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
3
6
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
7
|
+
import { type IconName } from '../../ui-kit/Icon/IconProps';
|
|
4
8
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
5
9
|
|
|
6
10
|
const FILTRATION_LABELS = {
|
|
@@ -10,26 +14,78 @@ const FILTRATION_LABELS = {
|
|
|
10
14
|
terminalTypeTerm: 'Терминалы',
|
|
11
15
|
workAllTime: 'Круглосуточно',
|
|
12
16
|
billAcceptorEnable: 'Прием наличных',
|
|
17
|
+
premiumService: 'Премиальное обслуживание',
|
|
18
|
+
privateBanking: 'Услуга Private banking',
|
|
19
|
+
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
20
|
+
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
21
|
+
bullionOperations: 'Операции со слитками',
|
|
22
|
+
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
23
|
+
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
13
24
|
};
|
|
14
25
|
|
|
26
|
+
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
27
|
+
|
|
15
28
|
export const renderFiltrationForm = (
|
|
16
29
|
filters: string[],
|
|
17
30
|
{ field, reset }: { field: FormFieldRegisterer<any>; reset: () => void },
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
visibleFiltersNum = 3,
|
|
32
|
+
) => {
|
|
33
|
+
const filtersCheckbox = (filters || []).map((key) => (
|
|
34
|
+
<Checkbox key={key} text={FILTRATION_LABELS[key]} {...field(key)} />
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
const [visibleFilters, hiddenFilters] =
|
|
38
|
+
visibleFiltersNum > 0
|
|
39
|
+
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
40
|
+
: [filtersCheckbox, []];
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div>
|
|
44
|
+
{filters?.length ? (
|
|
45
|
+
<div>
|
|
46
|
+
{hiddenFilters.length > 0 ? (
|
|
47
|
+
<Foldable
|
|
48
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
49
|
+
<div>
|
|
50
|
+
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
51
|
+
<FoldableSection className={COMMON_FILTERS_STYLES} isUnfolded={isUnfolded}>
|
|
52
|
+
{hiddenFilters}
|
|
53
|
+
</FoldableSection>
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
56
|
+
renderFoldButton={renderFoldButton(reset)}
|
|
57
|
+
/>
|
|
58
|
+
) : (
|
|
59
|
+
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
) : null}
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const renderFoldButton =
|
|
68
|
+
(reset: () => void) =>
|
|
69
|
+
({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
70
|
+
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
71
|
+
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div className="flex">
|
|
75
|
+
<LinkButton
|
|
76
|
+
version="transparent"
|
|
77
|
+
className="text-secondary-text [&>*]:p-0 mr-lg"
|
|
78
|
+
appendRight={<Icon name={icons[Number(isUnfolded)]} width="16" height="16" />}
|
|
79
|
+
text={labels[Number(isUnfolded)]}
|
|
80
|
+
onClick={onToggle}
|
|
81
|
+
/>
|
|
82
|
+
<LinkButton
|
|
83
|
+
version="transparent"
|
|
84
|
+
className="text-secondary-text [&>*]:p-0"
|
|
85
|
+
onClick={reset}
|
|
86
|
+
text="Очистить фильтр"
|
|
87
|
+
appendRight={<Icon name="CloseIcon" width="16" height="16" />}
|
|
88
|
+
/>
|
|
25
89
|
</div>
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
version="transparent"
|
|
29
|
-
className="text-secondary-text [&>*]:p-0"
|
|
30
|
-
onClick={reset}
|
|
31
|
-
text="Очистить фильтр"
|
|
32
|
-
appendRight={<Icon name="CloseIcon" width="16" height="16" />}
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
90
|
+
);
|
|
91
|
+
};
|
|
@@ -2,10 +2,13 @@ import { type BalloonPoints } from '../OfficesAtmsMap/YandexMapProps';
|
|
|
2
2
|
import { type Branch } from './useSafeBoxes';
|
|
3
3
|
|
|
4
4
|
export const getCoordinates = (data?: Branch | Branch[]): BalloonPoints[] => {
|
|
5
|
+
const getBalloon = () => void 0;
|
|
6
|
+
|
|
5
7
|
if (Array.isArray(data)) {
|
|
6
8
|
return data
|
|
7
9
|
.map((_) => ({
|
|
8
|
-
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]
|
|
10
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)].filter(Boolean),
|
|
11
|
+
content: getBalloon(),
|
|
9
12
|
}))
|
|
10
13
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
11
14
|
}
|