@redneckz/wildless-cms-uni-blocks 0.6.27 → 0.6.28
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 +27 -22
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficeMap/useOfficeMap.d.ts +56 -2
- package/dist/components/OfficeMap/OfficeMap.js +4 -2
- package/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/dist/components/OfficeMap/useOfficeMap.d.ts +56 -2
- package/dist/components/OfficeMap/useOfficeMap.js +4 -1
- package/dist/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/lib/components/OfficeMap/OfficeMap.js +4 -2
- package/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/lib/components/OfficeMap/useOfficeMap.d.ts +56 -2
- package/lib/components/OfficeMap/useOfficeMap.js +4 -1
- package/lib/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficeMap/useOfficeMap.d.ts +56 -2
- package/mobile/dist/components/OfficeMap/OfficeMap.js +4 -2
- package/mobile/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/dist/components/OfficeMap/useOfficeMap.d.ts +56 -2
- package/mobile/dist/components/OfficeMap/useOfficeMap.js +4 -1
- package/mobile/dist/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/lib/components/OfficeMap/OfficeMap.js +4 -2
- package/mobile/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/lib/components/OfficeMap/useOfficeMap.d.ts +56 -2
- package/mobile/lib/components/OfficeMap/useOfficeMap.js +4 -1
- package/mobile/lib/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/src/components/OfficeMap/OfficeMap.tsx +4 -2
- package/mobile/src/components/OfficeMap/useOfficeMap.ts +4 -1
- package/package.json +1 -1
- package/src/components/OfficeMap/OfficeMap.tsx +4 -2
- package/src/components/OfficeMap/useOfficeMap.ts +4 -1
|
@@ -1,3 +1,57 @@
|
|
|
1
1
|
export declare function useOfficeMap(regionCode?: string): {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
id: number;
|
|
3
|
+
branchType: {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
shortName: string;
|
|
9
|
+
name: string;
|
|
10
|
+
address: string;
|
|
11
|
+
lawAddress: string;
|
|
12
|
+
openDate: string;
|
|
13
|
+
closeDate: null;
|
|
14
|
+
bik: string;
|
|
15
|
+
corAcc: string;
|
|
16
|
+
registrationNumber: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
fax: string;
|
|
19
|
+
okpo: string;
|
|
20
|
+
ogrn: string;
|
|
21
|
+
kpp: string;
|
|
22
|
+
inn: string;
|
|
23
|
+
branchCode: string;
|
|
24
|
+
upperBranchCode: string;
|
|
25
|
+
timeZone: string;
|
|
26
|
+
exchangeRate: {
|
|
27
|
+
currencies: {
|
|
28
|
+
buyExchangeRate: number;
|
|
29
|
+
saleExchangeRate: number;
|
|
30
|
+
currency: {
|
|
31
|
+
id: number;
|
|
32
|
+
code: string;
|
|
33
|
+
currency: string;
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
lastUpdate: string;
|
|
38
|
+
};
|
|
39
|
+
workSchedule: {
|
|
40
|
+
id: number;
|
|
41
|
+
workTime: string;
|
|
42
|
+
lunchHour: string;
|
|
43
|
+
workTimeSaturday: string;
|
|
44
|
+
lunchHourSaturday: string;
|
|
45
|
+
workingMonday: boolean;
|
|
46
|
+
workingTuesday: boolean;
|
|
47
|
+
workingWednesday: boolean;
|
|
48
|
+
workingThursday: boolean;
|
|
49
|
+
workingFriday: boolean;
|
|
50
|
+
workingSaturday: boolean;
|
|
51
|
+
workingSunday: boolean;
|
|
52
|
+
};
|
|
53
|
+
gpsLatitude: number;
|
|
54
|
+
gpsLongitude: number;
|
|
55
|
+
range: null;
|
|
56
|
+
safeBoxCaseVolumes: null;
|
|
57
|
+
};
|
|
@@ -4,12 +4,14 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const Icon_1 = require("../../ui-kit/Icon/Icon");
|
|
6
6
|
const YandexMap_1 = require("../../ui-kit/YandexMap/YandexMap");
|
|
7
|
-
const mockOfficeMap_1 = require("./mockOfficeMap");
|
|
8
7
|
const nearbyOffices_1 = require("./nearbyOffices");
|
|
9
8
|
const renderFunctions_1 = require("./renderFunctions");
|
|
10
9
|
const useOfficeMap_1 = require("./useOfficeMap");
|
|
11
10
|
exports.OfficeMap = (0, uni_jsx_1.JSX)(({ className = '' }) => {
|
|
12
|
-
|
|
11
|
+
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
12
|
+
// TODO: useOfficeMap has return MOCK OBJECT!
|
|
13
|
+
// TODO: Fix this when endpoint /api/v1/branches (or new endpoint) had returning right data
|
|
14
|
+
const resultOfficeMap = (0, useOfficeMap_1.useOfficeMap)('000');
|
|
13
15
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } = resultOfficeMap;
|
|
14
16
|
const { workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
|
|
15
17
|
const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/OfficeMap.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iDAA8C;AAC9C,gEAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"OfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/OfficeMap.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;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 -1,3 +1,57 @@
|
|
|
1
1
|
export declare function useOfficeMap(regionCode?: string): {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
id: number;
|
|
3
|
+
branchType: {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
shortName: string;
|
|
9
|
+
name: string;
|
|
10
|
+
address: string;
|
|
11
|
+
lawAddress: string;
|
|
12
|
+
openDate: string;
|
|
13
|
+
closeDate: null;
|
|
14
|
+
bik: string;
|
|
15
|
+
corAcc: string;
|
|
16
|
+
registrationNumber: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
fax: string;
|
|
19
|
+
okpo: string;
|
|
20
|
+
ogrn: string;
|
|
21
|
+
kpp: string;
|
|
22
|
+
inn: string;
|
|
23
|
+
branchCode: string;
|
|
24
|
+
upperBranchCode: string;
|
|
25
|
+
timeZone: string;
|
|
26
|
+
exchangeRate: {
|
|
27
|
+
currencies: {
|
|
28
|
+
buyExchangeRate: number;
|
|
29
|
+
saleExchangeRate: number;
|
|
30
|
+
currency: {
|
|
31
|
+
id: number;
|
|
32
|
+
code: string;
|
|
33
|
+
currency: string;
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
lastUpdate: string;
|
|
38
|
+
};
|
|
39
|
+
workSchedule: {
|
|
40
|
+
id: number;
|
|
41
|
+
workTime: string;
|
|
42
|
+
lunchHour: string;
|
|
43
|
+
workTimeSaturday: string;
|
|
44
|
+
lunchHourSaturday: string;
|
|
45
|
+
workingMonday: boolean;
|
|
46
|
+
workingTuesday: boolean;
|
|
47
|
+
workingWednesday: boolean;
|
|
48
|
+
workingThursday: boolean;
|
|
49
|
+
workingFriday: boolean;
|
|
50
|
+
workingSaturday: boolean;
|
|
51
|
+
workingSunday: boolean;
|
|
52
|
+
};
|
|
53
|
+
gpsLatitude: number;
|
|
54
|
+
gpsLongitude: number;
|
|
55
|
+
range: null;
|
|
56
|
+
safeBoxCaseVolumes: null;
|
|
57
|
+
};
|
|
@@ -2,12 +2,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.useOfficeMap = void 0;
|
|
3
3
|
const useAsyncData_1 = require("@redneckz/uni-jsx/lib/hooks/useAsyncData");
|
|
4
4
|
const fetchJSON_1 = require("../../utils/fetchJSON");
|
|
5
|
+
const mockOfficeMap_1 = require("./mockOfficeMap");
|
|
5
6
|
const OFFICE_MAP_URL = '/api/v1/branches';
|
|
6
7
|
// TODO: regionCode - внутренний идентификатор банка. Не соответствует государственной нумерации регионов РФ
|
|
7
8
|
// TODO: Список регионов можно получить через api/v1/regions
|
|
8
9
|
function useOfficeMap(regionCode) {
|
|
9
10
|
const { data } = (0, useAsyncData_1.useAsyncData)(regionCode ? `${OFFICE_MAP_URL}?regionCode=${regionCode}` : undefined, fetchOfficeMap);
|
|
10
|
-
|
|
11
|
+
console.warn('WARNING!!! Hook useOfficeMap RETURN MOCK object for testing!');
|
|
12
|
+
console.log('Hook useOfficeMap get this data:', data);
|
|
13
|
+
return mockOfficeMap_1.OFFICE_MAP;
|
|
11
14
|
}
|
|
12
15
|
exports.useOfficeMap = useOfficeMap;
|
|
13
16
|
const fetchOfficeMap = (url) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/useOfficeMap.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,qDAAkD;
|
|
1
|
+
{"version":3,"file":"useOfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/useOfficeMap.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,qDAAkD;AAClD,mDAA6C;AAE7C,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAE1C,4GAA4G;AAC5G,4DAA4D;AAC5D,SAAgB,YAAY,CAAC,UAAmB;IAC9C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAC3B,UAAU,CAAC,CAAC,CAAC,GAAG,cAAc,eAAe,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,EACrE,cAAc,CACf,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;IAEtD,OAAO,0BAAU,CAAC;AACpB,CAAC;AATD,oCASC;AAED,MAAM,cAAc,GAAG,CAAC,GAAY,EAAE,EAAE;IACtC,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,CAAC;KACX;IAED,OAAO,IAAA,qBAAS,EAAC,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -2,12 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
4
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap.js';
|
|
5
|
-
import { OFFICE_MAP } from './mockOfficeMap.js';
|
|
6
5
|
import { nearbyOffices } from './nearbyOffices.js';
|
|
7
6
|
import { renderCurrentDaySchedule, renderDay, renderNearbyOffice } from './renderFunctions.js';
|
|
8
7
|
import { useOfficeMap } from './useOfficeMap.js';
|
|
9
8
|
export const OfficeMap = JSX(({ className = '' }) => {
|
|
10
|
-
|
|
9
|
+
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
10
|
+
// TODO: useOfficeMap has return MOCK OBJECT!
|
|
11
|
+
// TODO: Fix this when endpoint /api/v1/branches (or new endpoint) had returning right data
|
|
12
|
+
const resultOfficeMap = useOfficeMap('000');
|
|
11
13
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } = resultOfficeMap;
|
|
12
14
|
const { workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
|
|
13
15
|
const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/OfficeMap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"OfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/OfficeMap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE;IACjE,wFAAwF;IACxF,6CAA6C;IAC7C,2FAA2F;IAC3F,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,GAC9D,eAAiC,CAAC;IACpC,MAAM,EACJ,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,aAAa,GACd,GAAG,YAAY,CAAC;IACjB,MAAM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BAAsB,aACnC,cAAK,SAAS,EAAC,SAAS,YAAE,IAAI,GAAO,EACpC,wBAAwB,CAAC,cAAc,CAAC,IACrC,EACN,eAAK,SAAS,EAAC,wBAAwB,aACrC,KAAC,IAAI,IAAC,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,QAAC,SAAS,EAAC,MAAM,GAAG,EAC5E,OAAO,IACJ,EACN,cAAK,SAAS,EAAC,WAAW,YAAE,aAAa,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAAO,IACpE,EACN,eAAK,SAAS,EAAC,2BAA2B,aACxC,cAAK,SAAS,EAAC,yCAAyC,YACrD,KAAK,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,EAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,GAC7D,EACN,cAAK,SAAS,EAAC,wDAAwD,YACpE,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,GAC5B,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,57 @@
|
|
|
1
1
|
export declare function useOfficeMap(regionCode?: string): {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
id: number;
|
|
3
|
+
branchType: {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
shortName: string;
|
|
9
|
+
name: string;
|
|
10
|
+
address: string;
|
|
11
|
+
lawAddress: string;
|
|
12
|
+
openDate: string;
|
|
13
|
+
closeDate: null;
|
|
14
|
+
bik: string;
|
|
15
|
+
corAcc: string;
|
|
16
|
+
registrationNumber: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
fax: string;
|
|
19
|
+
okpo: string;
|
|
20
|
+
ogrn: string;
|
|
21
|
+
kpp: string;
|
|
22
|
+
inn: string;
|
|
23
|
+
branchCode: string;
|
|
24
|
+
upperBranchCode: string;
|
|
25
|
+
timeZone: string;
|
|
26
|
+
exchangeRate: {
|
|
27
|
+
currencies: {
|
|
28
|
+
buyExchangeRate: number;
|
|
29
|
+
saleExchangeRate: number;
|
|
30
|
+
currency: {
|
|
31
|
+
id: number;
|
|
32
|
+
code: string;
|
|
33
|
+
currency: string;
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
lastUpdate: string;
|
|
38
|
+
};
|
|
39
|
+
workSchedule: {
|
|
40
|
+
id: number;
|
|
41
|
+
workTime: string;
|
|
42
|
+
lunchHour: string;
|
|
43
|
+
workTimeSaturday: string;
|
|
44
|
+
lunchHourSaturday: string;
|
|
45
|
+
workingMonday: boolean;
|
|
46
|
+
workingTuesday: boolean;
|
|
47
|
+
workingWednesday: boolean;
|
|
48
|
+
workingThursday: boolean;
|
|
49
|
+
workingFriday: boolean;
|
|
50
|
+
workingSaturday: boolean;
|
|
51
|
+
workingSunday: boolean;
|
|
52
|
+
};
|
|
53
|
+
gpsLatitude: number;
|
|
54
|
+
gpsLongitude: number;
|
|
55
|
+
range: null;
|
|
56
|
+
safeBoxCaseVolumes: null;
|
|
57
|
+
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON.js';
|
|
3
|
+
import { OFFICE_MAP } from './mockOfficeMap.js';
|
|
3
4
|
const OFFICE_MAP_URL = '/api/v1/branches';
|
|
4
5
|
// TODO: regionCode - внутренний идентификатор банка. Не соответствует государственной нумерации регионов РФ
|
|
5
6
|
// TODO: Список регионов можно получить через api/v1/regions
|
|
6
7
|
export function useOfficeMap(regionCode) {
|
|
7
8
|
const { data } = useAsyncData(regionCode ? `${OFFICE_MAP_URL}?regionCode=${regionCode}` : undefined, fetchOfficeMap);
|
|
8
|
-
|
|
9
|
+
console.warn('WARNING!!! Hook useOfficeMap RETURN MOCK object for testing!');
|
|
10
|
+
console.log('Hook useOfficeMap get this data:', data);
|
|
11
|
+
return OFFICE_MAP;
|
|
9
12
|
}
|
|
10
13
|
const fetchOfficeMap = (url) => {
|
|
11
14
|
if (!url) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/useOfficeMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useOfficeMap.js","sourceRoot":"","sources":["../../../src/components/OfficeMap/useOfficeMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAE1C,4GAA4G;AAC5G,4DAA4D;AAC5D,MAAM,UAAU,YAAY,CAAC,UAAmB;IAC9C,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAC3B,UAAU,CAAC,CAAC,CAAC,GAAG,cAAc,eAAe,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,EACrE,cAAc,CACf,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;IAEtD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,cAAc,GAAG,CAAC,GAAY,EAAE,EAAE;IACtC,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,CAAC;KACX;IAED,OAAO,SAAS,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -2,14 +2,16 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
4
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
5
|
-
import { OFFICE_MAP } from './mockOfficeMap';
|
|
6
5
|
import { nearbyOffices } from './nearbyOffices';
|
|
7
6
|
import type { OfficeMapProps, WorkScheduleWeek } from './OfficeMapContent';
|
|
8
7
|
import { renderCurrentDaySchedule, renderDay, renderNearbyOffice } from './renderFunctions';
|
|
9
8
|
import { useOfficeMap } from './useOfficeMap';
|
|
10
9
|
|
|
11
10
|
export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
12
|
-
|
|
11
|
+
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
12
|
+
// TODO: useOfficeMap has return MOCK OBJECT!
|
|
13
|
+
// TODO: Fix this when endpoint /api/v1/branches (or new endpoint) had returning right data
|
|
14
|
+
const resultOfficeMap = useOfficeMap('000');
|
|
13
15
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } =
|
|
14
16
|
resultOfficeMap as OfficeMapProps;
|
|
15
17
|
const {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON';
|
|
3
|
+
import { OFFICE_MAP } from './mockOfficeMap';
|
|
3
4
|
|
|
4
5
|
const OFFICE_MAP_URL = '/api/v1/branches';
|
|
5
6
|
|
|
@@ -10,8 +11,10 @@ export function useOfficeMap(regionCode?: string) {
|
|
|
10
11
|
regionCode ? `${OFFICE_MAP_URL}?regionCode=${regionCode}` : undefined,
|
|
11
12
|
fetchOfficeMap,
|
|
12
13
|
);
|
|
14
|
+
console.warn('WARNING!!! Hook useOfficeMap RETURN MOCK object for testing!');
|
|
15
|
+
console.log('Hook useOfficeMap get this data:', data);
|
|
13
16
|
|
|
14
|
-
return
|
|
17
|
+
return OFFICE_MAP;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const fetchOfficeMap = (url?: string) => {
|
package/package.json
CHANGED
|
@@ -2,14 +2,16 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
4
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
5
|
-
import { OFFICE_MAP } from './mockOfficeMap';
|
|
6
5
|
import { nearbyOffices } from './nearbyOffices';
|
|
7
6
|
import type { OfficeMapProps, WorkScheduleWeek } from './OfficeMapContent';
|
|
8
7
|
import { renderCurrentDaySchedule, renderDay, renderNearbyOffice } from './renderFunctions';
|
|
9
8
|
import { useOfficeMap } from './useOfficeMap';
|
|
10
9
|
|
|
11
10
|
export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
12
|
-
|
|
11
|
+
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
12
|
+
// TODO: useOfficeMap has return MOCK OBJECT!
|
|
13
|
+
// TODO: Fix this when endpoint /api/v1/branches (or new endpoint) had returning right data
|
|
14
|
+
const resultOfficeMap = useOfficeMap('000');
|
|
13
15
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } =
|
|
14
16
|
resultOfficeMap as OfficeMapProps;
|
|
15
17
|
const {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON';
|
|
3
|
+
import { OFFICE_MAP } from './mockOfficeMap';
|
|
3
4
|
|
|
4
5
|
const OFFICE_MAP_URL = '/api/v1/branches';
|
|
5
6
|
|
|
@@ -10,8 +11,10 @@ export function useOfficeMap(regionCode?: string) {
|
|
|
10
11
|
regionCode ? `${OFFICE_MAP_URL}?regionCode=${regionCode}` : undefined,
|
|
11
12
|
fetchOfficeMap,
|
|
12
13
|
);
|
|
14
|
+
console.warn('WARNING!!! Hook useOfficeMap RETURN MOCK object for testing!');
|
|
15
|
+
console.log('Hook useOfficeMap get this data:', data);
|
|
13
16
|
|
|
14
|
-
return
|
|
17
|
+
return OFFICE_MAP;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const fetchOfficeMap = (url?: string) => {
|