@pisell/private-materials 6.4.41 → 6.4.43
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/actionButtons/index.js +37 -42
- package/es/components/booking/components/actionButtons/index.less +0 -28
- package/es/components/booking/components/footer/amount.d.ts +3 -3
- package/es/components/booking/components/footer/amount.js +13 -2
- package/es/components/booking/components/footer/index.js +168 -68
- package/es/components/booking/components/footer/utils.js +62 -33
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/index.js +2 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +42 -2
- package/es/components/booking/info2/service/addService/index.js +2 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +12 -4
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.d.ts +2 -0
- package/es/components/checkout/PaymentModal.js +395 -240
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +161 -54
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
- package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
- package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/components/WalletPassModule/index.js +3 -2
- package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
- package/es/components/checkout/hooks/useWalletPass.js +2 -0
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +33 -0
- package/es/components/checkout/locales.js +39 -3
- package/es/components/checkout/types.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Cart/Product.js +143 -71
- package/es/components/shoppingCart/components/Cart/index.js +1 -1
- package/es/components/shoppingCart/components/Cart/index.less +31 -0
- package/es/components/shoppingCart/locales.d.ts +3 -0
- package/es/components/shoppingCart/locales.js +12 -3
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/es/components/ticketBooking/utils/index.js +2 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
- package/es/pro/priceKeyboard/index.d.ts +3 -0
- package/es/pro/priceKeyboard/index.js +3 -0
- package/es/pro/priceKeyboard/index.less +215 -0
- package/es/pro/priceKeyboard/utils.d.ts +31 -0
- package/es/pro/priceKeyboard/utils.js +51 -0
- package/es/pro/skuDetailModal/index.js +19 -16
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/actionButtons/index.js +31 -28
- package/lib/components/booking/components/actionButtons/index.less +0 -28
- package/lib/components/booking/components/footer/amount.d.ts +3 -3
- package/lib/components/booking/components/footer/amount.js +10 -4
- package/lib/components/booking/components/footer/index.js +107 -40
- package/lib/components/booking/components/footer/utils.js +35 -7
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/service/addService/index.js +2 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +18 -1
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +12 -4
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.d.ts +2 -0
- package/lib/components/checkout/PaymentModal.js +152 -73
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +114 -40
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
- package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/components/WalletPassModule/index.js +3 -2
- package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
- package/lib/components/checkout/hooks/useWalletPass.js +2 -0
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +33 -0
- package/lib/components/checkout/locales.js +39 -3
- package/lib/components/checkout/types.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
- package/lib/components/shoppingCart/components/Cart/index.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.less +31 -0
- package/lib/components/shoppingCart/locales.d.ts +3 -0
- package/lib/components/shoppingCart/locales.js +6 -3
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/lib/components/ticketBooking/index.js +5 -1
- package/lib/components/ticketBooking/utils/index.js +2 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
- package/lib/pro/priceKeyboard/index.d.ts +3 -0
- package/lib/pro/priceKeyboard/index.js +45 -0
- package/lib/pro/priceKeyboard/index.less +215 -0
- package/lib/pro/priceKeyboard/utils.d.ts +31 -0
- package/lib/pro/priceKeyboard/utils.js +75 -0
- package/lib/pro/skuDetailModal/index.js +18 -22
- package/package.json +3 -3
@@ -48,6 +48,7 @@ var import_utils4 = require("../../info/service2/utils");
|
|
48
48
|
var import_utils5 = require("@pisell/utils");
|
49
49
|
var import_materials = require("@pisell/materials");
|
50
50
|
var import_utils6 = require("../../../../plus/clientName/utils");
|
51
|
+
var import_lodash = require("lodash");
|
51
52
|
var formatNote = (data) => {
|
52
53
|
var _a;
|
53
54
|
return ((_a = data.notes) == null ? void 0 : _a.orderNote) || "";
|
@@ -223,7 +224,7 @@ var formatSellingPrice = (item) => {
|
|
223
224
|
return Number((_a = item._extend) == null ? void 0 : _a.total);
|
224
225
|
};
|
225
226
|
var formatMetaData = (item) => {
|
226
|
-
var _a, _b, _c, _d, _e;
|
227
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
227
228
|
let metadata = {};
|
228
229
|
if ((_a = item._extend) == null ? void 0 : _a.capacity) {
|
229
230
|
metadata.capacity = item._extend.capacity;
|
@@ -237,6 +238,9 @@ var formatMetaData = (item) => {
|
|
237
238
|
if ((_d = item._extend) == null ? void 0 : _d.multiDayPrices) {
|
238
239
|
metadata.multiDayPrices = (_e = item._extend) == null ? void 0 : _e.multiDayPrices;
|
239
240
|
}
|
241
|
+
if ((_f = item._extend) == null ? void 0 : _f.unique_identification_number) {
|
242
|
+
metadata.unique_identification_number = (_g = item._extend) == null ? void 0 : _g.unique_identification_number;
|
243
|
+
}
|
240
244
|
return metadata;
|
241
245
|
};
|
242
246
|
var getSourceProductPrice = (item) => {
|
@@ -258,6 +262,12 @@ var formatProducts = (item, quantity) => {
|
|
258
262
|
const discount_amount = origin_total - total;
|
259
263
|
const discount_list = (item == null ? void 0 : item.discount_list) || [];
|
260
264
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
265
|
+
discount_list.forEach((d) => {
|
266
|
+
d.metadata = {
|
267
|
+
...d.metadata,
|
268
|
+
unique_identification_number: `${item._extend.unique_identification_number}_${d.discount.resource_id}`
|
269
|
+
};
|
270
|
+
});
|
261
271
|
const notManualDiscount = discount_list.filter((item2) => item2.type !== "product");
|
262
272
|
if (item.isCustomItem) {
|
263
273
|
item.product_id = 0;
|
@@ -285,7 +295,8 @@ var formatProducts = (item, quantity) => {
|
|
285
295
|
// checkout 需求新增字段
|
286
296
|
"calculated_original_price": formatOriginalPrice(item),
|
287
297
|
"calculated_selling_price": formatSellingPrice(item),
|
288
|
-
"tax_fee": item._extend.tax_fee
|
298
|
+
"tax_fee": item._extend.tax_fee,
|
299
|
+
"custom_deposit_data": item.custom_deposit_data
|
289
300
|
};
|
290
301
|
};
|
291
302
|
var formatAppointmentProductLists = (data) => {
|
@@ -337,7 +348,7 @@ var formatBookings = (data, values) => {
|
|
337
348
|
const eventOtherParams = data.eventOtherParams;
|
338
349
|
let bookings = [];
|
339
350
|
list.forEach((item) => {
|
340
|
-
var _a, _b, _c, _d;
|
351
|
+
var _a, _b, _c, _d, _e;
|
341
352
|
if (item.isCustomItem) {
|
342
353
|
bookings.push({
|
343
354
|
...item._extend,
|
@@ -366,8 +377,13 @@ var formatBookings = (data, values) => {
|
|
366
377
|
dayParams.holder = formatHolders(data, item, values);
|
367
378
|
dayParams.duration = (0, import_utils3.getDays)({ _extend: { start_date: startDateTime, end_date: endDateTime } }, "minutes");
|
368
379
|
}
|
380
|
+
if (!((_e = item._extend) == null ? void 0 : _e.unique_identification_number)) {
|
381
|
+
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
382
|
+
item._extend.unique_identification_number = unique_identification_number;
|
383
|
+
}
|
369
384
|
const booking = {
|
370
385
|
"product": formatProducts(item),
|
386
|
+
"metadata": formatMetaData(item),
|
371
387
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
372
388
|
"id": item.booking_id || 0,
|
373
389
|
"relation_id": item._extend.relation_id || 0,
|
@@ -384,7 +400,6 @@ var formatBookings = (data, values) => {
|
|
384
400
|
"duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
385
401
|
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
386
402
|
"resources": formatResource(item),
|
387
|
-
"metadata": formatMetaData(item),
|
388
403
|
"note": item._extend.note,
|
389
404
|
...eventOtherParams || {},
|
390
405
|
...dayParams
|
@@ -394,11 +409,14 @@ var formatBookings = (data, values) => {
|
|
394
409
|
return;
|
395
410
|
}
|
396
411
|
for (let i = 0; i < (item._extend.quantity || 1); i++) {
|
412
|
+
const newItem = (0, import_lodash.cloneDeep)(item);
|
413
|
+
newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
|
397
414
|
bookings.push({
|
398
415
|
...booking,
|
399
|
-
"product": formatProducts(
|
400
|
-
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem:
|
401
|
-
"holder": getHolderByIndex(booking.holder, i)
|
416
|
+
"product": formatProducts(newItem, 1),
|
417
|
+
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
|
418
|
+
"holder": getHolderByIndex(booking.holder, i),
|
419
|
+
"metadata": formatMetaData(newItem)
|
402
420
|
});
|
403
421
|
}
|
404
422
|
});
|
@@ -418,6 +436,11 @@ var formatRelationProducts = (data, type) => {
|
|
418
436
|
);
|
419
437
|
let relationProducts = [];
|
420
438
|
relationProducts = list.map((item) => {
|
439
|
+
var _a2;
|
440
|
+
if (!((_a2 = item._extend) == null ? void 0 : _a2.unique_identification_number)) {
|
441
|
+
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
442
|
+
item._extend.unique_identification_number = unique_identification_number;
|
443
|
+
}
|
421
444
|
return formatProducts(item);
|
422
445
|
});
|
423
446
|
return relationProducts || [];
|
@@ -428,6 +451,11 @@ var formatNormalProducts = (data) => {
|
|
428
451
|
list = list.filter((item) => (0, import_utils4.isNormalProductByDurationSchedule)(item));
|
429
452
|
let relationProducts = [];
|
430
453
|
relationProducts = list.map((item) => {
|
454
|
+
var _a2;
|
455
|
+
if (!((_a2 = item._extend) == null ? void 0 : _a2.unique_identification_number)) {
|
456
|
+
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
457
|
+
item._extend.unique_identification_number = unique_identification_number;
|
458
|
+
}
|
431
459
|
return formatProducts(item);
|
432
460
|
});
|
433
461
|
return relationProducts || [];
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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,5 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { FormState } from '../model';
|
1
3
|
export declare const walkInData: {
|
2
4
|
id: number;
|
3
5
|
nickname: string;
|
4
6
|
};
|
5
|
-
export declare const Provider: any, Context:
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
8
|
+
state: FormState;
|
9
|
+
} & {
|
10
|
+
dispatch: (params: {
|
11
|
+
type: string;
|
12
|
+
payload: any;
|
13
|
+
}) => void;
|
14
|
+
}>;
|
@@ -47,6 +47,9 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
|
|
47
47
|
service: { ...state.service, ...payload, ...obj }
|
48
48
|
});
|
49
49
|
},
|
50
|
+
setPaymentPaid(state, payload) {
|
51
|
+
state.setGlobalState({ paymentPaid: { ...state.paymentPaid, ...payload } });
|
52
|
+
},
|
50
53
|
setDate(state, payload) {
|
51
54
|
state.setGlobalState({ date: { ...state.date, ...payload } });
|
52
55
|
},
|
@@ -127,7 +127,8 @@ var Info = (props) => {
|
|
127
127
|
let product = list[0];
|
128
128
|
const detail = await (0, import_serve.getProductDetail)(product.id, {
|
129
129
|
schedule_date: state.date.value.format("YYYY-MM-DD"),
|
130
|
-
customer_id: customerId
|
130
|
+
customer_id: customerId,
|
131
|
+
open_deposit: 1
|
131
132
|
});
|
132
133
|
const isBundleOrCombination = (0, import_utils4.getIsBundleOrCombination)(detail.data);
|
133
134
|
setLoading(false);
|
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
248
248
|
* @Author: WangHan
|
249
249
|
* @Date: 2024-12-24 11:32
|
250
250
|
*/
|
251
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
251
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
@@ -96,6 +96,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
96
96
|
});
|
97
97
|
}
|
98
98
|
}, []);
|
99
|
+
const Toast = (0, import_materials.useToast)();
|
99
100
|
(0, import_react.useMemo)(() => {
|
100
101
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k, _l, _m;
|
101
102
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
@@ -110,6 +111,22 @@ var Info = (0, import_model.Provider)((props) => {
|
|
110
111
|
}
|
111
112
|
});
|
112
113
|
}, [globalState]);
|
114
|
+
const dropdownProps = (0, import_react.useMemo)(() => {
|
115
|
+
const icon = /* @__PURE__ */ import_react.default.createElement(
|
116
|
+
import_materials.Iconfont,
|
117
|
+
{
|
118
|
+
type: "pisell2-switch-horizontal-01",
|
119
|
+
size: 24,
|
120
|
+
style: { color: "#667085" }
|
121
|
+
}
|
122
|
+
);
|
123
|
+
return {
|
124
|
+
buttonProps: {
|
125
|
+
icon,
|
126
|
+
size: "default"
|
127
|
+
}
|
128
|
+
};
|
129
|
+
}, [modal.state]);
|
113
130
|
const addNote = (e) => {
|
114
131
|
modal.dispatch({
|
115
132
|
type: "setNotes",
|
@@ -281,7 +298,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
281
298
|
dispatch: modal.dispatch,
|
282
299
|
source: "info"
|
283
300
|
},
|
284
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(import_cartClientCard.default,
|
301
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(import_cartClientCard.default, { clientCardProps: { dropdown: dropdownProps } })) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
|
285
302
|
"div",
|
286
303
|
{
|
287
304
|
className: "booking-info-client-line-code",
|
@@ -98,7 +98,8 @@ var Info = (props) => {
|
|
98
98
|
setLoading(true);
|
99
99
|
let product = list[0];
|
100
100
|
const detail = await (0, import_serve.getProductDetail)(product.id, {
|
101
|
-
schedule_date: state.date.value.format("YYYY-MM-DD")
|
101
|
+
schedule_date: state.date.value.format("YYYY-MM-DD"),
|
102
|
+
open_deposit: 1
|
102
103
|
});
|
103
104
|
const isBundleOrCombination = (0, import_utils.getIsBundleOrCombination)(detail.data);
|
104
105
|
setLoading(false);
|
@@ -54,6 +54,7 @@ var import_utils6 = require("../../../utils");
|
|
54
54
|
var import_utilsByBooking = require("../../utilsByBooking");
|
55
55
|
var import_utils7 = require("../addService/utils");
|
56
56
|
var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
|
57
|
+
var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
|
57
58
|
var submitLock = false;
|
58
59
|
var Info = (_, ref) => {
|
59
60
|
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;
|
@@ -527,7 +528,7 @@ var Info = (_, ref) => {
|
|
527
528
|
)
|
528
529
|
},
|
529
530
|
/* @__PURE__ */ import_react.default.createElement(
|
530
|
-
|
531
|
+
import_priceKeyboard.DiscountKeyboard.InputNumber,
|
531
532
|
{
|
532
533
|
style: { width: "100%" },
|
533
534
|
min: 0,
|
@@ -535,8 +536,15 @@ var Info = (_, ref) => {
|
|
535
536
|
prefix: state.amountSymbol,
|
536
537
|
onChange: handleTotalChange,
|
537
538
|
disabled: state.channelDisabledEdit,
|
538
|
-
|
539
|
-
placeholder: ((_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total) || "0"
|
539
|
+
originalValue: ((_f2 = (_e2 = state.service.cacheItem) == null ? void 0 : _e2._extend) == null ? void 0 : _f2.origin_total) || 0,
|
540
|
+
placeholder: ((_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total) || "0",
|
541
|
+
size: "large",
|
542
|
+
keyboardProps: {
|
543
|
+
containerProps: {
|
544
|
+
renderType: "modal"
|
545
|
+
},
|
546
|
+
selectType: "dark"
|
547
|
+
}
|
540
548
|
}
|
541
549
|
)
|
542
550
|
));
|
@@ -676,7 +684,7 @@ var Info = (_, ref) => {
|
|
676
684
|
style: { height: "48px", width: "140px" }
|
677
685
|
},
|
678
686
|
import_utils.locales.getText("pisell2.ticket-booking.note"),
|
679
|
-
useNote && /* @__PURE__ */ import_react.default.createElement("span", { className: "note-indicator" }, /* @__PURE__ */ import_react.default.createElement(Iconfont, { type: "pisell2-info-circle2" }))
|
687
|
+
useNote && /* @__PURE__ */ import_react.default.createElement("span", { className: "note-indicator" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-info-circle2" }))
|
680
688
|
)
|
681
689
|
)),
|
682
690
|
/* @__PURE__ */ import_react.default.createElement(
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
export interface FormState {
|
2
3
|
amountSymbol: string;
|
3
4
|
apis: {
|
@@ -105,4 +106,11 @@ export declare const walkInData: {
|
|
105
106
|
id: number;
|
106
107
|
nickname: string;
|
107
108
|
};
|
108
|
-
export declare const Provider: any, Context:
|
109
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
110
|
+
state: FormState;
|
111
|
+
} & {
|
112
|
+
dispatch: (params: {
|
113
|
+
type: string;
|
114
|
+
payload: any;
|
115
|
+
}) => void;
|
116
|
+
}>;
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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
|
+
}>;
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
166
166
|
type: string;
|
167
167
|
value: number;
|
168
|
-
}) => number | {
|
168
|
+
}) => number | "flexible" | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
}
|
171
|
+
};
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -23,6 +23,8 @@ interface PaymentModalProps {
|
|
23
23
|
}
|
24
24
|
interface PaymentModalMainProps extends PaymentModalProps {
|
25
25
|
onClose?: (reset?: boolean) => void;
|
26
|
+
setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
|
27
|
+
editOrderId?: number;
|
26
28
|
}
|
27
29
|
declare const PaymentModal: React.FC<PaymentModalMainProps>;
|
28
30
|
export type { PaymentModalData, PaymentModalProps };
|