@pisell/pisellos 2.3.190 → 2.3.192

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.
Files changed (63) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  2. package/dist/modules/BookingContext/index.d.ts +2 -2
  3. package/dist/modules/BookingContext/index.js +55 -25
  4. package/dist/modules/BookingContext/types.d.ts +2 -0
  5. package/dist/modules/Order/index.d.ts +13 -5
  6. package/dist/modules/Order/index.js +1053 -554
  7. package/dist/modules/Order/types.d.ts +20 -1
  8. package/dist/modules/Order/types.js +4 -0
  9. package/dist/modules/Product/index.d.ts +1 -1
  10. package/dist/modules/ProductList/clientDataVariants.js +6 -2
  11. package/dist/modules/ProductList/index.d.ts +2 -0
  12. package/dist/modules/ProductList/index.js +125 -39
  13. package/dist/modules/ResourcePlanner/planner.js +5 -0
  14. package/dist/server/index.d.ts +3 -0
  15. package/dist/server/index.js +1105 -976
  16. package/dist/shared/receipt/small-ticket.js +33 -5
  17. package/dist/solution/BaseSales/index.d.ts +14 -3
  18. package/dist/solution/BaseSales/index.js +285 -195
  19. package/dist/solution/BookingByStep/index.d.ts +2 -2
  20. package/dist/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
  21. package/dist/solution/UnifiedBookingSales/catalogQueryBatch.js +202 -0
  22. package/dist/solution/UnifiedBookingSales/index.d.ts +49 -1
  23. package/dist/solution/UnifiedBookingSales/index.js +2276 -902
  24. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  25. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +4 -0
  26. package/dist/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  27. package/dist/solution/UnifiedBookingSales/sessionResourceCache.js +271 -0
  28. package/dist/solution/UnifiedBookingSales/types.d.ts +64 -1
  29. package/dist/solution/UnifiedBookingSales/types.js +7 -1
  30. package/dist/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  31. package/dist/solution/UnifiedBookingSales/venueCatalogSession.js +277 -0
  32. package/lib/model/strategy/adapter/promotion/index.js +46 -1
  33. package/lib/modules/BookingContext/index.d.ts +2 -2
  34. package/lib/modules/BookingContext/index.js +42 -10
  35. package/lib/modules/BookingContext/types.d.ts +2 -0
  36. package/lib/modules/Order/index.d.ts +13 -5
  37. package/lib/modules/Order/index.js +208 -7
  38. package/lib/modules/Order/types.d.ts +20 -1
  39. package/lib/modules/Order/types.js +2 -0
  40. package/lib/modules/Product/index.d.ts +1 -1
  41. package/lib/modules/ProductList/clientDataVariants.js +6 -2
  42. package/lib/modules/ProductList/index.d.ts +2 -0
  43. package/lib/modules/ProductList/index.js +56 -0
  44. package/lib/modules/ResourcePlanner/planner.js +4 -0
  45. package/lib/server/index.d.ts +3 -0
  46. package/lib/server/index.js +86 -5
  47. package/lib/shared/receipt/small-ticket.js +30 -5
  48. package/lib/solution/BaseSales/index.d.ts +14 -3
  49. package/lib/solution/BaseSales/index.js +67 -2
  50. package/lib/solution/BookingByStep/index.d.ts +2 -2
  51. package/lib/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
  52. package/lib/solution/UnifiedBookingSales/catalogQueryBatch.js +109 -0
  53. package/lib/solution/UnifiedBookingSales/index.d.ts +49 -1
  54. package/lib/solution/UnifiedBookingSales/index.js +872 -55
  55. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  56. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +2 -0
  57. package/lib/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  58. package/lib/solution/UnifiedBookingSales/sessionResourceCache.js +199 -0
  59. package/lib/solution/UnifiedBookingSales/types.d.ts +64 -1
  60. package/lib/solution/UnifiedBookingSales/types.js +4 -1
  61. package/lib/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  62. package/lib/solution/UnifiedBookingSales/venueCatalogSession.js +151 -0
  63. package/package.json +1 -1
@@ -1487,13 +1487,15 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1487
1487
  var preparedProduct = this.prepareRawProductForPriceQuery(params.rawProduct, params.selectedProduct);
1488
1488
  if (!preparedProduct) return null;
1489
1489
  var scheduleList = this.getPriceQueryScheduleList();
1490
- var result = tryResolveClientDataVariants(_objectSpread({
1490
+ var result = tryResolveClientDataVariants(_objectSpread(_objectSpread({
1491
1491
  core: this.core,
1492
1492
  otherParams: this.otherParams,
1493
1493
  products: [preparedProduct],
1494
1494
  queryPayload: params.queryPayload,
1495
1495
  handledByOsServer: false
1496
- }, scheduleList ? {
1496
+ }, params.menuList ? {
1497
+ menuList: params.menuList
1498
+ } : {}), scheduleList ? {
1497
1499
  scheduleList: scheduleList
1498
1500
  } : {}));
1499
1501
  if (result.status !== 'resolved') return null;
@@ -1582,13 +1584,23 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1582
1584
  return _loadProductsForPriceQuery.apply(this, arguments);
1583
1585
  }
1584
1586
  return loadProductsForPriceQuery;
1585
- }()
1587
+ }() /** Opt-in subclasses may supply page-owned raw pools; ordinary sales keep remote fallback. */
1588
+ }, {
1589
+ key: "isVenueCatalogLocalPricingActive",
1590
+ value: function isVenueCatalogLocalPricingActive() {
1591
+ return false;
1592
+ }
1593
+ }, {
1594
+ key: "getVenueCatalogLocalPriceSource",
1595
+ value: function getVenueCatalogLocalPriceSource(_productId, _selectedProduct) {
1596
+ return undefined;
1597
+ }
1586
1598
  }, {
1587
1599
  key: "resolveProductsForPriceQuery",
1588
1600
  value: function () {
1589
1601
  var _resolveProductsForPriceQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
1590
1602
  var _this9 = this;
1591
- var selectedProducts, productIds, ids, handledByOsServer, canUseLocalFastPath, productsById, shouldAlignSelectedVariantPrice, queryPayload, cachedRawProducts, authoritativeProducts, missingIds, remoteRawProducts;
1603
+ var selectedProducts, productIds, ids, _queryPayload, handledByOsServer, canUseLocalFastPath, productsById, shouldAlignSelectedVariantPrice, queryPayload, cachedRawProducts, authoritativeProducts, missingIds, remoteRawProducts;
1592
1604
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
1593
1605
  while (1) switch (_context12.prev = _context12.next) {
1594
1606
  case 0:
@@ -1609,28 +1621,52 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1609
1621
  return null;
1610
1622
  }));
