@pisell/private-materials 6.1.2 → 6.1.4
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/Lists.js +2 -0
- package/es/components/booking/info/service/editService/index.js +3 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceList/index.js +2 -0
- package/es/components/booking/info/service/serviceManager/index.js +3 -1
- package/es/components/booking/info/service2/Lists.js +1 -0
- package/es/components/booking/info2/index.js +1 -0
- package/es/components/booking/info2/service/addService/index.js +1 -0
- package/es/components/booking/info2/service/editService/index.js +18 -2
- package/es/components/booking/info2/service/serviceList/index.js +2 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +78 -71
- package/es/components/ticketBooking/index.js +2 -2
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/Lists.js +2 -0
- package/lib/components/booking/info/service/editService/index.js +3 -0
- package/lib/components/booking/info/service/serviceList/index.js +2 -0
- package/lib/components/booking/info/service/serviceManager/index.js +2 -0
- package/lib/components/booking/info/service2/Lists.js +1 -0
- package/lib/components/booking/info2/service/addService/index.js +1 -0
- package/lib/components/booking/info2/service/editService/index.js +16 -3
- package/lib/components/booking/info2/service/serviceList/index.js +2 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
- package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
- package/lib/components/ticketBooking/index.js +2 -2
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/package.json +2 -2
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
interface RechargeState {
|
3
|
-
total: 0;
|
4
|
-
}
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
6
|
-
state: RechargeState;
|
7
|
-
} & {
|
8
|
-
dispatch: (params: {
|
9
|
-
type: string;
|
10
|
-
payload: any;
|
11
|
-
}) => void;
|
12
|
-
}>;
|
13
|
-
export {};
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { IWalletListItemProps } from './serve';
|
3
2
|
export interface WalletCardItemProps {
|
4
3
|
id: string;
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
27
26
|
currentSearchListItemCode?: string;
|
28
27
|
[key: string]: any;
|
29
28
|
}
|
30
|
-
export declare const Provider:
|
31
|
-
global_wallet: WalletListProps;
|
32
|
-
} & {
|
33
|
-
dispatch: (params: {
|
34
|
-
type: string;
|
35
|
-
payload: any;
|
36
|
-
}) => void;
|
37
|
-
}>;
|
29
|
+
export declare const Provider: any, Context: any;
|
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
|
|
8
8
|
var _utils$getComponents;
|
9
9
|
var _ref = appHelper || {},
|
10
10
|
utils = _ref.utils;
|
11
|
-
return (utils === null || utils === void 0
|
11
|
+
return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
|
12
12
|
}, [components]);
|
13
13
|
return Cpt;
|
14
14
|
};
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,14 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { FormState } from '../model';
|
3
1
|
export declare const walkInData: {
|
4
2
|
id: number;
|
5
3
|
nickname: string;
|
6
4
|
};
|
7
|
-
export declare const Provider:
|
8
|
-
state: FormState;
|
9
|
-
} & {
|
10
|
-
dispatch: (params: {
|
11
|
-
type: string;
|
12
|
-
payload: any;
|
13
|
-
}) => void;
|
14
|
-
}>;
|
5
|
+
export declare const Provider: any, Context: any;
|
@@ -65,9 +65,11 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
65
65
|
state
|
66
66
|
});
|
67
67
|
}
|
68
|
+
openBookingEditModal();
|
68
69
|
onChange({ editModal: true, cacheItem });
|
69
70
|
return onEdit == null ? void 0 : onEdit(cacheItem, type);
|
70
71
|
}
|
72
|
+
closeBookingEditModal();
|
71
73
|
const params = {
|
72
74
|
editModal: false,
|
73
75
|
value: products2,
|
@@ -190,6 +190,7 @@ var Info = (_, ref) => {
|
|
190
190
|
} else {
|
191
191
|
_list = _list.filter((d) => d._id !== _id);
|
192
192
|
}
|
193
|
+
closeBookingEditModal();
|
193
194
|
dispatch({
|
194
195
|
type: "setService",
|
195
196
|
payload: {
|
@@ -504,6 +505,7 @@ var Info = (_, ref) => {
|
|
504
505
|
if (state.channelDisabledEdit) {
|
505
506
|
return;
|
506
507
|
}
|
508
|
+
openBookingEditModal();
|
507
509
|
dispatch({
|
508
510
|
type: "setService",
|
509
511
|
payload: {
|
@@ -632,6 +634,7 @@ var Info = (_, ref) => {
|
|
632
634
|
open: state.service.editModal && !((_a2 = state.service.cacheItem) == null ? void 0 : _a2.autoClose),
|
633
635
|
title: isDayBookingMode ? import_utils.locales.getText("pisell2.text.edit-select-service") : import_utils.locales.getText("pisell2.text.edit-service"),
|
634
636
|
onClose: () => {
|
637
|
+
closeBookingEditModal();
|
635
638
|
dispatch({
|
636
639
|
type: "setService",
|
637
640
|
payload: {
|
@@ -52,6 +52,7 @@ var ServiceList = ({ onEdit }) => {
|
|
52
52
|
if (state.disabledEdit || state.disableEventBookingEdit) {
|
53
53
|
return;
|
54
54
|
}
|
55
|
+
openBookingEditModal();
|
55
56
|
dispatch({
|
56
57
|
type: "setService",
|
57
58
|
payload: {
|
@@ -67,6 +68,7 @@ var ServiceList = ({ onEdit }) => {
|
|
67
68
|
}
|
68
69
|
let _list = [...state.service.value];
|
69
70
|
_list = _list.filter((d) => d._id !== item._id);
|
71
|
+
closeBookingEditModal();
|
70
72
|
dispatch({
|
71
73
|
type: "setService",
|
72
74
|
payload: {
|
@@ -178,6 +178,7 @@ var useService = ({
|
|
178
178
|
}
|
179
179
|
}
|
180
180
|
(0, import_utils2.deleteCacheParams)();
|
181
|
+
closeBookingEditModal();
|
181
182
|
dispatch({
|
182
183
|
type: "setService",
|
183
184
|
payload: {
|
@@ -191,6 +192,7 @@ var useService = ({
|
|
191
192
|
});
|
192
193
|
};
|
193
194
|
const goEditPanel = ({ booking }) => {
|
195
|
+
openBookingEditModal();
|
194
196
|
dispatch({
|
195
197
|
type: "setService",
|
196
198
|
payload: {
|
@@ -63,6 +63,7 @@ var Lists = ({ onEdit, onChange }) => {
|
|
63
63
|
let products = (0, import_utils.updateServices)(state, currentItem, type, other);
|
64
64
|
if (type === "view") {
|
65
65
|
let product = currentItem._origin;
|
66
|
+
openBookingEditModal();
|
66
67
|
onChange({ editModal: true, cacheItem: { ...product, new: 0 } });
|
67
68
|
return onEdit == null ? void 0 : onEdit({ ...product, new: 0 });
|
68
69
|
}
|
@@ -63,6 +63,15 @@ var Info = (_, ref) => {
|
|
63
63
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
64
64
|
const resourcesRef = (0, import_react.useRef)(null);
|
65
65
|
const isChangeTotal = (0, import_react.useRef)(false);
|
66
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
67
|
+
(0, import_react.useEffect)(() => {
|
68
|
+
window.openBookingEditModal = () => {
|
69
|
+
setOpen(true);
|
70
|
+
};
|
71
|
+
window.closeBookingEditModal = () => {
|
72
|
+
setOpen(false);
|
73
|
+
};
|
74
|
+
}, []);
|
66
75
|
const isNormalProduct = (0, import_react.useMemo)(() => {
|
67
76
|
var _a2, _b2;
|
68
77
|
return ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem) && (0, import_utils4.isNormalProductByDurationSchedule)((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem);
|
@@ -141,6 +150,7 @@ var Info = (_, ref) => {
|
|
141
150
|
let _list = [...state.service.value];
|
142
151
|
let _id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
143
152
|
_list = _list.filter((d) => d._id !== _id);
|
153
|
+
closeBookingEditModal();
|
144
154
|
dispatch({
|
145
155
|
type: "setService",
|
146
156
|
payload: {
|
@@ -216,6 +226,7 @@ var Info = (_, ref) => {
|
|
216
226
|
(0, import_utils6.deleteCacheParams)();
|
217
227
|
console.log("_onFinish", _list);
|
218
228
|
form.resetFields();
|
229
|
+
closeBookingEditModal();
|
219
230
|
dispatch({
|
220
231
|
type: "setService",
|
221
232
|
payload: {
|
@@ -239,9 +250,9 @@ var Info = (_, ref) => {
|
|
239
250
|
}
|
240
251
|
);
|
241
252
|
const setEditData = (0, import_ahooks.useMemoizedFn)(
|
242
|
-
(_cacheItem,
|
253
|
+
(_cacheItem, open2, openProductDetail) => {
|
243
254
|
console.timeEnd("handleChange");
|
244
|
-
console.log("setEditDatasetEditData", _cacheItem,
|
255
|
+
console.log("setEditDatasetEditData", _cacheItem, open2);
|
245
256
|
isChangeTotal.current = false;
|
246
257
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
247
258
|
let values = cacheItem._extend;
|
@@ -426,6 +437,7 @@ var Info = (_, ref) => {
|
|
426
437
|
return;
|
427
438
|
}
|
428
439
|
form.resetFields();
|
440
|
+
closeBookingEditModal();
|
429
441
|
dispatch({
|
430
442
|
type: "setService",
|
431
443
|
payload: {
|
@@ -636,9 +648,10 @@ var Info = (_, ref) => {
|
|
636
648
|
zIndex: state.service.changeService ? 999 : 1e3,
|
637
649
|
forceRender: true,
|
638
650
|
mask: state.drawerMask,
|
639
|
-
open:
|
651
|
+
open: open && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
|
640
652
|
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
641
653
|
onClose: () => {
|
654
|
+
closeBookingEditModal();
|
642
655
|
dispatch({
|
643
656
|
type: "setService",
|
644
657
|
payload: {
|
@@ -48,6 +48,7 @@ var ServiceList = ({ onEdit }) => {
|
|
48
48
|
cacheItem: { ...item, new: 0 },
|
49
49
|
state
|
50
50
|
});
|
51
|
+
openBookingEditModal();
|
51
52
|
dispatch({
|
52
53
|
type: "setService",
|
53
54
|
payload: {
|
@@ -63,6 +64,7 @@ var ServiceList = ({ onEdit }) => {
|
|
63
64
|
}
|
64
65
|
let _list = [...state.service.value];
|
65
66
|
_list = _list.filter((d) => d._id !== item._id);
|
67
|
+
closeBookingEditModal();
|
66
68
|
dispatch({
|
67
69
|
type: "setService",
|
68
70
|
payload: {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
amountSymbol: string;
|
4
3
|
apis: {
|
@@ -105,11 +104,4 @@ export declare const walkInData: {
|
|
105
104
|
id: number;
|
106
105
|
nickname: string;
|
107
106
|
};
|
108
|
-
export declare const Provider:
|
109
|
-
state: FormState;
|
110
|
-
} & {
|
111
|
-
dispatch: (params: {
|
112
|
-
type: string;
|
113
|
-
payload: any;
|
114
|
-
}) => void;
|
115
|
-
}>;
|
107
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
4
3
|
order: any;
|
@@ -29,11 +28,4 @@ export interface PayGroup {
|
|
29
28
|
pay_number?: string;
|
30
29
|
_order: any;
|
31
30
|
}
|
32
|
-
export declare const Provider:
|
33
|
-
state: FormState;
|
34
|
-
} & {
|
35
|
-
dispatch: (params: {
|
36
|
-
type: string;
|
37
|
-
payload: any;
|
38
|
-
}) => void;
|
39
|
-
}>;
|
31
|
+
export declare const Provider: any, Context: any;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
3
2
|
import dayjs from "dayjs";
|
4
3
|
export interface FormState {
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
69
68
|
};
|
70
69
|
setGlobalState: Function | null;
|
71
70
|
}
|
72
|
-
export declare const Provider:
|
73
|
-
state: FormState;
|
74
|
-
} & {
|
75
|
-
dispatch: (params: {
|
76
|
-
type: string;
|
77
|
-
payload: any;
|
78
|
-
}) => void;
|
79
|
-
}>;
|
71
|
+
export declare const Provider: any, Context: any;
|
@@ -188,7 +188,7 @@ var _formatBookingDetail = (data, modalState) => {
|
|
188
188
|
};
|
189
189
|
};
|
190
190
|
var TicketBooking = () => {
|
191
|
-
var _a;
|
191
|
+
var _a, _b, _c;
|
192
192
|
const [state, setState] = (0, import_miniRedux.useStore)();
|
193
193
|
const engineContext = (0, import_useEngineContext.default)();
|
194
194
|
const { props: engineProps } = engineContext.engine;
|
@@ -210,7 +210,7 @@ var TicketBooking = () => {
|
|
210
210
|
const _timerRef = (0, import_react.useRef)();
|
211
211
|
const _callbackFnRef = (0, import_react.useRef)();
|
212
212
|
(0, import_react.useEffect)(() => {
|
213
|
-
var _a2,
|
213
|
+
var _a2, _b2, _c2, _d, _e, _f;
|
214
214
|
_persistentRef.current = storage.get(`drawer-booking`) === "true" ? true : isTerminal();
|
215
215
|
if (lowcodeRef) {
|
216
216
|
lowcodeRef.onReady(void 0);
|
@@ -235,7 +235,7 @@ var TicketBooking = () => {
|
|
235
235
|
});
|
236
236
|
setState(
|
237
237
|
{
|
238
|
-
amountSymbol: (getData == null ? void 0 : getData("shop_symbol")) || ((_d = (
|
238
|
+
amountSymbol: (getData == null ? void 0 : getData("shop_symbol")) || ((_d = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d.symbol) || "$"
|
239
239
|
},
|
240
240
|
() => {
|
241
241
|
_initStateRef.current = JSON.parse(JSON.stringify(state));
|
@@ -291,10 +291,10 @@ var TicketBooking = () => {
|
|
291
291
|
});
|
292
292
|
};
|
293
293
|
(0, import_react.useEffect)(() => {
|
294
|
-
var _a2,
|
295
|
-
const cartItems = (
|
294
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
|
295
|
+
const cartItems = (_b2 = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value;
|
296
296
|
if (!Array.isArray(cartItems) || cartItems.length === 0) {
|
297
|
-
(_d = (
|
297
|
+
(_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.postMessageToApp) == null ? void 0 : _d.call(_c2, {
|
298
298
|
module: "cds",
|
299
299
|
key: "cartUpdate",
|
300
300
|
data: {
|
@@ -395,15 +395,15 @@ var TicketBooking = () => {
|
|
395
395
|
fees
|
396
396
|
}
|
397
397
|
});
|
398
|
-
}, [state.modalState]);
|
398
|
+
}, [(_c = (_b = state == null ? void 0 : state.modalState) == null ? void 0 : _b.service) == null ? void 0 : _c.value]);
|
399
399
|
const _setModalState = (props) => {
|
400
|
-
var _a2,
|
400
|
+
var _a2, _b2;
|
401
401
|
console.log("同步state到外层", props);
|
402
402
|
let newVal = { ...props };
|
403
403
|
if (newVal.service) {
|
404
404
|
newVal.service.value = ((_a2 = newVal == null ? void 0 : newVal.service) == null ? void 0 : _a2.value) || [];
|
405
405
|
}
|
406
|
-
console.log((
|
406
|
+
console.log((_b2 = newVal == null ? void 0 : newVal.service) == null ? void 0 : _b2.value, "newVal.service.value");
|
407
407
|
setState({
|
408
408
|
modalState: {
|
409
409
|
...state.modalState,
|
@@ -430,10 +430,10 @@ var TicketBooking = () => {
|
|
430
430
|
}
|
431
431
|
});
|
432
432
|
setTimeout(() => {
|
433
|
-
var _a2,
|
434
|
-
if ((
|
435
|
-
let _list = (_e = (
|
436
|
-
|
433
|
+
var _a2, _b2, _c2, _d, _e;
|
434
|
+
if ((_b2 = (_a2 = state.modalState.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
|
435
|
+
let _list = (_e = (_c2 = state.bookingFunctions) == null ? void 0 : _c2.updateServiceDate) == null ? void 0 : _e.call(
|
436
|
+
_c2,
|
437
437
|
(_d = state.modalState.service) == null ? void 0 : _d.value,
|
438
438
|
date,
|
439
439
|
false
|
@@ -449,8 +449,8 @@ var TicketBooking = () => {
|
|
449
449
|
}, 100);
|
450
450
|
};
|
451
451
|
const _setShopOpeningHours = () => {
|
452
|
-
var _a2,
|
453
|
-
let time = ((_a2 = getData == null ? void 0 : getData("operating_day_boundary")) == null ? void 0 : _a2.time) || ((_f = (_e = (_d = (
|
452
|
+
var _a2, _b2, _c2, _d, _e, _f;
|
453
|
+
let time = ((_a2 = getData == null ? void 0 : getData("operating_day_boundary")) == null ? void 0 : _a2.time) || ((_f = (_e = (_d = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d.shopDetail) == null ? void 0 : _e.operating_day_boundary) == null ? void 0 : _f.time);
|
454
454
|
if (time) {
|
455
455
|
localStorage.setItem("shopOpeningHours", time);
|
456
456
|
}
|
@@ -467,12 +467,12 @@ var TicketBooking = () => {
|
|
467
467
|
});
|
468
468
|
};
|
469
469
|
const _getBoardConfig = async () => {
|
470
|
-
var _a2,
|
470
|
+
var _a2, _b2, _c2;
|
471
471
|
const { bookingConfigParams } = state;
|
472
472
|
const data = await (0, import_serve.getBookingConfig)({
|
473
473
|
...bookingConfigParams
|
474
474
|
});
|
475
|
-
if ((
|
475
|
+
if ((_c2 = (_b2 = (_a2 = data == null ? void 0 : data.config) == null ? void 0 : _a2.information_tab) == null ? void 0 : _b2.appointment_card) == null ? void 0 : _c2.quick_time) {
|
476
476
|
_getAddTimeProducts();
|
477
477
|
}
|
478
478
|
setState({
|
@@ -566,7 +566,7 @@ var TicketBooking = () => {
|
|
566
566
|
}
|
567
567
|
};
|
568
568
|
const _initBookingData = (type, data) => {
|
569
|
-
var _a2,
|
569
|
+
var _a2, _b2, _c2, _d, _e, _f, _g;
|
570
570
|
let initState = _getInitState({
|
571
571
|
bookingDetail: null,
|
572
572
|
bookingConfig: state.bookingConfig,
|
@@ -588,14 +588,14 @@ var TicketBooking = () => {
|
|
588
588
|
if (type === "create") {
|
589
589
|
if ((_a2 = data == null ? void 0 : data.serviceParams) == null ? void 0 : _a2.start_date) {
|
590
590
|
initState.modalState.date.value = (0, import_dayjs.default)(
|
591
|
-
(
|
591
|
+
(_b2 = data == null ? void 0 : data.serviceParams) == null ? void 0 : _b2.start_date
|
592
592
|
);
|
593
593
|
sessionStorage.setItem(
|
594
594
|
"pisell2.booking.serviceParams",
|
595
595
|
JSON.stringify(data)
|
596
596
|
);
|
597
597
|
} else {
|
598
|
-
let timezone = (_f = (_e = (_d = (
|
598
|
+
let timezone = (_f = (_e = (_d = (_c2 = store == null ? void 0 : store.getState) == null ? void 0 : _c2.call(store)) == null ? void 0 : _d.global) == null ? void 0 : _e.globalConfig) == null ? void 0 : _f.timezone;
|
599
599
|
initState.modalState.date.value = import_dayjs.default.tz(/* @__PURE__ */ new Date(), timezone);
|
600
600
|
sessionStorage.removeItem("pisell2.booking.serviceParams");
|
601
601
|
}
|
@@ -613,9 +613,9 @@ var TicketBooking = () => {
|
|
613
613
|
});
|
614
614
|
};
|
615
615
|
const _rebook = () => {
|
616
|
-
var _a2,
|
616
|
+
var _a2, _b2, _c2;
|
617
617
|
let date = (0, import_utils2.getNextTimeSlice)(
|
618
|
-
((
|
618
|
+
((_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time.value) || 10
|
619
619
|
);
|
620
620
|
setState({
|
621
621
|
rebookState: {
|
@@ -703,7 +703,7 @@ var TicketBooking = () => {
|
|
703
703
|
);
|
704
704
|
};
|
705
705
|
const _scanBookingDetailResult = async (detail) => {
|
706
|
-
var _a2,
|
706
|
+
var _a2, _b2, _c2;
|
707
707
|
(_a2 = Toast == null ? void 0 : Toast.loading) == null ? void 0 : _a2.call(Toast, import_utils.locales.getText("pisell2.ticket-booking.loading"), 6e4);
|
708
708
|
let result = {};
|
709
709
|
try {
|
@@ -711,7 +711,7 @@ var TicketBooking = () => {
|
|
711
711
|
} catch (err) {
|
712
712
|
}
|
713
713
|
if (!(result == null ? void 0 : result.value)) {
|
714
|
-
(
|
714
|
+
(_b2 = import_antd.message) == null ? void 0 : _b2.error(
|
715
715
|
import_utils.locales.getText("pisell2.ticket-booking.appointment-not-found")
|
716
716
|
);
|
717
717
|
Toast == null ? void 0 : Toast.hide();
|
@@ -720,7 +720,7 @@ var TicketBooking = () => {
|
|
720
720
|
const objDetail = await (0, import_serve.getOrderInfoByCode)({ code: result.value });
|
721
721
|
Toast == null ? void 0 : Toast.hide();
|
722
722
|
if (!(objDetail == null ? void 0 : objDetail.order_id) || (objDetail == null ? void 0 : objDetail.event_id) === 0) {
|
723
|
-
(
|
723
|
+
(_c2 = import_antd.message) == null ? void 0 : _c2.error(
|
724
724
|
import_utils.locales.getText("pisell2.ticket-booking.appointment-not-found")
|
725
725
|
);
|
726
726
|
return;
|