@pisell/pisellos 0.10.88 → 0.10.91
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/itemRule/adapter.d.ts +3 -1
- package/dist/model/strategy/adapter/itemRule/adapter.js +74 -7
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +3 -1
- package/dist/model/strategy/adapter/itemRule/evaluator.js +13 -0
- package/dist/model/strategy/adapter/itemRule/type.d.ts +40 -1
- package/dist/model/strategy/adapter/itemRule/type.js +10 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +2 -1
- package/dist/model/strategy/adapter/promotion/evaluator.js +103 -112
- package/dist/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
- package/dist/modules/BookingContext/utils/calendarBooking.js +207 -0
- package/dist/modules/BookingContext/utils/index.d.ts +1 -0
- package/dist/modules/BookingContext/utils/index.js +1 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +21 -0
- package/dist/modules/BookingContext/utils/productExtend.js +132 -33
- package/dist/modules/BookingContext/utils/resources.js +1 -1
- package/dist/modules/Cart/index.js +4 -3
- package/dist/modules/Cart/types.d.ts +2 -0
- package/dist/modules/Cart/utils/cartProduct.d.ts +3 -1
- package/dist/modules/Cart/utils/cartProduct.js +59 -32
- package/dist/modules/Date/index.d.ts +1 -1
- package/dist/modules/Date/index.js +60 -14
- package/dist/modules/Date/types.d.ts +5 -0
- package/dist/modules/OpenData/salesSettings.js +1 -1
- package/dist/modules/OpenData/types.d.ts +9 -0
- package/dist/modules/OpenData/utils.d.ts +1 -1
- package/dist/modules/OpenData/utils.js +3 -2
- package/dist/modules/Order/index.d.ts +22 -7
- package/dist/modules/Order/index.js +1565 -1161
- package/dist/modules/Order/localEftposState.d.ts +13 -0
- package/dist/modules/Order/localEftposState.js +39 -0
- package/dist/modules/Order/types.d.ts +33 -11
- package/dist/modules/Order/types.js +2 -2
- package/dist/modules/Order/unpaidAmountGap.d.ts +6 -0
- package/dist/modules/Order/unpaidAmountGap.js +72 -0
- package/dist/modules/Order/utils.d.ts +4 -1
- package/dist/modules/Order/utils.js +185 -129
- package/dist/modules/Payment/walletpass.js +32 -6
- package/dist/modules/Product/types.d.ts +16 -0
- package/dist/modules/ProductList/index.js +1 -1
- package/dist/modules/ResourcePlanner/planner.d.ts +2 -0
- package/dist/modules/ResourcePlanner/planner.js +383 -24
- package/dist/modules/ResourcePlanner/types.d.ts +42 -0
- package/dist/modules/Rules/index.js +86 -54
- package/dist/modules/Schedule/index.d.ts +7 -1
- package/dist/modules/Schedule/index.js +155 -39
- package/dist/modules/Schedule/types.d.ts +2 -0
- package/dist/modules/bookingReadValidation.d.ts +6 -0
- package/dist/modules/bookingReadValidation.js +72 -0
- package/dist/plugins/request.d.ts +2 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +1928 -1462
- package/dist/server/modules/form/index.d.ts +19 -0
- package/dist/server/modules/form/index.js +205 -0
- package/dist/server/modules/form/types.d.ts +13 -0
- package/dist/server/modules/form/types.js +3 -0
- package/dist/server/modules/index.d.ts +3 -0
- package/dist/server/modules/index.js +4 -0
- package/dist/server/modules/order/index.d.ts +21 -0
- package/dist/server/modules/order/index.js +1399 -831
- package/dist/server/modules/order/types.d.ts +3 -0
- package/dist/server/modules/order/utils/filterOrders.js +20 -0
- package/dist/server/modules/products/index.d.ts +28 -7
- package/dist/server/modules/products/index.js +1295 -769
- package/dist/server/modules/products/replication.d.ts +8 -0
- package/dist/server/modules/products/replication.js +69 -0
- package/dist/server/modules/products/types.d.ts +12 -1
- package/dist/server/modules/products/types.js +4 -0
- package/dist/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
- package/dist/shared/receipt/customerInvoiceLanguages.js +5 -3
- package/dist/shared/receipt/small-ticket.d.ts +1 -0
- package/dist/shared/receipt/small-ticket.js +58 -26
- package/dist/shared/receipt/templateVisibility.d.ts +3 -0
- package/dist/shared/receipt/templateVisibility.js +6 -2
- package/dist/solution/BaseSales/fulfillmentItemRules.d.ts +27 -0
- package/dist/solution/BaseSales/fulfillmentItemRules.js +750 -0
- package/dist/solution/BaseSales/index.d.ts +22 -6
- package/dist/solution/BaseSales/index.js +1881 -1347
- package/dist/solution/BaseSales/pickupTiming.d.ts +4 -0
- package/dist/solution/BaseSales/pickupTiming.js +35 -8
- package/dist/solution/BaseSales/types.d.ts +4 -0
- package/dist/solution/BaseSales/types.js +1 -0
- package/dist/solution/BaseSales/utils/posDurationPricing.d.ts +21 -0
- package/dist/solution/BaseSales/utils/posDurationPricing.js +174 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +2 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +8 -8
- package/dist/solution/BookingByStep/index.d.ts +19 -3
- package/dist/solution/BookingByStep/index.js +681 -361
- package/dist/solution/BookingByStep/utils/resources.d.ts +10 -0
- package/dist/solution/BookingByStep/utils/resources.js +117 -76
- package/dist/solution/BookingTicket/index.d.ts +6 -0
- package/dist/solution/BookingTicket/index.js +666 -593
- package/dist/solution/BookingTicket/types.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.js +35 -8
- package/dist/solution/BookingTicket/utils/redeemArrival.d.ts +7 -7
- package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
- package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.js +188 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +58 -94
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +1 -3
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +33 -62
- package/dist/solution/OrderInvoicePreview/index.js +4 -3
- package/dist/solution/Sales/index.js +1 -1
- package/dist/solution/ScanOrder/index.d.ts +2 -0
- package/dist/solution/ScanOrder/index.js +230 -97
- package/dist/solution/ScanOrder/menuAvailability.d.ts +24 -0
- package/dist/solution/ScanOrder/menuAvailability.js +363 -0
- package/dist/solution/ScanOrder/types.d.ts +3 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +42 -10
- package/dist/solution/UnifiedBookingSales/index.js +2493 -1496
- package/dist/solution/UnifiedBookingSales/salesSettings.js +1 -1
- package/dist/solution/UnifiedBookingSales/types.d.ts +20 -5
- package/dist/utils/pos-receipt-auto-print.d.ts +4 -0
- package/dist/utils/pos-receipt-auto-print.js +14 -0
- package/lib/model/strategy/adapter/itemRule/adapter.d.ts +3 -1
- package/lib/model/strategy/adapter/itemRule/adapter.js +54 -4
- package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +3 -1
- package/lib/model/strategy/adapter/itemRule/evaluator.js +9 -0
- package/lib/model/strategy/adapter/itemRule/type.d.ts +40 -1
- package/lib/model/strategy/adapter/itemRule/type.js +10 -0
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +2 -1
- package/lib/model/strategy/adapter/promotion/evaluator.js +22 -21
- package/lib/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
- package/lib/modules/BookingContext/utils/calendarBooking.js +156 -0
- package/lib/modules/BookingContext/utils/index.d.ts +1 -0
- package/lib/modules/BookingContext/utils/index.js +11 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +21 -0
- package/lib/modules/BookingContext/utils/productExtend.js +104 -5
- package/lib/modules/BookingContext/utils/resources.js +1 -1
- package/lib/modules/Cart/index.js +4 -2
- package/lib/modules/Cart/types.d.ts +2 -0
- package/lib/modules/Cart/utils/cartProduct.d.ts +3 -1
- package/lib/modules/Cart/utils/cartProduct.js +39 -20
- package/lib/modules/Date/index.d.ts +1 -1
- package/lib/modules/Date/index.js +28 -5
- package/lib/modules/Date/types.d.ts +5 -0
- package/lib/modules/OpenData/salesSettings.js +1 -1
- package/lib/modules/OpenData/types.d.ts +9 -0
- package/lib/modules/OpenData/utils.d.ts +1 -1
- package/lib/modules/OpenData/utils.js +3 -2
- package/lib/modules/Order/index.d.ts +22 -7
- package/lib/modules/Order/index.js +457 -174
- package/lib/modules/Order/localEftposState.d.ts +13 -0
- package/lib/modules/Order/localEftposState.js +44 -0
- package/lib/modules/Order/types.d.ts +33 -11
- package/lib/modules/Order/types.js +2 -2
- package/lib/modules/Order/unpaidAmountGap.d.ts +6 -0
- package/lib/modules/Order/unpaidAmountGap.js +60 -0
- package/lib/modules/Order/utils.d.ts +4 -1
- package/lib/modules/Order/utils.js +51 -3
- package/lib/modules/Payment/walletpass.js +23 -1
- package/lib/modules/Product/types.d.ts +16 -0
- package/lib/modules/ProductList/index.js +1 -1
- package/lib/modules/ResourcePlanner/planner.d.ts +2 -0
- package/lib/modules/ResourcePlanner/planner.js +299 -9
- package/lib/modules/ResourcePlanner/types.d.ts +42 -0
- package/lib/modules/Rules/index.js +32 -3
- package/lib/modules/Schedule/index.d.ts +7 -1
- package/lib/modules/Schedule/index.js +68 -4
- package/lib/modules/Schedule/types.d.ts +2 -0
- package/lib/modules/bookingReadValidation.d.ts +6 -0
- package/lib/modules/bookingReadValidation.js +56 -0
- package/lib/plugins/request.d.ts +2 -0
- package/lib/server/index.d.ts +9 -0
- package/lib/server/index.js +279 -30
- package/lib/server/modules/form/index.d.ts +19 -0
- package/lib/server/modules/form/index.js +73 -0
- package/lib/server/modules/form/types.d.ts +13 -0
- package/lib/server/modules/form/types.js +9 -0
- package/lib/server/modules/index.d.ts +3 -0
- package/lib/server/modules/index.js +15 -1
- package/lib/server/modules/order/index.d.ts +21 -0
- package/lib/server/modules/order/index.js +344 -35
- package/lib/server/modules/order/types.d.ts +3 -0
- package/lib/server/modules/order/utils/filterOrders.js +18 -0
- package/lib/server/modules/products/index.d.ts +28 -7
- package/lib/server/modules/products/index.js +224 -62
- package/lib/server/modules/products/replication.d.ts +8 -0
- package/lib/server/modules/products/replication.js +30 -0
- package/lib/server/modules/products/types.d.ts +12 -1
- package/lib/server/modules/products/types.js +3 -0
- package/lib/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
- package/lib/shared/receipt/customerInvoiceLanguages.js +5 -3
- package/lib/shared/receipt/small-ticket.d.ts +1 -0
- package/lib/shared/receipt/small-ticket.js +53 -25
- package/lib/shared/receipt/templateVisibility.d.ts +3 -0
- package/lib/shared/receipt/templateVisibility.js +6 -2
- package/lib/solution/BaseSales/fulfillmentItemRules.d.ts +27 -0
- package/lib/solution/BaseSales/fulfillmentItemRules.js +259 -0
- package/lib/solution/BaseSales/index.d.ts +22 -6
- package/lib/solution/BaseSales/index.js +347 -59
- package/lib/solution/BaseSales/pickupTiming.d.ts +4 -0
- package/lib/solution/BaseSales/pickupTiming.js +24 -3
- package/lib/solution/BaseSales/types.d.ts +4 -0
- package/lib/solution/BaseSales/types.js +1 -0
- package/lib/solution/BaseSales/utils/posDurationPricing.d.ts +21 -0
- package/lib/solution/BaseSales/utils/posDurationPricing.js +133 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +2 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/lib/solution/BookingByStep/index.d.ts +19 -3
- package/lib/solution/BookingByStep/index.js +229 -17
- package/lib/solution/BookingByStep/utils/resources.d.ts +10 -0
- package/lib/solution/BookingByStep/utils/resources.js +25 -15
- package/lib/solution/BookingTicket/index.d.ts +6 -0
- package/lib/solution/BookingTicket/index.js +40 -5
- package/lib/solution/BookingTicket/types.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +34 -4
- package/lib/solution/BookingTicket/utils/redeemArrival.d.ts +7 -7
- package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
- package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.js +136 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +2 -14
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +1 -3
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +17 -34
- package/lib/solution/OrderInvoicePreview/index.js +1 -0
- package/lib/solution/Sales/index.js +1 -1
- package/lib/solution/ScanOrder/index.d.ts +2 -0
- package/lib/solution/ScanOrder/index.js +131 -22
- package/lib/solution/ScanOrder/menuAvailability.d.ts +24 -0
- package/lib/solution/ScanOrder/menuAvailability.js +203 -0
- package/lib/solution/ScanOrder/types.d.ts +3 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +42 -10
- package/lib/solution/UnifiedBookingSales/index.js +717 -144
- package/lib/solution/UnifiedBookingSales/salesSettings.js +1 -1
- package/lib/solution/UnifiedBookingSales/types.d.ts +20 -5
- package/lib/utils/pos-receipt-auto-print.d.ts +4 -0
- package/lib/utils/pos-receipt-auto-print.js +13 -0
- package/package.json +1 -1
|
@@ -2,9 +2,7 @@ import type { GlobalScanHandleResult, GlobalScanHostBridge } from '../../types';
|
|
|
2
2
|
import { type GlobalScanApplyHost } from './applyGlobalScan';
|
|
3
3
|
import type { GlobalScanFormattedResult } from './formatGlobalScan';
|
|
4
4
|
export interface ProductVoucherCollectionScanHost extends GlobalScanApplyHost {
|
|
5
|
-
waitForCustomerDiscounts(): Promise<void>;
|
|
6
5
|
loadCustomerDiscounts(): Promise<Record<string, any>[]>;
|
|
7
6
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Never expand a wristband's result to other orders of the same customer. */
|
|
7
|
+
/** Resolve the scanned account, then collect all of that customer's vouchers. */
|
|
10
8
|
export declare function applyProductVoucherCollectionScan(host: ProductVoucherCollectionScanHost, formatted: GlobalScanFormattedResult, bridge: GlobalScanHostBridge): Promise<GlobalScanHandleResult>;
|
|
@@ -8,14 +8,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
8
8
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
9
9
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
10
|
import { applyGlobalScan } from "./applyGlobalScan";
|
|
11
|
-
/**
|
|
12
|
-
* Never expand a wristband's result to other orders of the same customer. */
|
|
11
|
+
/** Resolve the scanned account, then collect all of that customer's vouchers. */
|
|
13
12
|
export function applyProductVoucherCollectionScan(_x, _x2, _x3) {
|
|
14
13
|
return _applyProductVoucherCollectionScan.apply(this, arguments);
|
|
15
14
|
}
|
|
16
15
|
function _applyProductVoucherCollectionScan() {
|
|
17
16
|
_applyProductVoucherCollectionScan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(host, formatted, bridge) {
|
|
18
|
-
var
|
|
17
|
+
var _ref, _formatted$customerId, _formatted$data, _formatted$data2, _bridge$requestCustom;
|
|
18
|
+
var assertCurrent, isPass, customerScan, result, vouchers;
|
|
19
19
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20
20
|
while (1) switch (_context2.prev = _context2.next) {
|
|
21
21
|
case 0:
|
|
@@ -25,9 +25,16 @@ function _applyProductVoucherCollectionScan() {
|
|
|
25
25
|
throw new DOMException('Scan session ended', 'AbortError');
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
isPass = formatted.searchType === 'walletPass'; // Order numbers and wristbands resolve through batch-search. Their returned
|
|
29
|
+
// passes identify the customer; they are not the collection's voucher list.
|
|
30
|
+
// Resolve source-shop IDs before reusing the wallet customer-binding flow.
|
|
31
|
+
customerScan = isPass ? _objectSpread(_objectSpread({}, formatted), {}, {
|
|
32
|
+
searchType: 'wallet',
|
|
33
|
+
customerId: (_ref = (_formatted$customerId = formatted.customerId) !== null && _formatted$customerId !== void 0 ? _formatted$customerId : (_formatted$data = formatted.data) === null || _formatted$data === void 0 ? void 0 : _formatted$data.id) !== null && _ref !== void 0 ? _ref : (_formatted$data2 = formatted.data) === null || _formatted$data2 === void 0 ? void 0 : _formatted$data2.customer_id,
|
|
34
|
+
isCrossShopWallet: true
|
|
35
|
+
}) : formatted;
|
|
29
36
|
assertCurrent();
|
|
30
|
-
_context2.next =
|
|
37
|
+
_context2.next = 6;
|
|
31
38
|
return applyGlobalScan(_objectSpread(_objectSpread({}, host), {}, {
|
|
32
39
|
setOrderCustomer: function setOrderCustomer(customer) {
|
|
33
40
|
assertCurrent();
|
|
@@ -37,77 +44,41 @@ function _applyProductVoucherCollectionScan() {
|
|
|
37
44
|
assertCurrent();
|
|
38
45
|
return host.addProductToOrder(product, booking);
|
|
39
46
|
}
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
productVouchersOnly: true,
|
|
54
|
-
suppressFailureNotification: true
|
|
55
|
-
}));
|
|
56
|
-
case 5:
|
|
57
|
-
promotion = _context.sent;
|
|
58
|
-
assertCurrent();
|
|
59
|
-
// An empty successful search is different from a swallowed request error.
|
|
60
|
-
if (Array.isArray(promotion.scannedDiscountList)) {
|
|
61
|
-
_context.next = 9;
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
throw new Error('Could not resolve scanned vouchers');
|
|
65
|
-
case 9:
|
|
66
|
-
vouchers = promotion.scannedDiscountList;
|
|
67
|
-
return _context.abrupt("return", promotion);
|
|
68
|
-
case 11:
|
|
69
|
-
case "end":
|
|
70
|
-
return _context.stop();
|
|
71
|
-
}
|
|
72
|
-
}, _callee);
|
|
73
|
-
}));
|
|
74
|
-
return function (_x4, _x5, _x6) {
|
|
75
|
-
return _ref.apply(this, arguments);
|
|
76
|
-
};
|
|
77
|
-
}())
|
|
47
|
+
}), customerScan, _objectSpread(_objectSpread({}, bridge), {}, {
|
|
48
|
+
// Without a switch bridge, do not return the previous customer's vouchers.
|
|
49
|
+
requestCustomerSwitch: (_bridge$requestCustom = bridge.requestCustomerSwitch) !== null && _bridge$requestCustom !== void 0 ? _bridge$requestCustom : /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
50
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
51
|
+
while (1) switch (_context.prev = _context.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
return _context.abrupt("return", false);
|
|
54
|
+
case 1:
|
|
55
|
+
case "end":
|
|
56
|
+
return _context.stop();
|
|
57
|
+
}
|
|
58
|
+
}, _callee);
|
|
59
|
+
}))
|
|
78
60
|
}));
|
|
79
|
-
case
|
|
61
|
+
case 6:
|
|
80
62
|
result = _context2.sent;
|
|
81
63
|
assertCurrent();
|
|
82
|
-
if (!(
|
|
83
|
-
_context2.next =
|
|
64
|
+
if (!(customerScan.searchType === 'wallet' && result.status === 'success')) {
|
|
65
|
+
_context2.next = 14;
|
|
84
66
|
break;
|
|
85
67
|
}
|
|
86
|
-
_context2.next =
|
|
68
|
+
_context2.next = 11;
|
|
87
69
|
return host.loadCustomerDiscounts();
|
|
88
|
-
case
|
|
70
|
+
case 11:
|
|
89
71
|
vouchers = _context2.sent;
|
|
90
72
|
assertCurrent();
|
|
91
73
|
return _context2.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
|
|
92
74
|
redemption: {
|
|
93
|
-
source: 'wallet',
|
|
75
|
+
source: isPass ? 'scan' : 'wallet',
|
|
94
76
|
vouchers: vouchers
|
|
95
77
|
}
|
|
96
78
|
}));
|
|
97
|
-
case
|
|
98
|
-
if (!(formatted.searchType === 'walletPass')) {
|
|
99
|
-
_context2.next = 15;
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
return _context2.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
|
|
103
|
-
redemption: {
|
|
104
|
-
source: 'scan',
|
|
105
|
-
vouchers: vouchers
|
|
106
|
-
}
|
|
107
|
-
}));
|
|
108
|
-
case 15:
|
|
79
|
+
case 14:
|
|
109
80
|
return _context2.abrupt("return", result);
|
|
110
|
-
case
|
|
81
|
+
case 15:
|
|
111
82
|
case "end":
|
|
112
83
|
return _context2.stop();
|
|
113
84
|
}
|
|
@@ -216,13 +216,14 @@ export var OrderInvoicePreviewImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
216
216
|
tax_country_code: getData('tax_country_code')
|
|
217
217
|
} : {});
|
|
218
218
|
shop.default_domain || (shop.default_domain = shopCore.default_domain);
|
|
219
|
+
shop.private_domain || (shop.private_domain = shopCore.private_domain);
|
|
219
220
|
shop.private_domain_protocol || (shop.private_domain_protocol = shopCore.private_domain_protocol);
|
|
220
221
|
if (!(generation !== _this3.generation || _this3.disposed)) {
|
|
221
|
-
_context.next =
|
|
222
|
+
_context.next = 21;
|
|
222
223
|
break;
|
|
223
224
|
}
|
|
224
225
|
throw new Error('Invoice request superseded');
|
|
225
|
-
case
|
|
226
|
+
case 21:
|
|
226
227
|
languageOptions = resolveCustomerInvoiceLanguages(template.language, input.locale);
|
|
227
228
|
remembered = (_this3$languageSelect = _this3.languageSelection) === null || _this3$languageSelect === void 0 ? void 0 : _this3$languageSelect.code;
|
|
228
229
|
selected = languageOptions.find(function (option) {
|
|
@@ -259,7 +260,7 @@ export var OrderInvoicePreviewImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
259
260
|
error: null
|
|
260
261
|
});
|
|
261
262
|
return _context.abrupt("return", result);
|
|
262
|
-
case
|
|
263
|
+
case 28:
|
|
263
264
|
case "end":
|
|
264
265
|
return _context.stop();
|
|
265
266
|
}
|
|
@@ -442,7 +442,7 @@ export var SalesImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
442
442
|
} : {
|
|
443
443
|
external_sale_number: normalizedLookup
|
|
444
444
|
};
|
|
445
|
-
return _context6.abrupt("return", this.request.post('/local/print-order', _objectSpread(_objectSpread({}, lookupPayload), {}, {
|
|
445
|
+
return _context6.abrupt("return", this.request.post('/shop/local/print-order', _objectSpread(_objectSpread({}, lookupPayload), {}, {
|
|
446
446
|
lookup_order_from_db: 1,
|
|
447
447
|
small_ticket_data_flag: 1,
|
|
448
448
|
business_code: businessCode,
|
|
@@ -100,6 +100,8 @@ export declare class ScanOrderImpl extends BaseSalesImpl implements Module {
|
|
|
100
100
|
private buildSubmitPayloadEnhancer;
|
|
101
101
|
private isScanOrderMoreMode;
|
|
102
102
|
private submitScanOrderMore;
|
|
103
|
+
/** Read both current and legacy cart snapshots without changing the product catalog. */
|
|
104
|
+
private getMenuAvailabilityProductSources;
|
|
103
105
|
submitScanOrder<T = any>(): Promise<T>;
|
|
104
106
|
addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
105
107
|
updateOrderProduct(params: UpdateOrderProductParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|