1611
1623
  case 5:
1624
+ if (!this.isVenueCatalogLocalPricingActive()) {
1625
+ _context12.next = 8;
1626
+ break;
1627
+ }
1628
+ _queryPayload = this.buildPriceQueryPayload({
1629
+ ids: ids,
1630
+ schedule: params.schedule,
1631
+ customerId: params.customerId,
1632
+ channel: params.channel
1633
+ });
1634
+ return _context12.abrupt("return", selectedProducts.map(function (selectedProduct, index) {
1635
+ var source = productIds[index] == null ? undefined : _this9.getVenueCatalogLocalPriceSource(productIds[index], selectedProduct);
1636
+ var resolved = source && _this9.resolveLocalProductForPriceQuery({
1637
+ selectedProduct: selectedProduct,
1638
+ rawProduct: source.product,
1639
+ menuList: source.menuList,
1640
+ queryPayload: _queryPayload
1641
+ });
1642
+ if (!resolved) throw Object.assign(new Error('The complete venue product or pricing rules are not ready. Reload the catalog before continuing.'), {
1643
+ code: 'VENUE_LOCAL_PRICE_UNAVAILABLE'
1644
+ });
1645
+ return resolved;
1646
+ }));
1647
+ case 8:
1612
1648
  handledByOsServer = this.request ? isProductQueryHandledByOsServer(this.core, this.request) : false;
1613
1649
  canUseLocalFastPath = this.isCustomerUserPriceQuery() && !handledByOsServer;
1614
1650
  if (canUseLocalFastPath) {
1615
- _context12.next = 15;
1651
+ _context12.next = 18;
1616
1652
  break;
1617
1653
  }
1618
1654
  if (this.request) {
1619
- _context12.next = 10;
1655
+ _context12.next = 13;
1620
1656
  break;
1621
1657
  }
1622
1658
  return _context12.abrupt("return", selectedProducts.map(function () {
1623
1659
  return null;
1624
1660
  }));
1625
- case 10:
1626
- _context12.next = 12;
1661
+ case 13:
1662
+ _context12.next = 15;
1627
1663
  return this.loadProductsForPriceQuery({
1628
1664
  ids: ids,
1629
1665
  schedule: params.schedule,
1630
1666
  customerId: params.customerId,
1631
1667
  channel: params.channel
1632
1668
  });
1633
- case 12:
1669
+ case 15:
1634
1670
  productsById = _context12.sent;
1635
1671
  shouldAlignSelectedVariantPrice = handledByOsServer && this.preferAuthoritativeProductQueryPrice();
1636
1672
  return _context12.abrupt("return", productIds.map(function (productId, index) {
@@ -1665,7 +1701,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1665
1701
  price: selectedPrice
1666
1702
  });
1667
1703
  }));
1668
- case 15:
1704
+ case 18:
1669
1705
  queryPayload = this.buildPriceQueryPayload({
1670
1706
  ids: ids,
1671
1707
  schedule: params.schedule,
@@ -1685,25 +1721,25 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1685
1721
  return productId !== null && !authoritativeProducts[index];
1686
1722
  })));
1687
1723
  if (missingIds.length) {
1688
- _context12.next = 21;
1724
+ _context12.next = 24;
1689
1725
  break;
1690
1726
  }
1691
1727
  return _context12.abrupt("return", authoritativeProducts);
1692
- case 21:
1728
+ case 24:
1693
1729
  if (this.request) {
1694
- _context12.next = 23;
1730
+ _context12.next = 26;
1695
1731
  break;
1696
1732
  }
1697
1733
  return _context12.abrupt("return", authoritativeProducts);
1698
- case 23:
1699
- _context12.next = 25;
1734
+ case 26:
1735
+ _context12.next = 28;
1700
1736
  return this.loadProductsForPriceQuery({
1701
1737
  ids: missingIds,
1702
1738
  schedule: params.schedule,
1703
1739
  customerId: params.customerId,
1704
1740
  channel: params.channel
1705
1741
  });
1706
- case 25:
1742
+ case 28:
1707
1743
  remoteRawProducts = _context12.sent;
1708
1744
  authoritativeProducts.forEach(function (authoritativeProduct, index) {
1709
1745
  if (authoritativeProduct) return;
@@ -1725,7 +1761,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1725
1761
  authoritativeProducts[index] = rawProduct ? _this9.prepareRawProductForPriceQuery(rawProduct, selectedProducts[index]) || rawProduct : null;
1726
1762
  });
1727
1763
  return _context12.abrupt("return", authoritativeProducts);
1728
- case 28:
1764
+ case 31:
1729
1765
  case "end":
1730
1766
  return _context12.stop();
1731
1767
  }
@@ -7156,28 +7192,82 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7156
7192
  value: function transformBaseProductToOrderProduct(params) {
7157
7193
  return _transformBaseProductToOrderProduct(params);
7158
7194
  }
