@pisell/pisellos 2.3.51 → 2.3.54
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/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +12 -10
- package/dist/modules/Order/index.d.ts +6 -6
- package/dist/modules/Order/index.js +140 -86
- package/dist/modules/Order/types.d.ts +21 -3
- package/dist/modules/Order/types.js +11 -0
- package/dist/modules/ProductList/index.js +1 -1
- package/dist/modules/Rules/index.js +19 -9
- package/dist/modules/SalesSummary/utils.js +7 -1
- package/dist/solution/BaseSales/index.d.ts +15 -5
- package/dist/solution/BaseSales/index.js +173 -135
- package/dist/solution/BaseSales/utils/cartPromotion.js +5 -3
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/types.d.ts +3 -0
- package/dist/solution/BookingTicket/utils/cartView.js +44 -32
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +16 -2
- package/dist/solution/UnifiedBookingSales/index.d.ts +0 -4
- package/dist/solution/UnifiedBookingSales/index.js +27 -26
- package/lib/model/strategy/adapter/promotion/index.js +0 -51
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -1
- package/lib/modules/Order/index.d.ts +6 -6
- package/lib/modules/Order/index.js +79 -12
- package/lib/modules/Order/types.d.ts +21 -3
- package/lib/modules/ProductList/index.js +9 -1
- package/lib/modules/Rules/index.js +16 -11
- package/lib/modules/SalesSummary/utils.js +5 -1
- package/lib/solution/BaseSales/index.d.ts +15 -5
- package/lib/solution/BaseSales/index.js +44 -11
- package/lib/solution/BaseSales/utils/cartPromotion.js +5 -2
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/types.d.ts +3 -0
- package/lib/solution/BookingTicket/utils/cartView.js +43 -30
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/Sales/index.js +15 -3
- package/lib/solution/UnifiedBookingSales/index.d.ts +0 -4
- package/lib/solution/UnifiedBookingSales/index.js +27 -26
- package/package.json +1 -1
|
@@ -134,9 +134,11 @@ function resolveMainProductPrice(product, fallback) {
|
|
|
134
134
|
}
|
|
135
135
|
function mapOrderBundleToOtherBundle(bundle) {
|
|
136
136
|
return bundle.map(function (item) {
|
|
137
|
-
var _ref7, _item$original_price;
|
|
137
|
+
var _ref7, _ref8, _item$original_price;
|
|
138
138
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
139
|
-
|
|
139
|
+
// 后端历史订单可能没有 original_price;此时 price 是折前毛价,
|
|
140
|
+
// bundle_selling_price 已包含折扣,不能把它当成编辑时的新原价。
|
|
141
|
+
original_price: (_ref7 = (_ref8 = (_item$original_price = item.original_price) !== null && _item$original_price !== void 0 ? _item$original_price : item.product_price) !== null && _ref8 !== void 0 ? _ref8 : item.price) !== null && _ref7 !== void 0 ? _ref7 : item.bundle_selling_price
|
|
140
142
|
});
|
|
141
143
|
});
|
|
142
144
|
}
|
|
@@ -167,10 +169,10 @@ function synthesizeProductResourceFromBooking(booking) {
|
|
|
167
169
|
});
|
|
168
170
|
if (relationIdsByForm.size === 0) return undefined;
|
|
169
171
|
return {
|
|
170
|
-
resources: Array.from(relationIdsByForm.entries()).map(function (
|
|
171
|
-
var
|
|
172
|
-
formId =
|
|
173
|
-
relationIds =
|
|
172
|
+
resources: Array.from(relationIdsByForm.entries()).map(function (_ref9) {
|
|
173
|
+
var _ref10 = _slicedToArray(_ref9, 2),
|
|
174
|
+
formId = _ref10[0],
|
|
175
|
+
relationIds = _ref10[1];
|
|
174
176
|
return {
|
|
175
177
|
id: formId,
|
|
176
178
|
status: 1,
|
|
@@ -190,7 +192,7 @@ function synthesizeProductResourceFromBooking(booking) {
|
|
|
190
192
|
* 调用方须传入与该行关联的 booking(通常 bookings[].product_uid === product.metadata.unique_identification_number)。
|
|
191
193
|
*/
|
|
192
194
|
export function buildCacheItemFromOrderLine(input) {
|
|
193
|
-
var _product$product_id, _product$selling_pric, _product$original_pri, _booking$metadata$hol, _booking$metadata2, _product$product_vari, _product$num,
|
|
195
|
+
var _product$product_id, _product$selling_pric, _product$original_pri, _booking$metadata$hol, _booking$metadata2, _product$product_vari, _product$num, _ref11, _product$note, _booking$detail2, _product$metadata, _product$metadata2, _ref12, _extension_type, _booking$product2, _booking$product3, _price, _product$product_sku, _product$order_detail, _ref13, _booking$id;
|
|
194
196
|
var product = input.product,
|
|
195
197
|
booking = input.booking,
|
|
196
198
|
sourceProduct = input.sourceProduct;
|
|
@@ -225,7 +227,7 @@ export function buildCacheItemFromOrderLine(input) {
|
|
|
225
227
|
quantity: (_product$num = product.num) !== null && _product$num !== void 0 ? _product$num : 1,
|
|
226
228
|
product_name: productTitle,
|
|
227
229
|
product_cover: productCover,
|
|
228
|
-
note: (
|
|
230
|
+
note: (_ref11 = (_product$note = product.note) !== null && _product$note !== void 0 ? _product$note : booking === null || booking === void 0 || (_booking$detail2 = booking.detail) === null || _booking$detail2 === void 0 ? void 0 : _booking$detail2.note) !== null && _ref11 !== void 0 ? _ref11 : '',
|
|
229
231
|
price: mainProductPrice,
|
|
230
232
|
total: selling,
|
|
231
233
|
origin_total: original,
|
|
@@ -260,7 +262,7 @@ export function buildCacheItemFromOrderLine(input) {
|
|
|
260
262
|
var base = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, sourceProduct || {}), {}, {
|
|
261
263
|
id: resolvedId,
|
|
262
264
|
product_id: resolvedId,
|
|
263
|
-
extension_type: (
|
|
265
|
+
extension_type: (_ref12 = (_extension_type = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.extension_type) !== null && _extension_type !== void 0 ? _extension_type : booking === null || booking === void 0 || (_booking$product2 = booking.product) === null || _booking$product2 === void 0 ? void 0 : _booking$product2.extension_type) !== null && _ref12 !== void 0 ? _ref12 : sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.extension_type,
|
|
264
266
|
title: productTitle || (sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.title) || (booking === null || booking === void 0 || (_booking$product3 = booking.product) === null || _booking$product3 === void 0 ? void 0 : _booking$product3.title),
|
|
265
267
|
price: (_price = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.price) !== null && _price !== void 0 ? _price : selling,
|
|
266
268
|
selling_price: product.selling_price,
|
|
@@ -274,7 +276,7 @@ export function buildCacheItemFromOrderLine(input) {
|
|
|
274
276
|
new: 0,
|
|
275
277
|
autoClose: false,
|
|
276
278
|
order_detail_id: (_product$order_detail = product.order_detail_id) !== null && _product$order_detail !== void 0 ? _product$order_detail : null,
|
|
277
|
-
booking_id: (
|
|
279
|
+
booking_id: (_ref13 = (_booking$id = booking.id) !== null && _booking$id !== void 0 ? _booking$id : booking.booking_id) !== null && _ref13 !== void 0 ? _ref13 : 0
|
|
278
280
|
});
|
|
279
281
|
if ((sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.capacity) !== undefined) {
|
|
280
282
|
base.capacity = sourceProduct.capacity;
|
|
@@ -3,7 +3,7 @@ import { BaseModule } from '../BaseModule';
|
|
|
3
3
|
import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
|
|
4
4
|
import { CartItem } from '../Cart/types';
|
|
5
5
|
import { type SubmitPayloadEnhancer } from './utils';
|
|
6
|
-
import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions } from './types';
|
|
6
|
+
import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions } from './types';
|
|
7
7
|
import type { ICustomer } from '../AccountList/types';
|
|
8
8
|
import type { Discount } from '../Discount/types';
|
|
9
9
|
import { UnavailableReason } from '../Rules/types';
|
|
@@ -385,7 +385,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
385
385
|
* await order.addProductToOrder({ product_id: 1, num: 3 }, { start_time: '10:00' });
|
|
386
386
|
* // → tempOrder.products 新增 3 行,每行 num=1,bookings 3 条
|
|
387
387
|
*/
|
|
388
|
-
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput): Promise<OrderProduct[]>;
|
|
388
|
+
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<OrderProduct[]>;
|
|
389
389
|
/**
|
|
390
390
|
* 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
|
|
391
391
|
*
|
|
@@ -423,8 +423,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
423
423
|
* @example
|
|
424
424
|
* await order.removeProductsFromOrder([identityA, identityB]);
|
|
425
425
|
*/
|
|
426
|
-
removeProductsFromOrder(identities: OrderProductIdentity[]): Promise<OrderProduct[]>;
|
|
427
|
-
removeProductFromOrder(identity: OrderProductIdentity): Promise<OrderProduct[]>;
|
|
426
|
+
removeProductsFromOrder(identities: OrderProductIdentity[], options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
|
|
427
|
+
removeProductFromOrder(identity: OrderProductIdentity, options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
|
|
428
428
|
/**
|
|
429
429
|
* 仅清空购物车行(products / bookings),不重置整单。
|
|
430
430
|
* 用于「仅清空商品」;客户、备注、支付等协议字段保持不变。
|
|
@@ -487,7 +487,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
487
487
|
generateIdempotencyToken(): string;
|
|
488
488
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
489
489
|
createOrder(params: CommitOrderParams['query']): {
|
|
490
|
-
type: "
|
|
490
|
+
type: "appointment_booking" | "virtual";
|
|
491
491
|
platform: string;
|
|
492
492
|
sales_channel: string;
|
|
493
493
|
order_sales_channel: string;
|
|
@@ -563,4 +563,4 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
563
563
|
getOrderInfo(order_id: number): Promise<any>;
|
|
564
564
|
getVouchers(): any[];
|
|
565
565
|
}
|
|
566
|
-
export type { UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
|
|
566
|
+
export type { AddProductToOrderOptions, RemoveProductsFromOrderOptions, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
|
|
@@ -3883,11 +3883,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3883
3883
|
}, {
|
|
3884
3884
|
key: "appendProductLineToTempOrder",
|
|
3885
3885
|
value: (function () {
|
|
3886
|
-
var _appendProductLineToTempOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(tempOrder, product, booking) {
|
|
3887
|
-
var
|
|
3886
|
+
var _appendProductLineToTempOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(tempOrder, product, booking, options) {
|
|
3887
|
+
var _normalizedIncoming$p,
|
|
3888
|
+
_normalizedIncoming$p2,
|
|
3889
|
+
_booking_uid,
|
|
3888
3890
|
_metadata,
|
|
3889
3891
|
_this26 = this;
|
|
3890
|
-
var linked, productToAdd, incomingFingerprint, normalizedIncoming, incomingBookingUid, hasIncomingGoodPass, hasIncomingProductNote, hasIncomingBookingUid, shouldForceNewLine, matchedIndex, matchedProduct, existedFingerprint, shouldMerge, _targetProduct$metada, targetProduct, targetUid, normalizedProduct, nextNum, targetIsManualProductDiscount, nextDiscountList;
|
|
3892
|
+
var linked, productToAdd, incomingFingerprint, normalizedIncoming, isWeighingProduct, netWeight, incomingBookingUid, hasIncomingGoodPass, hasIncomingProductNote, hasIncomingBookingUid, shouldForceNewLine, matchedIndex, matchedProduct, existedFingerprint, shouldMerge, insertAtIndex, _targetProduct$metada, targetProduct, targetUid, normalizedProduct, nextNum, targetIsManualProductDiscount, nextDiscountList, mergedProduct;
|
|
3891
3893
|
return _regeneratorRuntime().wrap(function _callee20$(_context22) {
|
|
3892
3894
|
while (1) switch (_context22.prev = _context22.next) {
|
|
3893
3895
|
case 0:
|
|
@@ -3898,6 +3900,14 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3898
3900
|
productToAdd = (linked === null || linked === void 0 ? void 0 : linked.product) || product;
|
|
3899
3901
|
incomingFingerprint = buildProductLineFingerprint(getProductSkuOptions(productToAdd), productToAdd.product_bundle);
|
|
3900
3902
|
normalizedIncoming = mergeOrderProductDisplayFields(productToAdd, normalizeOrderProduct(productToAdd));
|
|
3903
|
+
isWeighingProduct = Number(((_normalizedIncoming$p = normalizedIncoming.product_sku) === null || _normalizedIncoming$p === void 0 ? void 0 : _normalizedIncoming$p.open_sold_weight) || 0) === 1;
|
|
3904
|
+
netWeight = Number((_normalizedIncoming$p2 = normalizedIncoming.product_sku) === null || _normalizedIncoming$p2 === void 0 ? void 0 : _normalizedIncoming$p2.net_weight);
|
|
3905
|
+
if (!(isWeighingProduct && (!Number.isFinite(netWeight) || netWeight <= 0))) {
|
|
3906
|
+
_context22.next = 8;
|
|
3907
|
+
break;
|
|
3908
|
+
}
|
|
3909
|
+
throw new Error('[Order] 称重商品净重必须大于 0');
|
|
3910
|
+
case 8:
|
|
3901
3911
|
incomingBookingUid = (_booking_uid = productToAdd.booking_uid) !== null && _booking_uid !== void 0 ? _booking_uid : (_metadata = productToAdd.metadata) === null || _metadata === void 0 ? void 0 : _metadata.booking_uid;
|
|
3902
3912
|
if (incomingBookingUid !== undefined && incomingBookingUid !== null && String(incomingBookingUid) !== '') {
|
|
3903
3913
|
normalizedIncoming.booking_uid = String(incomingBookingUid);
|
|
@@ -3909,7 +3919,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3909
3919
|
hasIncomingGoodPass = this.hasGoodPassDiscount(normalizedIncoming);
|
|
3910
3920
|
hasIncomingProductNote = this.hasOrderProductLineNote(normalizedIncoming);
|
|
3911
3921
|
hasIncomingBookingUid = this.hasLinkedBookingUid(productToAdd) || this.hasLinkedBookingUid(normalizedIncoming);
|
|
3912
|
-
shouldForceNewLine = !!booking || hasIncomingProductNote || hasIncomingBookingUid;
|
|
3922
|
+
shouldForceNewLine = !!booking || hasIncomingProductNote || hasIncomingBookingUid || isWeighingProduct;
|
|
3913
3923
|
matchedIndex = hasIncomingGoodPass || shouldForceNewLine ? -1 : tempOrder.products.findIndex(function (item) {
|
|
3914
3924
|
var _item$metadata3;
|
|
3915
3925
|
if (_this26.hasGoodPassDiscount(item)) return false;
|
|
@@ -3924,10 +3934,10 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3924
3934
|
matchedProduct = matchedIndex === -1 ? null : tempOrder.products[matchedIndex];
|
|
3925
3935
|
existedFingerprint = matchedProduct ? buildProductLineFingerprint(getProductSkuOptions(matchedProduct), matchedProduct.product_bundle) : '';
|
|
3926
3936
|
if (!matchedProduct) {
|
|
3927
|
-
_context22.next =
|
|
3937
|
+
_context22.next = 24;
|
|
3928
3938
|
break;
|
|
3929
3939
|
}
|
|
3930
|
-
_context22.next =
|
|
3940
|
+
_context22.next = 21;
|
|
3931
3941
|
return this.shouldMergeProductToOrder({
|
|
3932
3942
|
incomingProduct: productToAdd,
|
|
3933
3943
|
normalizedIncoming: normalizedIncoming,
|
|
@@ -3938,13 +3948,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3938
3948
|
tempOrder: tempOrder,
|
|
3939
3949
|
booking: booking
|
|
3940
3950
|
});
|
|
3941
|
-
case
|
|
3951
|
+
case 21:
|
|
3942
3952
|
_context22.t0 = _context22.sent;
|
|
3943
|
-
_context22.next =
|
|
3953
|
+
_context22.next = 25;
|
|
3944
3954
|
break;
|
|
3945
|
-
case
|
|
3955
|
+
case 24:
|
|
3946
3956
|
_context22.t0 = false;
|
|
3947
|
-
case
|
|
3957
|
+
case 25:
|
|
3948
3958
|
shouldMerge = _context22.t0;
|
|
3949
3959
|
if (matchedIndex === -1 || !matchedProduct || !shouldMerge) {
|
|
3950
3960
|
this.captureProductRuntime(tempOrder, productToAdd, normalizedIncoming);
|
|
@@ -3954,8 +3964,12 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3954
3964
|
booking_uid: linked.bookingUid
|
|
3955
3965
|
});
|
|
3956
3966
|
}
|
|
3957
|
-
|
|
3958
|
-
|
|
3967
|
+
insertAtIndex = options === null || options === void 0 ? void 0 : options.insertAtIndex;
|
|
3968
|
+
if (Number.isInteger(insertAtIndex) && Number(insertAtIndex) >= 0 && Number(insertAtIndex) < tempOrder.products.length) {
|
|
3969
|
+
tempOrder.products = [].concat(_toConsumableArray(tempOrder.products.slice(0, insertAtIndex)), [normalizedIncoming], _toConsumableArray(tempOrder.products.slice(insertAtIndex)));
|
|
3970
|
+
} else {
|
|
3971
|
+
tempOrder.products = [].concat(_toConsumableArray(tempOrder.products), [normalizedIncoming]);
|
|
3972
|
+
}
|
|
3959
3973
|
} else {
|
|
3960
3974
|
targetProduct = matchedProduct;
|
|
3961
3975
|
targetUid = (_targetProduct$metada = targetProduct.metadata) === null || _targetProduct$metada === void 0 ? void 0 : _targetProduct$metada.unique_identification_number;
|
|
@@ -3993,17 +4007,21 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3993
4007
|
num: nextNum
|
|
3994
4008
|
});
|
|
3995
4009
|
this.captureProductRuntime(tempOrder, productToAdd, tempOrder.products[matchedIndex], targetUid);
|
|
4010
|
+
if (matchedIndex !== tempOrder.products.length - 1) {
|
|
4011
|
+
mergedProduct = tempOrder.products[matchedIndex];
|
|
4012
|
+
tempOrder.products = [].concat(_toConsumableArray(tempOrder.products.slice(0, matchedIndex)), _toConsumableArray(tempOrder.products.slice(matchedIndex + 1)), [mergedProduct]);
|
|
4013
|
+
}
|
|
3996
4014
|
}
|
|
3997
4015
|
if (linked) {
|
|
3998
4016
|
tempOrder.bookings = [].concat(_toConsumableArray(tempOrder.bookings || []), [linked.booking]);
|
|
3999
4017
|
}
|
|
4000
|
-
case
|
|
4018
|
+
case 28:
|
|
4001
4019
|
case "end":
|
|
4002
4020
|
return _context22.stop();
|
|
4003
4021
|
}
|
|
4004
4022
|
}, _callee20, this);
|
|
4005
4023
|
}));
|
|
4006
|
-
function appendProductLineToTempOrder(_x22, _x23, _x24) {
|
|
4024
|
+
function appendProductLineToTempOrder(_x22, _x23, _x24, _x25) {
|
|
4007
4025
|
return _appendProductLineToTempOrder.apply(this, arguments);
|
|
4008
4026
|
}
|
|
4009
4027
|
return appendProductLineToTempOrder;
|
|
@@ -4019,61 +4037,74 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4019
4037
|
}, {
|
|
4020
4038
|
key: "addProductToOrder",
|
|
4021
4039
|
value: (function () {
|
|
4022
|
-
var _addProductToOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(product, booking) {
|
|
4023
|
-
var tempOrder, _ref61, _productRecord$num, productRecord, splitCount, i, singleLine;
|
|
4040
|
+
var _addProductToOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(product, booking, options) {
|
|
4041
|
+
var tempOrder, insertAfterProductUid, anchorIndex, insertAtIndex, _ref61, _productRecord$num, productRecord, splitCount, i, singleLine;
|
|
4024
4042
|
return _regeneratorRuntime().wrap(function _callee21$(_context23) {
|
|
4025
4043
|
while (1) switch (_context23.prev = _context23.next) {
|
|
4026
4044
|
case 0:
|
|
4027
4045
|
tempOrder = this.ensureTempOrder();
|
|
4046
|
+
insertAfterProductUid = options === null || options === void 0 ? void 0 : options.insertAfterProductUid;
|
|
4047
|
+
anchorIndex = booking && insertAfterProductUid ? tempOrder.products.findIndex(function (line) {
|
|
4048
|
+
var _line$metadata;
|
|
4049
|
+
var uid = ((_line$metadata = line.metadata) === null || _line$metadata === void 0 ? void 0 : _line$metadata.unique_identification_number) || line.unique_identification_number;
|
|
4050
|
+
return uid !== undefined && uid !== null && String(uid) === String(insertAfterProductUid);
|
|
4051
|
+
}) : -1;
|
|
4052
|
+
insertAtIndex = anchorIndex >= 0 ? anchorIndex + 1 : undefined;
|
|
4028
4053
|
if (!booking) {
|
|
4029
|
-
_context23.next =
|
|
4054
|
+
_context23.next = 22;
|
|
4030
4055
|
break;
|
|
4031
4056
|
}
|
|
4032
4057
|
productRecord = product;
|
|
4033
4058
|
splitCount = getSafeProductNum((_ref61 = (_productRecord$num = productRecord.num) !== null && _productRecord$num !== void 0 ? _productRecord$num : productRecord.product_quantity) !== null && _ref61 !== void 0 ? _ref61 : 1);
|
|
4034
4059
|
if (!(splitCount > 1)) {
|
|
4035
|
-
_context23.next =
|
|
4060
|
+
_context23.next = 22;
|
|
4036
4061
|
break;
|
|
4037
4062
|
}
|
|
4038
4063
|
i = 0;
|
|
4039
|
-
case
|
|
4064
|
+
case 9:
|
|
4040
4065
|
if (!(i < splitCount)) {
|
|
4041
|
-
_context23.next =
|
|
4066
|
+
_context23.next = 19;
|
|
4042
4067
|
break;
|
|
4043
4068
|
}
|
|
4044
4069
|
singleLine = cloneDeep(productRecord);
|
|
4045
4070
|
singleLine.num = 1;
|
|
4046
4071
|
delete singleLine.product_quantity;
|
|
4047
|
-
_context23.next =
|
|
4048
|
-
return this.appendProductLineToTempOrder(tempOrder, singleLine, cloneDeep(booking)
|
|
4049
|
-
|
|
4072
|
+
_context23.next = 15;
|
|
4073
|
+
return this.appendProductLineToTempOrder(tempOrder, singleLine, cloneDeep(booking), {
|
|
4074
|
+
insertAtIndex: insertAtIndex
|
|
4075
|
+
});
|
|
4076
|
+
case 15:
|
|
4077
|
+
if (insertAtIndex !== undefined) insertAtIndex += 1;
|
|
4078
|
+
case 16:
|
|
4050
4079
|
i += 1;
|
|
4051
|
-
_context23.next =
|
|
4080
|
+
_context23.next = 9;
|
|
4052
4081
|
break;
|
|
4053
|
-
case
|
|
4054
|
-
_context23.next =
|
|
4082
|
+
case 19:
|
|
4083
|
+
_context23.next = 21;
|
|
4055
4084
|
return this.finalizeProductOrderMutation(tempOrder);
|
|
4056
|
-
case
|
|
4085
|
+
case 21:
|
|
4057
4086
|
return _context23.abrupt("return", tempOrder.products);
|
|
4058
|
-
case 18:
|
|
4059
|
-
_context23.next = 20;
|
|
4060
|
-
return this.appendProductLineToTempOrder(tempOrder, product, booking);
|
|
4061
|
-
case 20:
|
|
4062
|
-
_context23.next = 22;
|
|
4063
|
-
return this.finalizeProductOrderMutation(tempOrder);
|
|
4064
4087
|
case 22:
|
|
4088
|
+
_context23.next = 24;
|
|
4089
|
+
return this.appendProductLineToTempOrder(tempOrder, product, booking, {
|
|
4090
|
+
insertAtIndex: insertAtIndex
|
|
4091
|
+
});
|
|
4092
|
+
case 24:
|
|
4093
|
+
_context23.next = 26;
|
|
4094
|
+
return this.finalizeProductOrderMutation(tempOrder);
|
|
4095
|
+
case 26:
|
|
4065
4096
|
this.logInfo('addProductToOrder success', {
|
|
4066
4097
|
product_id: product.product_id,
|
|
4067
4098
|
with_booking: !!booking
|
|
4068
4099
|
});
|
|
4069
4100
|
return _context23.abrupt("return", tempOrder.products);
|
|
4070
|
-
case
|
|
4101
|
+
case 28:
|
|
4071
4102
|
case "end":
|
|
4072
4103
|
return _context23.stop();
|
|
4073
4104
|
}
|
|
4074
4105
|
}, _callee21, this);
|
|
4075
4106
|
}));
|
|
4076
|
-
function addProductToOrder(
|
|
4107
|
+
function addProductToOrder(_x26, _x27, _x28) {
|
|
4077
4108
|
return _addProductToOrder.apply(this, arguments);
|
|
4078
4109
|
}
|
|
4079
4110
|
return addProductToOrder;
|
|
@@ -4177,7 +4208,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4177
4208
|
}
|
|
4178
4209
|
}, _callee22, this, [[4, 32, 35, 38]]);
|
|
4179
4210
|
}));
|
|
4180
|
-
function addProductsToOrder(
|
|
4211
|
+
function addProductsToOrder(_x29, _x30) {
|
|
4181
4212
|
return _addProductsToOrder.apply(this, arguments);
|
|
4182
4213
|
}
|
|
4183
4214
|
return addProductsToOrder;
|
|
@@ -4452,7 +4483,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4452
4483
|
}
|
|
4453
4484
|
}, _callee23, this);
|
|
4454
4485
|
}));
|
|
4455
|
-
function updateOrderProduct(
|
|
4486
|
+
function updateOrderProduct(_x31) {
|
|
4456
4487
|
return _updateOrderProduct.apply(this, arguments);
|
|
4457
4488
|
}
|
|
4458
4489
|
return updateOrderProduct;
|
|
@@ -4496,7 +4527,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4496
4527
|
}
|
|
4497
4528
|
}, _callee24, this);
|
|
4498
4529
|
}));
|
|
4499
|
-
function updateOrderProducts(
|
|
4530
|
+
function updateOrderProducts(_x32) {
|
|
4500
4531
|
return _updateOrderProducts.apply(this, arguments);
|
|
4501
4532
|
}
|
|
4502
4533
|
return updateOrderProducts;
|
|
@@ -4572,7 +4603,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4572
4603
|
}
|
|
4573
4604
|
}, _callee25, this);
|
|
4574
4605
|
}));
|
|
4575
|
-
function updateOrderProductQuantity(
|
|
4606
|
+
function updateOrderProductQuantity(_x33) {
|
|
4576
4607
|
return _updateOrderProductQuantity.apply(this, arguments);
|
|
4577
4608
|
}
|
|
4578
4609
|
return updateOrderProductQuantity;
|
|
@@ -4637,7 +4668,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4637
4668
|
}
|
|
4638
4669
|
}, _callee26, this);
|
|
4639
4670
|
}));
|
|
4640
|
-
function finalizeAfterProductsMutation(
|
|
4671
|
+
function finalizeAfterProductsMutation(_x34, _x35) {
|
|
4641
4672
|
return _finalizeAfterProductsMutation.apply(this, arguments);
|
|
4642
4673
|
}
|
|
4643
4674
|
return finalizeAfterProductsMutation;
|
|
@@ -4652,9 +4683,9 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4652
4683
|
}, {
|
|
4653
4684
|
key: "removeProductsFromOrder",
|
|
4654
4685
|
value: (function () {
|
|
4655
|
-
var _removeProductsFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(identities) {
|
|
4686
|
+
var _removeProductsFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(identities, options) {
|
|
4656
4687
|
var _this29 = this;
|
|
4657
|
-
var tempOrder, productsBeforeRemove, bookingsBeforeRemove, matchedProducts, removedProducts, _i2, _removedProducts, product, linkedBookingUidsToRemove, _iterator21, _step21, _loop3;
|
|
4688
|
+
var tempOrder, productsBeforeRemove, bookingsBeforeRemove, preserveDisplayPosition, anchorIndex, productsAfterAnchor, matchedProducts, removedProducts, _i2, _removedProducts, product, linkedBookingUidsToRemove, _iterator21, _step21, _loop3, remainingProductIndex, remainingProduct, nextProduct, productsWithoutRemaining, nextProductIndex;
|
|
4658
4689
|
return _regeneratorRuntime().wrap(function _callee27$(_context30) {
|
|
4659
4690
|
while (1) switch (_context30.prev = _context30.next) {
|
|
4660
4691
|
case 0:
|
|
@@ -4667,6 +4698,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4667
4698
|
case 3:
|
|
4668
4699
|
productsBeforeRemove = tempOrder.products || [];
|
|
4669
4700
|
bookingsBeforeRemove = tempOrder.bookings || [];
|
|
4701
|
+
preserveDisplayPosition = options === null || options === void 0 ? void 0 : options.preserveDisplayPosition;
|
|
4702
|
+
anchorIndex = preserveDisplayPosition ? productsBeforeRemove.findIndex(function (item) {
|
|
4703
|
+
var _item$metadata6;
|
|
4704
|
+
var uid = ((_item$metadata6 = item.metadata) === null || _item$metadata6 === void 0 ? void 0 : _item$metadata6.unique_identification_number) || item.unique_identification_number;
|
|
4705
|
+
return uid !== undefined && uid !== null && String(uid) === String(preserveDisplayPosition.anchorProductUid);
|
|
4706
|
+
}) : -1;
|
|
4707
|
+
productsAfterAnchor = anchorIndex >= 0 ? productsBeforeRemove.slice(anchorIndex + 1) : [];
|
|
4670
4708
|
matchedProducts = productsBeforeRemove.filter(function (item) {
|
|
4671
4709
|
return identities.some(function (identity) {
|
|
4672
4710
|
return isIdentityMatch(item, identity);
|
|
@@ -4686,7 +4724,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4686
4724
|
}
|
|
4687
4725
|
linkedBookingUidsToRemove = new Set();
|
|
4688
4726
|
_iterator21 = _createForOfIteratorHelper(matchedProducts);
|
|
4689
|
-
_context30.prev =
|
|
4727
|
+
_context30.prev = 14;
|
|
4690
4728
|
_loop3 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop3() {
|
|
4691
4729
|
var _metadata11, _metadata12, _metadata13, _metadata14;
|
|
4692
4730
|
var product, productUid, productBookingUid, isAddTimeProduct;
|
|
@@ -4721,56 +4759,72 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4721
4759
|
}, _loop3);
|
|
4722
4760
|
});
|
|
4723
4761
|
_iterator21.s();
|
|
4724
|
-
case
|
|
4762
|
+
case 17:
|
|
4725
4763
|
if ((_step21 = _iterator21.n()).done) {
|
|
4726
|
-
_context30.next =
|
|
4764
|
+
_context30.next = 23;
|
|
4727
4765
|
break;
|
|
4728
4766
|
}
|
|
4729
|
-
return _context30.delegateYield(_loop3(), "t0",
|
|
4730
|
-
case
|
|
4767
|
+
return _context30.delegateYield(_loop3(), "t0", 19);
|
|
4768
|
+
case 19:
|
|
4731
4769
|
if (!_context30.t0) {
|
|
4732
|
-
_context30.next =
|
|
4770
|
+
_context30.next = 21;
|
|
4733
4771
|
break;
|
|
4734
4772
|
}
|
|
4735
|
-
return _context30.abrupt("continue",
|
|
4736
|
-
case
|
|
4737
|
-
_context30.next =
|
|
4773
|
+
return _context30.abrupt("continue", 21);
|
|
4774
|
+
case 21:
|
|
4775
|
+
_context30.next = 17;
|
|
4738
4776
|
break;
|
|
4739
|
-
case
|
|
4740
|
-
_context30.next =
|
|
4777
|
+
case 23:
|
|
4778
|
+
_context30.next = 28;
|
|
4741
4779
|
break;
|
|
4742
|
-
case 22:
|
|
4743
|
-
_context30.prev = 22;
|
|
4744
|
-
_context30.t1 = _context30["catch"](11);
|
|
4745
|
-
_iterator21.e(_context30.t1);
|
|
4746
4780
|
case 25:
|
|
4747
4781
|
_context30.prev = 25;
|
|
4748
|
-
|
|
4749
|
-
|
|
4782
|
+
_context30.t1 = _context30["catch"](14);
|
|
4783
|
+
_iterator21.e(_context30.t1);
|
|
4750
4784
|
case 28:
|
|
4785
|
+
_context30.prev = 28;
|
|
4786
|
+
_iterator21.f();
|
|
4787
|
+
return _context30.finish(28);
|
|
4788
|
+
case 31:
|
|
4751
4789
|
if (linkedBookingUidsToRemove.size > 0) {
|
|
4752
4790
|
// 删除主预约商品时,同步移除挂在同一 booking_uid 下的加时商品,避免残留孤儿行。
|
|
4753
4791
|
tempOrder.products = (tempOrder.products || []).filter(function (line) {
|
|
4754
|
-
var _line$
|
|
4755
|
-
var lineBookingUid = (line === null || line === void 0 || (_line$
|
|
4756
|
-
var isAddTimeProduct = (line === null || line === void 0 || (_line$
|
|
4792
|
+
var _line$metadata2, _line$metadata3, _line$metadata4;
|
|
4793
|
+
var lineBookingUid = (line === null || line === void 0 || (_line$metadata2 = line.metadata) === null || _line$metadata2 === void 0 ? void 0 : _line$metadata2.booking_uid) || (line === null || line === void 0 ? void 0 : line.booking_uid);
|
|
4794
|
+
var isAddTimeProduct = (line === null || line === void 0 || (_line$metadata3 = line.metadata) === null || _line$metadata3 === void 0 ? void 0 : _line$metadata3.product_add_schedule_time) !== undefined && (line === null || line === void 0 || (_line$metadata4 = line.metadata) === null || _line$metadata4 === void 0 ? void 0 : _line$metadata4.product_add_schedule_time) !== null;
|
|
4757
4795
|
return !(isAddTimeProduct && lineBookingUid !== undefined && lineBookingUid !== null && linkedBookingUidsToRemove.has(String(lineBookingUid)));
|
|
4758
4796
|
});
|
|
4759
4797
|
}
|
|
4760
|
-
|
|
4798
|
+
if (preserveDisplayPosition && anchorIndex >= 0) {
|
|
4799
|
+
remainingProductIndex = tempOrder.products.findIndex(function (item) {
|
|
4800
|
+
var _item$metadata7;
|
|
4801
|
+
var uid = ((_item$metadata7 = item.metadata) === null || _item$metadata7 === void 0 ? void 0 : _item$metadata7.unique_identification_number) || item.unique_identification_number;
|
|
4802
|
+
return uid !== undefined && uid !== null && String(uid) === String(preserveDisplayPosition.remainingProductUid);
|
|
4803
|
+
});
|
|
4804
|
+
if (remainingProductIndex >= 0) {
|
|
4805
|
+
remainingProduct = tempOrder.products[remainingProductIndex];
|
|
4806
|
+
nextProduct = productsAfterAnchor.find(function (item) {
|
|
4807
|
+
return tempOrder.products.includes(item);
|
|
4808
|
+
});
|
|
4809
|
+
productsWithoutRemaining = [].concat(_toConsumableArray(tempOrder.products.slice(0, remainingProductIndex)), _toConsumableArray(tempOrder.products.slice(remainingProductIndex + 1)));
|
|
4810
|
+
nextProductIndex = nextProduct ? productsWithoutRemaining.indexOf(nextProduct) : -1;
|
|
4811
|
+
tempOrder.products = nextProductIndex >= 0 ? [].concat(_toConsumableArray(productsWithoutRemaining.slice(0, nextProductIndex)), [remainingProduct], _toConsumableArray(productsWithoutRemaining.slice(nextProductIndex))) : [].concat(_toConsumableArray(productsWithoutRemaining), [remainingProduct]);
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
_context30.next = 35;
|
|
4761
4815
|
return this.finalizeAfterProductsMutation(tempOrder);
|
|
4762
|
-
case
|
|
4816
|
+
case 35:
|
|
4763
4817
|
this.logInfo('removeProductsFromOrder success', {
|
|
4764
4818
|
identities: identities
|
|
4765
4819
|
});
|
|
4766
4820
|
return _context30.abrupt("return", tempOrder.products);
|
|
4767
|
-
case
|
|
4821
|
+
case 37:
|
|
4768
4822
|
case "end":
|
|
4769
4823
|
return _context30.stop();
|
|
4770
4824
|
}
|
|
4771
|
-
}, _callee27, this, [[
|
|
4825
|
+
}, _callee27, this, [[14, 25, 28, 31]]);
|
|
4772
4826
|
}));
|
|
4773
|
-
function removeProductsFromOrder(
|
|
4827
|
+
function removeProductsFromOrder(_x36, _x37) {
|
|
4774
4828
|
return _removeProductsFromOrder.apply(this, arguments);
|
|
4775
4829
|
}
|
|
4776
4830
|
return removeProductsFromOrder;
|
|
@@ -4778,18 +4832,18 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4778
4832
|
}, {
|
|
4779
4833
|
key: "removeProductFromOrder",
|
|
4780
4834
|
value: function () {
|
|
4781
|
-
var _removeProductFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(identity) {
|
|
4835
|
+
var _removeProductFromOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(identity, options) {
|
|
4782
4836
|
return _regeneratorRuntime().wrap(function _callee28$(_context31) {
|
|
4783
4837
|
while (1) switch (_context31.prev = _context31.next) {
|
|
4784
4838
|
case 0:
|
|
4785
|
-
return _context31.abrupt("return", this.removeProductsFromOrder([identity]));
|
|
4839
|
+
return _context31.abrupt("return", this.removeProductsFromOrder([identity], options));
|
|
4786
4840
|
case 1:
|
|
4787
4841
|
case "end":
|
|
4788
4842
|
return _context31.stop();
|
|
4789
4843
|
}
|
|
4790
4844
|
}, _callee28, this);
|
|
4791
4845
|
}));
|
|
4792
|
-
function removeProductFromOrder(
|
|
4846
|
+
function removeProductFromOrder(_x38, _x39) {
|
|
4793
4847
|
return _removeProductFromOrder.apply(this, arguments);
|
|
4794
4848
|
}
|
|
4795
4849
|
return removeProductFromOrder;
|
|
@@ -4901,7 +4955,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4901
4955
|
}
|
|
4902
4956
|
}, _callee30, this);
|
|
4903
4957
|
}));
|
|
4904
|
-
function applyLocalPrintOrderNumbers(
|
|
4958
|
+
function applyLocalPrintOrderNumbers(_x40) {
|
|
4905
4959
|
return _applyLocalPrintOrderNumbers.apply(this, arguments);
|
|
4906
4960
|
}
|
|
4907
4961
|
return applyLocalPrintOrderNumbers;
|
|
@@ -4968,7 +5022,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4968
5022
|
}
|
|
4969
5023
|
}, _callee31, this);
|
|
4970
5024
|
}));
|
|
4971
|
-
function saveTempOrderAsDraft(
|
|
5025
|
+
function saveTempOrderAsDraft(_x41) {
|
|
4972
5026
|
return _saveTempOrderAsDraft.apply(this, arguments);
|
|
4973
5027
|
}
|
|
4974
5028
|
return saveTempOrderAsDraft;
|
|
@@ -4993,7 +5047,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4993
5047
|
}
|
|
4994
5048
|
}, _callee32, this);
|
|
4995
5049
|
}));
|
|
4996
|
-
function submitTempOrder(
|
|
5050
|
+
function submitTempOrder(_x42) {
|
|
4997
5051
|
return _submitTempOrder.apply(this, arguments);
|
|
4998
5052
|
}
|
|
4999
5053
|
return submitTempOrder;
|
|
@@ -5014,7 +5068,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5014
5068
|
}
|
|
5015
5069
|
}, _callee33, this);
|
|
5016
5070
|
}));
|
|
5017
|
-
function submitTempOrderAsync(
|
|
5071
|
+
function submitTempOrderAsync(_x43) {
|
|
5018
5072
|
return _submitTempOrderAsync.apply(this, arguments);
|
|
5019
5073
|
}
|
|
5020
5074
|
return submitTempOrderAsync;
|
|
@@ -5184,7 +5238,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5184
5238
|
}
|
|
5185
5239
|
}, _callee34, this, [[26, 33]]);
|
|
5186
5240
|
}));
|
|
5187
|
-
function runSubmitTempOrder(
|
|
5241
|
+
function runSubmitTempOrder(_x44) {
|
|
5188
5242
|
return _runSubmitTempOrder.apply(this, arguments);
|
|
5189
5243
|
}
|
|
5190
5244
|
return runSubmitTempOrder;
|
|
@@ -5211,7 +5265,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5211
5265
|
}
|
|
5212
5266
|
}, _callee35, this);
|
|
5213
5267
|
}));
|
|
5214
|
-
function markLocalOrderSynced(
|
|
5268
|
+
function markLocalOrderSynced(_x45, _x46) {
|
|
5215
5269
|
return _markLocalOrderSynced.apply(this, arguments);
|
|
5216
5270
|
}
|
|
5217
5271
|
return markLocalOrderSynced;
|
|
@@ -5380,7 +5434,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5380
5434
|
}
|
|
5381
5435
|
}, _callee36, this);
|
|
5382
5436
|
}));
|
|
5383
|
-
function syncPaymentsToOrder(
|
|
5437
|
+
function syncPaymentsToOrder(_x47) {
|
|
5384
5438
|
return _syncPaymentsToOrder.apply(this, arguments);
|
|
5385
5439
|
}
|
|
5386
5440
|
return syncPaymentsToOrder;
|
|
@@ -5508,7 +5562,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5508
5562
|
}
|
|
5509
5563
|
}, _callee37, this);
|
|
5510
5564
|
}));
|
|
5511
|
-
function submitOrder(
|
|
5565
|
+
function submitOrder(_x48) {
|
|
5512
5566
|
return _submitOrder.apply(this, arguments);
|
|
5513
5567
|
}
|
|
5514
5568
|
return submitOrder;
|
|
@@ -5547,7 +5601,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5547
5601
|
}
|
|
5548
5602
|
}, _callee38, this);
|
|
5549
5603
|
}));
|
|
5550
|
-
function cancelOrder(
|
|
5604
|
+
function cancelOrder(_x49) {
|
|
5551
5605
|
return _cancelOrder.apply(this, arguments);
|
|
5552
5606
|
}
|
|
5553
5607
|
return cancelOrder;
|
|
@@ -5591,7 +5645,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5591
5645
|
}
|
|
5592
5646
|
}, _callee39, this);
|
|
5593
5647
|
}));
|
|
5594
|
-
function changeBookingStatus(
|
|
5648
|
+
function changeBookingStatus(_x50) {
|
|
5595
5649
|
return _changeBookingStatus.apply(this, arguments);
|
|
5596
5650
|
}
|
|
5597
5651
|
return changeBookingStatus;
|
|
@@ -5738,7 +5792,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5738
5792
|
}
|
|
5739
5793
|
}, _callee40, this, [[4, 18]]);
|
|
5740
5794
|
}));
|
|
5741
|
-
function createOrderByCheckout(
|
|
5795
|
+
function createOrderByCheckout(_x51) {
|
|
5742
5796
|
return _createOrderByCheckout.apply(this, arguments);
|
|
5743
5797
|
}
|
|
5744
5798
|
return createOrderByCheckout;
|
|
@@ -5763,7 +5817,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5763
5817
|
}
|
|
5764
5818
|
}, _callee41, this);
|
|
5765
5819
|
}));
|
|
5766
|
-
function submitSalesOrder(
|
|
5820
|
+
function submitSalesOrder(_x52) {
|
|
5767
5821
|
return _submitSalesOrder.apply(this, arguments);
|
|
5768
5822
|
}
|
|
5769
5823
|
return submitSalesOrder;
|
|
@@ -5807,7 +5861,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5807
5861
|
}
|
|
5808
5862
|
}, _callee42, this);
|
|
5809
5863
|
}));
|
|
5810
|
-
function sendCustomerPayLink(
|
|
5864
|
+
function sendCustomerPayLink(_x53) {
|
|
5811
5865
|
return _sendCustomerPayLink.apply(this, arguments);
|
|
5812
5866
|
}
|
|
5813
5867
|
return sendCustomerPayLink;
|
|
@@ -5851,7 +5905,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5851
5905
|
}
|
|
5852
5906
|
}, _callee43, this);
|
|
5853
5907
|
}));
|
|
5854
|
-
function getSalesOrderByLookup(
|
|
5908
|
+
function getSalesOrderByLookup(_x54) {
|
|
5855
5909
|
return _getSalesOrderByLookup.apply(this, arguments);
|
|
5856
5910
|
}
|
|
5857
5911
|
return getSalesOrderByLookup;
|
|
@@ -5966,7 +6020,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
5966
6020
|
}
|
|
5967
6021
|
}, _callee44, this);
|
|
5968
6022
|
}));
|
|
5969
|
-
function hydrateTempOrderFromRecord(
|
|
6023
|
+
function hydrateTempOrderFromRecord(_x55, _x56) {
|
|
5970
6024
|
return _hydrateTempOrderFromRecord.apply(this, arguments);
|
|
5971
6025
|
}
|
|
5972
6026
|
return hydrateTempOrderFromRecord;
|
|
@@ -6361,7 +6415,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
6361
6415
|
}
|
|
6362
6416
|
}, _callee45, this);
|
|
6363
6417
|
}));
|
|
6364
|
-
function getOrderInfo(
|
|
6418
|
+
function getOrderInfo(_x57) {
|
|
6365
6419
|
return _getOrderInfo.apply(this, arguments);
|
|
6366
6420
|
}
|
|
6367
6421
|
return getOrderInfo;
|