@pisell/private-materials 6.6.32 → 6.6.34
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/voucher/index.js +4 -6
- package/es/components/booking/components/voucher/utils.d.ts +1 -0
- package/es/components/booking/components/voucher/utils.js +8 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service2/Group/utils.js +8 -6
- package/es/components/booking/info2/service/editService/DiscountChangeModal/index.d.ts +25 -0
- package/es/components/booking/info2/service/editService/DiscountChangeModal/index.js +61 -0
- package/es/components/booking/info2/service/editService/DiscountChangeModal/index.less +41 -0
- package/es/components/booking/info2/service/editService/index.js +144 -35
- package/es/components/booking/info2/service/editService/utils.d.ts +6 -0
- package/es/components/booking/info2/service/editService/utils.js +21 -0
- package/es/components/booking/locales.d.ts +36 -0
- package/es/components/booking/locales.js +42 -3
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/voucher/index.js +3 -3
- package/lib/components/booking/components/voucher/utils.d.ts +1 -0
- package/lib/components/booking/components/voucher/utils.js +10 -2
- 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/service2/Group/utils.js +3 -2
- package/lib/components/booking/info2/service/editService/DiscountChangeModal/index.d.ts +25 -0
- package/lib/components/booking/info2/service/editService/DiscountChangeModal/index.js +64 -0
- package/lib/components/booking/info2/service/editService/DiscountChangeModal/index.less +41 -0
- package/lib/components/booking/info2/service/editService/index.js +95 -13
- package/lib/components/booking/info2/service/editService/utils.d.ts +6 -0
- package/lib/components/booking/info2/service/editService/utils.js +11 -0
- package/lib/components/booking/locales.d.ts +36 -0
- package/lib/components/booking/locales.js +42 -3
- 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/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/package.json +3 -3
|
@@ -61,6 +61,8 @@ var import_EditTabs = __toESM(require("../../../info/service/editService/EditTab
|
|
|
61
61
|
var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
|
|
62
62
|
var import_dayjs = __toESM(require("dayjs"));
|
|
63
63
|
var import_utils9 = require("../../../info/service2/Group/utils");
|
|
64
|
+
var import_useShopDiscountModule = require("../../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
65
|
+
var import_DiscountChangeModal = __toESM(require("./DiscountChangeModal"));
|
|
64
66
|
var submitLock = false;
|
|
65
67
|
var Info = (_, ref) => {
|
|
66
68
|
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, _G, _H, _I, _J, _K;
|
|
@@ -74,12 +76,17 @@ var Info = (_, ref) => {
|
|
|
74
76
|
const useNote = import_antd.Form.useWatch("note", form);
|
|
75
77
|
const useStartDate = import_antd.Form.useWatch("start_date", form);
|
|
76
78
|
const useEndDate = import_antd.Form.useWatch("end_date", form);
|
|
79
|
+
const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
|
|
80
|
+
const [discountChangeModalOpen, setDiscountChangeModalOpen] = (0, import_react.useState)(false);
|
|
77
81
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
78
82
|
const resourcesRef = (0, import_react.useRef)(null);
|
|
79
83
|
const isChangeTotal = (0, import_react.useRef)(false);
|
|
80
84
|
const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
|
|
81
85
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
82
86
|
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
87
|
+
const valuesRef = (0, import_react.useRef)({});
|
|
88
|
+
const noInOriginalDiscountIdsRef = (0, import_react.useRef)([]);
|
|
89
|
+
const isEditedRef = (0, import_react.useRef)(false);
|
|
83
90
|
(0, import_react.useEffect)(() => {
|
|
84
91
|
window.openBookingEditModal = () => {
|
|
85
92
|
setOpen(true);
|
|
@@ -198,8 +205,38 @@ var Info = (_, ref) => {
|
|
|
198
205
|
}
|
|
199
206
|
form.setFieldsValue({ discount });
|
|
200
207
|
};
|
|
201
|
-
const
|
|
202
|
-
|
|
208
|
+
const onFinishBefore = (values) => {
|
|
209
|
+
if (!isEditedRef.current) {
|
|
210
|
+
onFinish(values);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
valuesRef.current = values;
|
|
214
|
+
const originalDiscountList = shopDiscount.getDiscountList();
|
|
215
|
+
const productAllDiscountList = (0, import_utils8.getProductAllDiscountList)(state.service.cacheItem);
|
|
216
|
+
const noInOriginalDiscountList = productAllDiscountList.filter((item) => {
|
|
217
|
+
return !originalDiscountList.some((d) => {
|
|
218
|
+
var _a2;
|
|
219
|
+
return !d.isEditMode && d.id === ((_a2 = item == null ? void 0 : item.discount) == null ? void 0 : _a2.resource_id);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
const isSomeDiscountNotInOriginalDiscountList = noInOriginalDiscountList.length > 0;
|
|
223
|
+
if (isSomeDiscountNotInOriginalDiscountList) {
|
|
224
|
+
noInOriginalDiscountIdsRef.current = noInOriginalDiscountList.map((item) => {
|
|
225
|
+
var _a2;
|
|
226
|
+
return (_a2 = item == null ? void 0 : item.discount) == null ? void 0 : _a2.resource_id;
|
|
227
|
+
});
|
|
228
|
+
setDiscountChangeModalOpen(true);
|
|
229
|
+
} else {
|
|
230
|
+
let cacheItem = { ...state.service.cacheItem };
|
|
231
|
+
cacheItem = deleteDiscountList(cacheItem);
|
|
232
|
+
onFinish(values, cacheItem);
|
|
233
|
+
if (!!(productAllDiscountList == null ? void 0 : productAllDiscountList.length)) {
|
|
234
|
+
import_antd.message.success(import_utils.locales.getText("pisell2.text.edit-service-success"));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
const onFinish = (values, cacheItem) => {
|
|
239
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
|
|
203
240
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
204
241
|
if (isShowTimeAndResource && !isSuccess) {
|
|
205
242
|
return;
|
|
@@ -213,7 +250,7 @@ var Info = (_, ref) => {
|
|
|
213
250
|
}, 1500);
|
|
214
251
|
let _list = [...state.service.value];
|
|
215
252
|
let _item = {
|
|
216
|
-
...state.service.cacheItem,
|
|
253
|
+
...cacheItem ?? state.service.cacheItem,
|
|
217
254
|
autoClose: false
|
|
218
255
|
};
|
|
219
256
|
let _extend = {
|
|
@@ -260,23 +297,27 @@ var Info = (_, ref) => {
|
|
|
260
297
|
}
|
|
261
298
|
let _id = _item == null ? void 0 : _item._id;
|
|
262
299
|
let groupId = (_h2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _h2.groupId;
|
|
300
|
+
const origin_total = (_l2 = (_k2 = (_j2 = (_i2 = _item._extend) == null ? void 0 : _i2.items) == null ? void 0 : _j2[0]) == null ? void 0 : _k2._extend) == null ? void 0 : _l2.origin_total;
|
|
301
|
+
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
302
|
+
newTotal: values.total,
|
|
303
|
+
origin_total: origin_total ?? ((_m2 = _item._extend) == null ? void 0 : _m2.origin_total)
|
|
304
|
+
});
|
|
263
305
|
if (groupId) {
|
|
306
|
+
if (isChangeTotal.current) {
|
|
307
|
+
_item = deleteDiscountList(_item);
|
|
308
|
+
}
|
|
264
309
|
_list = _list.filter((d) => {
|
|
265
310
|
var _a3;
|
|
266
311
|
return ((_a3 = d._extend) == null ? void 0 : _a3.groupId) !== groupId;
|
|
267
312
|
});
|
|
268
313
|
_list = _list.concat((0, import_utils9.createBookingItemsByGroup)(_item, true));
|
|
269
314
|
} else {
|
|
270
|
-
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
271
|
-
newTotal: values.total,
|
|
272
|
-
origin_total: (_i2 = _item._extend) == null ? void 0 : _i2.origin_total
|
|
273
|
-
});
|
|
274
315
|
if (!_list.some((d) => d._id === _id)) {
|
|
275
316
|
const detail = (0, import_utils3.addService)(_list, _item, state);
|
|
276
317
|
_list = detail.list;
|
|
277
318
|
} else {
|
|
278
319
|
if (isChangeTotal.current) {
|
|
279
|
-
|
|
320
|
+
_item = deleteDiscountList(_item);
|
|
280
321
|
}
|
|
281
322
|
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
282
323
|
}
|
|
@@ -284,7 +325,7 @@ var Info = (_, ref) => {
|
|
|
284
325
|
(0, import_utils6.deleteCacheParams)();
|
|
285
326
|
console.log("_onFinish", _list);
|
|
286
327
|
form.resetFields();
|
|
287
|
-
if (!!((
|
|
328
|
+
if (!!((_n2 = state.service.cacheItem) == null ? void 0 : _n2.new)) {
|
|
288
329
|
window.dispatchEvent(
|
|
289
330
|
new CustomEvent("onAddNewService", {
|
|
290
331
|
detail: {
|
|
@@ -293,7 +334,7 @@ var Info = (_, ref) => {
|
|
|
293
334
|
})
|
|
294
335
|
);
|
|
295
336
|
}
|
|
296
|
-
(
|
|
337
|
+
(_o2 = window.closeBookingEditModal) == null ? void 0 : _o2.call(window);
|
|
297
338
|
_list.sort((a, b) => {
|
|
298
339
|
var _a3, _b3;
|
|
299
340
|
const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
@@ -330,6 +371,7 @@ var Info = (_, ref) => {
|
|
|
330
371
|
console.log("setEditDatasetEditData", _cacheItem, open2);
|
|
331
372
|
setCurrentTab("batch_edit");
|
|
332
373
|
isChangeTotal.current = false;
|
|
374
|
+
isEditedRef.current = false;
|
|
333
375
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
|
334
376
|
let values = cacheItem._extend;
|
|
335
377
|
const startTime2 = performance.now();
|
|
@@ -473,7 +515,8 @@ var Info = (_, ref) => {
|
|
|
473
515
|
}
|
|
474
516
|
},
|
|
475
517
|
callback: (e2, extension_type, detail) => {
|
|
476
|
-
var _a3;
|
|
518
|
+
var _a3, _b3;
|
|
519
|
+
isEditedRef.current = true;
|
|
477
520
|
const _detail = detail || item;
|
|
478
521
|
const other = JSON.parse(JSON.stringify(e2));
|
|
479
522
|
other.session = e2.session;
|
|
@@ -512,6 +555,7 @@ var Info = (_, ref) => {
|
|
|
512
555
|
}, 200);
|
|
513
556
|
}
|
|
514
557
|
cacheItem._extend.origin_total = _total;
|
|
558
|
+
(((_a3 = cacheItem._extend) == null ? void 0 : _a3.items) || []).forEach((item2) => item2._extend.origin_total = _total);
|
|
515
559
|
dispatch({
|
|
516
560
|
type: "setService",
|
|
517
561
|
payload: {
|
|
@@ -520,7 +564,7 @@ var Info = (_, ref) => {
|
|
|
520
564
|
});
|
|
521
565
|
form.setFieldsValue({
|
|
522
566
|
total: _total,
|
|
523
|
-
capacity: (
|
|
567
|
+
capacity: (_b3 = cacheItem._extend) == null ? void 0 : _b3.capacity,
|
|
524
568
|
quantity: (e2 == null ? void 0 : e2.quantity) || (values == null ? void 0 : values.quantity) || 1
|
|
525
569
|
});
|
|
526
570
|
}
|
|
@@ -947,6 +991,35 @@ var Info = (_, ref) => {
|
|
|
947
991
|
}
|
|
948
992
|
}
|
|
949
993
|
};
|
|
994
|
+
const deleteDiscountList = (cacheItem) => {
|
|
995
|
+
var _a2, _b2, _c2;
|
|
996
|
+
delete cacheItem.discount_list;
|
|
997
|
+
(_c2 = (_b2 = (_a2 = cacheItem._extend.other) == null ? void 0 : _a2.bundle) == null ? void 0 : _b2.forEach) == null ? void 0 : _c2.call(_b2, (bundle) => {
|
|
998
|
+
bundle == null ? true : delete bundle.discount_list;
|
|
999
|
+
bundle == null ? true : delete bundle.booking_id;
|
|
1000
|
+
bundle == null ? true : delete bundle.bundle_selling_price;
|
|
1001
|
+
bundle == null ? true : delete bundle.bundle_payment_price;
|
|
1002
|
+
});
|
|
1003
|
+
return cacheItem;
|
|
1004
|
+
};
|
|
1005
|
+
const handleKeepOriginal = () => {
|
|
1006
|
+
setDiscountChangeModalOpen(false);
|
|
1007
|
+
};
|
|
1008
|
+
const handleContinue = async () => {
|
|
1009
|
+
let cacheItem = { ...state.service.cacheItem };
|
|
1010
|
+
cacheItem = deleteDiscountList(cacheItem);
|
|
1011
|
+
await shopDiscount.batchSearchByProductIds(noInOriginalDiscountIdsRef.current);
|
|
1012
|
+
onFinish(valuesRef.current, cacheItem);
|
|
1013
|
+
setDiscountChangeModalOpen(false);
|
|
1014
|
+
};
|
|
1015
|
+
const handleRemove = () => {
|
|
1016
|
+
setDiscountChangeModalOpen(false);
|
|
1017
|
+
const cacheItem = deleteDiscountList({ ...state.service.cacheItem });
|
|
1018
|
+
onFinish(valuesRef.current, cacheItem);
|
|
1019
|
+
};
|
|
1020
|
+
const handleCancel = () => {
|
|
1021
|
+
setDiscountChangeModalOpen(false);
|
|
1022
|
+
};
|
|
950
1023
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
951
1024
|
import_drawer.default,
|
|
952
1025
|
{
|
|
@@ -974,7 +1047,7 @@ var Info = (_, ref) => {
|
|
|
974
1047
|
{
|
|
975
1048
|
layout: "vertical",
|
|
976
1049
|
form,
|
|
977
|
-
onFinish,
|
|
1050
|
+
onFinish: onFinishBefore,
|
|
978
1051
|
onValuesChange,
|
|
979
1052
|
style: {
|
|
980
1053
|
display: currentTab === "batch_edit" ? "block" : "none"
|
|
@@ -992,6 +1065,15 @@ var Info = (_, ref) => {
|
|
|
992
1065
|
}
|
|
993
1066
|
))
|
|
994
1067
|
), footer)
|
|
1068
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
1069
|
+
import_DiscountChangeModal.default,
|
|
1070
|
+
{
|
|
1071
|
+
open: discountChangeModalOpen,
|
|
1072
|
+
onKeepOriginal: handleKeepOriginal,
|
|
1073
|
+
onContinue: handleContinue,
|
|
1074
|
+
onRemove: handleRemove,
|
|
1075
|
+
onCancel: handleCancel
|
|
1076
|
+
}
|
|
995
1077
|
));
|
|
996
1078
|
};
|
|
997
1079
|
var editService_default = (0, import_react.forwardRef)(Info);
|
|
@@ -26,3 +26,9 @@ export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total
|
|
|
26
26
|
newTotal: number;
|
|
27
27
|
origin_total: number;
|
|
28
28
|
}) => any;
|
|
29
|
+
/**
|
|
30
|
+
* 获取商品所有折扣列表 包含子商品
|
|
31
|
+
* @param cacheItem - 缓存的商品项
|
|
32
|
+
* @returns 折扣列表
|
|
33
|
+
*/
|
|
34
|
+
export declare const getProductAllDiscountList: (cacheItem: any) => any;
|
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
32
|
getAutoAllocationStorage: () => getAutoAllocationStorage,
|
|
33
|
+
getProductAllDiscountList: () => getProductAllDiscountList,
|
|
33
34
|
setAutoAllocationStorage: () => setAutoAllocationStorage,
|
|
34
35
|
setProductPrice: () => setProductPrice
|
|
35
36
|
});
|
|
@@ -37,6 +38,7 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
37
38
|
var import_utils = require("@pisell/utils");
|
|
38
39
|
var import_utils2 = require("@pisell/utils");
|
|
39
40
|
var import_decimal = __toESM(require("decimal.js"));
|
|
41
|
+
var import_utils3 = require("../../../components/footer/utils");
|
|
40
42
|
var getAutoAllocationStorage = (id) => {
|
|
41
43
|
const value = localStorage.getItem("resource-auto-allocation");
|
|
42
44
|
if (value) {
|
|
@@ -77,9 +79,18 @@ var setProductPrice = (cacheItem, { newTotal, origin_total }) => {
|
|
|
77
79
|
cacheItem._extend.price = new import_decimal.default(newTotal).sub(subTotal).toNumber();
|
|
78
80
|
return cacheItem;
|
|
79
81
|
};
|
|
82
|
+
var getProductAllDiscountList = (cacheItem) => {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
let discountList = [];
|
|
85
|
+
discountList = cacheItem.discount_list || [];
|
|
86
|
+
const bundleDiscountList = (0, import_utils3.getBundleDiscountList)(((_b = (_a = cacheItem._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []) || [];
|
|
87
|
+
discountList.push(...bundleDiscountList);
|
|
88
|
+
return discountList;
|
|
89
|
+
};
|
|
80
90
|
// Annotate the CommonJS export names for ESM import in node:
|
|
81
91
|
0 && (module.exports = {
|
|
82
92
|
getAutoAllocationStorage,
|
|
93
|
+
getProductAllDiscountList,
|
|
83
94
|
setAutoAllocationStorage,
|
|
84
95
|
setProductPrice
|
|
85
96
|
});
|
|
@@ -314,6 +314,18 @@ declare const _default: {
|
|
|
314
314
|
'pisell2.booking.text.search-placeholder': string;
|
|
315
315
|
'pisell-select-holder-please-select': string;
|
|
316
316
|
'pisell-select-holder-selected': string;
|
|
317
|
+
'pisell2.discount-change.title': string;
|
|
318
|
+
'pisell2.discount-change.desc': string;
|
|
319
|
+
'pisell2.discount-change.reason': string;
|
|
320
|
+
'pisell2.discount-change.options-title': string;
|
|
321
|
+
'pisell2.discount-change.keep-original': string;
|
|
322
|
+
'pisell2.discount-change.keep-original-desc': string;
|
|
323
|
+
'pisell2.discount-change.continue': string;
|
|
324
|
+
'pisell2.discount-change.continue-desc': string;
|
|
325
|
+
'pisell2.discount-change.remove': string;
|
|
326
|
+
'pisell2.discount-change.remove-desc': string;
|
|
327
|
+
'pisell2.discount-change.cancel': string;
|
|
328
|
+
'pisell2.text.edit-service-success': string;
|
|
317
329
|
};
|
|
318
330
|
'zh-CN': {
|
|
319
331
|
'pisell2.text.refunded-amount': string;
|
|
@@ -630,6 +642,18 @@ declare const _default: {
|
|
|
630
642
|
'pisell2.booking.text.search-placeholder': string;
|
|
631
643
|
'pisell-select-holder-please-select': string;
|
|
632
644
|
'pisell-select-holder-selected': string;
|
|
645
|
+
'pisell2.discount-change.title': string;
|
|
646
|
+
'pisell2.discount-change.desc': string;
|
|
647
|
+
'pisell2.discount-change.reason': string;
|
|
648
|
+
'pisell2.discount-change.options-title': string;
|
|
649
|
+
'pisell2.discount-change.keep-original': string;
|
|
650
|
+
'pisell2.discount-change.keep-original-desc': string;
|
|
651
|
+
'pisell2.discount-change.continue': string;
|
|
652
|
+
'pisell2.discount-change.continue-desc': string;
|
|
653
|
+
'pisell2.discount-change.remove': string;
|
|
654
|
+
'pisell2.discount-change.remove-desc': string;
|
|
655
|
+
'pisell2.discount-change.cancel': string;
|
|
656
|
+
'pisell2.text.edit-service-success': string;
|
|
633
657
|
};
|
|
634
658
|
'zh-HK': {
|
|
635
659
|
'pisell2.text.refunded-amount': string;
|
|
@@ -946,6 +970,18 @@ declare const _default: {
|
|
|
946
970
|
'pisell2.booking.text.search-placeholder': string;
|
|
947
971
|
'pisell-select-holder-please-select': string;
|
|
948
972
|
'pisell-select-holder-selected': string;
|
|
973
|
+
'pisell2.discount-change.title': string;
|
|
974
|
+
'pisell2.discount-change.desc': string;
|
|
975
|
+
'pisell2.discount-change.reason': string;
|
|
976
|
+
'pisell2.discount-change.options-title': string;
|
|
977
|
+
'pisell2.discount-change.keep-original': string;
|
|
978
|
+
'pisell2.discount-change.keep-original-desc': string;
|
|
979
|
+
'pisell2.discount-change.continue': string;
|
|
980
|
+
'pisell2.discount-change.continue-desc': string;
|
|
981
|
+
'pisell2.discount-change.remove': string;
|
|
982
|
+
'pisell2.discount-change.remove-desc': string;
|
|
983
|
+
'pisell2.discount-change.cancel': string;
|
|
984
|
+
'pisell2.text.edit-service-success': string;
|
|
949
985
|
};
|
|
950
986
|
};
|
|
951
987
|
export default _default;
|
|
@@ -382,7 +382,20 @@ var locales_default = {
|
|
|
382
382
|
"pisell2.booking.text.contact-info.title": "Contact info",
|
|
383
383
|
"pisell2.booking.text.search-placeholder": "Customers / Contacts / Holder",
|
|
384
384
|
"pisell-select-holder-please-select": "Please Select",
|
|
385
|
-
"pisell-select-holder-selected": "Selected: "
|
|
385
|
+
"pisell-select-holder-selected": "Selected: ",
|
|
386
|
+
// 折扣变更弹窗
|
|
387
|
+
"pisell2.discount-change.title": "Discount No Longer Available — Choose How to Handle",
|
|
388
|
+
"pisell2.discount-change.desc": "The discount previously applied to this order is no longer valid because:",
|
|
389
|
+
"pisell2.discount-change.reason": "The discount has expired, been deactivated, or no longer meets its conditions",
|
|
390
|
+
"pisell2.discount-change.options-title": "Please choose how you would like to continue:",
|
|
391
|
+
"pisell2.discount-change.keep-original": "Keep Original Discount",
|
|
392
|
+
"pisell2.discount-change.keep-original-desc": "Keep the existing discount amount. New or modified items will be charged at full price.",
|
|
393
|
+
"pisell2.discount-change.continue": "Continue Discount",
|
|
394
|
+
"pisell2.discount-change.continue-desc": "Continue using the original discount rate (e.g. 20% off) for this order, even if the campaign has ended.",
|
|
395
|
+
"pisell2.discount-change.remove": "Remove Discount",
|
|
396
|
+
"pisell2.discount-change.remove-desc": "Remove all discounts. All items will be charged at full price.",
|
|
397
|
+
"pisell2.discount-change.cancel": "Cancel",
|
|
398
|
+
"pisell2.text.edit-service-success": "Price updated. Discount recalculated automatically."
|
|
386
399
|
},
|
|
387
400
|
"zh-CN": {
|
|
388
401
|
"pisell2.text.refunded-amount": "已退金额",
|
|
@@ -737,7 +750,20 @@ var locales_default = {
|
|
|
737
750
|
"pisell2.booking.text.contact-info.title": "联系信息",
|
|
738
751
|
"pisell2.booking.text.search-placeholder": "搜索客户/联系信息/持有人",
|
|
739
752
|
"pisell-select-holder-please-select": "请选择",
|
|
740
|
-
"pisell-select-holder-selected": "已选择:"
|
|
753
|
+
"pisell-select-holder-selected": "已选择:",
|
|
754
|
+
// 折扣变更弹窗
|
|
755
|
+
"pisell2.discount-change.title": "商品折扣无法继续使用,请选择处理方式",
|
|
756
|
+
"pisell2.discount-change.desc": "当前订单中使用的商品折扣已失效,可能是因为:",
|
|
757
|
+
"pisell2.discount-change.reason": "折扣已过期、被停用,或条件不再符合",
|
|
758
|
+
"pisell2.discount-change.options-title": "您可以选择以下方式继续:",
|
|
759
|
+
"pisell2.discount-change.keep-original": "保留原折扣",
|
|
760
|
+
"pisell2.discount-change.keep-original-desc": "旧部分保持优惠,新商品按原价。",
|
|
761
|
+
"pisell2.discount-change.continue": "延续折扣",
|
|
762
|
+
"pisell2.discount-change.continue-desc": "可用商品继续按原折扣比例计算(如8折)。",
|
|
763
|
+
"pisell2.discount-change.remove": "移除折扣",
|
|
764
|
+
"pisell2.discount-change.remove-desc": "删除折扣,按原价结算。",
|
|
765
|
+
"pisell2.discount-change.cancel": "取消",
|
|
766
|
+
"pisell2.text.edit-service-success": "价格已调整,折扣已自动重算"
|
|
741
767
|
},
|
|
742
768
|
"zh-HK": {
|
|
743
769
|
"pisell2.text.refunded-amount": "已退金額",
|
|
@@ -1092,6 +1118,19 @@ var locales_default = {
|
|
|
1092
1118
|
"pisell2.booking.text.contact-info.title": "聯繫信息",
|
|
1093
1119
|
"pisell2.booking.text.search-placeholder": "搜索客戶/聯系信息/持有人",
|
|
1094
1120
|
"pisell-select-holder-please-select": "請選擇",
|
|
1095
|
-
"pisell-select-holder-selected": "已選擇:"
|
|
1121
|
+
"pisell-select-holder-selected": "已選擇:",
|
|
1122
|
+
// 折扣變更彈窗
|
|
1123
|
+
"pisell2.discount-change.title": "商品折扣無法繼續使用,請選擇處理方式",
|
|
1124
|
+
"pisell2.discount-change.desc": "當前訂單中使用的商品折扣已失效,可能是因為:",
|
|
1125
|
+
"pisell2.discount-change.reason": "折扣已過期、被停用,或條件不再符合",
|
|
1126
|
+
"pisell2.discount-change.options-title": "您可以選擇以下方式繼續:",
|
|
1127
|
+
"pisell2.discount-change.keep-original": "保留原折扣",
|
|
1128
|
+
"pisell2.discount-change.keep-original-desc": "舊部分保持優惠,新商品按原價。",
|
|
1129
|
+
"pisell2.discount-change.continue": "延續折扣",
|
|
1130
|
+
"pisell2.discount-change.continue-desc": "可用商品繼續按原折扣比例計算(如8折)。",
|
|
1131
|
+
"pisell2.discount-change.remove": "移除折扣",
|
|
1132
|
+
"pisell2.discount-change.remove-desc": "刪除折扣,按原價結算。",
|
|
1133
|
+
"pisell2.discount-change.cancel": "取消",
|
|
1134
|
+
"pisell2.text.edit-service-success": "价格已调整,折扣已自动重算"
|
|
1096
1135
|
}
|
|
1097
1136
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -110,11 +109,4 @@ export declare const walkInData: {
|
|
|
110
109
|
id: number;
|
|
111
110
|
nickname: string;
|
|
112
111
|
};
|
|
113
|
-
export declare const Provider:
|
|
114
|
-
state: FormState;
|
|
115
|
-
} & {
|
|
116
|
-
dispatch: (params: {
|
|
117
|
-
type: string;
|
|
118
|
-
payload: any;
|
|
119
|
-
}) => void;
|
|
120
|
-
}>;
|
|
112
|
+
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;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
302
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "stripe" | "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
|
|
305
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.34",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@use-gesture/react": "^10.3.1",
|
|
64
64
|
"@pisell/utils": "3.0.2",
|
|
65
65
|
"@pisell/materials": "6.6.11",
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
66
|
+
"@pisell/icon": "0.0.11",
|
|
67
|
+
"@pisell/date-picker": "3.0.7"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|