@pisell/pisellos 2.2.310 → 2.2.312-vm.0
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/apis/picoding.d.ts.map +1 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/inventory/index.d.ts +92 -0
- package/dist/inventory/index.d.ts.map +1 -0
- package/dist/inventory/index.js +509 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/adapter.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/examples.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/adapter.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/examples.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/adapter.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/examples.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/model/strategy/adapter/promotion/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/example.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/locales.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/utils.d.ts.map +1 -0
- package/dist/model/strategy/engine.d.ts.map +1 -0
- package/dist/model/strategy/index.d.ts.map +1 -0
- package/dist/model/strategy/strategy-example.d.ts.map +1 -0
- package/dist/model/strategy/type.d.ts.map +1 -0
- package/dist/modules/Account/index.d.ts.map +1 -0
- package/dist/modules/Account/types.d.ts.map +1 -0
- package/dist/modules/AccountList/index.d.ts.map +1 -0
- package/dist/modules/AccountList/types.d.ts.map +1 -0
- package/dist/modules/AccountList/utils.d.ts.map +1 -0
- package/dist/modules/BaseModule.d.ts.map +1 -0
- package/dist/modules/BookingContext/index.d.ts.map +1 -0
- package/dist/modules/BookingContext/types.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/flexible.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/index.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/noResource.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/resources.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/timeSlices.d.ts.map +1 -0
- package/dist/modules/Cart/index.d.ts.map +1 -0
- package/dist/modules/Cart/types.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartAccount.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartDate.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartDiscount.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartNote.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartProduct.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartRelationForms.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartResource.d.ts.map +1 -0
- package/dist/modules/Cart/utils/changePrice.d.ts.map +1 -0
- package/dist/modules/Cart/utils/index.d.ts.map +1 -0
- package/dist/modules/Customer/constants.d.ts.map +1 -0
- package/dist/modules/Customer/index.d.ts.map +1 -0
- package/dist/modules/Customer/types.d.ts.map +1 -0
- package/dist/modules/Date/index.d.ts.map +1 -0
- package/dist/modules/Date/types.d.ts.map +1 -0
- package/dist/modules/Date/utils.d.ts.map +1 -0
- package/dist/modules/Discount/availability.d.ts.map +1 -0
- package/dist/modules/Discount/entitlementPass.d.ts.map +1 -0
- package/dist/modules/Discount/index.d.ts.map +1 -0
- package/dist/modules/Discount/index.js +1 -0
- package/dist/modules/Discount/types.d.ts.map +1 -0
- package/dist/modules/Guests/index.d.ts.map +1 -0
- package/dist/modules/Guests/types.d.ts.map +1 -0
- package/dist/modules/Holder/index.d.ts.map +1 -0
- package/dist/modules/Holder/types.d.ts.map +1 -0
- package/dist/modules/Holder/utils.d.ts.map +1 -0
- package/dist/modules/OpenData/index.d.ts.map +1 -0
- package/dist/modules/OpenData/types.d.ts.map +1 -0
- package/dist/modules/OpenData/utils.d.ts.map +1 -0
- package/dist/modules/Order/index.d.ts +25 -3
- package/dist/modules/Order/index.d.ts.map +1 -0
- package/dist/modules/Order/index.js +1647 -1211
- package/dist/modules/Order/payment-utils.d.ts.map +1 -0
- package/dist/modules/Order/salesNotes.d.ts.map +1 -0
- package/dist/modules/Order/types.d.ts +7 -0
- package/dist/modules/Order/types.d.ts.map +1 -0
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts.map +1 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.d.ts.map +1 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.js +2 -2
- package/dist/modules/Order/utils/manualProductDiscount.d.ts.map +1 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts.map +1 -0
- package/dist/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/dist/modules/Order/utils/productVoucherGroups.d.ts.map +1 -0
- package/dist/modules/Order/utils/productVoucherGroups.js +115 -0
- package/dist/modules/Order/utils/virtualSettlement.d.ts.map +1 -0
- package/dist/modules/Order/utils/weighedProduct.d.ts.map +1 -0
- package/dist/modules/Order/utils.d.ts +5 -3
- package/dist/modules/Order/utils.d.ts.map +1 -0
- package/dist/modules/Order/utils.js +32 -11
- package/dist/modules/Payment/cash.d.ts.map +1 -0
- package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts.map +1 -0
- package/dist/modules/Payment/eftpos.d.ts.map +1 -0
- package/dist/modules/Payment/index.d.ts.map +1 -0
- package/dist/modules/Payment/mx51.d.ts.map +1 -0
- package/dist/modules/Payment/types.d.ts.map +1 -0
- package/dist/modules/Payment/utils.d.ts.map +1 -0
- package/dist/modules/Payment/walletpass.d.ts.map +1 -0
- package/dist/modules/Product/index.d.ts.map +1 -0
- package/dist/modules/Product/types.d.ts.map +1 -0
- package/dist/modules/Product/utils.d.ts.map +1 -0
- package/dist/modules/ProductList/clientDataVariants.d.ts.map +1 -0
- package/dist/modules/ProductList/index.d.ts.map +1 -0
- package/dist/modules/ProductList/index.js +33 -12
- package/dist/modules/ProductList/types.d.ts.map +1 -0
- package/dist/modules/Quotation/index.d.ts.map +1 -0
- package/dist/modules/Quotation/types.d.ts.map +1 -0
- package/dist/modules/Resource/index.d.ts.map +1 -0
- package/dist/modules/Resource/types.d.ts.map +1 -0
- package/dist/modules/Resource/utils.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/index.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/localClock.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/planner.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/types.d.ts.map +1 -0
- package/dist/modules/Rules/index.d.ts +2 -0
- package/dist/modules/Rules/index.d.ts.map +1 -0
- package/dist/modules/Rules/index.js +29 -21
- package/dist/modules/Rules/types.d.ts.map +1 -0
- package/dist/modules/SalesSummary/index.d.ts.map +1 -0
- package/dist/modules/SalesSummary/types.d.ts.map +1 -0
- package/dist/modules/SalesSummary/utils.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/index.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/providers/feishu.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/providers/grafana.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/types.d.ts.map +1 -0
- package/dist/modules/Schedule/getDateIsInSchedule.d.ts.map +1 -0
- package/dist/modules/Schedule/index.d.ts.map +1 -0
- package/dist/modules/Schedule/type.d.ts.map +1 -0
- package/dist/modules/Schedule/types.d.ts.map +1 -0
- package/dist/modules/Schedule/utils.d.ts.map +1 -0
- package/dist/modules/Step/index.d.ts.map +1 -0
- package/dist/modules/Step/tyeps.d.ts.map +1 -0
- package/dist/modules/Summary/index.d.ts.map +1 -0
- package/dist/modules/Summary/types.d.ts.map +1 -0
- package/dist/modules/Summary/utils.d.ts.map +1 -0
- package/dist/modules/SurchargeList/index.d.ts.map +1 -0
- package/dist/modules/SurchargeList/types.d.ts.map +1 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/plugins/app.d.ts.map +1 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/request.d.ts.map +1 -0
- package/dist/plugins/shopStore.d.ts.map +1 -0
- package/dist/plugins/user.d.ts.map +1 -0
- package/dist/plugins/window.d.ts.map +1 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/modules/floor-plan/index.d.ts.map +1 -0
- package/dist/server/modules/floor-plan/index.js +34 -3
- package/dist/server/modules/floor-plan/types.d.ts.map +1 -0
- package/dist/server/modules/index.d.ts.map +1 -0
- package/dist/server/modules/menu/index.d.ts.map +1 -0
- package/dist/server/modules/menu/types.d.ts.map +1 -0
- package/dist/server/modules/order/index.d.ts.map +1 -0
- package/dist/server/modules/order/types.d.ts.map +1 -0
- package/dist/server/modules/order/utils/filterBookings.d.ts.map +1 -0
- package/dist/server/modules/order/utils/filterOrders.d.ts.map +1 -0
- package/dist/server/modules/payment/index.d.ts.map +1 -0
- package/dist/server/modules/payment/types.d.ts.map +1 -0
- package/dist/server/modules/products/index.d.ts.map +1 -0
- package/dist/server/modules/products/types.d.ts.map +1 -0
- package/dist/server/modules/quotation/index.d.ts.map +1 -0
- package/dist/server/modules/quotation/types.d.ts.map +1 -0
- package/dist/server/modules/resource/index.d.ts.map +1 -0
- package/dist/server/modules/resource/types.d.ts.map +1 -0
- package/dist/server/modules/schedule/index.d.ts.map +1 -0
- package/dist/server/modules/schedule/types.d.ts.map +1 -0
- package/dist/server/modules/schedule/utils.d.ts.map +1 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/utils/index.d.ts.map +1 -0
- package/dist/server/utils/product.d.ts.map +1 -0
- package/dist/server/utils/schedule.d.ts.map +1 -0
- package/dist/server/utils/small-ticket.d.ts.map +1 -0
- package/dist/server/utils/time.d.ts.map +1 -0
- package/dist/solution/BaseSales/index.d.ts +16 -1
- package/dist/solution/BaseSales/index.d.ts.map +1 -0
- package/dist/solution/BaseSales/index.js +1363 -1176
- package/dist/solution/BaseSales/types.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils.d.ts.map +1 -0
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts.map +1 -0
- package/dist/solution/BookingByStep/types.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/capacity.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/products.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/resources.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/stock.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/timeslots.d.ts.map +1 -0
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts.map +1 -0
- package/dist/solution/BookingTicket/index.js +198 -108
- package/dist/solution/BookingTicket/types.d.ts +14 -2
- package/dist/solution/BookingTicket/types.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +4 -3
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/exampleData.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/orderCustomer.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +94 -58
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +10 -0
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +117 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -1
- package/dist/solution/BookingTicket/utils/scan/index.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts.map +1 -0
- package/dist/solution/BuyTickets/index.d.ts.map +1 -0
- package/dist/solution/BuyTickets/types.d.ts.map +1 -0
- package/dist/solution/Checkout/index.d.ts.map +1 -0
- package/dist/solution/Checkout/types.d.ts.map +1 -0
- package/dist/solution/Checkout/utils/index.d.ts.map +1 -0
- package/dist/solution/PlaceOrder/index.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/config.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/index.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/types.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/utils.d.ts.map +1 -0
- package/dist/solution/Sales/index.d.ts.map +1 -0
- package/dist/solution/Sales/types.d.ts.map +1 -0
- package/dist/solution/ScanOrder/index.d.ts.map +1 -0
- package/dist/solution/ScanOrder/types.d.ts.map +1 -0
- package/dist/solution/ScanOrder/utils.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/index.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/types.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/utils.d.ts.map +1 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +1 -1
- package/dist/solution/UnifiedBookingSales/index.d.ts.map +1 -0
- package/dist/solution/UnifiedBookingSales/index.js +63 -43
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts.map +1 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts.map +1 -0
- package/dist/solution/VenueBooking/index.d.ts.map +1 -0
- package/dist/solution/VenueBooking/types.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/resource.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/timeSlot.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils.d.ts.map +1 -0
- package/dist/solution/index.d.ts.map +1 -0
- package/dist/store/createStore.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/os-private-payload.d.ts.map +1 -0
- package/dist/utils/payment-number.d.ts.map +1 -0
- package/dist/utils/platform.d.ts +2 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +6 -0
- package/dist/utils/task.d.ts.map +1 -0
- package/dist/utils/watch.d.ts.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/lib/inventory/index.d.ts +92 -0
- package/lib/inventory/index.js +287 -0
- package/lib/model/strategy/adapter/promotion/index.js +46 -1
- package/lib/modules/Discount/index.js +1 -0
- package/lib/modules/Order/index.d.ts +25 -3
- package/lib/modules/Order/index.js +145 -11
- package/lib/modules/Order/types.d.ts +7 -0
- package/lib/modules/Order/utils/discountProductLineIdentity.js +1 -1
- package/lib/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/lib/modules/Order/utils/productVoucherGroups.js +64 -0
- package/lib/modules/Order/utils.d.ts +5 -3
- package/lib/modules/Order/utils.js +29 -10
- package/lib/modules/ProductList/index.js +15 -0
- package/lib/modules/Rules/index.d.ts +2 -0
- package/lib/modules/Rules/index.js +6 -0
- package/lib/server/modules/floor-plan/index.js +29 -1
- package/lib/solution/BaseSales/index.d.ts +16 -1
- package/lib/solution/BaseSales/index.js +89 -9
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +36 -2
- package/lib/solution/BookingTicket/types.d.ts +14 -2
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +4 -3
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +14 -2
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +10 -0
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +71 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -1
- package/lib/solution/UnifiedBookingSales/index.d.ts +1 -1
- package/lib/solution/UnifiedBookingSales/index.js +14 -3
- package/lib/utils/platform.d.ts +2 -0
- package/lib/utils/platform.js +7 -0
- package/package.json +4 -2
|
@@ -1366,11 +1366,16 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
|
|
|
1366
1366
|
cover = false
|
|
1367
1367
|
} = {}) {
|
|
1368
1368
|
const previousScope = this.getAvailabilityScopeDescriptor(this.otherParams || {});
|
|
1369
|
+
const previousCatalogScope = this.otherParams?.catalogScopeKey;
|
|
1369
1370
|
const previousItemRuleConfig = this.otherParams?.itemRule;
|
|
1370
1371
|
const explicitlySetsOpenData = Object.prototype.hasOwnProperty.call(params, 'openData');
|
|
1371
1372
|
await super.setOtherParams(params, {
|
|
1372
1373
|
cover
|
|
1373
1374
|
});
|
|
1375
|
+
if (previousCatalogScope !== this.otherParams?.catalogScopeKey && (previousCatalogScope || this.otherParams?.catalogScopeKey)) {
|
|
1376
|
+
this.unifiedProductCatalog = [];
|
|
1377
|
+
await this.core.effects.emit(`${this.name}:onProductsLoaded`, []);
|
|
1378
|
+
}
|
|
1374
1379
|
const nextScope = this.getAvailabilityScopeDescriptor(this.otherParams || {});
|
|
1375
1380
|
if (explicitlySetsOpenData) {
|
|
1376
1381
|
this.openDataTarget = this.otherParams?.openData && nextScope.businessCode && nextScope.channel ? `${nextScope.businessCode}+${nextScope.channel}` : null;
|
|
@@ -1580,14 +1585,14 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
|
|
|
1580
1585
|
}
|
|
1581
1586
|
|
|
1582
1587
|
/**
|
|
1583
|
-
* PC/H5
|
|
1588
|
+
* PC/H5 及自助终端结账默认直接等待云端 checkout;POS/WebPOS 仍保持本地待同步。
|
|
1584
1589
|
* 显式传 checkoutSyncTaskEnabled: true 时仍可回退到本地同步模式。
|
|
1585
1590
|
*/
|
|
1586
1591
|
shouldUseCheckoutSyncTask() {
|
|
1587
1592
|
const configured = this.otherParams?.checkoutSyncTaskEnabled;
|
|
1588
1593
|
if (configured === true) return true;
|
|
1589
1594
|
const platform = (0, _platform.normalizeRuntimePlatform)(this.otherParams?.platform);
|
|
1590
|
-
return !(0, _platform.isCustomerUserPlatform)(platform) && platform
|
|
1595
|
+
return !(0, _platform.isCustomerUserPlatform)(platform) && !(0, _platform.isSelfServicePlatform)(platform);
|
|
1591
1596
|
}
|
|
1592
1597
|
|
|
1593
1598
|
/** UnifiedBookingSales 的真实结账默认请求收据数据,供云端确认后再本地打印。 */
|
|
@@ -1874,7 +1879,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
|
|
|
1874
1879
|
throw new Error('[UnifiedBookingSales] getProtocol 需要 policyId');
|
|
1875
1880
|
}
|
|
1876
1881
|
let policyUrl = 'shop-policy';
|
|
1877
|
-
if (this.otherParams.platform
|
|
1882
|
+
if ((0, _platform.isSelfServicePlatform)(this.otherParams.platform) || this.otherParams.platform === 'pos' || this.otherParams.platform === 'shop') {
|
|
1878
1883
|
policyUrl = 'policy';
|
|
1879
1884
|
}
|
|
1880
1885
|
return this.request.get(`/${policyUrl}/${encodeURIComponent(normalizedPolicyId)}`);
|
|
@@ -1886,6 +1891,7 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
|
|
|
1886
1891
|
*/
|
|
1887
1892
|
async loadProducts(params = {}, options) {
|
|
1888
1893
|
if (!this.store.products) throw new Error('[UnifiedBookingSales] products 模块未初始化');
|
|
1894
|
+
const catalogScope = this.otherParams.catalogScopeKey;
|
|
1889
1895
|
const schedule_date = params.schedule_date || (0, _dayjs.default)().format('YYYY-MM-DD');
|
|
1890
1896
|
const schedule_datetime = params.schedule_datetime || `${schedule_date} ${(0, _dayjs.default)().format('HH:mm:ss')}`;
|
|
1891
1897
|
const result = await this.store.products.loadProducts({
|
|
@@ -1896,6 +1902,11 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
|
|
|
1896
1902
|
schedule_datetime,
|
|
1897
1903
|
cacheId: this.cacheId
|
|
1898
1904
|
}, options);
|
|
1905
|
+
if (catalogScope !== this.otherParams.catalogScopeKey) {
|
|
1906
|
+
throw Object.assign(new Error('Product scope changed'), {
|
|
1907
|
+
name: 'AbortError'
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1899
1910
|
this.unifiedProductCatalog = Array.isArray(result) ? [...result] : [];
|
|
1900
1911
|
await this.core.effects.emit(`${this.name}:onProductsLoaded`, result);
|
|
1901
1912
|
return result;
|
package/lib/utils/platform.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export declare function normalizeRuntimePlatform(platform: unknown): string;
|
|
|
6
6
|
* PC and H5 are authenticated-customer clients rather than staff terminals.
|
|
7
7
|
*/
|
|
8
8
|
export declare function isCustomerUserPlatform(platform: unknown): boolean;
|
|
9
|
+
/** Kiosk and vending retain distinct channels but share self-service checkout behavior. */
|
|
10
|
+
export declare function isSelfServicePlatform(platform: unknown): boolean;
|
package/lib/utils/platform.js
CHANGED
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isCustomerUserPlatform = isCustomerUserPlatform;
|
|
7
|
+
exports.isSelfServicePlatform = isSelfServicePlatform;
|
|
7
8
|
exports.normalizeRuntimePlatform = normalizeRuntimePlatform;
|
|
8
9
|
const CUSTOMER_USER_PLATFORMS = new Set(['pc', 'h5']);
|
|
10
|
+
const SELF_SERVICE_PLATFORMS = new Set(['kiosk', 'vending']);
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* Normalize the runtime platform passed through solution/module otherParams.
|
|
@@ -19,4 +21,9 @@ function normalizeRuntimePlatform(platform) {
|
|
|
19
21
|
*/
|
|
20
22
|
function isCustomerUserPlatform(platform) {
|
|
21
23
|
return CUSTOMER_USER_PLATFORMS.has(normalizeRuntimePlatform(platform));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Kiosk and vending retain distinct channels but share self-service checkout behavior. */
|
|
27
|
+
function isSelfServicePlatform(platform) {
|
|
28
|
+
return SELF_SERVICE_PLATFORMS.has(normalizeRuntimePlatform(platform));
|
|
22
29
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@pisell/pisellos",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.312-vm.0",
|
|
5
5
|
"description": "一个可扩展的前端模块化SDK框架,支持插件系统",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -68,6 +68,8 @@
|
|
|
68
68
|
"node": ">=18.0.0"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
|
71
|
-
"access": "public"
|
|
71
|
+
"access": "public",
|
|
72
|
+
"registry": "https://registry.npmjs.org/",
|
|
73
|
+
"tag": "vm"
|
|
72
74
|
}
|
|
73
75
|
}
|