@pisell/private-materials 3.0.201 → 3.0.202
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/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -33
- package/es/components/booking/addons/model.d.ts +1 -1
- package/es/components/booking/components/footer/amount.js +5 -4
- package/es/components/booking/components/footer/utils.js +49 -29
- package/es/components/booking/forms/model.d.ts +1 -1
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +54 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +93 -7
- package/es/components/booking/info/main.js +10 -9
- package/es/components/booking/info/pet/ChangePetModal/index.js +38 -23
- package/es/components/booking/info/service/addService/index.js +70 -99
- package/es/components/booking/info/service/addService/utils.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.js +55 -3
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +5 -0
- package/es/components/booking/info/service/editService/BookingList/index.js +39 -0
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
- package/es/components/booking/info/service/editService/EditTabs/index.js +35 -0
- package/es/components/booking/info/service/editService/index.js +234 -142
- package/es/components/booking/info/service/serve.d.ts +10 -0
- package/es/components/booking/info/service/serve.js +28 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +55 -0
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service/serviceManager/index.js +277 -0
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +14 -0
- package/es/components/booking/info/service2/Group/utils.js +146 -0
- package/es/components/booking/info/service2/Lists.js +27 -33
- package/es/components/booking/info/service2/index.d.ts +4 -1
- package/es/components/booking/info/service2/index.js +5 -6
- package/es/components/booking/info/service2/status.js +1 -1
- package/es/components/booking/info/service2/utils.d.ts +95 -3
- package/es/components/booking/info/service2/utils.js +676 -52
- package/es/components/booking/info/utils.d.ts +11 -0
- package/es/components/booking/info/utils.js +24 -0
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/model.d.ts +1 -0
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -1
- package/es/components/booking/utils.js +5 -4
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +11 -39
- package/es/components/shoppingCart/components/Render/index.js +8 -7
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +12 -4
- package/es/components/shoppingCart/hooks/useClearCart.js +10 -5
- package/es/components/shoppingCart/type.d.ts +1 -1
- package/es/components/shoppingCart/utils.js +2 -5
- package/lib/components/booking/addons/model.d.ts +1 -1
- package/lib/components/booking/components/footer/amount.js +4 -3
- package/lib/components/booking/components/footer/utils.js +28 -28
- package/lib/components/booking/forms/model.d.ts +1 -1
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/clientVariant/vertical/index.js +51 -1
- package/lib/components/booking/info/main.js +6 -5
- package/lib/components/booking/info/pet/ChangePetModal/index.js +33 -23
- package/lib/components/booking/info/service/addService/index.js +50 -92
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.js +27 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +5 -0
- package/lib/components/booking/info/service/editService/BookingList/index.js +55 -0
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
- package/lib/components/booking/info/service/editService/EditTabs/index.js +75 -0
- package/lib/components/booking/info/service/editService/index.js +309 -234
- package/lib/components/booking/info/service/serve.d.ts +10 -0
- package/lib/components/booking/info/service/serve.js +7 -2
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +70 -0
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service/serviceManager/index.js +207 -0
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +14 -0
- package/lib/components/booking/info/service2/Group/utils.js +142 -0
- package/lib/components/booking/info/service2/Lists.js +14 -12
- package/lib/components/booking/info/service2/index.d.ts +4 -1
- package/lib/components/booking/info/service2/index.js +5 -5
- package/lib/components/booking/info/service2/status.js +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +95 -3
- package/lib/components/booking/info/service2/utils.js +401 -48
- package/lib/components/booking/info/utils.d.ts +11 -0
- package/lib/components/booking/info/utils.js +35 -0
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/model.d.ts +1 -0
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -1
- package/lib/components/booking/utils.js +3 -4
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +6 -22
- package/lib/components/shoppingCart/components/Render/index.js +6 -10
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +12 -4
- package/lib/components/shoppingCart/hooks/useClearCart.js +4 -9
- package/lib/components/shoppingCart/type.d.ts +1 -1
- package/lib/components/shoppingCart/utils.js +2 -8
- package/package.json +3 -3
|
@@ -44,6 +44,7 @@ var import_index = require("./index.less");
|
|
|
44
44
|
var import_collapsibleList = __toESM(require("../../../components/collapsibleList"));
|
|
45
45
|
var import_utils2 = require("../../../components/collapsibleList/utils");
|
|
46
46
|
var import_ahooks = require("ahooks");
|
|
47
|
+
var import_BookingList = __toESM(require("./BookingList"));
|
|
47
48
|
var import_utils3 = require("../../../utils");
|
|
48
49
|
var import_like = __toESM(require("../like"));
|
|
49
50
|
var import_mock = require("../../../mock");
|
|
@@ -52,9 +53,14 @@ var import_materials = require("@pisell/materials");
|
|
|
52
53
|
var import_dayjs = __toESM(require("dayjs"));
|
|
53
54
|
var import_useSelectPet = __toESM(require("../../service2/hooks/useSelectPet"));
|
|
54
55
|
var import_utils5 = require("../../service2/utils");
|
|
56
|
+
var import_utils6 = require("../../service2/Group/utils");
|
|
57
|
+
var import_utils7 = require("../../service2/Group/utils");
|
|
58
|
+
var import_utils8 = require("../../utils");
|
|
59
|
+
var import_serviceManager = require("../serviceManager");
|
|
60
|
+
var import_EditTabs = __toESM(require("./EditTabs"));
|
|
55
61
|
var submitLock = false;
|
|
56
62
|
var Info = (_, ref) => {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
|
|
63
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
58
64
|
const [form] = import_antd.Form.useForm();
|
|
59
65
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
60
66
|
const useLikeStatus = import_antd.Form.useWatch("like_status", form);
|
|
@@ -67,12 +73,15 @@ var Info = (_, ref) => {
|
|
|
67
73
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
68
74
|
const [selectOpen, setSelectOpen] = (0, import_react.useState)();
|
|
69
75
|
const { holderLists } = (0, import_useSelectPet.default)(state);
|
|
70
|
-
const
|
|
76
|
+
const { editBookingData, editBooking } = (0, import_serviceManager.useService)({ state, dispatch });
|
|
77
|
+
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
78
|
+
const isDayBookingMode = (0, import_react.useMemo)(() => {
|
|
71
79
|
return (0, import_utils5.isDayBooking)(state);
|
|
72
|
-
}, [state.renderType]);
|
|
80
|
+
}, [state == null ? void 0 : state.renderType]);
|
|
73
81
|
const getCurrentCacheItem = (_cacheItem) => {
|
|
82
|
+
var _a2;
|
|
74
83
|
let values = form.getFieldsValue();
|
|
75
|
-
let _item = _cacheItem || state.service.cacheItem;
|
|
84
|
+
let _item = _cacheItem || ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem);
|
|
76
85
|
return {
|
|
77
86
|
..._item,
|
|
78
87
|
_extend: {
|
|
@@ -143,7 +152,7 @@ var Info = (_, ref) => {
|
|
|
143
152
|
resources: (0, import_utils4.formatResources)({
|
|
144
153
|
cacheItem: _cacheItem,
|
|
145
154
|
resourcesOrigin: _list,
|
|
146
|
-
isDay
|
|
155
|
+
isDay: isDayBookingMode
|
|
147
156
|
})
|
|
148
157
|
}
|
|
149
158
|
});
|
|
@@ -170,7 +179,11 @@ var Info = (_, ref) => {
|
|
|
170
179
|
}
|
|
171
180
|
let _list = [...state.service.value];
|
|
172
181
|
let _id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
173
|
-
|
|
182
|
+
if ((0, import_utils7.isGroupBooking)(_id)) {
|
|
183
|
+
_list = (0, import_utils7.filterItemByGroupId)(_id, _list);
|
|
184
|
+
} else {
|
|
185
|
+
_list = _list.filter((d) => d._id !== _id);
|
|
186
|
+
}
|
|
174
187
|
dispatch({
|
|
175
188
|
type: "setService",
|
|
176
189
|
payload: {
|
|
@@ -226,8 +239,7 @@ var Info = (_, ref) => {
|
|
|
226
239
|
}
|
|
227
240
|
form.setFieldsValue({ discount });
|
|
228
241
|
};
|
|
229
|
-
const onFinish = (0, import_ahooks.useMemoizedFn)((values) => {
|
|
230
|
-
var _a2;
|
|
242
|
+
const onFinish = (0, import_ahooks.useMemoizedFn)(async (values) => {
|
|
231
243
|
if (submitLock) {
|
|
232
244
|
return;
|
|
233
245
|
}
|
|
@@ -235,55 +247,16 @@ var Info = (_, ref) => {
|
|
|
235
247
|
setTimeout(() => {
|
|
236
248
|
submitLock = false;
|
|
237
249
|
}, 1500);
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
errorList
|
|
243
|
-
};
|
|
244
|
-
let _extend = {
|
|
245
|
-
..._item._extend,
|
|
246
|
-
...values
|
|
247
|
-
};
|
|
248
|
-
if ((0, import_utils5.isAppointment)(state.service.cacheItem, state)) {
|
|
249
|
-
_extend.quantity = useDuration || 1;
|
|
250
|
-
_extend.startDate = _extend == null ? void 0 : _extend.start_date;
|
|
251
|
-
_extend.endDate = _extend == null ? void 0 : _extend.end_date;
|
|
252
|
-
} else {
|
|
253
|
-
const { startDate, endDate } = (0, import_utils3.getServiceTimes)({ _extend });
|
|
254
|
-
_extend.startDate = startDate;
|
|
255
|
-
_extend.endDate = endDate;
|
|
256
|
-
}
|
|
257
|
-
const { relation_type, item_id, schedule_id } = ((_a2 = currentResource == null ? void 0 : currentResource._extend) == null ? void 0 : _a2.usableTime) || {};
|
|
258
|
-
_extend.relation_type = relation_type || "form";
|
|
259
|
-
_extend.relation_id = item_id || (currentResource == null ? void 0 : currentResource.form_record_id) || 0;
|
|
260
|
-
_extend.schedule_id = schedule_id || 0;
|
|
261
|
-
if (_extend.bundle_edit !== void 0) {
|
|
262
|
-
_extend.bundle_edit = 1;
|
|
263
|
-
}
|
|
264
|
-
_item._extend = _extend;
|
|
265
|
-
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
266
|
-
let _id = _item == null ? void 0 : _item._id;
|
|
267
|
-
if (!_list.some((d) => d._id === _id)) {
|
|
268
|
-
_list.push(_item);
|
|
269
|
-
} else {
|
|
270
|
-
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
271
|
-
}
|
|
272
|
-
(0, import_utils3.deleteCacheParams)();
|
|
273
|
-
console.log("_onFinish", _list);
|
|
274
|
-
dispatch({
|
|
275
|
-
type: "setService",
|
|
276
|
-
payload: {
|
|
277
|
-
editModal: false,
|
|
278
|
-
addModal: false,
|
|
279
|
-
value: _list,
|
|
280
|
-
edit: true,
|
|
281
|
-
cacheItem: null,
|
|
282
|
-
changeService: false
|
|
250
|
+
const data = await editBookingData({
|
|
251
|
+
changeValues: {
|
|
252
|
+
...values,
|
|
253
|
+
errorList
|
|
283
254
|
}
|
|
284
255
|
});
|
|
256
|
+
await editBooking({ booking: data });
|
|
285
257
|
});
|
|
286
258
|
const setEditData = (0, import_ahooks.useMemoizedFn)((_cacheItem, open) => {
|
|
259
|
+
setCurrentTab("batch_edit");
|
|
287
260
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
|
288
261
|
let values = cacheItem._extend;
|
|
289
262
|
values = {
|
|
@@ -302,7 +275,11 @@ var Info = (_, ref) => {
|
|
|
302
275
|
return cPrice !== oPrice;
|
|
303
276
|
}, [useTotal, (_e = (_d = state.service.cacheItem) == null ? void 0 : _d._extend) == null ? void 0 : _e.origin_total]);
|
|
304
277
|
const errorList = (0, import_react.useMemo)(() => {
|
|
305
|
-
return (0, import_utils3.getErrorList)(
|
|
278
|
+
return (0, import_utils3.getErrorList)(
|
|
279
|
+
currentResource,
|
|
280
|
+
getCurrentCacheItem(),
|
|
281
|
+
isDayBookingMode
|
|
282
|
+
);
|
|
306
283
|
}, [currentResource, useDuration, useStartTime]);
|
|
307
284
|
(0, import_ahooks.useUpdateEffect)(() => {
|
|
308
285
|
var _a2;
|
|
@@ -348,11 +325,22 @@ var Info = (_, ref) => {
|
|
|
348
325
|
var _a2, _b2, _c2, _d2;
|
|
349
326
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
|
350
327
|
}, [(_n = (_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.other) == null ? void 0 : _n.bundle]);
|
|
328
|
+
const multiDayPrices = (0, import_react.useMemo)(() => {
|
|
329
|
+
var _a2, _b2, _c2;
|
|
330
|
+
return Object.entries(
|
|
331
|
+
(0, import_utils8.getMultiDayPrices)(((_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.multi_day) || [])
|
|
332
|
+
).map(([key, value]) => {
|
|
333
|
+
return {
|
|
334
|
+
key,
|
|
335
|
+
value
|
|
336
|
+
};
|
|
337
|
+
});
|
|
338
|
+
}, [(_q = (_p = (_o = state.service) == null ? void 0 : _o.cacheItem) == null ? void 0 : _p._extend) == null ? void 0 : _q.multi_day]);
|
|
351
339
|
const getResourcesData = async () => {
|
|
352
340
|
setResourceLoading(true);
|
|
353
341
|
try {
|
|
354
342
|
let params = {};
|
|
355
|
-
if (
|
|
343
|
+
if (isDayBookingMode) {
|
|
356
344
|
const format = "YYYY-MM-DD HH:mm";
|
|
357
345
|
const startDate = useStartDate || state.date.value;
|
|
358
346
|
const endDate = useEndDate || state.date.end_date;
|
|
@@ -393,17 +381,17 @@ var Info = (_, ref) => {
|
|
|
393
381
|
getResourcesData();
|
|
394
382
|
}, 20);
|
|
395
383
|
}, [
|
|
396
|
-
(
|
|
397
|
-
(
|
|
384
|
+
(_t = (_s = (_r = state.date) == null ? void 0 : _r.value) == null ? void 0 : _s.format) == null ? void 0 : _t.call(_s, "YYYY-MM-DD"),
|
|
385
|
+
(_u = state.date) == null ? void 0 : _u.end_date,
|
|
398
386
|
useStartDate,
|
|
399
387
|
useEndDate
|
|
400
388
|
]);
|
|
401
389
|
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
402
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
390
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
403
391
|
const item = state.service.cacheItem;
|
|
404
392
|
let values = form.getFieldsValue();
|
|
405
393
|
let dayValue = {};
|
|
406
|
-
if (
|
|
394
|
+
if (isDayBookingMode) {
|
|
407
395
|
const option = (_c2 = (_b2 = (_a2 = item._extend) == null ? void 0 : _a2.other) == null ? void 0 : _b2.option) == null ? void 0 : _c2.map((o) => {
|
|
408
396
|
return {
|
|
409
397
|
...o,
|
|
@@ -419,15 +407,16 @@ var Info = (_, ref) => {
|
|
|
419
407
|
id: item.id,
|
|
420
408
|
date: state.date.value.format("YYYY-MM-DD"),
|
|
421
409
|
showConfig: {
|
|
422
|
-
option:
|
|
410
|
+
option: isDayBookingMode ? true : false,
|
|
423
411
|
session: false,
|
|
424
|
-
variant:
|
|
412
|
+
variant: isDayBookingMode ? true : false,
|
|
425
413
|
package: true
|
|
426
414
|
},
|
|
427
415
|
value: {
|
|
428
416
|
...((_f2 = item._extend) == null ? void 0 : _f2.other) || {},
|
|
429
417
|
...dayValue
|
|
430
|
-
}
|
|
418
|
+
},
|
|
419
|
+
customer_id: isDayBookingMode ? ((_h2 = (_g2 = state.client) == null ? void 0 : _g2.value) == null ? void 0 : _h2.id) || 1 : void 0
|
|
431
420
|
},
|
|
432
421
|
callback: (e2) => {
|
|
433
422
|
var _a3, _b3, _c3, _d3;
|
|
@@ -457,9 +446,12 @@ var Info = (_, ref) => {
|
|
|
457
446
|
cacheItem
|
|
458
447
|
}
|
|
459
448
|
});
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
449
|
+
setTimeout(() => {
|
|
450
|
+
updateMultiDay({
|
|
451
|
+
start_date: values.start_date,
|
|
452
|
+
end_date: values.end_date
|
|
453
|
+
});
|
|
454
|
+
}, 100);
|
|
463
455
|
}
|
|
464
456
|
});
|
|
465
457
|
});
|
|
@@ -482,7 +474,7 @@ var Info = (_, ref) => {
|
|
|
482
474
|
init: setEditData
|
|
483
475
|
};
|
|
484
476
|
});
|
|
485
|
-
const SelectTime = (
|
|
477
|
+
const SelectTime = (_v = window.BaseMaterials) == null ? void 0 : _v.SelectTime;
|
|
486
478
|
const DateCom = (position) => {
|
|
487
479
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
488
480
|
import_antd.DatePicker,
|
|
@@ -495,11 +487,46 @@ var Info = (_, ref) => {
|
|
|
495
487
|
}
|
|
496
488
|
);
|
|
497
489
|
};
|
|
490
|
+
const updateMultiDay = async ({ start_date, end_date, duration }) => {
|
|
491
|
+
const cacheItem = await (0, import_utils4.getMultiDay)({
|
|
492
|
+
start_date,
|
|
493
|
+
end_date,
|
|
494
|
+
state,
|
|
495
|
+
cacheItem: getCurrentCacheItem()
|
|
496
|
+
});
|
|
497
|
+
if (duration !== void 0) {
|
|
498
|
+
cacheItem._extend.duration = duration;
|
|
499
|
+
}
|
|
500
|
+
cacheItem._extend.items = (0, import_utils6.createBookingItemsByGroup)(cacheItem);
|
|
501
|
+
cacheItem._extend = {
|
|
502
|
+
...cacheItem._extend,
|
|
503
|
+
...(0, import_utils6.getGroupTotalPrice)(cacheItem._extend.items)
|
|
504
|
+
};
|
|
505
|
+
dispatch({
|
|
506
|
+
type: "setService",
|
|
507
|
+
payload: {
|
|
508
|
+
cacheItem
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
let fieldsValues = {
|
|
512
|
+
total: cacheItem._extend.total
|
|
513
|
+
};
|
|
514
|
+
form.setFieldsValue(fieldsValues);
|
|
515
|
+
};
|
|
498
516
|
const onValuesChange = (changedValues) => {
|
|
499
|
-
if (
|
|
517
|
+
if (isDayBookingMode) {
|
|
500
518
|
if (changedValues == null ? void 0 : changedValues.duration) {
|
|
501
|
-
|
|
502
|
-
|
|
519
|
+
const end_date = (0, import_dayjs.default)(useStartDate).add(
|
|
520
|
+
changedValues == null ? void 0 : changedValues.duration,
|
|
521
|
+
"day"
|
|
522
|
+
);
|
|
523
|
+
form.setFieldsValue({
|
|
524
|
+
end_date
|
|
525
|
+
});
|
|
526
|
+
return updateMultiDay({
|
|
527
|
+
start_date: useStartDate,
|
|
528
|
+
end_date,
|
|
529
|
+
duration: changedValues == null ? void 0 : changedValues.duration
|
|
503
530
|
});
|
|
504
531
|
}
|
|
505
532
|
if (changedValues == null ? void 0 : changedValues.start_date) {
|
|
@@ -515,6 +542,9 @@ var Info = (_, ref) => {
|
|
|
515
542
|
if ((changedValues == null ? void 0 : changedValues.start_date) || (changedValues == null ? void 0 : changedValues.end_date)) {
|
|
516
543
|
const cacheItem = getCurrentCacheItem();
|
|
517
544
|
const duration = (0, import_utils3.getDays)(cacheItem, "days");
|
|
545
|
+
const start_date = (changedValues == null ? void 0 : changedValues.start_date) || useStartDate;
|
|
546
|
+
const end_date = (changedValues == null ? void 0 : changedValues.end_date) || useEndDate;
|
|
547
|
+
updateMultiDay({ start_date, end_date, duration });
|
|
518
548
|
return form.setFieldsValue({
|
|
519
549
|
duration
|
|
520
550
|
});
|
|
@@ -525,11 +555,24 @@ var Info = (_, ref) => {
|
|
|
525
555
|
if (state.renderType === "eventBooking") {
|
|
526
556
|
return false;
|
|
527
557
|
}
|
|
528
|
-
if (
|
|
529
|
-
return (0, import_utils5.
|
|
558
|
+
if (isDayBookingMode) {
|
|
559
|
+
return (0, import_utils5.isDayBookingProduct)(state.service.cacheItem, state);
|
|
530
560
|
}
|
|
531
561
|
return true;
|
|
532
562
|
}, [state.service.cacheItem, state.renderType]);
|
|
563
|
+
const items = (0, import_react.useMemo)(() => {
|
|
564
|
+
var _a2, _b2;
|
|
565
|
+
return ((_b2 = (_a2 = getCurrentCacheItem()) == null ? void 0 : _a2._extend) == null ? void 0 : _b2.items) || [];
|
|
566
|
+
}, [
|
|
567
|
+
getCurrentCacheItem(),
|
|
568
|
+
state.service.cacheItem,
|
|
569
|
+
useLikeStatus,
|
|
570
|
+
currentResource,
|
|
571
|
+
useTotal
|
|
572
|
+
]);
|
|
573
|
+
const isEditGroup = (0, import_react.useMemo)(() => {
|
|
574
|
+
return items.length;
|
|
575
|
+
}, [items]);
|
|
533
576
|
return (0, import_react.useMemo)(() => {
|
|
534
577
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
535
578
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -539,7 +582,7 @@ var Info = (_, ref) => {
|
|
|
539
582
|
zIndex: state.service.changeService ? 999 : 1e3,
|
|
540
583
|
forceRender: true,
|
|
541
584
|
open: state.service.editModal && !((_a2 = state.service.cacheItem) == null ? void 0 : _a2.autoClose),
|
|
542
|
-
title:
|
|
585
|
+
title: isDayBookingMode ? import_utils.locales.getText("pisell2.text.edit-select-service") : import_utils.locales.getText("pisell2.text.edit-service"),
|
|
543
586
|
onClose: () => {
|
|
544
587
|
dispatch({
|
|
545
588
|
type: "setService",
|
|
@@ -551,188 +594,217 @@ var Info = (_, ref) => {
|
|
|
551
594
|
});
|
|
552
595
|
}
|
|
553
596
|
},
|
|
554
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(
|
|
555
|
-
|
|
597
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, isEditGroup ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
598
|
+
import_EditTabs.default,
|
|
599
|
+
{
|
|
600
|
+
value: currentTab,
|
|
601
|
+
onChange: (e) => {
|
|
602
|
+
console.log(e);
|
|
603
|
+
setCurrentTab(e);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
607
|
+
"div",
|
|
556
608
|
{
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
609
|
+
className: "",
|
|
610
|
+
style: {
|
|
611
|
+
display: currentTab === "booking_list" ? "block" : "none"
|
|
612
|
+
}
|
|
561
613
|
},
|
|
562
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
614
|
+
/* @__PURE__ */ import_react.default.createElement(import_BookingList.default, { items })
|
|
615
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
616
|
+
"div",
|
|
617
|
+
{
|
|
618
|
+
className: "",
|
|
619
|
+
style: {
|
|
620
|
+
display: currentTab === "batch_edit" ? "block" : "none"
|
|
568
621
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
label: import_utils.locales.getText("pisell2.text.price"),
|
|
573
|
-
name: "total",
|
|
574
|
-
rules: [{ required: true }],
|
|
575
|
-
extra: useTotal !== ((_f2 = (_e2 = state.service.cacheItem) == null ? void 0 : _e2._extend) == null ? void 0 : _f2.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
|
|
576
|
-
(0, import_utils.formatAmount)(
|
|
577
|
-
(_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total,
|
|
578
|
-
2,
|
|
579
|
-
state.amountSymbol
|
|
580
|
-
),
|
|
581
|
-
(0, import_utils.formatAmount)(useTotal, 2, state.amountSymbol)
|
|
582
|
-
)
|
|
583
|
-
},
|
|
584
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
585
|
-
import_materials.PisellAdjustPriceInputNumber,
|
|
586
|
-
{
|
|
587
|
-
style: { width: "100%" },
|
|
588
|
-
min: 0,
|
|
589
|
-
precision: 2,
|
|
590
|
-
prefix: state.amountSymbol,
|
|
591
|
-
disabled: state.channelDisabledEdit,
|
|
592
|
-
originValue: ((_j2 = (_i2 = state.service.cacheItem) == null ? void 0 : _i2._extend) == null ? void 0 : _j2.origin_total) || 0,
|
|
593
|
-
placeholder: ((_l2 = (_k2 = state.service.cacheItem) == null ? void 0 : _k2._extend) == null ? void 0 : _l2.origin_total) || "0"
|
|
594
|
-
}
|
|
595
|
-
)
|
|
596
|
-
)), isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
597
|
-
import_antd.Form.Item,
|
|
598
|
-
{
|
|
599
|
-
label: import_utils.locales.getText("pisell2.text.discount-reason"),
|
|
600
|
-
name: "discount_reason"
|
|
601
|
-
},
|
|
602
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
|
603
|
-
)) : null, showResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
604
|
-
import_antd.Form.Item,
|
|
622
|
+
},
|
|
623
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_materials.Page, null, /* @__PURE__ */ import_react.default.createElement(
|
|
624
|
+
import_antd.Form,
|
|
605
625
|
{
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
rules: [{ required: true }]
|
|
626
|
+
layout: "vertical",
|
|
627
|
+
form,
|
|
628
|
+
onFinish,
|
|
629
|
+
onValuesChange
|
|
611
630
|
},
|
|
612
|
-
|
|
613
|
-
|
|
631
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_d2 = (_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend) == null ? void 0 : _d2.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !isTerminalBooking && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
|
|
632
|
+
import_collapsibleList.default,
|
|
614
633
|
{
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
timeProps: {
|
|
620
|
-
style: { zoom: 0.8 }
|
|
621
|
-
}
|
|
634
|
+
style: { marginTop: bundles.length ? "8px" : 0 },
|
|
635
|
+
list: bundles,
|
|
636
|
+
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
|
622
637
|
}
|
|
623
|
-
) :
|
|
624
|
-
|
|
625
|
-
import_antd.Form.Item,
|
|
626
|
-
{
|
|
627
|
-
label: import_utils.locales.getText(
|
|
628
|
-
isDay ? "pisell2.text.end_date" : "pisell2.text.end_time"
|
|
629
|
-
),
|
|
630
|
-
name: "end_date",
|
|
631
|
-
rules: [{ required: true }]
|
|
632
|
-
},
|
|
633
|
-
DateCom("end")
|
|
634
|
-
)) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
635
|
-
import_antd.Form.Item,
|
|
636
|
-
{
|
|
637
|
-
label: import_utils.locales.getText("pisell2.text.duration"),
|
|
638
|
-
name: "duration",
|
|
639
|
-
rules: [{ required: true }]
|
|
640
|
-
},
|
|
641
|
-
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
|
642
|
-
)), isDay && (holderLists == null ? void 0 : holderLists.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
643
|
-
import_antd.Form.Item,
|
|
644
|
-
{
|
|
645
|
-
label: import_utils.locales.getText("pisell2.text.holder"),
|
|
646
|
-
name: "holder_id",
|
|
647
|
-
rules: [{ required: true }]
|
|
648
|
-
},
|
|
649
|
-
/* @__PURE__ */ import_react.default.createElement(import_holder.default, { size: "large" })
|
|
650
|
-
)) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
651
|
-
import_antd.Form.Item,
|
|
652
|
-
{
|
|
653
|
-
required: true,
|
|
654
|
-
label: import_utils.locales.getText("pisell2.text.resource")
|
|
655
|
-
},
|
|
656
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, /* @__PURE__ */ import_react.default.createElement(
|
|
657
|
-
import_antd.Button,
|
|
638
|
+
)))), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
639
|
+
import_antd.Form.Item,
|
|
658
640
|
{
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
641
|
+
label: import_utils.locales.getText("pisell2.text.price"),
|
|
642
|
+
name: "total",
|
|
643
|
+
rules: [{ required: true }],
|
|
644
|
+
extra: useTotal !== ((_f2 = (_e2 = state.service.cacheItem) == null ? void 0 : _e2._extend) == null ? void 0 : _f2.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
|
|
645
|
+
(0, import_utils.formatAmount)(
|
|
646
|
+
(_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total,
|
|
647
|
+
2,
|
|
648
|
+
state.amountSymbol
|
|
649
|
+
),
|
|
650
|
+
(0, import_utils.formatAmount)(useTotal, 2, state.amountSymbol)
|
|
651
|
+
)
|
|
666
652
|
},
|
|
667
653
|
/* @__PURE__ */ import_react.default.createElement(
|
|
668
|
-
|
|
654
|
+
import_materials.PisellAdjustPriceInputNumber,
|
|
669
655
|
{
|
|
670
|
-
|
|
656
|
+
style: { width: "100%" },
|
|
657
|
+
min: 0,
|
|
658
|
+
precision: 2,
|
|
659
|
+
prefix: state.amountSymbol,
|
|
660
|
+
disabled: state.channelDisabledEdit,
|
|
661
|
+
originValue: ((_j2 = (_i2 = state.service.cacheItem) == null ? void 0 : _i2._extend) == null ? void 0 : _j2.origin_total) || 0,
|
|
662
|
+
placeholder: ((_l2 = (_k2 = state.service.cacheItem) == null ? void 0 : _k2._extend) == null ? void 0 : _l2.origin_total) || "0"
|
|
671
663
|
}
|
|
672
664
|
)
|
|
673
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
665
|
+
)), isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
666
|
+
import_antd.Form.Item,
|
|
667
|
+
{
|
|
668
|
+
label: import_utils.locales.getText(
|
|
669
|
+
"pisell2.text.discount-reason"
|
|
670
|
+
),
|
|
671
|
+
name: "discount_reason"
|
|
672
|
+
},
|
|
673
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
|
674
|
+
)) : null, showResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
674
675
|
import_antd.Form.Item,
|
|
675
676
|
{
|
|
676
|
-
|
|
677
|
-
|
|
677
|
+
label: import_utils.locales.getText(
|
|
678
|
+
isDayBookingMode ? "pisell2.text.start_date" : "pisell2.text.start_time"
|
|
679
|
+
),
|
|
680
|
+
name: isDayBookingMode ? "start_date" : "start_time",
|
|
678
681
|
rules: [{ required: true }]
|
|
679
682
|
},
|
|
680
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
681
|
-
|
|
683
|
+
isDayBookingMode ? DateCom("start") : SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
684
|
+
SelectTime,
|
|
682
685
|
{
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
686
|
+
slice: (_p2 = (_o2 = (_n2 = (_m2 = state.bookingConfig) == null ? void 0 : _m2.config) == null ? void 0 : _n2.basic) == null ? void 0 : _o2.service_time) == null ? void 0 : _p2.value,
|
|
687
|
+
timePickerProps: {
|
|
688
|
+
style: { width: "100%" }
|
|
689
|
+
},
|
|
690
|
+
timeProps: {
|
|
691
|
+
style: { zoom: 0.8 }
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
) : null
|
|
695
|
+
)), isDayBookingMode ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
696
|
+
import_antd.Form.Item,
|
|
697
|
+
{
|
|
698
|
+
label: import_utils.locales.getText(
|
|
699
|
+
isDayBookingMode ? "pisell2.text.end_date" : "pisell2.text.end_time"
|
|
700
|
+
),
|
|
701
|
+
name: "end_date",
|
|
702
|
+
rules: [{ required: true }]
|
|
703
|
+
},
|
|
704
|
+
DateCom("end")
|
|
705
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
706
|
+
import_antd.Form.Item,
|
|
707
|
+
{
|
|
708
|
+
label: import_utils.locales.getText("pisell2.text.duration"),
|
|
709
|
+
name: "duration",
|
|
710
|
+
rules: [{ required: true }]
|
|
711
|
+
},
|
|
712
|
+
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
|
713
|
+
)), isDayBookingMode && (holderLists == null ? void 0 : holderLists.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
714
|
+
import_antd.Form.Item,
|
|
715
|
+
{
|
|
716
|
+
label: import_utils.locales.getText("pisell2.text.holder"),
|
|
717
|
+
name: "holder_id",
|
|
718
|
+
rules: [{ required: true }]
|
|
719
|
+
},
|
|
720
|
+
/* @__PURE__ */ import_react.default.createElement(import_holder.default, { size: "large" })
|
|
721
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
722
|
+
import_antd.Form.Item,
|
|
723
|
+
{
|
|
724
|
+
required: true,
|
|
725
|
+
label: import_utils.locales.getText("pisell2.text.resource")
|
|
726
|
+
},
|
|
727
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, /* @__PURE__ */ import_react.default.createElement(
|
|
728
|
+
import_antd.Button,
|
|
729
|
+
{
|
|
730
|
+
className: "resource-col-like-wrap",
|
|
731
|
+
disabled: !useResource,
|
|
732
|
+
onClick: () => {
|
|
733
|
+
handleLikeResource(
|
|
734
|
+
useLikeStatus === "like" ? "common" : "like"
|
|
735
|
+
);
|
|
691
736
|
}
|
|
692
737
|
},
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
738
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
739
|
+
import_like.default,
|
|
740
|
+
{
|
|
741
|
+
status: useLikeStatus
|
|
742
|
+
}
|
|
698
743
|
)
|
|
699
|
-
)
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
744
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
745
|
+
import_antd.Form.Item,
|
|
746
|
+
{
|
|
747
|
+
name: "resource",
|
|
748
|
+
noStyle: true,
|
|
749
|
+
rules: [{ required: true }]
|
|
750
|
+
},
|
|
751
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
752
|
+
import_antd.Select,
|
|
753
|
+
{
|
|
754
|
+
loading: resourceLoading,
|
|
755
|
+
size: "large",
|
|
756
|
+
allowClear: true,
|
|
757
|
+
showSearch: true,
|
|
758
|
+
open: selectOpen,
|
|
759
|
+
onDropdownVisibleChange: setSelectOpen,
|
|
760
|
+
filterOption: (str, option) => {
|
|
761
|
+
return (option.labelText || "").toLowerCase().includes((str || "").toLowerCase());
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
renderOptions(
|
|
765
|
+
state.service.resources || [],
|
|
766
|
+
"form_record_id",
|
|
767
|
+
"label",
|
|
768
|
+
"resource"
|
|
769
|
+
)
|
|
770
|
+
)
|
|
771
|
+
))
|
|
772
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "like_status" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null))), isDayBookingMode && !(0, import_utils5.isDayBookingProduct)(state.service.cacheItem, state) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
773
|
+
import_antd.Form.Item,
|
|
710
774
|
{
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
775
|
+
label: import_utils.locales.getText("pisell2.text.quantity"),
|
|
776
|
+
name: "quantity",
|
|
777
|
+
rules: [{ required: true }]
|
|
778
|
+
},
|
|
779
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
780
|
+
import_antd.InputNumber,
|
|
781
|
+
{
|
|
782
|
+
size: "large",
|
|
783
|
+
style: { width: "100%" },
|
|
784
|
+
min: 1,
|
|
785
|
+
max: 999999,
|
|
786
|
+
formatter: (value) => {
|
|
787
|
+
if (value !== void 0) {
|
|
788
|
+
return Math.floor(value);
|
|
789
|
+
}
|
|
790
|
+
return value;
|
|
718
791
|
}
|
|
719
|
-
return value;
|
|
720
792
|
}
|
|
793
|
+
)
|
|
794
|
+
)) : null)
|
|
795
|
+
)), showResource && errorList.map((d, i) => {
|
|
796
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
797
|
+
import_antd.Alert,
|
|
798
|
+
{
|
|
799
|
+
key: d.type,
|
|
800
|
+
message: d.label,
|
|
801
|
+
type: "warning",
|
|
802
|
+
showIcon: true,
|
|
803
|
+
style: { marginBottom: 12 }
|
|
721
804
|
}
|
|
722
|
-
)
|
|
723
|
-
))
|
|
724
|
-
)
|
|
725
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
726
|
-
import_antd.Alert,
|
|
727
|
-
{
|
|
728
|
-
key: d.type,
|
|
729
|
-
message: d.label,
|
|
730
|
-
type: "warning",
|
|
731
|
-
showIcon: true,
|
|
732
|
-
style: { marginBottom: 12 }
|
|
733
|
-
}
|
|
734
|
-
);
|
|
735
|
-
}), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
805
|
+
);
|
|
806
|
+
}))
|
|
807
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
736
808
|
"div",
|
|
737
809
|
{
|
|
738
810
|
className: "pisell-lowcode__booking-service-delete-wrap",
|
|
@@ -755,17 +827,17 @@ var Info = (_, ref) => {
|
|
|
755
827
|
}, [
|
|
756
828
|
state.service.changeService,
|
|
757
829
|
state.service.editModal,
|
|
758
|
-
(
|
|
830
|
+
(_w = state.service.cacheItem) == null ? void 0 : _w.autoClose,
|
|
759
831
|
import_utils.locales,
|
|
760
|
-
(
|
|
832
|
+
(_z = (_y = (_x = state.service) == null ? void 0 : _x.cacheItem) == null ? void 0 : _y._extend) == null ? void 0 : _z.product_name,
|
|
761
833
|
bundles,
|
|
762
834
|
state.amountSymbol,
|
|
763
835
|
state.channelDisabledEdit,
|
|
764
|
-
(
|
|
836
|
+
(_B = (_A = state.service.cacheItem) == null ? void 0 : _A._extend) == null ? void 0 : _B.origin_total,
|
|
765
837
|
isDiscount,
|
|
766
838
|
isReason,
|
|
767
839
|
state.renderType,
|
|
768
|
-
(
|
|
840
|
+
(_F = (_E = (_D = (_C = state.bookingConfig) == null ? void 0 : _C.config) == null ? void 0 : _D.basic) == null ? void 0 : _E.service_time) == null ? void 0 : _F.value,
|
|
769
841
|
SelectTime,
|
|
770
842
|
durationProps,
|
|
771
843
|
timeObj,
|
|
@@ -779,7 +851,10 @@ var Info = (_, ref) => {
|
|
|
779
851
|
useStartDate,
|
|
780
852
|
useEndDate,
|
|
781
853
|
showResource,
|
|
782
|
-
holderLists
|
|
854
|
+
holderLists,
|
|
855
|
+
multiDayPrices,
|
|
856
|
+
currentTab,
|
|
857
|
+
items
|
|
783
858
|
]);
|
|
784
859
|
};
|
|
785
860
|
var editService_default = (0, import_react.forwardRef)(Info);
|