@pisell/private-materials 6.12.486 → 6.12.488
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/ProductList/index.js +1 -0
- package/es/components/bigSale/components/TimeBar/index.js +1 -0
- package/es/components/bigSale/dialog.js +1 -0
- package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
- package/es/components/bigSale/hooks/useBigSaleProductListConfig.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
- package/es/components/bigSale/index.js +1 -0
- package/es/components/bigSale/templates/Kiosk/index.js +1 -0
- package/es/components/kiosk/components/Shell/useKioskMemberAction.js +1 -0
- package/es/components/kiosk/sales/KioskSaleSession.js +1 -0
- package/es/components/kiosk/sales/useCheckout.js +1 -0
- package/es/components/kiosk/sales/useSaleSessionExit.js +1 -0
- package/es/components/scanOrder/components/Check/index.js +33 -34
- package/es/components/scanOrder/utils/freePayment.test.cjs +21 -8
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/es/components/venueBookingSales/BookingComposer.js +5 -4
- package/es/components/venueBookingSales/availability/controller.js +1 -1
- package/es/components/venueBookingSales/catalogPresentation.js +1 -0
- package/es/components/venueBookingSales/checkout/VenueBookingHolderStep.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueCustomerAccess.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueKioskCheckout.js +1 -0
- package/es/components/venueBookingSales/extras/VenueExtraDetailModal.js +1 -0
- package/es/components/venueBookingSales/useBookingComposer.js +38 -7
- package/es/components/venueBookingSales/useVenueBookingSession.js +1 -0
- package/es/index.js +2 -0
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/pisellReservation/floorRoomCard/endingSoonHighlight.js +4 -4
- package/es/plus/pisellReservation/index.js +17 -0
- package/es/plus/pisellReservation/utils/calendarBookingSelection.js +4 -4
- package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
- package/es/plus/saleDetail/Base.js +1 -0
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/PrintAction.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
- package/es/plus/saleDetail/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/index.js +1 -0
- package/es/plus/salesSdk/index.js +54 -0
- package/es/plus/salesSdk/types.d.ts +3 -1
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/discountCard.js +2 -0
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/calendarEntry.js +2 -2
- package/lib/components/scanOrder/components/Check/index.js +33 -34
- package/lib/components/scanOrder/utils/freePayment.test.cjs +21 -8
- package/lib/components/venueBookingSales/BookingComposer.js +5 -4
- package/lib/components/venueBookingSales/availability/controller.js +1 -1
- package/lib/components/venueBookingSales/useBookingComposer.js +38 -7
- package/lib/plus/salesSdk/types.d.ts +3 -1
- package/lib/plus/salesSdk/utils/discountCard.js +2 -0
- package/package.json +4 -4
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
+
import "../../../../plus/salesSdk/index.js";
|
|
3
4
|
import dayjs from "dayjs";
|
|
4
5
|
import { useCallback, useEffect, useState } from "react";
|
|
5
6
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -20,6 +20,7 @@ import { showAddToCartToast } from "../../../../plus/salesSdk/components/showAdd
|
|
|
20
20
|
import { mergeBookingsForDisplay } from "../../../../plus/salesSdk/utils/mergeBookingsForDisplay.js";
|
|
21
21
|
import useSalesSdkGlobalScanHandler from "../../../../plus/salesSdk/hooks/useSalesSdkGlobalScanHandler.js";
|
|
22
22
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
23
|
+
import "../../../../plus/salesSdk/index.js";
|
|
23
24
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
24
25
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
25
26
|
import locales_default$1 from "../../locales/index.js";
|
|
@@ -5,6 +5,7 @@ import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { setBookingTimeSelectionIntent } from "../../../../plus/salesSdk/utils/bookingTimeSelection.js";
|
|
7
7
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
+
import "../../../../plus/salesSdk/index.js";
|
|
8
9
|
import locales_default from "../../locales/index.js";
|
|
9
10
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
10
11
|
import dayjs from "dayjs";
|
|
@@ -6,6 +6,7 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
6
6
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
7
7
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
8
8
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
9
|
+
import "../../plus/salesSdk/index.js";
|
|
9
10
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
10
11
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
11
12
|
import BigSale from "./index.js";
|
|
@@ -4,6 +4,7 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
|
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
6
|
import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import { useMemo } from "react";
|
|
8
9
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
9
10
|
/**
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import { generateProductTabs, sortProductsByTabOrder } from "../../ticketBooking/components/ProductDisplayAdapter/utils.js";
|
|
4
4
|
import { ProductDisplayPresets } from "../../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
5
|
+
import "../../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
5
6
|
import { mergeBigSaleProductListPreferences } from "../utils/productListPreferences.js";
|
|
6
7
|
import { useMemo, useRef } from "react";
|
|
7
8
|
import isEqual from "lodash/isEqual";
|
|
@@ -3,6 +3,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
3
3
|
import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from "../../../plus/salesSdk/utils/buildDefaultLoadProductsParams.js";
|
|
4
4
|
import { useSalesSdkUIHosts } from "../../../plus/salesSdk/context/SalesSdkUIHostsContext.js";
|
|
5
5
|
import { SalesSdkRootRefreshContext } from "../../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
6
|
+
import "../../../plus/salesSdk/index.js";
|
|
6
7
|
import { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
|
|
7
8
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
9
|
import { findReservationRuleProductByResourceId } from "../../../plus/pisellReservation/data/reservationRuleProducts.js";
|
|
@@ -8,6 +8,7 @@ import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
|
8
8
|
import { useSalesSdkCustomer } from "../../plus/salesSdk/hooks/useSalesSdkCustomer.js";
|
|
9
9
|
import { SalesSdkProvider } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
10
10
|
import { SalesSdkBookingContextProvider } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
11
|
+
import "../../plus/salesSdk/index.js";
|
|
11
12
|
import { resolveCustomerDetailAppearance } from "../../pro/skuDetailModal/customerDetailPolicy.js";
|
|
12
13
|
import { resolveKioskPlatformSource, resolveKioskPresentation } from "../kioskSale/resolveKioskPresentation.js";
|
|
13
14
|
import { isVenueKioskRuntime } from "../venueBookingSales/kiosk/customer.js";
|
|
@@ -14,6 +14,7 @@ import { useSalesSdkBusinessAvailability } from "../../../../plus/salesSdk/conte
|
|
|
14
14
|
import { collectUnassignedHolderLines } from "../../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
15
15
|
import { isFulfillmentTimingBooking } from "../../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
16
16
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
17
|
+
import "../../../../plus/salesSdk/index.js";
|
|
17
18
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
18
19
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
19
20
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -3,6 +3,7 @@ import { useSalesSdkHostBridges } from "../../../../plus/salesSdk/context/SalesS
|
|
|
3
3
|
import { isValidOrderCustomerId } from "../../../../plus/salesSdk/utils/customerAuthGate.js";
|
|
4
4
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
5
5
|
import { getClientDisplayName, normalizeCustomer } from "../../../../plus/saleDetail/components/Client/utils.js";
|
|
6
|
+
import "../../../../plus/salesSdk/index.js";
|
|
6
7
|
import { useKioskSale } from "../../sales/KioskSaleContext.js";
|
|
7
8
|
import { captureShoppingOrder } from "../../sales/shopping/orderIdentity.js";
|
|
8
9
|
import { maskCustomerPhone } from "./memberPhone.js";
|
|
@@ -5,6 +5,7 @@ import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/
|
|
|
5
5
|
import { isFulfillmentTimingBooking } from "../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
6
6
|
import { KioskDialog } from "../components/KioskDialog/index.js";
|
|
7
7
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
8
|
+
import "../../../plus/salesSdk/index.js";
|
|
8
9
|
import { resolveSaleDetailProductQuantity, resolveSaleDetailTempOrder } from "../../../plus/saleDetail/utils.js";
|
|
9
10
|
import locales_default from "../../bigSale/locales/index.js";
|
|
10
11
|
import { KioskSaleContext } from "./KioskSaleContext.js";
|
|
@@ -6,6 +6,7 @@ import { isVirtualSettlementTempOrder } from "../../../plus/multiCurrencySettlem
|
|
|
6
6
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
7
7
|
import { collectUnassignedHolderLines } from "../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
8
8
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
9
|
+
import "../../../plus/salesSdk/index.js";
|
|
9
10
|
import { defaultCheckoutOptions } from "../app/contracts.js";
|
|
10
11
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
11
12
|
import { useSalesCommands } from "../runtime/operations/useSalesCommands.js";
|
|
@@ -2,6 +2,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
2
2
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
3
3
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
4
4
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
5
|
+
import "../../../plus/salesSdk/index.js";
|
|
5
6
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
6
7
|
import { useEffect, useRef, useState } from "react";
|
|
7
8
|
import { useMemoizedFn } from "ahooks";
|
|
@@ -176,43 +176,42 @@ function Check() {
|
|
|
176
176
|
paymentAmount,
|
|
177
177
|
paymentAmountType: typeof paymentAmount,
|
|
178
178
|
amountSource: (res === null || res === void 0 || (_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : _res$data11.order_wait_pay_amount) != null ? "response.order_wait_pay_amount" : "viewModel.summary.total_amount",
|
|
179
|
-
branch:
|
|
179
|
+
branch: !isAdditionalOrder && isZeroPaymentAmount(paymentAmount) ? "free-pay" : shouldPayOnSubmit ? "pisell1.payment" : "order-details",
|
|
180
180
|
hasFreePayBranch: true
|
|
181
181
|
});
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
status: _e === null || _e === void 0 ? void 0 : _e.status
|
|
203
|
-
});
|
|
204
|
-
try {
|
|
205
|
-
yield runModuleAction("restoreOrder");
|
|
206
|
-
} catch (error) {
|
|
207
|
-
logScanOrder(utils, "restoreOrder after payment failed", scanOrderError(error), "error");
|
|
208
|
-
}
|
|
182
|
+
if (!isAdditionalOrder && (yield handleScanOrderFreePayment({
|
|
183
|
+
orderId,
|
|
184
|
+
amount: paymentAmount,
|
|
185
|
+
utils,
|
|
186
|
+
restoreOrder: () => runModuleAction("restoreOrder"),
|
|
187
|
+
showFailure: showSubmitFailedTip
|
|
188
|
+
}))) return;
|
|
189
|
+
if (shouldPayOnSubmit) utils.action({
|
|
190
|
+
type: "pisell1.payment",
|
|
191
|
+
data: {
|
|
192
|
+
order_id: orderId,
|
|
193
|
+
total_amount: paymentAmount,
|
|
194
|
+
sale_channel: saleChannel
|
|
195
|
+
},
|
|
196
|
+
callback: function() {
|
|
197
|
+
var _ref2 = _asyncToGenerator(function* (_e) {
|
|
198
|
+
logScanOrder(utils, "支付回调", {
|
|
199
|
+
orderId,
|
|
200
|
+
type: _e === null || _e === void 0 ? void 0 : _e.type,
|
|
201
|
+
status: _e === null || _e === void 0 ? void 0 : _e.status
|
|
209
202
|
});
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
203
|
+
try {
|
|
204
|
+
yield runModuleAction("restoreOrder");
|
|
205
|
+
} catch (error) {
|
|
206
|
+
logScanOrder(utils, "restoreOrder after payment failed", scanOrderError(error), "error");
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
return function callback(_x2) {
|
|
210
|
+
return _ref2.apply(this, arguments);
|
|
211
|
+
};
|
|
212
|
+
}()
|
|
213
|
+
});
|
|
214
|
+
else {
|
|
216
215
|
var _utils$history, _utils$history2;
|
|
217
216
|
try {
|
|
218
217
|
yield runModuleAction("restoreOrder");
|
|
@@ -35,12 +35,17 @@ function visit(node) {
|
|
|
35
35
|
}
|
|
36
36
|
visit(parsed);
|
|
37
37
|
|
|
38
|
-
test('scan order zero
|
|
39
|
-
for (const [amount, success, payOnSubmit
|
|
38
|
+
test('scan order zero pays regardless of pay-on-submit; positive and additional orders preserve their flow', async () => {
|
|
39
|
+
for (const [amount, success, payOnSubmit, isAdditionalOrder = false] of [
|
|
40
|
+
[0, true, true], ['0.00', true, true], [5, true, true], [0, false, true],
|
|
41
|
+
[0, true, false], ['0.00', true, false], [0, false, false], [5, true, false],
|
|
42
|
+
[0, true, undefined], [0, false, undefined], [5, true, undefined],
|
|
43
|
+
[0, true, true, true], [0, true, false, true],
|
|
44
|
+
]) {
|
|
40
45
|
const events = [];
|
|
41
46
|
const ctx = {
|
|
42
47
|
logScanOrder: logger.logScanOrder, scanOrderError: logger.scanOrderError,
|
|
43
|
-
viewModel: { cartItems: [{}], summary: { total_amount: 99 } }, note: '', channel: 'scan_to_order', entryMode: 'default', isAdditionalOrder
|
|
48
|
+
viewModel: { cartItems: [{}], summary: { total_amount: 99 } }, note: '', channel: 'scan_to_order', entryMode: isAdditionalOrder ? 'additional_order' : 'default', isAdditionalOrder,
|
|
44
49
|
dineInConfig: { 'sale.require_payment_on_submit': payOnSubmit },
|
|
45
50
|
runModuleAction: async (name) => { events.push(name); return name === 'submitScanOrder' ? { status: true, data: { order_id: 123, order_wait_pay_amount: amount } } : undefined; },
|
|
46
51
|
clearStepCache() {}, refreshViewModel: async () => {},
|
|
@@ -51,12 +56,20 @@ test('scan order zero bypasses modal, positive preserves channel, failed free pa
|
|
|
51
56
|
handleScanOrderFreePayment: api.handleScanOrderFreePayment,
|
|
52
57
|
};
|
|
53
58
|
await vm.runInNewContext(transpile('const run = ' + submit + '; run();'), ctx);
|
|
54
|
-
if (!
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
assert(
|
|
59
|
+
if (!isAdditionalOrder && api.isZeroPaymentAmount(amount)) {
|
|
60
|
+
assert.equal(events.filter(event => event === 'free-pay').length, 1);
|
|
61
|
+
assert(!events.includes('modal'));
|
|
62
|
+
assert(!events.includes('/order/details?id=123'));
|
|
58
63
|
if (success) assert(events.includes('/payment-finish/success?amount=0&order_id=123'));
|
|
59
|
-
else {
|
|
64
|
+
else {
|
|
65
|
+
assert(events.includes('failure')); assert(!events.includes('restoreOrder'));
|
|
66
|
+
assert(!events.includes('/payment-finish/success?amount=0&order_id=123'));
|
|
67
|
+
}
|
|
68
|
+
} else if (payOnSubmit && !isAdditionalOrder) {
|
|
69
|
+
assert(events.includes('modal')); assert(!events.includes('free-pay'));
|
|
70
|
+
} else {
|
|
71
|
+
assert(!events.includes('free-pay')); assert(!events.includes('modal'));
|
|
72
|
+
assert(events.includes('/order/details?id=123'));
|
|
60
73
|
}
|
|
61
74
|
}
|
|
62
75
|
});
|
|
@@ -2,6 +2,7 @@ import useEngineContext from "../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
3
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { TEMP_ORDER_SYNC_REQUEST_MESSAGE_TYPE, getTempOrderSyncPayload, getTempOrderSyncRequestPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
+
import "../../plus/salesSdk/index.js";
|
|
5
6
|
import { useEffect, useRef, useState } from "react";
|
|
6
7
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
|
7
8
|
function createRequestId() {
|
|
@@ -20,6 +20,7 @@ import { useProducts } from "../../hooks/pisellos/useProducts.js";
|
|
|
20
20
|
import { useService } from "../../../booking/info/service/serviceManager/index.js";
|
|
21
21
|
import ProductDisplayAdapter_default from "../ProductDisplayAdapter/ProductDisplayAdapter.js";
|
|
22
22
|
import { resolveProductDisplayConfig } from "../ProductDisplayAdapter/types.js";
|
|
23
|
+
import "../ProductDisplayAdapter/index.js";
|
|
23
24
|
import notAvailable_default from "../notAvailable/index.js";
|
|
24
25
|
import MultiDayTimeSelectModal from "./MultiDayTimeSelectModal.js";
|
|
25
26
|
import dayjs from "dayjs";
|
|
@@ -22,7 +22,7 @@ function BookingComposer(props) {
|
|
|
22
22
|
const text = (en, zh) => locale === "zh" ? zh : en;
|
|
23
23
|
const model = useBookingComposer(props);
|
|
24
24
|
const bookingUI = useOptionalBookingUI();
|
|
25
|
-
const { configuration, setConfiguration, quantity, setQuantity, quote, error, working, revision, commit } = model;
|
|
25
|
+
const { configuration, setConfiguration, quantity, setQuantity, maxQuantity, quantityDisabled, quote, error, working, revision, commit } = model;
|
|
26
26
|
const configurationDetail = mode === "tickets" && ((_draft$plan = draft.plan) === null || _draft$plan === void 0 ? void 0 : _draft$plan.hasConfiguration) ? draft.plan.productDetail : void 0;
|
|
27
27
|
const overSold = isSkuFlagSet((_props$skuOptions$con = (_props$skuOptions = props.skuOptions) === null || _props$skuOptions === void 0 || (_props$skuOptions = _props$skuOptions.config) === null || _props$skuOptions === void 0 ? void 0 : _props$skuOptions.overSold) !== null && _props$skuOptions$con !== void 0 ? _props$skuOptions$con : draft.detail.over_sold);
|
|
28
28
|
const configurationComplete = useMemo(() => Boolean(configurationDetail && validateBookingProductConfiguration(configurationDetail, configuration.skuValue, {
|
|
@@ -67,7 +67,7 @@ function BookingComposer(props) {
|
|
|
67
67
|
return (scrollContainer === null || scrollContainer === void 0 || (_scrollContainer$clos = scrollContainer.closest("[role=\"dialog\"]")) === null || _scrollContainer$clos === void 0 ? void 0 : _scrollContainer$clos.querySelector(".booking-config-actions .booking-primary-action")) || null;
|
|
68
68
|
}
|
|
69
69
|
}));
|
|
70
|
-
const quantityControl = (busy = false) => mode === "tickets" && !draft.lineUid ? /* @__PURE__ */ React.createElement("div", {
|
|
70
|
+
const quantityControl = (busy = false) => mode === "tickets" && !draft.lineUid && maxQuantity !== 0 ? /* @__PURE__ */ React.createElement("div", {
|
|
71
71
|
className: "reservation-quantity",
|
|
72
72
|
role: "group",
|
|
73
73
|
"aria-label": text("Number", "数量")
|
|
@@ -75,15 +75,16 @@ function BookingComposer(props) {
|
|
|
75
75
|
className: "booking-ticket-quantity",
|
|
76
76
|
variant: "capsule",
|
|
77
77
|
min: 1,
|
|
78
|
+
max: maxQuantity,
|
|
78
79
|
step: 1,
|
|
79
80
|
value: quantity,
|
|
80
|
-
disabled: busy || working || props.disabled,
|
|
81
|
+
disabled: busy || working || props.disabled || quantityDisabled,
|
|
81
82
|
commitInputOnClose: false,
|
|
82
83
|
selectAllInputOnOpen: true,
|
|
83
84
|
clearSelectedInputOnDelete: true,
|
|
84
85
|
ignoreEmptyInputConfirm: true,
|
|
85
86
|
onChange: (value) => {
|
|
86
|
-
if (!busy && !working && !props.disabled && Number.isSafeInteger(value) && value >= 1) setQuantity(value);
|
|
87
|
+
if (!busy && !working && !props.disabled && !quantityDisabled && Number.isSafeInteger(value) && value >= 1) setQuantity(value);
|
|
87
88
|
}
|
|
88
89
|
})) : null;
|
|
89
90
|
const footer = /* @__PURE__ */ React.createElement("div", { className: "venue-booking-sales__booking-footer" }, quantityControl(), /* @__PURE__ */ React.createElement("div", {
|
|
@@ -181,7 +181,7 @@ var BookingAvailabilityController = class {
|
|
|
181
181
|
});
|
|
182
182
|
return result;
|
|
183
183
|
} catch (error) {
|
|
184
|
-
const rejectedBeforeWrite = !!error && typeof error === "object" && "code" in error && error.code === "BUSINESS_UNAVAILABLE";
|
|
184
|
+
const rejectedBeforeWrite = !!error && typeof error === "object" && "code" in error && (error.code === "BUSINESS_UNAVAILABLE" || error.code === "ITEM_QUANTITY_LIMIT");
|
|
185
185
|
_this.publish({
|
|
186
186
|
status: "error",
|
|
187
187
|
ready: false,
|
|
@@ -3,6 +3,7 @@ import index from "../../plus/productSelect/components/pisellPriceText/index.js"
|
|
|
3
3
|
import { resolveProductPricePresentation } from "../../plus/productSelect/pricing/pricePresentation.js";
|
|
4
4
|
import SettlementPriceList from "../../plus/multiCurrencySettlement/SettlementPriceList.js";
|
|
5
5
|
import { ProductDisplayPresets } from "../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
6
|
+
import "../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
6
7
|
import { DEFAULT_BIG_SALE_PRODUCT_LIST_PREFERENCES } from "../bigSale/utils/productListPreferences.js";
|
|
7
8
|
import { translate } from "../../plus/venueBookingDesign/i18n.js";
|
|
8
9
|
import { ProductCard as ProductCard$1 } from "../../plus/venueBookingDesign/shared/ProductCard.js";
|
|
@@ -7,6 +7,7 @@ import { useSalesSdkHolder } from "../../../plus/salesSdk/context/SalesSdkHolder
|
|
|
7
7
|
import { assignHolderToCartLine } from "../../../plus/salesSdk/utils/assignHolderToCartLine.js";
|
|
8
8
|
import { resolveLineByProductUid } from "../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
9
9
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
10
|
+
import "../../../plus/salesSdk/index.js";
|
|
10
11
|
import { isProgressTarget } from "../../../plus/venueBookingDesign/shared/booking-progress.js";
|
|
11
12
|
import { useBookingProgress } from "../../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
|
12
13
|
import { Button as Button$1 } from "../../../plus/venueBookingDesign/shared/Controls.js";
|
|
@@ -7,6 +7,7 @@ import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkH
|
|
|
7
7
|
import { isVirtualSettlementTempOrder } from "../../../plus/multiCurrencySettlement/index.js";
|
|
8
8
|
import { freePayApi } from "../../Sales/Checkout/serve.js";
|
|
9
9
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
10
|
+
import "../../../plus/salesSdk/index.js";
|
|
10
11
|
import { isSalesOrderSubmitSuccess } from "../../../plus/saleDetail/components/DetailActions/utils.js";
|
|
11
12
|
import { resolveKioskDeferredSubmission } from "../../bigSale/templates/Kiosk/deferredCheckout.js";
|
|
12
13
|
import { isH5ZeroAmountValue, toFiniteKioskAmount } from "../../bigSale/templates/Kiosk/zeroAmountCheckout.js";
|
|
@@ -2,6 +2,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
2
2
|
import useSalesUserLogin from "../../../hooks/useSalesUserLogin.js";
|
|
3
3
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
4
4
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
5
|
+
import "../../../plus/salesSdk/index.js";
|
|
5
6
|
import { orderIdentity } from "../presentation.js";
|
|
6
7
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerAuthRequest } from "../kiosk/customer.js";
|
|
7
8
|
import { confirmationErrorMessage } from "./errorMessage.js";
|
|
@@ -4,6 +4,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
4
4
|
import useInitLocalesOnce from "../../../hooks/useInitLocalesOnce.js";
|
|
5
5
|
import { isHolderConfirmCancelled } from "../../../plus/salesSdk/holderConfirm/createHolderConfirmBridge.js";
|
|
6
6
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import locales_default from "../../bigSale/locales/index.js";
|
|
8
9
|
import { presentBaseSalesPaymentResult } from "../../checkout/paymentRuntime/presentBaseSalesPaymentResult.js";
|
|
9
10
|
import { usePaymentScreenProtection } from "../../checkout/paymentRuntime/usePaymentScreenProtection.js";
|
|
@@ -10,6 +10,7 @@ import immersive from "../../../pro/skuDetailModal/appearances/immersive/index.j
|
|
|
10
10
|
import { resolveEffectiveHolderConfig } from "../../../plus/salesSdk/utils/productHolderConfig.js";
|
|
11
11
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
12
12
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
13
|
+
import "../../../plus/salesSdk/index.js";
|
|
13
14
|
import { localizedText, orderIdentity } from "../presentation.js";
|
|
14
15
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
15
16
|
import { ProductDescription } from "../../../plus/venueBookingDesign/shared/ProductDescription.js";
|
|
@@ -16,10 +16,11 @@ import { useEffect, useMemo, useRef, useState } from "react";
|
|
|
16
16
|
* Start a new keyed hook owner for a new draft/openId, as the existing Composer does.
|
|
17
17
|
*/
|
|
18
18
|
function useBookingComposer(props) {
|
|
19
|
-
var _draft$openId, _draft$plan, _draft$detail$
|
|
19
|
+
var _draft$detail$product, _draft$openId, _draft$plan, _draft$detail$product2, _selection$candidate, _os$otherParams, _context$sales$salesS, _selection$requiremen2, _selection$selectedRe;
|
|
20
20
|
const { mode, draft, context, date, scopeKey, locale, priceSource } = props;
|
|
21
21
|
const text = (en, zh) => locale === "zh" ? zh : en;
|
|
22
|
-
const
|
|
22
|
+
const ticket = context.sales.bookingTicket;
|
|
23
|
+
const os = ticket;
|
|
23
24
|
const businessAvailability = useSalesSdkBusinessAvailability();
|
|
24
25
|
const panel = useRef(null);
|
|
25
26
|
const [configuration, setConfiguration] = useState(draft.configuration);
|
|
@@ -27,6 +28,33 @@ function useBookingComposer(props) {
|
|
|
27
28
|
const initialQuantity = Number(draft.quantity);
|
|
28
29
|
return Number.isSafeInteger(initialQuantity) && initialQuantity > 0 ? initialQuantity : 1;
|
|
29
30
|
});
|
|
31
|
+
const productId = Number((_draft$detail$product = draft.detail.product_id) !== null && _draft$detail$product !== void 0 ? _draft$detail$product : draft.detail.id);
|
|
32
|
+
const checkQuantityLimit = mode === "tickets" && !draft.lineUid && !!(ticket === null || ticket === void 0 ? void 0 : ticket.getVenueTicketRemainingQuantity);
|
|
33
|
+
const [quantityLimit, setQuantityLimit] = useState();
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!checkQuantityLimit || !(ticket === null || ticket === void 0 ? void 0 : ticket.getVenueTicketRemainingQuantity)) return;
|
|
36
|
+
let active = true;
|
|
37
|
+
setQuantityLimit(void 0);
|
|
38
|
+
ticket.getVenueTicketRemainingQuantity(productId).then((remaining) => {
|
|
39
|
+
if (!active) return;
|
|
40
|
+
if (remaining !== void 0 && remaining > 0) setQuantity((current) => Math.min(current, remaining));
|
|
41
|
+
setQuantityLimit({ remaining });
|
|
42
|
+
}, () => {
|
|
43
|
+
if (active) setQuantityLimit({ failed: true });
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
active = false;
|
|
47
|
+
};
|
|
48
|
+
}, [
|
|
49
|
+
checkQuantityLimit,
|
|
50
|
+
ticket,
|
|
51
|
+
productId,
|
|
52
|
+
scopeKey
|
|
53
|
+
]);
|
|
54
|
+
const maxQuantity = checkQuantityLimit ? quantityLimit === null || quantityLimit === void 0 ? void 0 : quantityLimit.remaining : void 0;
|
|
55
|
+
const quantityDisabled = checkQuantityLimit && (!quantityLimit || !!quantityLimit.failed || maxQuantity === 0);
|
|
56
|
+
const quantityValid = !quantityDisabled && (maxQuantity === void 0 || quantity <= maxQuantity);
|
|
57
|
+
const quantityError = checkQuantityLimit && (quantityLimit === null || quantityLimit === void 0 ? void 0 : quantityLimit.failed) ? text("Unable to check the ticket limit. Reopen this ticket to try again.", "无法核对门票限购数量,请重新打开门票。") : maxQuantity === 0 ? text("You have reached the limit for this ticket.", "已达到该门票的购买上限。") : void 0;
|
|
30
58
|
const [selection, setSelection] = useState();
|
|
31
59
|
const lastDraftIntent = useRef(draft.initialSelection);
|
|
32
60
|
const [quote, setQuote] = useState();
|
|
@@ -65,7 +93,7 @@ function useBookingComposer(props) {
|
|
|
65
93
|
scopeKey,
|
|
66
94
|
mode,
|
|
67
95
|
(_draft$openId = draft.openId) !== null && _draft$openId !== void 0 ? _draft$openId : (_draft$plan = draft.plan) === null || _draft$plan === void 0 ? void 0 : _draft$plan.openId,
|
|
68
|
-
(_draft$detail$
|
|
96
|
+
(_draft$detail$product2 = draft.detail.product_id) !== null && _draft$detail$product2 !== void 0 ? _draft$detail$product2 : draft.detail.id,
|
|
69
97
|
draft.lineUid,
|
|
70
98
|
date,
|
|
71
99
|
quantity,
|
|
@@ -91,7 +119,7 @@ function useBookingComposer(props) {
|
|
|
91
119
|
useEffect(() => {
|
|
92
120
|
let active = true;
|
|
93
121
|
setQuote(void 0);
|
|
94
|
-
if (!(selection === null || selection === void 0 ? void 0 : selection.candidate) || !["selecting", "ready"].includes(selection.status) || mode !== "tickets" && !selection.ready || selection.requiresOrderReconciliation || selection.candidate.date !== date || selection.candidate.availabilityContextId !== selection.contextId || !selection.times.some((time) => sameContextualTime(time, selection.candidate) && selectable(time, (selection.partySize || 0) * selection.bookingCount))) return;
|
|
122
|
+
if (!quantityValid || !(selection === null || selection === void 0 ? void 0 : selection.candidate) || !["selecting", "ready"].includes(selection.status) || mode !== "tickets" && !selection.ready || selection.requiresOrderReconciliation || selection.candidate.date !== date || selection.candidate.availabilityContextId !== selection.contextId || !selection.times.some((time) => sameContextualTime(time, selection.candidate) && selectable(time, (selection.partySize || 0) * selection.bookingCount))) return;
|
|
95
123
|
setError(void 0);
|
|
96
124
|
quoteBookingProduct({
|
|
97
125
|
os: priceSource,
|
|
@@ -115,6 +143,7 @@ function useBookingComposer(props) {
|
|
|
115
143
|
draft,
|
|
116
144
|
prepared.product,
|
|
117
145
|
revision,
|
|
146
|
+
quantityValid,
|
|
118
147
|
selection === null || selection === void 0 ? void 0 : selection.ready,
|
|
119
148
|
selection === null || selection === void 0 ? void 0 : selection.status,
|
|
120
149
|
selection === null || selection === void 0 ? void 0 : selection.contextId,
|
|
@@ -123,7 +152,7 @@ function useBookingComposer(props) {
|
|
|
123
152
|
const commit = function() {
|
|
124
153
|
var _ref = _asyncToGenerator(function* () {
|
|
125
154
|
var _busyCallback$current2, _os$getTempOrder, _props$operationLog, _prepared$product$pro, _selection$requiremen;
|
|
126
|
-
if (lock.current || props.disabled || !quote || !(selection === null || selection === void 0 ? void 0 : selection.ready) || !selection.candidate || !panel.current) return false;
|
|
155
|
+
if (lock.current || props.disabled || !quantityValid || !quote || !(selection === null || selection === void 0 ? void 0 : selection.ready) || !selection.candidate || !panel.current) return false;
|
|
127
156
|
lock.current = true;
|
|
128
157
|
setWorking(true);
|
|
129
158
|
(_busyCallback$current2 = busyCallback.current) === null || _busyCallback$current2 === void 0 || _busyCallback$current2.call(busyCallback, true);
|
|
@@ -271,7 +300,7 @@ function useBookingComposer(props) {
|
|
|
271
300
|
resourceSettingsFailed: Boolean(context.sales.salesSettingsError),
|
|
272
301
|
onRetryResourceSettings: context.sales.ensureSalesSettings
|
|
273
302
|
};
|
|
274
|
-
const bookingReady = Boolean((selection === null || selection === void 0 ? void 0 : selection.ready) && quote && !selection.requiresOrderReconciliation);
|
|
303
|
+
const bookingReady = Boolean(quantityValid && (selection === null || selection === void 0 ? void 0 : selection.ready) && quote && !selection.requiresOrderReconciliation);
|
|
275
304
|
const cancel = () => {
|
|
276
305
|
if (!lock.current) props.onCancel();
|
|
277
306
|
};
|
|
@@ -280,10 +309,12 @@ function useBookingComposer(props) {
|
|
|
280
309
|
setConfiguration,
|
|
281
310
|
quantity,
|
|
282
311
|
setQuantity,
|
|
312
|
+
maxQuantity,
|
|
313
|
+
quantityDisabled,
|
|
283
314
|
prepared,
|
|
284
315
|
selection,
|
|
285
316
|
quote,
|
|
286
|
-
error,
|
|
317
|
+
error: quantityError !== null && quantityError !== void 0 ? quantityError : error,
|
|
287
318
|
working,
|
|
288
319
|
revision,
|
|
289
320
|
panelRef: panel,
|
|
@@ -9,6 +9,7 @@ import { useSalesSdkHostBridges } from "../../plus/salesSdk/context/SalesSdkHost
|
|
|
9
9
|
import { formatTempOrderSettlementAmount } from "../../plus/multiCurrencySettlement/index.js";
|
|
10
10
|
import { useSalesSdkBusinessAvailability } from "../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
11
11
|
import { pickIdentity } from "../../plus/salesSdk/utils/identity.js";
|
|
12
|
+
import "../../plus/salesSdk/index.js";
|
|
12
13
|
import { getPendingWalletPaymentAmount, resolveEffectiveSaleDetailAmountDue } from "../../plus/saleDetail/utils.js";
|
|
13
14
|
import { useBookingUI } from "../../plus/venueBookingDesign/context.js";
|
|
14
15
|
import { useBookingProgress } from "../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
package/es/index.js
CHANGED
|
@@ -92,6 +92,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
92
92
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
93
93
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
94
94
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
95
|
+
import "./plus/salesSdk/index.js";
|
|
95
96
|
import { defineExitPolicy, defineNavigationGuard, definePredicate, defineTrigger, defineWorkflow } from "./components/HDLKiosk/kernel/application/defineApplication.js";
|
|
96
97
|
import { accept, defineSlice, perform, require } from "./components/HDLKiosk/kernel/application/defineSlice.js";
|
|
97
98
|
import { defineKioskScanCommand, kioskScanTrigger, salesScan, startOnScan } from "./components/kiosk/sales/inputs/scan.js";
|
|
@@ -185,6 +186,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
185
186
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
186
187
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
187
188
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
189
|
+
import "./plus/pisellReservation/index.js";
|
|
188
190
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
189
191
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
190
192
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -290,4 +290,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
//#endregion
|
|
293
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
293
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, findFirstVirtualCurrencyAsset, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getReservedVirtualSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
|
|
|
259
259
|
return rows;
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
|
-
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
|
|
|
78
78
|
PisellToast({ content: err instanceof Error ? err.message : String(err) });
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
|
|
|
927
927
|
];
|
|
928
928
|
}
|
|
929
929
|
//#endregion
|
|
930
|
-
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utc from "dayjs/plugin/utc";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/floorRoomCard/endingSoonHighlight.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
dayjs.extend(timezone);
|
|
7
7
|
function endingSoonBookingBusiness(booking) {
|
|
8
8
|
var _ref, _booking$business_cod;
|
|
9
9
|
const order = booking.order;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./serve/formResourcePage.js";
|
|
2
|
+
import "./floorRoomCard/mapRowToFloorRoomCardData.js";
|
|
3
|
+
import "./floorRoomCard/ReservationFloorRoomCard.js";
|
|
4
|
+
import "./floorMap/reservationMock.js";
|
|
5
|
+
import "./floorMap/floorPlanApi.js";
|
|
6
|
+
import "./reservationConstants.js";
|
|
7
|
+
import "./data/bookingToReservationTables.js";
|
|
8
|
+
import "./data/formResourceToReservationTables.js";
|
|
9
|
+
import "./data/salesEmbeddedResourceToTableRows.js";
|
|
10
|
+
import "./floorMap/reservationCards.js";
|
|
11
|
+
import "./PisellReservation.js";
|
|
12
|
+
import "./PisellReservationBookingPage.js";
|
|
13
|
+
import "./PisellVenueControlPage.js";
|
|
14
|
+
import "./PisellVenueWallPage.js";
|
|
15
|
+
import "./PisellReservationTablePage.js";
|
|
16
|
+
import "./components/SelectFloorMapResourceDialog.js";
|
|
17
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utc from "dayjs/plugin/utc";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/utils/calendarBookingSelection.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
dayjs.extend(timezone);
|
|
7
7
|
/** Resolve the same shop clock used by the POS host; previews use the device clock. */
|
|
8
8
|
function resolveReservationTimeZone(utils) {
|
|
9
9
|
var _utils$getStore$getSt, _utils$getStore, _utils$getStore$getSt2, _utils$store, _utils$store$getState, _utils$getApp, _utils$getApp$getStor, _utils$getApp$getStor2, _core$tenant, _core$core, _core$core2, _state$core, _state$core2, _utils$getData, _state$global, _state$global2, _state$global3;
|