@pisell/pisellos 2.3.228 → 2.3.230

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 (39) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  2. package/dist/modules/Customer/types.d.ts +4 -0
  3. package/dist/modules/Order/index.d.ts +1 -1
  4. package/dist/modules/Order/index.js +123 -79
  5. package/dist/modules/Order/types.d.ts +2 -0
  6. package/dist/modules/Order/utils/bookingUuid.d.ts +4 -0
  7. package/dist/modules/Order/utils/bookingUuid.js +24 -0
  8. package/dist/modules/Order/utils.js +2 -0
  9. package/dist/modules/Product/index.d.ts +1 -1
  10. package/dist/modules/Summary/utils.d.ts +1 -1
  11. package/dist/solution/BaseSales/index.js +3 -0
  12. package/dist/solution/BookingByStep/index.d.ts +3 -3
  13. package/dist/solution/BookingTicket/index.d.ts +1 -0
  14. package/dist/solution/BookingTicket/index.js +49 -18
  15. package/dist/solution/BookingTicket/utils/redeemArrival.d.ts +6 -6
  16. package/dist/solution/Checkout/index.js +104 -69
  17. package/dist/solution/Checkout/types.d.ts +1 -0
  18. package/dist/solution/ScanOrder/index.js +10 -2
  19. package/dist/solution/VenueBooking/index.js +522 -490
  20. package/lib/model/strategy/adapter/promotion/index.js +1 -46
  21. package/lib/modules/Customer/types.d.ts +4 -0
  22. package/lib/modules/Order/index.d.ts +1 -1
  23. package/lib/modules/Order/index.js +44 -6
  24. package/lib/modules/Order/types.d.ts +2 -0
  25. package/lib/modules/Order/utils/bookingUuid.d.ts +4 -0
  26. package/lib/modules/Order/utils/bookingUuid.js +25 -0
  27. package/lib/modules/Order/utils.js +5 -1
  28. package/lib/modules/Product/index.d.ts +1 -1
  29. package/lib/modules/Summary/utils.d.ts +1 -1
  30. package/lib/solution/BaseSales/index.js +3 -0
  31. package/lib/solution/BookingByStep/index.d.ts +3 -3
  32. package/lib/solution/BookingTicket/index.d.ts +1 -0
  33. package/lib/solution/BookingTicket/index.js +27 -6
  34. package/lib/solution/BookingTicket/utils/redeemArrival.d.ts +6 -6
  35. package/lib/solution/Checkout/index.js +21 -0
  36. package/lib/solution/Checkout/types.d.ts +1 -0
  37. package/lib/solution/ScanOrder/index.js +6 -0
  38. package/lib/solution/VenueBooking/index.js +6 -1
  39. package/package.json +1 -1
@@ -1431,10 +1431,18 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
1431
1431
  var bookingCapacityDimensionId = (_pickFirstCustomCapac = pickFirstCustomCapacityDimensionId(_this5.enabledReservationRuleProducts)) !== null && _pickFirstCustomCapac !== void 0 ? _pickFirstCustomCapac : 0;
1432
1432
  var bookings = payload.bookings || [];
1433
1433
  if (!tempOrder.order_id && bookings.length === 0) {
1434
+ var _tempOrder$_extend;
1435
+ var extend = (_tempOrder$_extend = tempOrder._extend) !== null && _tempOrder$_extend !== void 0 ? _tempOrder$_extend : tempOrder._extend = {};
1436
+ if (!extend.scanOrderBookingUuid) {
1437
+ var _this5$store$order, _this5$store$order$pe;
1438
+ extend.scanOrderBookingUuid = createUuidV4();
1439
+ (_this5$store$order = _this5.store.order) === null || _this5$store$order === void 0 || (_this5$store$order$pe = _this5$store$order.persistTempOrder) === null || _this5$store$order$pe === void 0 || _this5$store$order$pe.call(_this5$store$order);
1440
+ }
1434
1441
  var bookingStart = dayjs(now);
1435
1442
  var bookingDuration = resolveTableOccupancyDuration(tempOrder);
1436
1443
  var bookingEnd = bookingStart.add(bookingDuration, 'minute');
1437
1444
  bookings = [normalizeSubmitBooking({
1445
+ uuid: extend.scanOrderBookingUuid,
1438
1446
  relation_id: 0,
1439
1447
  form_id: 0,
1440
1448
  start_time: bookingStart.format('HH:mm'),
@@ -1600,10 +1608,10 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
1600
1608
  _step5;
1601
1609
  try {
1602
1610
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
1603
- var _product$metadata3, _product$metadata4, _tempOrder$_extend;
1611
+ var _product$metadata3, _product$metadata4, _tempOrder$_extend2;
1604
1612
  var product = _step5.value;
1605
1613
  var uid = (_product$metadata3 = product.metadata) === null || _product$metadata3 === void 0 ? void 0 : _product$metadata3.unique_identification_number;
1606
- var origins = [product._origin, (_product$metadata4 = product.metadata) === null || _product$metadata4 === void 0 ? void 0 : _product$metadata4.origin, uid ? (_tempOrder$_extend = tempOrder._extend) === null || _tempOrder$_extend === void 0 || (_tempOrder$_extend = _tempOrder$_extend.productsByUid) === null || _tempOrder$_extend === void 0 || (_tempOrder$_extend = _tempOrder$_extend[String(uid)]) === null || _tempOrder$_extend === void 0 ? void 0 : _tempOrder$_extend.origin : undefined];
1614
+ var origins = [product._origin, (_product$metadata4 = product.metadata) === null || _product$metadata4 === void 0 ? void 0 : _product$metadata4.origin, uid ? (_tempOrder$_extend2 = tempOrder._extend) === null || _tempOrder$_extend2 === void 0 || (_tempOrder$_extend2 = _tempOrder$_extend2.productsByUid) === null || _tempOrder$_extend2 === void 0 || (_tempOrder$_extend2 = _tempOrder$_extend2[String(uid)]) === null || _tempOrder$_extend2 === void 0 ? void 0 : _tempOrder$_extend2.origin : undefined];
1607
1615
  for (var _i5 = 0, _origins = origins; _i5 < _origins.length; _i5++) {
1608
1616
  var origin = _origins[_i5];
1609
1617
  if (origin && _typeof(origin) === 'object' && !Array.isArray(origin)) {