7195
+
7196
+ /** Explicit pool source avoids races between two simultaneous Venue pricing contexts. */
7197
+ }, {
7198
+ key: "calculateVenueCatalogProductBookingPrice",
7199
+ value: (function () {
7200
+ var _calculateVenueCatalogProductBookingPrice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(params, source) {
7201
+ var _params$customer_id;
7202
+ var customerId, channel, queryPayload, authoritativeProduct;
7203
+ return _regeneratorRuntime().wrap(function _callee71$(_context71) {
7204
+ while (1) switch (_context71.prev = _context71.next) {
7205
+ case 0:
7206
+ customerId = (_params$customer_id = params.customer_id) !== null && _params$customer_id !== void 0 ? _params$customer_id : this.getCurrentOrderCustomerId();
7207
+ _context71.next = 3;
7208
+ return this.prepareProductPriceQueryContext(customerId);
7209
+ case 3:
7210
+ channel = this.getPriceQueryChannel(params.channel);
7211
+ queryPayload = this.buildPriceQueryPayload({
7212
+ ids: [Number(source.product.id)],
7213
+ schedule: this.getPriceQuerySchedule(params),
7214
+ customerId: customerId,
7215
+ channel: channel
7216
+ });
7217
+ authoritativeProduct = this.resolveLocalProductForPriceQuery({
7218
+ selectedProduct: params.product,
7219
+ rawProduct: source.product,
7220
+ menuList: source.menuList,
7221
+ queryPayload: queryPayload
7222
+ });
7223
+ if (authoritativeProduct) {
7224
+ _context71.next = 8;
7225
+ break;
7226
+ }
7227
+ throw Object.assign(new Error('Complete product pricing rules are not ready. Please retry.'), {
7228
+ code: 'VENUE_LOCAL_PRICE_UNAVAILABLE'
7229
+ });
7230
+ case 8:
7231
+ return _context71.abrupt("return", calculateBaseSalesProductBookingPrice(_objectSpread(_objectSpread({}, params), {}, {
7232
+ channel: channel,
7233
+ customer_id: customerId,
7234
+ product: this.mergeProductForPriceQuery(params.product, authoritativeProduct),
7235
+ fallback_price: undefined,
7236
+ quotation: undefined
7237
+ })));
7238
+ case 9:
7239
+ case "end":
7240
+ return _context71.stop();
7241
+ }
7242
+ }, _callee71, this);
7243
+ }));
7244
+ function calculateVenueCatalogProductBookingPrice(_x56, _x57) {
7245
+ return _calculateVenueCatalogProductBookingPrice.apply(this, arguments);
7246
+ }
7247
+ return calculateVenueCatalogProductBookingPrice;
7248
+ }())
7159
7249
  }, {
7160
7250
  key: "calculateProductBookingPrice",
7161
7251
  value: function () {
7162
- var _calculateProductBookingPrice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(params) {
7252
+ var _calculateProductBookingPrice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(params) {
7163
7253
  var _yield$this$calculate, _yield$this$calculate2, result;
7164
- return _regeneratorRuntime().wrap(function _callee71$(_context71) {
7165
- while (1) switch (_context71.prev = _context71.next) {
7254
+ return _regeneratorRuntime().wrap(function _callee72$(_context72) {
7255
+ while (1) switch (_context72.prev = _context72.next) {
7166
7256
  case 0:
7167
- _context71.next = 2;
7257
+ _context72.next = 2;
7168
7258
  return this.calculateProductBookingPrices([params]);
7169
7259
  case 2:
7170
- _yield$this$calculate = _context71.sent;
7260
+ _yield$this$calculate = _context72.sent;
7171
7261
  _yield$this$calculate2 = _slicedToArray(_yield$this$calculate, 1);
7172
7262
  result = _yield$this$calculate2[0];
7173
- return _context71.abrupt("return", result);
7263
+ return _context72.abrupt("return", result);
7174
7264
  case 6:
7175
7265
  case "end":
7176
- return _context71.stop();
7266
+ return _context72.stop();
7177
7267
  }
7178
- }, _callee71, this);
7268
+ }, _callee72, this);
7179
7269
  }));
7180
- function calculateProductBookingPrice(_x56) {
7270
+ function calculateProductBookingPrice(_x58) {
7181
7271
  return _calculateProductBookingPrice.apply(this, arguments);
7182
7272
  }
7183
7273
  return calculateProductBookingPrice;
@@ -7261,18 +7351,18 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7261
7351
  }, {
7262
7352
  key: "resolveProductBookingPriceGroups",
7263
7353
  value: function () {
7264
- var _resolveProductBookingPriceGroups = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(paramsList, currentOrderCustomerId) {
7354
+ var _resolveProductBookingPriceGroups = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(paramsList, currentOrderCustomerId) {
7265
7355
  var _this24 = this,
7266
7356
  _this$otherParams43;
7267
7357
  var strictDurationPricing,
7268
7358
  resolvedChannels,
7269
7359
  authoritativeProducts,
7270
7360
  groups,
7271
- _args73 = arguments;
7272
- return _regeneratorRuntime().wrap(function _callee73$(_context73) {
7273
- while (1) switch (_context73.prev = _context73.next) {
7361
+ _args74 = arguments;
7362
+ return _regeneratorRuntime().wrap(function _callee74$(_context74) {
7363
+ while (1) switch (_context74.prev = _context74.next) {
7274
7364
  case 0:
7275
- strictDurationPricing = _args73.length > 2 && _args73[2] !== undefined ? _args73[2] : false;
7365
+ strictDurationPricing = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : false;
7276
7366
  resolvedChannels = paramsList.map(function (params) {
7277
7367
  return _this24.getPriceQueryChannel(params.channel);
7278
7368
  });
@@ -7281,10 +7371,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7281
7371
  });
7282
7372
  groups = new Map();
7283
7373
  paramsList.forEach(function (params, index) {
7284
- var _params$customer_id;
7374
+ var _params$customer_id2;
7285
7375
  var schedule = _this24.getPriceQuerySchedule(params);
7286
7376
  var channel = resolvedChannels[index];
7287
- var customerId = (_params$customer_id = params.customer_id) !== null && _params$customer_id !== void 0 ? _params$customer_id : currentOrderCustomerId;
7377
+ var customerId = (_params$customer_id2 = params.customer_id) !== null && _params$customer_id2 !== void 0 ? _params$customer_id2 : currentOrderCustomerId;
7288
7378
  var groupKey = [schedule.schedule_date, schedule.schedule_datetime, channel || '', _this24.normalizePriceContextCustomerId(customerId) || ''].join('|');
7289
7379
  var group = groups.get(groupKey) || {
7290
7380
  indices: [],
@@ -7295,20 +7385,20 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7295
7385
  group.indices.push(index);
7296
7386
  groups.set(groupKey, group);
7297
7387
  });
7298
- _context73.next = 7;
7388
+ _context74.next = 7;
7299
7389
  return forEachPriceQueryGroup(Array.from(groups.values()), /*#__PURE__*/function () {
7300
- var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(group) {
7390
+ var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(group) {
7301
7391
  var priceQueries, resolvedProducts;
7302
- return _regeneratorRuntime().wrap(function _callee72$(_context72) {
7303
- while (1) switch (_context72.prev = _context72.next) {
7392
+ return _regeneratorRuntime().wrap(function _callee73$(_context73) {
7393
+ while (1) switch (_context73.prev = _context73.next) {
7304
7394
  case 0:
7305
- _context72.next = 2;
7395
+ _context73.next = 2;
7306
7396
  return _this24.prepareProductPriceQueryContext(group.customerId);
7307
7397
  case 2:
7308
7398
  priceQueries = group.indices.map(function (index) {
7309
7399
  return paramsList[index];
7310
7400
  });
7311
- _context72.next = 5;
7401
+ _context73.next = 5;
7312
7402
  return _this24.resolveProductsForPriceQuery({
7313
7403
  priceQueries: priceQueries,
7314
7404
  schedule: group.schedule,
@@ -7317,29 +7407,29 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7317
7407
  strictDurationPricing: strictDurationPricing
7318
7408
  });
7319
7409
  case 5:
7320
- resolvedProducts = _context72.sent;
7410
+ resolvedProducts = _context73.sent;
7321
7411
  group.indices.forEach(function (originalIndex, groupIndex) {
7322
7412
  authoritativeProducts[originalIndex] = resolvedProducts[groupIndex] || null;
7323
7413
  });
7324
7414
  case 7:
7325
7415
  case "end":
7326
- return _context72.stop();
7416
+ return _context73.stop();
7327
7417
  }
7328
- }, _callee72);
7418
+ }, _callee73);
7329
7419
  }));
7330
- return function (_x59) {
7420
+ return function (_x61) {
7331
7421
  return _ref57.apply(this, arguments);
7332
7422
  };
7333
7423
  }(), normalizeRuntimePlatform((_this$otherParams43 = this.otherParams) === null || _this$otherParams43 === void 0 ? void 0 : _this$otherParams43.platform) === 'pos' ? 4 : groups.size);
7334
7424
  case 7:
7335
- return _context73.abrupt("return", authoritativeProducts);
7425
+ return _context74.abrupt("return", authoritativeProducts);
7336
7426
  case 8:
7337
7427
  case "end":
7338
- return _context73.stop();
7428
+ return _context74.stop();
7339
7429
  }
7340
- }, _callee73, this);
7430
+ }, _callee74, this);
7341
7431
  }));
7342
- function resolveProductBookingPriceGroups(_x57, _x58) {
7432
+ function resolveProductBookingPriceGroups(_x59, _x60) {
7343
7433
  return _resolveProductBookingPriceGroups.apply(this, arguments);
7344
7434
  }
7345
7435
  return resolveProductBookingPriceGroups;
@@ -7347,18 +7437,18 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7347
7437
  }, {
7348
7438
  key: "calculateProductBookingPrices",
7349
7439
  value: function () {
7350
- var _calculateProductBookingPrices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(paramsList) {
7440
+ var _calculateProductBookingPrices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(paramsList) {
7351
7441
  var _this$otherParams44,
7352
7442
  _this25 = this;
7353
7443
  var useCustomerUserPricing, isPos, quotation, currentOrderCustomerId, resolvedChannels, authoritativeProducts, plans, segmentQueries, segmentQueryIndices, segmentProducts, quotationContexts;
7354
- return _regeneratorRuntime().wrap(function _callee74$(_context74) {
7355
- while (1) switch (_context74.prev = _context74.next) {
7444
+ return _regeneratorRuntime().wrap(function _callee75$(_context75) {
7445
+ while (1) switch (_context75.prev = _context75.next) {
7356
7446
  case 0:
7357
7447
  if (paramsList.length) {
7358
- _context74.next = 2;
7448
+ _context75.next = 2;
7359
7449
  break;
7360
7450
  }
7361
- return _context74.abrupt("return", []);
7451
+ return _context75.abrupt("return", []);
7362
7452
  case 2:
7363
7453
  useCustomerUserPricing = this.isCustomerUserPriceQuery();
7364
7454
  isPos = normalizeRuntimePlatform((_this$otherParams44 = this.otherParams) === null || _this$otherParams44 === void 0 ? void 0 : _this$otherParams44.platform) === 'pos';
@@ -7367,10 +7457,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7367
7457
  resolvedChannels = paramsList.map(function (params) {
7368
7458
  return _this25.getPriceQueryChannel(params.channel);
7369
7459
  });
7370
- _context74.next = 9;
7460
+ _context75.next = 9;
7371
7461
  return this.resolveProductBookingPriceGroups(paramsList, currentOrderCustomerId);
7372
7462
  case 9:
7373
- authoritativeProducts = _context74.sent;
7463
+ authoritativeProducts = _context75.sent;
7374
7464
  plans = paramsList.map(function (params, index) {
7375
7465
  if (!isPos) return null;
7376
7466
  var product = authoritativeProducts[index];
@@ -7400,47 +7490,47 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7400
7490
  return queryIndex;
7401
7491
  })) || [];
7402
7492
  });
7403
- _context74.next = 15;
7493
+ _context75.next = 15;
7404
7494
  return this.resolveProductBookingPriceGroups(segmentQueries, currentOrderCustomerId, true);
7405
7495
  case 15:
7406
- segmentProducts = _context74.sent;
7496
+ segmentProducts = _context75.sent;
7407
7497
  if (!segmentProducts.some(function (product) {
7408
7498
  return !product;
7409
7499
  })) {
7410
- _context74.next = 18;
7500
+ _context75.next = 18;
7411
7501
  break;
7412
7502
  }
7413
7503
  throw durationPricingUnavailable('An authoritative product is missing for a billing unit.');
7414
7504
  case 18:
7415
7505
  if (useCustomerUserPricing) {
7416
- _context74.next = 23;
7506
+ _context75.next = 23;
7417
7507
  break;
7418
7508
  }
7419
7509
  quotationContexts = new Map();
7420
7510
  paramsList.forEach(function (params, index) {
7421
- var _params$customer_id2;
7511
+ var _params$customer_id3;
7422
7512
  if (plans[index]) return;
7423
7513
  var channel = resolvedChannels[index];
7424
7514
  var key = channel || '';
7425
7515
  if (quotationContexts.has(key)) return;
7426
7516
  quotationContexts.set(key, {
7427
7517
  channel: channel,
7428
- customer_id: (_params$customer_id2 = params.customer_id) !== null && _params$customer_id2 !== void 0 ? _params$customer_id2 : currentOrderCustomerId
7518
+ customer_id: (_params$customer_id3 = params.customer_id) !== null && _params$customer_id3 !== void 0 ? _params$customer_id3 : currentOrderCustomerId
7429
7519
  });
7430
7520
  });
7431
- _context74.next = 23;
7521
+ _context75.next = 23;
7432
7522
  return Promise.all(Array.from(quotationContexts.values()).map(function (context) {
7433
7523
  return _this25.loadQuotationForPriceQuery(_objectSpread({
7434
7524
  quotation: quotation
7435
7525
  }, context));
7436
7526
  }));
7437
7527
  case 23:
7438
- return _context74.abrupt("return", paramsList.map(function (params, index) {
7439
- var _params$customer_id3, _authoritativeProduct2, _params$duration;
7528
+ return _context75.abrupt("return", paramsList.map(function (params, index) {
7529
+ var _params$customer_id4, _authoritativeProduct2, _params$duration;
7440
7530
  var productInput = params.product || {};
7441
7531
  var authoritativeProduct = authoritativeProducts[index];
7442
7532
  var product = _this25.mergeProductForPriceQuery(productInput, authoritativeProduct);
7443
- var customerId = (_params$customer_id3 = params.customer_id) !== null && _params$customer_id3 !== void 0 ? _params$customer_id3 : currentOrderCustomerId;
7533
+ var customerId = (_params$customer_id4 = params.customer_id) !== null && _params$customer_id4 !== void 0 ? _params$customer_id4 : currentOrderCustomerId;
7444
7534
  var channel = resolvedChannels[index];
7445
7535
  var plan = plans[index];
7446
7536
  if (plan) {
@@ -7487,11 +7577,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7487
7577
  }));
7488
7578
  case 24:
7489
7579
  case "end":
7490
- return _context74.stop();
7580
+ return _context75.stop();
7491
7581
  }
7492
- }, _callee74, this);
7582
+ }, _callee75, this);
7493
7583
  }));
7494
- function calculateProductBookingPrices(_x60) {
7584
+ function calculateProductBookingPrices(_x62) {
7495
7585
  return _calculateProductBookingPrices.apply(this, arguments);
7496
7586
  }
7497
7587
  return calculateProductBookingPrices;
@@ -7511,47 +7601,47 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7511
7601
  }, {
7512
7602
  key: "addProductToOrder",
7513
7603
  value: function () {
7514
- var _addProductToOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(product, booking, options) {
7604
+ var _addProductToOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(product, booking, options) {
7515
7605
  var products;
7516
- return _regeneratorRuntime().wrap(function _callee75$(_context75) {
7517
- while (1) switch (_context75.prev = _context75.next) {
7606
+ return _regeneratorRuntime().wrap(function _callee76$(_context76) {
7607
+ while (1) switch (_context76.prev = _context76.next) {
7518
7608
  case 0:
7519
- _context75.prev = 0;
7609
+ _context76.prev = 0;
7520
7610
  if (this.store.order) {
7521
- _context75.next = 3;
7611
+ _context76.next = 3;
7522
7612
  break;
7523
7613
  }
7524
7614
  throw new Error('order 模块未初始化');
7525
7615
  case 3:
7526
7616
  if (!(options === undefined)) {
7527
- _context75.next = 9;
7617
+ _context76.next = 9;
7528
7618
  break;
7529
7619
  }
7530
- _context75.next = 6;
7620
+ _context76.next = 6;
7531
7621
  return this.store.order.addProductToOrder(product, booking);
7532
7622
  case 6:
7533
- _context75.t0 = _context75.sent;
7534
- _context75.next = 12;
7623
+ _context76.t0 = _context76.sent;
7624
+ _context76.next = 12;
7535
7625
  break;
7536
7626
  case 9:
7537
- _context75.next = 11;
7627
+ _context76.next = 11;
7538
7628
  return this.store.order.addProductToOrder(product, booking, options);
7539
7629
  case 11:
7540
- _context75.t0 = _context75.sent;
7630
+ _context76.t0 = _context76.sent;
7541
7631
  case 12:
7542
- products = _context75.t0;
7543
- return _context75.abrupt("return", products);
7632
+ products = _context76.t0;
7633
+ return _context76.abrupt("return", products);
7544
7634
  case 16:
7545
- _context75.prev = 16;
7546
- _context75.t1 = _context75["catch"](0);
7547
- throw _context75.t1;
7635
+ _context76.prev = 16;
7636
+ _context76.t1 = _context76["catch"](0);
7637
+ throw _context76.t1;
7548
7638
  case 19:
7549
7639
  case "end":
7550
- return _context75.stop();
7640
+ return _context76.stop();
7551
7641
  }
7552
- }, _callee75, this, [[0, 16]]);
7642
+ }, _callee76, this, [[0, 16]]);
7553
7643
  }));
7554
- function addProductToOrder(_x61, _x62, _x63) {
7644
+ function addProductToOrder(_x63, _x64, _x65) {
7555
7645
  return _addProductToOrder.apply(this, arguments);
7556
7646
  }
7557
7647
  return addProductToOrder;
@@ -7559,34 +7649,34 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7559
7649
  }, {
7560
7650
  key: "updateOrderProduct",
7561
7651
  value: function () {
7562
- var _updateOrderProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(params) {
7652
+ var _updateOrderProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(params) {
7563
7653
  var products;
7564
- return _regeneratorRuntime().wrap(function _callee76$(_context76) {
7565
- while (1) switch (_context76.prev = _context76.next) {
7654
+ return _regeneratorRuntime().wrap(function _callee77$(_context77) {
7655
+ while (1) switch (_context77.prev = _context77.next) {
7566
7656
  case 0:
7567
- _context76.prev = 0;
7657
+ _context77.prev = 0;
7568
7658
  if (this.store.order) {
7569
- _context76.next = 3;
7659
+ _context77.next = 3;
7570
7660
  break;
7571
7661
  }
7572
7662
  throw new Error('order 模块未初始化');
7573
7663
  case 3:
7574
- _context76.next = 5;
7664
+ _context77.next = 5;
7575
7665
  return this.store.order.updateOrderProduct(params);
7576
7666
  case 5:
7577
- products = _context76.sent;
7578
- return _context76.abrupt("return", products);
7667
+ products = _context77.sent;
7668
+ return _context77.abrupt("return", products);
7579
7669
  case 9:
7580
- _context76.prev = 9;
7581
- _context76.t0 = _context76["catch"](0);
7582
- throw _context76.t0;
7670
+ _context77.prev = 9;
7671
+ _context77.t0 = _context77["catch"](0);
7672
+ throw _context77.t0;
7583
7673
  case 12:
7584
7674
  case "end":
7585
- return _context76.stop();
7675
+ return _context77.stop();
7586
7676
  }
7587
- }, _callee76, this, [[0, 9]]);
7677
+ }, _callee77, this, [[0, 9]]);
7588
7678
  }));
7589
- function updateOrderProduct(_x64) {
7679
+ function updateOrderProduct(_x66) {
7590
7680
  return _updateOrderProduct.apply(this, arguments);
7591
7681
  }
7592
7682
  return updateOrderProduct;
@@ -7594,34 +7684,34 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7594
7684
  }, {
7595
7685
  key: "updateOrderProducts",
7596
7686
  value: function () {
7597
- var _updateOrderProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(paramsList) {
7687
+ var _updateOrderProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(paramsList, options) {
7598
7688
  var products;
7599
- return _regeneratorRuntime().wrap(function _callee77$(_context77) {
7600
- while (1) switch (_context77.prev = _context77.next) {
7689
+ return _regeneratorRuntime().wrap(function _callee78$(_context78) {
7690
+ while (1) switch (_context78.prev = _context78.next) {
7601
7691
  case 0:
7602
- _context77.prev = 0;
7692
+ _context78.prev = 0;
7603
7693
  if (this.store.order) {
7604
- _context77.next = 3;
7694
+ _context78.next = 3;
7605
7695
  break;
7606
7696
  }
7607
7697
  throw new Error('order 模块未初始化');
7608
7698
  case 3:
7609
- _context77.next = 5;
7610
- return this.store.order.updateOrderProducts(paramsList);
7699
+ _context78.next = 5;
7700
+ return this.store.order.updateOrderProducts(paramsList, options);
7611
7701
  case 5:
7612
- products = _context77.sent;
7613
- return _context77.abrupt("return", products);
7702
+ products = _context78.sent;
7703
+ return _context78.abrupt("return", products);
7614
7704
  case 9:
7615
- _context77.prev = 9;
7616
- _context77.t0 = _context77["catch"](0);
7617
- throw _context77.t0;
7705
+ _context78.prev = 9;
7706
+ _context78.t0 = _context78["catch"](0);
7707
+ throw _context78.t0;
7618
7708
  case 12:
7619
7709
  case "end":
7620
- return _context77.stop();
7710
+ return _context78.stop();
7621
7711
  }
7622
- }, _callee77, this, [[0, 9]]);
7712
+ }, _callee78, this, [[0, 9]]);
7623
7713
  }));
7624
- function updateOrderProducts(_x65) {
7714
+ function updateOrderProducts(_x67, _x68) {
7625
7715
  return _updateOrderProducts.apply(this, arguments);
7626
7716
  }
7627
7717
  return updateOrderProducts;
@@ -7629,34 +7719,34 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7629
7719
  }, {
7630
7720
  key: "updateOrderProductQuantity",
7631
7721
  value: function () {
7632
- var _updateOrderProductQuantity = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(params) {
7722
+ var _updateOrderProductQuantity = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(params) {
7633
7723
  var products;
7634
- return _regeneratorRuntime().wrap(function _callee78$(_context78) {
7635
- while (1) switch (_context78.prev = _context78.next) {
7724
+ return _regeneratorRuntime().wrap(function _callee79$(_context79) {
7725
+ while (1) switch (_context79.prev = _context79.next) {
7636
7726
  case 0:
7637
- _context78.prev = 0;
7727
+ _context79.prev = 0;
7638
7728
  if (this.store.order) {
7639
- _context78.next = 3;
7729
+ _context79.next = 3;
7640
7730
  break;
7641
7731
  }
7642
7732
  throw new Error('order 模块未初始化');
7643
7733
  case 3:
7644
- _context78.next = 5;
7734
+ _context79.next = 5;
7645
7735
  return this.store.order.updateOrderProductQuantity(params);
7646
7736
  case 5:
7647
- products = _context78.sent;
7648
- return _context78.abrupt("return", products);
7737
+ products = _context79.sent;
7738
+ return _context79.abrupt("return", products);
7649
7739
  case 9:
7650
- _context78.prev = 9;
7651
- _context78.t0 = _context78["catch"](0);
7652
- throw _context78.t0;
7740
+ _context79.prev = 9;
7741
+ _context79.t0 = _context79["catch"](0);
7742
+ throw _context79.t0;
7653
7743
  case 12:
7654
7744
  case "end":
7655
- return _context78.stop();
7745
+ return _context79.stop();
7656
7746
  }
7657
- }, _callee78, this, [[0, 9]]);
7747
+ }, _callee79, this, [[0, 9]]);
7658
7748
  }));
7659
- function updateOrderProductQuantity(_x66) {
7749
+ function updateOrderProductQuantity(_x69) {
7660
7750
  return _updateOrderProductQuantity.apply(this, arguments);
7661
7751
  }
7662
7752
  return updateOrderProductQuantity;
@@ -7679,12 +7769,12 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7679
7769
  }, {
7680
7770
  key: "setOrderProductLineNote",
7681
7771
  value: (function () {
7682
- var _setOrderProductLineNote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(identity, note) {
7772
+ var _setOrderProductLineNote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(identity, note) {
7683
7773
  var params, products;
7684
- return _regeneratorRuntime().wrap(function _callee79$(_context79) {
7685
- while (1) switch (_context79.prev = _context79.next) {
7774
+ return _regeneratorRuntime().wrap(function _callee80$(_context80) {
7775
+ while (1) switch (_context80.prev = _context80.next) {
7686
7776
  case 0:
7687
- _context79.prev = 0;
7777
+ _context80.prev = 0;
7688
7778
  params = {
7689
7779
  product_id: identity.product_id,
7690
7780
  product_variant_id: identity.product_variant_id,
@@ -7699,22 +7789,22 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7699
7789
  params.product_sku = identity.product_sku;
7700
7790
  }
7701
7791
  if (identity.product_bundle !== undefined) params.product_bundle = identity.product_bundle;
7702
- _context79.next = 7;
7792
+ _context80.next = 7;
7703
7793
  return this.updateOrderProduct(params);
7704
7794
  case 7:
7705
- products = _context79.sent;
7706
- return _context79.abrupt("return", products);
7795
+ products = _context80.sent;
7796
+ return _context80.abrupt("return", products);
7707
7797
  case 11:
7708
- _context79.prev = 11;
7709
- _context79.t0 = _context79["catch"](0);
7710
- throw _context79.t0;
7798
+ _context80.prev = 11;
7799
+ _context80.t0 = _context80["catch"](0);
7800
+ throw _context80.t0;
7711
7801
  case 14:
7712
7802
  case "end":
7713
- return _context79.stop();
7803
+ return _context80.stop();
7714
7804
  }
7715
- }, _callee79, this, [[0, 11]]);
7805
+ }, _callee80, this, [[0, 11]]);
7716
7806
  }));
7717
- function setOrderProductLineNote(_x67, _x68) {
7807
+ function setOrderProductLineNote(_x70, _x71) {
7718
7808
  return _setOrderProductLineNote.apply(this, arguments);
7719
7809
  }
7720
7810
  return setOrderProductLineNote;
@@ -7729,45 +7819,45 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7729
7819
  }, {
7730
7820
  key: "removeProductsFromOrder",
7731
7821
  value: (function () {
7732
- var _removeProductsFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(identities, options) {
7733
- return _regeneratorRuntime().wrap(function _callee80$(_context80) {
7734
- while (1) switch (_context80.prev = _context80.next) {
7822
+ var _removeProductsFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(identities, options) {
7823
+ return _regeneratorRuntime().wrap(function _callee81$(_context81) {
7824
+ while (1) switch (_context81.prev = _context81.next) {
7735
7825
  case 0:
7736
- _context80.prev = 0;
7826
+ _context81.prev = 0;
7737
7827
  if (this.store.order) {
7738
- _context80.next = 3;
7828
+ _context81.next = 3;
7739
7829
  break;
7740
7830
  }
7741
7831
  throw new Error('order 模块未初始化');
7742
7832
  case 3:
7743
7833
  if (!(options === undefined)) {
7744
- _context80.next = 9;
7834
+ _context81.next = 9;
7745
7835
  break;
7746
7836
  }
7747
- _context80.next = 6;
7837
+ _context81.next = 6;
7748
7838
  return this.store.order.removeProductsFromOrder(identities);
7749
7839
  case 6:
7750
- _context80.t0 = _context80.sent;
7751
- _context80.next = 12;
7840
+ _context81.t0 = _context81.sent;
7841
+ _context81.next = 12;
7752
7842
  break;
7753
7843
  case 9:
7754
- _context80.next = 11;
7844
+ _context81.next = 11;
7755
7845
  return this.store.order.removeProductsFromOrder(identities, options);
7756
7846
  case 11:
7757
- _context80.t0 = _context80.sent;
7847
+ _context81.t0 = _context81.sent;
7758
7848
  case 12:
7759
- return _context80.abrupt("return", _context80.t0);
7849
+ return _context81.abrupt("return", _context81.t0);
7760
7850
  case 15:
7761
- _context80.prev = 15;
7762
- _context80.t1 = _context80["catch"](0);
7763
- throw _context80.t1;
7851
+ _context81.prev = 15;
7852
+ _context81.t1 = _context81["catch"](0);
7853
+ throw _context81.t1;
7764
7854
  case 18:
7765
7855
  case "end":
7766
- return _context80.stop();
7856
+ return _context81.stop();
7767
7857
  }
7768
- }, _callee80, this, [[0, 15]]);
7858
+ }, _callee81, this, [[0, 15]]);
7769
7859
  }));
7770
- function removeProductsFromOrder(_x69, _x70) {
7860
+ function removeProductsFromOrder(_x72, _x73) {
7771
7861
  return _removeProductsFromOrder.apply(this, arguments);
7772
7862
  }
7773
7863
  return removeProductsFromOrder;
@@ -7775,18 +7865,18 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7775
7865
  }, {
7776
7866
  key: "removeProductFromOrder",
7777
7867
  value: function () {
7778
- var _removeProductFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(identity, options) {
7779
- return _regeneratorRuntime().wrap(function _callee81$(_context81) {
7780
- while (1) switch (_context81.prev = _context81.next) {
7868
+ var _removeProductFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee82(identity, options) {
7869
+ return _regeneratorRuntime().wrap(function _callee82$(_context82) {
7870
+ while (1) switch (_context82.prev = _context82.next) {
7781
7871
  case 0:
7782
- return _context81.abrupt("return", this.removeProductsFromOrder([identity], options));
7872
+ return _context82.abrupt("return", this.removeProductsFromOrder([identity], options));
7783
7873
  case 1:
7784
7874
  case "end":
7785
- return _context81.stop();
7875
+ return _context82.stop();
7786
7876
  }
7787
- }, _callee81, this);
7877
+ }, _callee82, this);
7788
7878
  }));
7789
- function removeProductFromOrder(_x71, _x72) {
7879
+ function removeProductFromOrder(_x74, _x75) {
7790
7880
  return _removeProductFromOrder.apply(this, arguments);
7791
7881
  }
7792
7882
  return removeProductFromOrder;
@@ -7836,23 +7926,23 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7836
7926
  }, {
7837
7927
  key: "applyPromotion",
7838
7928
  value: (function () {
7839
- var _applyPromotion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee82() {
7840
- return _regeneratorRuntime().wrap(function _callee82$(_context82) {
7841
- while (1) switch (_context82.prev = _context82.next) {
7929
+ var _applyPromotion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee83() {
7930
+ return _regeneratorRuntime().wrap(function _callee83$(_context83) {
7931
+ while (1) switch (_context83.prev = _context83.next) {
7842
7932
  case 0:
7843
7933
  if (this.store.order) {
7844
- _context82.next = 2;
7934
+ _context83.next = 2;
7845
7935
  break;
7846
7936
  }
7847
7937
  throw new Error('order 模块未初始化');
7848
7938
  case 2:
7849
- _context82.next = 4;
7939
+ _context83.next = 4;
7850
7940
  return this.store.order.applyPromotion();
7851
7941
  case 4:
7852
7942
  case "end":
7853
- return _context82.stop();
7943
+ return _context83.stop();
7854
7944
  }
7855
- }, _callee82, this);
7945
+ }, _callee83, this);
7856
7946
  }));
7857
7947
  function applyPromotion() {
7858
7948
  return _applyPromotion.apply(this, arguments);
@@ -7879,18 +7969,18 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7879
7969
  }, {
7880
7970
  key: "getProductList",
7881
7971
  value: function () {
7882
- var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee83() {
7972
+ var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee84() {
7883
7973
  var _this$otherParams45;
7884
7974
  var menu_list_ids, _this$store$products, res;
7885
- return _regeneratorRuntime().wrap(function _callee83$(_context83) {
7886
- while (1) switch (_context83.prev = _context83.next) {
7975
+ return _regeneratorRuntime().wrap(function _callee84$(_context84) {
7976
+ while (1) switch (_context84.prev = _context84.next) {
7887
7977
  case 0:
7888
7978
  // 可以直接通过配置里的 menu 读取
7889
7979
  menu_list_ids = ((_this$otherParams45 = this.otherParams) === null || _this$otherParams45 === void 0 || (_this$otherParams45 = _this$otherParams45.dineInConfig) === null || _this$otherParams45 === void 0 ? void 0 : _this$otherParams45['menu.associated_menus'].map(function (n) {
7890
7980
  return Number(n.value);
7891
7981
  })) || [];
7892
- _context83.prev = 1;
7893
- _context83.next = 4;
7982
+ _context84.prev = 1;
7983
+ _context84.next = 4;
7894
7984
  return (_this$store$products = this.store.products) === null || _this$store$products === void 0 ? void 0 : _this$store$products.loadProducts({
7895
7985
  menu_list_ids: menu_list_ids,
7896
7986
  cacheId: this.cacheId,
@@ -7898,17 +7988,17 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7898
7988
  schedule_datetime: dayjs().format('YYYY-MM-DD HH:mm:ss')
7899
7989
  });
7900
7990
  case 4:
7901
- res = _context83.sent;
7902
- return _context83.abrupt("return", res);
7991
+ res = _context84.sent;
7992
+ return _context84.abrupt("return", res);
7903
7993
  case 8:
7904
- _context83.prev = 8;
7905
- _context83.t0 = _context83["catch"](1);
7906
- throw _context83.t0;
7994
+ _context84.prev = 8;
7995
+ _context84.t0 = _context84["catch"](1);
7996
+ throw _context84.t0;
7907
7997
  case 11:
7908
7998
  case "end":
7909
- return _context83.stop();
7999
+ return _context84.stop();
7910
8000
  }
7911
- }, _callee83, this, [[1, 8]]);
8001
+ }, _callee84, this, [[1, 8]]);
7912
8002
  }));
7913
8003
  function getProductList() {
7914
8004
  return _getProductList.apply(this, arguments);
@@ -7923,17 +8013,17 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7923
8013
  }, {
7924
8014
  key: "setOtherParams",
7925
8015
  value: function () {
7926
- var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee84(params) {
8016
+ var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee85(params) {
7927
8017
  var _this$otherParams46;
7928
8018
  var _ref58,
7929
8019
  _ref58$cover,
7930
8020
  cover,
7931
8021
  previousPickupTimingScope,
7932
- _args84 = arguments;
7933
- return _regeneratorRuntime().wrap(function _callee84$(_context84) {
7934
- while (1) switch (_context84.prev = _context84.next) {
8022
+ _args85 = arguments;
8023
+ return _regeneratorRuntime().wrap(function _callee85$(_context85) {
8024
+ while (1) switch (_context85.prev = _context85.next) {
7935
8025
  case 0:
7936
- _ref58 = _args84.length > 1 && _args84[1] !== undefined ? _args84[1] : {}, _ref58$cover = _ref58.cover, cover = _ref58$cover === void 0 ? false : _ref58$cover;
8026
+ _ref58 = _args85.length > 1 && _args85[1] !== undefined ? _args85[1] : {}, _ref58$cover = _ref58.cover, cover = _ref58$cover === void 0 ? false : _ref58$cover;
7937
8027
  previousPickupTimingScope = this.getPickupTimingScope();
7938
8028
  if (cover) {
7939
8029
  this.otherParams = _objectSpread({}, params);
@@ -7942,17 +8032,17 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7942
8032
  }
7943
8033
  this.cacheId = (_this$otherParams46 = this.otherParams) === null || _this$otherParams46 === void 0 ? void 0 : _this$otherParams46.cacheId;
7944
8034
  if (previousPickupTimingScope !== this.getPickupTimingScope()) this.resetPickupTimingCache();
7945
- _context84.next = 7;
8035
+ _context85.next = 7;
7946
8036
  return this.syncOtherParamsToSubModules(params, {
7947
8037
  cover: cover
7948
8038
  });
7949
8039
  case 7:
7950
8040
  case "end":
7951
- return _context84.stop();
8041
+ return _context85.stop();
7952
8042
  }
7953
- }, _callee84, this);
8043
+ }, _callee85, this);
7954
8044
  }));
7955
- function setOtherParams(_x73) {
8045
+ function setOtherParams(_x76) {
7956
8046
  return _setOtherParams.apply(this, arguments);
7957
8047
  }
7958
8048
  return setOtherParams;