@pisell/pisellos 2.2.243 → 2.2.244
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/promotion/evaluator.js +2 -3
- package/dist/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/model/strategy/adapter/walletPass/utils.js +4 -7
- package/dist/modules/Cart/utils/cartProduct.js +3 -24
- package/dist/modules/Cart/utils/changePrice.js +11 -11
- package/dist/modules/Customer/index.d.ts +0 -20
- package/dist/modules/Customer/index.js +83 -172
- package/dist/modules/Customer/types.d.ts +0 -2
- package/dist/modules/Discount/index.js +3 -4
- package/dist/modules/Discount/types.d.ts +0 -1
- package/dist/modules/OpenData/index.d.ts +0 -8
- package/dist/modules/OpenData/index.js +17 -37
- package/dist/modules/Order/index.d.ts +18 -268
- package/dist/modules/Order/index.js +757 -3306
- package/dist/modules/Order/types.d.ts +31 -279
- package/dist/modules/Order/types.js +0 -38
- package/dist/modules/Order/utils.d.ts +5 -147
- package/dist/modules/Order/utils.js +103 -746
- package/dist/modules/Payment/index.d.ts +13 -10
- package/dist/modules/Payment/index.js +837 -467
- package/dist/modules/Payment/types.d.ts +0 -2
- package/dist/modules/Payment/utils.js +1 -2
- package/dist/modules/Payment/walletpass.js +7 -14
- package/dist/modules/ProductList/index.d.ts +12 -16
- package/dist/modules/ProductList/index.js +59 -133
- package/dist/modules/ProductList/types.d.ts +0 -14
- package/dist/modules/Quotation/index.d.ts +1 -0
- package/dist/modules/Quotation/index.js +22 -25
- package/dist/modules/Rules/index.d.ts +0 -4
- package/dist/modules/Rules/index.js +69 -93
- package/dist/modules/Rules/types.d.ts +0 -1
- package/dist/modules/SalesSummary/index.d.ts +25 -8
- package/dist/modules/SalesSummary/index.js +35 -86
- package/dist/modules/SalesSummary/types.d.ts +1 -4
- package/dist/modules/SalesSummary/utils.d.ts +25 -2
- package/dist/modules/SalesSummary/utils.js +162 -794
- package/dist/modules/Schedule/index.d.ts +0 -7
- package/dist/modules/Schedule/index.js +2 -24
- package/dist/modules/Summary/index.js +3 -4
- package/dist/modules/index.d.ts +0 -2
- package/dist/modules/index.js +1 -3
- package/dist/plugins/request.d.ts +0 -1
- package/dist/server/index.d.ts +1 -204
- package/dist/server/index.js +928 -3658
- package/dist/server/modules/index.d.ts +0 -2
- package/dist/server/modules/index.js +0 -2
- package/dist/server/modules/order/index.d.ts +4 -120
- package/dist/server/modules/order/index.js +483 -1779
- package/dist/server/modules/order/types.d.ts +3 -32
- package/dist/server/modules/order/types.js +0 -8
- package/dist/server/modules/order/utils/filterBookings.js +3 -26
- package/dist/server/modules/order/utils/filterOrders.js +8 -23
- package/dist/server/modules/products/index.d.ts +7 -34
- package/dist/server/modules/products/index.js +317 -631
- package/dist/server/modules/resource/index.d.ts +0 -2
- package/dist/server/modules/resource/index.js +3 -29
- package/dist/server/modules/schedule/index.d.ts +4 -4
- package/dist/server/modules/schedule/index.js +88 -111
- package/dist/solution/BaseSales/index.d.ts +9 -131
- package/dist/solution/BaseSales/index.js +447 -1944
- package/dist/solution/BaseSales/types.d.ts +6 -76
- package/dist/solution/BaseSales/types.js +4 -5
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +24 -105
- package/dist/solution/BaseSales/utils.d.ts +1 -1
- package/dist/solution/BaseSales/utils.js +21 -62
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +10 -270
- package/dist/solution/BookingTicket/index.js +237 -1772
- package/dist/solution/BookingTicket/types.d.ts +1 -118
- package/dist/solution/BookingTicket/types.js +2 -41
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
- package/dist/solution/BookingTicket/utils/bookingStatus.js +0 -70
- package/dist/solution/BookingTicket/utils/cartView.d.ts +1 -9
- package/dist/solution/BookingTicket/utils/cartView.js +7 -94
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -5
- package/dist/solution/BookingTicket/utils/scan/index.js +8 -20
- package/dist/solution/Checkout/appointmentDemo.json +1 -0
- package/dist/solution/Checkout/index.d.ts +0 -1
- package/dist/solution/Checkout/index.js +9 -10
- package/dist/solution/RegisterAndLogin/config.js +10 -2
- package/dist/solution/ScanOrder/index.d.ts +3 -9
- package/dist/solution/ScanOrder/index.js +134 -241
- package/dist/solution/ScanOrder/types.d.ts +5 -9
- package/dist/solution/ScanOrder/types.js +3 -2
- package/dist/solution/ScanOrder/utils.d.ts +1 -1
- package/dist/solution/ScanOrder/utils.js +22 -84
- package/dist/solution/VenueBooking/index.d.ts +2 -5
- package/dist/solution/VenueBooking/index.js +59 -110
- package/dist/solution/VenueBooking/sales-section-4-annotated.json +2 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +0 -10
- package/dist/types/index.d.ts +0 -10
- package/lib/model/strategy/adapter/promotion/evaluator.js +1 -2
- package/lib/model/strategy/adapter/promotion/index.js +0 -49
- package/lib/model/strategy/adapter/walletPass/utils.js +2 -3
- package/lib/modules/Cart/utils/cartProduct.js +3 -20
- package/lib/modules/Cart/utils/changePrice.js +20 -12
- package/lib/modules/Customer/index.d.ts +0 -20
- package/lib/modules/Customer/index.js +11 -64
- package/lib/modules/Customer/types.d.ts +0 -2
- package/lib/modules/Discount/index.js +1 -5
- package/lib/modules/Discount/types.d.ts +0 -1
- package/lib/modules/OpenData/index.d.ts +0 -8
- package/lib/modules/OpenData/index.js +5 -19
- package/lib/modules/Order/index.d.ts +18 -268
- package/lib/modules/Order/index.js +344 -2149
- package/lib/modules/Order/types.d.ts +31 -279
- package/lib/modules/Order/types.js +0 -1
- package/lib/modules/Order/utils.d.ts +5 -147
- package/lib/modules/Order/utils.js +46 -614
- package/lib/modules/Payment/index.d.ts +13 -10
- package/lib/modules/Payment/index.js +150 -18
- package/lib/modules/Payment/types.d.ts +0 -2
- package/lib/modules/Payment/utils.js +1 -2
- package/lib/modules/Payment/walletpass.js +3 -7
- package/lib/modules/ProductList/index.d.ts +12 -16
- package/lib/modules/ProductList/index.js +4 -41
- package/lib/modules/ProductList/types.d.ts +0 -14
- package/lib/modules/Quotation/index.d.ts +1 -0
- package/lib/modules/Quotation/index.js +16 -19
- package/lib/modules/Rules/index.d.ts +0 -4
- package/lib/modules/Rules/index.js +120 -136
- package/lib/modules/Rules/types.d.ts +0 -1
- package/lib/modules/SalesSummary/index.d.ts +25 -8
- package/lib/modules/SalesSummary/index.js +4 -30
- package/lib/modules/SalesSummary/types.d.ts +1 -4
- package/lib/modules/SalesSummary/utils.d.ts +25 -2
- package/lib/modules/SalesSummary/utils.js +91 -645
- package/lib/modules/Schedule/index.d.ts +0 -7
- package/lib/modules/Schedule/index.js +1 -17
- package/lib/modules/Summary/index.js +4 -5
- package/lib/modules/index.d.ts +0 -2
- package/lib/modules/index.js +1 -5
- package/lib/plugins/request.d.ts +0 -1
- package/lib/server/index.d.ts +1 -204
- package/lib/server/index.js +57 -1888
- package/lib/server/modules/index.d.ts +0 -2
- package/lib/server/modules/index.js +0 -3
- package/lib/server/modules/order/index.d.ts +4 -120
- package/lib/server/modules/order/index.js +142 -919
- package/lib/server/modules/order/types.d.ts +3 -32
- package/lib/server/modules/order/utils/filterBookings.js +5 -24
- package/lib/server/modules/order/utils/filterOrders.js +6 -15
- package/lib/server/modules/products/index.d.ts +7 -34
- package/lib/server/modules/products/index.js +54 -189
- package/lib/server/modules/resource/index.d.ts +0 -2
- package/lib/server/modules/resource/index.js +3 -27
- package/lib/server/modules/schedule/index.d.ts +4 -4
- package/lib/server/modules/schedule/index.js +40 -47
- package/lib/solution/BaseSales/index.d.ts +9 -131
- package/lib/solution/BaseSales/index.js +63 -1106
- package/lib/solution/BaseSales/types.d.ts +6 -76
- package/lib/solution/BaseSales/types.js +1 -3
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +18 -106
- package/lib/solution/BaseSales/utils.d.ts +1 -1
- package/lib/solution/BaseSales/utils.js +10 -54
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +10 -270
- package/lib/solution/BookingTicket/index.js +29 -922
- package/lib/solution/BookingTicket/types.d.ts +1 -118
- package/lib/solution/BookingTicket/types.js +0 -11
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
- package/lib/solution/BookingTicket/utils/bookingStatus.js +2 -44
- package/lib/solution/BookingTicket/utils/cartView.d.ts +1 -9
- package/lib/solution/BookingTicket/utils/cartView.js +6 -61
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -5
- package/lib/solution/BookingTicket/utils/scan/index.js +3 -17
- package/lib/solution/Checkout/appointmentDemo.json +1 -0
- package/lib/solution/Checkout/index.d.ts +0 -1
- package/lib/solution/Checkout/index.js +2 -1
- package/lib/solution/RegisterAndLogin/config.js +10 -2
- package/lib/solution/ScanOrder/index.d.ts +3 -9
- package/lib/solution/ScanOrder/index.js +70 -153
- package/lib/solution/ScanOrder/types.d.ts +5 -9
- package/lib/solution/ScanOrder/utils.d.ts +1 -1
- package/lib/solution/ScanOrder/utils.js +17 -83
- package/lib/solution/VenueBooking/index.d.ts +2 -5
- package/lib/solution/VenueBooking/index.js +17 -54
- package/lib/solution/VenueBooking/sales-section-4-annotated.json +2 -0
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +0 -10
- package/lib/types/index.d.ts +0 -10
- package/package.json +1 -1
- package/dist/modules/BookingContext/index.d.ts +0 -48
- package/dist/modules/BookingContext/index.js +0 -566
- package/dist/modules/BookingContext/types.d.ts +0 -102
- package/dist/modules/BookingContext/types.js +0 -51
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -284
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -145
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -218
- package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/dist/modules/BookingContext/utils/flexible.js +0 -56
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/dist/modules/BookingContext/utils/formatResourceList.js +0 -38
- package/dist/modules/BookingContext/utils/index.d.ts +0 -11
- package/dist/modules/BookingContext/utils/index.js +0 -11
- package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/dist/modules/BookingContext/utils/noResource.js +0 -77
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
- package/dist/modules/BookingContext/utils/orderLineDisplay.js +0 -36
- package/dist/modules/BookingContext/utils/productExtend.d.ts +0 -72
- package/dist/modules/BookingContext/utils/productExtend.js +0 -339
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/dist/modules/BookingContext/utils/resourceErrors.js +0 -74
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/dist/modules/BookingContext/utils/resourceSelection.js +0 -24
- package/dist/modules/BookingContext/utils/resources.d.ts +0 -80
- package/dist/modules/BookingContext/utils/resources.js +0 -486
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/dist/modules/BookingContext/utils/serviceTimes.js +0 -151
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/dist/modules/BookingContext/utils/timeSlices.js +0 -100
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/dist/modules/Order/utils/manualProductDiscount.js +0 -210
- package/dist/modules/SurchargeList/index.d.ts +0 -16
- package/dist/modules/SurchargeList/index.js +0 -162
- package/dist/modules/SurchargeList/types.d.ts +0 -11
- package/dist/modules/SurchargeList/types.js +0 -1
- package/dist/server/modules/payment/index.d.ts +0 -28
- package/dist/server/modules/payment/index.js +0 -305
- package/dist/server/modules/payment/types.d.ts +0 -9
- package/dist/server/modules/payment/types.js +0 -1
- package/dist/server/test.json +0 -713
- package/dist/server/utils/small-ticket.d.ts +0 -71
- package/dist/server/utils/small-ticket.js +0 -830
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
- package/dist/solution/BaseSales/utils/cartPromotion.js +0 -1438
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
- package/dist/solution/BaseSales/utils/quotationPrice.js +0 -237
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
- package/dist/solution/BookingTicket/utils/addProductDecision.js +0 -346
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
- package/dist/solution/BookingTicket/utils/addTimeAvailability.js +0 -95
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +0 -123
- package/dist/solution/BookingTicket/utils/exampleData.js +0 -183
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -438
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -399
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -56
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +0 -150
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +0 -78
- package/lib/modules/BookingContext/index.d.ts +0 -48
- package/lib/modules/BookingContext/index.js +0 -368
- package/lib/modules/BookingContext/types.d.ts +0 -102
- package/lib/modules/BookingContext/types.js +0 -34
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -276
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -151
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -201
- package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/lib/modules/BookingContext/utils/flexible.js +0 -80
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/lib/modules/BookingContext/utils/formatResourceList.js +0 -50
- package/lib/modules/BookingContext/utils/index.d.ts +0 -11
- package/lib/modules/BookingContext/utils/index.js +0 -43
- package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/lib/modules/BookingContext/utils/noResource.js +0 -90
- package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
- package/lib/modules/BookingContext/utils/orderLineDisplay.js +0 -56
- package/lib/modules/BookingContext/utils/productExtend.d.ts +0 -72
- package/lib/modules/BookingContext/utils/productExtend.js +0 -283
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/lib/modules/BookingContext/utils/resourceErrors.js +0 -80
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/lib/modules/BookingContext/utils/resourceSelection.js +0 -46
- package/lib/modules/BookingContext/utils/resources.d.ts +0 -80
- package/lib/modules/BookingContext/utils/resources.js +0 -377
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/lib/modules/BookingContext/utils/serviceTimes.js +0 -162
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/lib/modules/BookingContext/utils/timeSlices.js +0 -124
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/lib/modules/Order/utils/manualProductDiscount.js +0 -206
- package/lib/modules/SurchargeList/index.d.ts +0 -16
- package/lib/modules/SurchargeList/index.js +0 -89
- package/lib/modules/SurchargeList/types.d.ts +0 -11
- package/lib/modules/SurchargeList/types.js +0 -17
- package/lib/server/modules/payment/index.d.ts +0 -28
- package/lib/server/modules/payment/index.js +0 -192
- package/lib/server/modules/payment/types.d.ts +0 -9
- package/lib/server/modules/payment/types.js +0 -17
- package/lib/server/test.json +0 -713
- package/lib/server/utils/small-ticket.d.ts +0 -71
- package/lib/server/utils/small-ticket.js +0 -781
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
- package/lib/solution/BaseSales/utils/cartPromotion.js +0 -992
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
- package/lib/solution/BaseSales/utils/quotationPrice.js +0 -277
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
- package/lib/solution/BookingTicket/utils/addProductDecision.js +0 -318
- package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +0 -125
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +0 -123
- package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -254
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -168
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -51
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +0 -127
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +0 -85
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/solution/BookingTicket/utils/scan/formatGlobalScan.ts
|
|
20
|
-
var formatGlobalScan_exports = {};
|
|
21
|
-
__export(formatGlobalScan_exports, {
|
|
22
|
-
formatGlobalScanResult: () => formatGlobalScanResult
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(formatGlobalScan_exports);
|
|
25
|
-
function formatGlobalScanResult(raw, scanCode) {
|
|
26
|
-
var _a;
|
|
27
|
-
if (!(raw == null ? void 0 : raw.searchType))
|
|
28
|
-
return null;
|
|
29
|
-
const { searchType } = raw;
|
|
30
|
-
const { data: resultData, code } = raw.response || {};
|
|
31
|
-
if (code !== 200 && searchType !== "local_product") {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
if (searchType === "wallet") {
|
|
35
|
-
return { searchType, data: resultData == null ? void 0 : resultData.customer, scanCode };
|
|
36
|
-
}
|
|
37
|
-
if (searchType === "walletPass") {
|
|
38
|
-
return { searchType, data: (_a = resultData == null ? void 0 : resultData[0]) == null ? void 0 : _a.customer, scanCode };
|
|
39
|
-
}
|
|
40
|
-
if (searchType === "product" || searchType === "local_product") {
|
|
41
|
-
return { searchType, data: resultData, scanCode };
|
|
42
|
-
}
|
|
43
|
-
if (searchType === "order") {
|
|
44
|
-
return { searchType, data: resultData, scanCode };
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
-
0 && (module.exports = {
|
|
50
|
-
formatGlobalScanResult
|
|
51
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 扫码商品条码预选规格纯函数(对齐 ticketBooking addServiceVariant/utils)。
|
|
3
|
-
*/
|
|
4
|
-
/** 套餐商品 */
|
|
5
|
-
export declare function isScanProductBundle(item: any): boolean;
|
|
6
|
-
/** 单规格 / 选项组商品 */
|
|
7
|
-
export declare function isScanProductOption(item: any): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* 根据条码匹配 variant,生成 cartDetailValue(对齐 ticketBooking `genValues`)。
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const values = genScanProductValues(catalogItem, '6901234567890');
|
|
14
|
-
* const itemWithSelection = { ...catalogItem, cartDetailValue: values };
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function genScanProductValues(item: any, code: string): Record<string, any>;
|
|
18
|
-
/**
|
|
19
|
-
* 统计条码命中的 variant 数量(多命中时需弹窗选择)。
|
|
20
|
-
*/
|
|
21
|
-
export declare function countScanVariantMatches(item: any, code: string): number;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/solution/BookingTicket/utils/scan/scanProductValues.ts
|
|
20
|
-
var scanProductValues_exports = {};
|
|
21
|
-
__export(scanProductValues_exports, {
|
|
22
|
-
countScanVariantMatches: () => countScanVariantMatches,
|
|
23
|
-
genScanProductValues: () => genScanProductValues,
|
|
24
|
-
isScanProductBundle: () => isScanProductBundle,
|
|
25
|
-
isScanProductOption: () => isScanProductOption
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(scanProductValues_exports);
|
|
28
|
-
function isScanProductBundle(item) {
|
|
29
|
-
return ((item == null ? void 0 : item.bundle_group_count) || 0) > 0;
|
|
30
|
-
}
|
|
31
|
-
function isScanProductOption(item) {
|
|
32
|
-
var _a;
|
|
33
|
-
return ((item == null ? void 0 : item.option_group_count) || 0) > 0 || (((_a = item == null ? void 0 : item.option_group) == null ? void 0 : _a.length) || 0) > 0;
|
|
34
|
-
}
|
|
35
|
-
function formatVariantGroupTitle(title, variantGroup = []) {
|
|
36
|
-
try {
|
|
37
|
-
return variantGroup.map((group) => {
|
|
38
|
-
const value = title == null ? void 0 : title[group == null ? void 0 : group.position_id];
|
|
39
|
-
return value ? `${(group == null ? void 0 : group.name) || "-"}: ${value}` : "";
|
|
40
|
-
}).filter(Boolean).join(", ");
|
|
41
|
-
} catch {
|
|
42
|
-
return "";
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function formatDataKey(data) {
|
|
46
|
-
var _a, _b, _c, _d;
|
|
47
|
-
const next = { ...data };
|
|
48
|
-
let key = `${next.product_id}`;
|
|
49
|
-
let rowKey = key;
|
|
50
|
-
if (next.product_variant_id) {
|
|
51
|
-
const str = `_${next.product_variant_id}`;
|
|
52
|
-
key += str;
|
|
53
|
-
rowKey += str;
|
|
54
|
-
}
|
|
55
|
-
if ((_a = next == null ? void 0 : next.option) == null ? void 0 : _a.length) {
|
|
56
|
-
for (const item of next.option) {
|
|
57
|
-
const str = `_${item.option_group_id}_${item.product_option_item_id}`;
|
|
58
|
-
key += str;
|
|
59
|
-
rowKey += `${str}_${item.quantity || item.num}`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
if ((_b = next == null ? void 0 : next.bundle) == null ? void 0 : _b.length) {
|
|
63
|
-
for (const item of next.bundle) {
|
|
64
|
-
let str = `_${item.group_id}_${item.bundle_product_id}`;
|
|
65
|
-
key += str;
|
|
66
|
-
rowKey += `${str}_${item.quantity || item.num}`;
|
|
67
|
-
if (item == null ? void 0 : item.option) {
|
|
68
|
-
for (const opt of item.option) {
|
|
69
|
-
const optStr = `_${opt.option_group_id}_${opt.product_option_item_id}`;
|
|
70
|
-
key += optStr;
|
|
71
|
-
rowKey += `${optStr}_${opt.quantity || opt.num}`;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (next == null ? void 0 : next.session) {
|
|
77
|
-
const str = `_${(_c = next.session) == null ? void 0 : _c.key}`;
|
|
78
|
-
key += str;
|
|
79
|
-
rowKey += str;
|
|
80
|
-
}
|
|
81
|
-
if (next == null ? void 0 : next.schedule) {
|
|
82
|
-
const str = `_${(_d = next.schedule) == null ? void 0 : _d.key}`;
|
|
83
|
-
key += str;
|
|
84
|
-
rowKey += str;
|
|
85
|
-
}
|
|
86
|
-
next.key = key;
|
|
87
|
-
next.rowKey = rowKey;
|
|
88
|
-
return next;
|
|
89
|
-
}
|
|
90
|
-
function genScanProductValues(item, code) {
|
|
91
|
-
var _a, _b;
|
|
92
|
-
const params = {
|
|
93
|
-
bundle: [],
|
|
94
|
-
option: [],
|
|
95
|
-
product_id: item.id,
|
|
96
|
-
product_variant_id: 0,
|
|
97
|
-
quantity: 1,
|
|
98
|
-
rowKey: "",
|
|
99
|
-
session: null
|
|
100
|
-
};
|
|
101
|
-
if (((_a = item == null ? void 0 : item.variant_group) == null ? void 0 : _a.length) || ((_b = item == null ? void 0 : item.option_group) == null ? void 0 : _b.length)) {
|
|
102
|
-
const variantItem = (item.variant || []).find(
|
|
103
|
-
(v) => (v == null ? void 0 : v.code) === code || (v == null ? void 0 : v.barcode) === code
|
|
104
|
-
);
|
|
105
|
-
if (variantItem) {
|
|
106
|
-
params.price = Number((variantItem == null ? void 0 : variantItem.price) || 0);
|
|
107
|
-
params.product_variant_id = variantItem.id;
|
|
108
|
-
params.product_option_string = formatVariantGroupTitle(
|
|
109
|
-
variantItem == null ? void 0 : variantItem.title,
|
|
110
|
-
(item == null ? void 0 : item.variant_group) || []
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return formatDataKey(params);
|
|
115
|
-
}
|
|
116
|
-
function countScanVariantMatches(item, code) {
|
|
117
|
-
return ((item == null ? void 0 : item.variant) || []).filter(
|
|
118
|
-
(v) => (v == null ? void 0 : v.code) === code || (v == null ? void 0 : v.barcode) === code
|
|
119
|
-
).length;
|
|
120
|
-
}
|
|
121
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
122
|
-
0 && (module.exports = {
|
|
123
|
-
countScanVariantMatches,
|
|
124
|
-
genScanProductValues,
|
|
125
|
-
isScanProductBundle,
|
|
126
|
-
isScanProductOption
|
|
127
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ProductData } from '../../../modules/Product/types';
|
|
2
|
-
export interface SessionCatalogStaleInfo {
|
|
3
|
-
productId: number | string | null;
|
|
4
|
-
productTitle: string | null;
|
|
5
|
-
sessionDay: string | null;
|
|
6
|
-
timeBarDay: string | null;
|
|
7
|
-
bookingDate: unknown;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* 判断 session 商品 catalog 中的 session 日历日是否与当前 TimeBar / bookingDate 不一致。
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* isSessionCatalogDateStale(product, '2026-06-05 19:01:18');
|
|
14
|
-
* // session 为 2026-06-04 → true;一致或无 session 快照 → false
|
|
15
|
-
*/
|
|
16
|
-
export declare function isSessionCatalogDateStale(product: ProductData & Record<string, any>, bookingDate: unknown): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 组装 session catalog 日期不一致时的日志 metadata。
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* buildSessionCatalogStaleInfo(product, '2026-06-05 19:01:18');
|
|
22
|
-
*/
|
|
23
|
-
export declare function buildSessionCatalogStaleInfo(product: ProductData & Record<string, any>, bookingDate: unknown): SessionCatalogStaleInfo;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/solution/BookingTicket/utils/sessionCatalogStale.ts
|
|
30
|
-
var sessionCatalogStale_exports = {};
|
|
31
|
-
__export(sessionCatalogStale_exports, {
|
|
32
|
-
buildSessionCatalogStaleInfo: () => buildSessionCatalogStaleInfo,
|
|
33
|
-
isSessionCatalogDateStale: () => isSessionCatalogDateStale
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(sessionCatalogStale_exports);
|
|
36
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
-
var SESSION_EXTENSION_TYPES = ["session_product", "session_ticket"];
|
|
38
|
-
function getIsSessionProduct(product) {
|
|
39
|
-
return SESSION_EXTENSION_TYPES.includes(product == null ? void 0 : product.extension_type);
|
|
40
|
-
}
|
|
41
|
-
function resolveSessionCalendarDay(session) {
|
|
42
|
-
if (!session)
|
|
43
|
-
return null;
|
|
44
|
-
const raw = session.start_at ?? session.end_at;
|
|
45
|
-
if (!raw)
|
|
46
|
-
return null;
|
|
47
|
-
const parsed = (0, import_dayjs.default)(raw);
|
|
48
|
-
return parsed.isValid() ? parsed.format("YYYY-MM-DD") : null;
|
|
49
|
-
}
|
|
50
|
-
function formatScheduleCalendarDay(date) {
|
|
51
|
-
if (date == null || date === "")
|
|
52
|
-
return null;
|
|
53
|
-
const parsed = (0, import_dayjs.default)(date);
|
|
54
|
-
return parsed.isValid() ? parsed.format("YYYY-MM-DD") : null;
|
|
55
|
-
}
|
|
56
|
-
function isSessionCatalogDateStale(product, bookingDate) {
|
|
57
|
-
var _a;
|
|
58
|
-
if (!getIsSessionProduct(product)) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
const timeBarDay = formatScheduleCalendarDay(bookingDate);
|
|
62
|
-
if (!timeBarDay) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
const sessionDay = resolveSessionCalendarDay((_a = product.cartDetailValue) == null ? void 0 : _a.session);
|
|
66
|
-
if (!sessionDay) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return sessionDay !== timeBarDay;
|
|
70
|
-
}
|
|
71
|
-
function buildSessionCatalogStaleInfo(product, bookingDate) {
|
|
72
|
-
var _a;
|
|
73
|
-
return {
|
|
74
|
-
productId: (product == null ? void 0 : product.id) ?? null,
|
|
75
|
-
productTitle: (product == null ? void 0 : product.title) ?? (product == null ? void 0 : product.name) ?? null,
|
|
76
|
-
sessionDay: resolveSessionCalendarDay((_a = product.cartDetailValue) == null ? void 0 : _a.session),
|
|
77
|
-
timeBarDay: formatScheduleCalendarDay(bookingDate),
|
|
78
|
-
bookingDate
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
-
0 && (module.exports = {
|
|
83
|
-
buildSessionCatalogStaleInfo,
|
|
84
|
-
isSessionCatalogDateStale
|
|
85
|
-
});
|