@pisell/pisellos 0.10.7 → 0.10.8
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/dist/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +12 -10
- package/dist/modules/Order/index.d.ts +12 -5
- package/dist/modules/Order/index.js +310 -210
- package/dist/modules/Order/types.d.ts +26 -3
- package/dist/modules/Order/types.js +11 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.d.ts +45 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.js +227 -0
- package/dist/modules/Rules/index.js +125 -52
- package/dist/modules/SalesSummary/utils.js +7 -1
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +810 -729
- package/dist/server/modules/order/index.d.ts +1 -0
- package/dist/server/modules/order/index.js +9 -2
- package/dist/server/modules/order/types.d.ts +1 -1
- package/dist/solution/BaseSales/index.d.ts +15 -5
- package/dist/solution/BaseSales/index.js +211 -159
- package/dist/solution/BaseSales/utils/cartPromotion.js +26 -3
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/dist/solution/BaseSales/utils.js +31 -20
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +1 -4
- package/dist/solution/BookingTicket/types.d.ts +3 -0
- package/dist/solution/BookingTicket/utils/cartView.js +44 -32
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +16 -2
- package/dist/solution/ScanOrder/utils.js +31 -20
- package/dist/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/dist/solution/UnifiedBookingSales/index.js +51 -39
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -1
- package/lib/modules/Order/index.d.ts +12 -5
- package/lib/modules/Order/index.js +148 -43
- package/lib/modules/Order/types.d.ts +26 -3
- package/lib/modules/Order/utils/discountProductLineIdentity.d.ts +45 -0
- package/lib/modules/Order/utils/discountProductLineIdentity.js +170 -0
- package/lib/modules/Rules/index.js +100 -20
- package/lib/modules/SalesSummary/utils.js +5 -1
- package/lib/server/index.d.ts +6 -0
- package/lib/server/index.js +51 -0
- package/lib/server/modules/order/index.d.ts +1 -0
- package/lib/server/modules/order/index.js +9 -3
- package/lib/server/modules/order/types.d.ts +1 -1
- package/lib/solution/BaseSales/index.d.ts +15 -5
- package/lib/solution/BaseSales/index.js +64 -16
- package/lib/solution/BaseSales/utils/cartPromotion.js +26 -2
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/lib/solution/BaseSales/utils.js +29 -18
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +1 -4
- package/lib/solution/BookingTicket/types.d.ts +3 -0
- package/lib/solution/BookingTicket/utils/cartView.js +43 -30
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/Sales/index.js +15 -3
- package/lib/solution/ScanOrder/utils.js +29 -18
- package/lib/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/lib/solution/UnifiedBookingSales/index.js +35 -26
- package/package.json +1 -1
|
@@ -523,6 +523,14 @@ var UnifiedBookingSalesImpl = class extends import_BookingTicket.BookingTicket {
|
|
|
523
523
|
cacheKey: ["sessionState"]
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
|
+
/**
|
|
527
|
+
* 清除当前 cacheId 的可恢复订单快照,同时保留 Solution UI sessionState。
|
|
528
|
+
* 用于支付跳转等终态场景,避免浏览器返回时恢复已提交订单。
|
|
529
|
+
*/
|
|
530
|
+
clearSessionStorageOrderSnapshot() {
|
|
531
|
+
var _a, _b;
|
|
532
|
+
(_b = (_a = this.store.order) == null ? void 0 : _a.clearSessionStoragePersistedTempOrder) == null ? void 0 : _b.call(_a);
|
|
533
|
+
}
|
|
526
534
|
/**
|
|
527
535
|
* Kiosk 不能把已收款订单留在本地等待重试:默认直接等待云端 checkout。
|
|
528
536
|
* 兼容仍需要 WebPOS 待同步模式的入口可显式传 checkoutSyncTaskEnabled: true。
|
|
@@ -806,32 +814,33 @@ var UnifiedBookingSalesImpl = class extends import_BookingTicket.BookingTicket {
|
|
|
806
814
|
* Read-only compatibility view for salesSdk skins. It reconnects a booking to its product but
|
|
807
815
|
* must not be used to mutate tempOrder; all writes go through BaseSales / planner APIs.
|
|
808
816
|
*/
|
|
809
|
-
getCart() {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
}
|
|
817
|
+
// getCart(): BookingTicketCartView {
|
|
818
|
+
// const tempOrder = this.getTempOrder();
|
|
819
|
+
// const salesDetail = this.getSalesOrder();
|
|
820
|
+
// const items = tempOrder?.products || [];
|
|
821
|
+
// const bookings = salesDetail?.bookings || tempOrder?.bookings || [];
|
|
822
|
+
// return {
|
|
823
|
+
// items,
|
|
824
|
+
// bookings: bookings.map((booking: any) => {
|
|
825
|
+
// const productUid = booking?.product_uid;
|
|
826
|
+
// const product = productUid
|
|
827
|
+
// ? items.find((item: any) => {
|
|
828
|
+
// const uid = item?.metadata?.unique_identification_number || item?.unique_identification_number;
|
|
829
|
+
// return String(uid || '') === String(productUid);
|
|
830
|
+
// }) || null
|
|
831
|
+
// : null;
|
|
832
|
+
// return {
|
|
833
|
+
// ...booking,
|
|
834
|
+
// _extend: {
|
|
835
|
+
// ...(booking?._extend || {}),
|
|
836
|
+
// product,
|
|
837
|
+
// addTimeProduct: [],
|
|
838
|
+
// canAddTime: false,
|
|
839
|
+
// },
|
|
840
|
+
// };
|
|
841
|
+
// }),
|
|
842
|
+
// };
|
|
843
|
+
// }
|
|
835
844
|
/**
|
|
836
845
|
* Loads the current customer's product coupons and discount cards after planner lines exist,
|
|
837
846
|
* then optionally lets the existing Rules engine select the best valid combination. This is a
|