@pisell/private-materials 6.12.452 → 6.12.453
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 +6 -6
- package/build/lowcode/view.js +6 -6
- 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 +60 -14
- package/es/components/scanOrder/utils/freePayment.js +89 -0
- package/es/components/scanOrder/utils/freePayment.test.cjs +74 -0
- package/es/components/scanOrder/utils/paymentLog.js +24 -0
- 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/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/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/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/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- 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 +60 -14
- package/lib/components/scanOrder/utils/freePayment.js +90 -0
- package/lib/components/scanOrder/utils/freePayment.test.cjs +74 -0
- package/lib/components/scanOrder/utils/paymentLog.js +25 -0
- package/package.json +3 -3
- 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 { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.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";
|
|
@@ -4,6 +4,7 @@ import useInitLocalesOnce from "../../../hooks/useInitLocalesOnce.js";
|
|
|
4
4
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
5
5
|
import { isFulfillmentTimingBooking } from "../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
6
6
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import { resolveSaleDetailProductQuantity, resolveSaleDetailTempOrder } from "../../../plus/saleDetail/utils.js";
|
|
8
9
|
import locales_default from "../../bigSale/locales/index.js";
|
|
9
10
|
import { KioskSaleContext } from "./KioskSaleContext.js";
|
|
@@ -5,6 +5,7 @@ import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkH
|
|
|
5
5
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
6
6
|
import { collectUnassignedHolderLines } from "../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
7
7
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
8
|
+
import "../../../plus/salesSdk/index.js";
|
|
8
9
|
import { defaultCheckoutOptions } from "../app/contracts.js";
|
|
9
10
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
10
11
|
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";
|
|
@@ -3,6 +3,8 @@ import { sendMaterialWarning } from "../../../../utils/materialWarning.js";
|
|
|
3
3
|
import { contextUtils } from "../../hooks.js";
|
|
4
4
|
import { useScanOrderContext } from "../../context.js";
|
|
5
5
|
import Cart from "../Cart/index.js";
|
|
6
|
+
import { logScanOrder, scanOrderError } from "../../utils/paymentLog.js";
|
|
7
|
+
import { handleScanOrderFreePayment, isZeroPaymentAmount } from "../../utils/freePayment.js";
|
|
6
8
|
import FulfillmentMode from "../FulfillmentMode/index.js";
|
|
7
9
|
import ManualPickupRefModal from "../ManualPickupRefModal/index.js";
|
|
8
10
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -26,7 +28,6 @@ function Check() {
|
|
|
26
28
|
const getConfig = useCallback(_asyncToGenerator(function* () {
|
|
27
29
|
var _otherParams$dineInCo, _otherParams$channel;
|
|
28
30
|
const otherParams = yield runModuleAction("getOtherParams");
|
|
29
|
-
console.log("otherParams >>>>> ", otherParams);
|
|
30
31
|
setDineInConfig((_otherParams$dineInCo = otherParams === null || otherParams === void 0 ? void 0 : otherParams.dineInConfig) !== null && _otherParams$dineInCo !== void 0 ? _otherParams$dineInCo : {});
|
|
31
32
|
setChannel((_otherParams$channel = otherParams === null || otherParams === void 0 ? void 0 : otherParams.channel) !== null && _otherParams$channel !== void 0 ? _otherParams$channel : "");
|
|
32
33
|
}), [runModuleAction]);
|
|
@@ -87,7 +88,7 @@ function Check() {
|
|
|
87
88
|
try {
|
|
88
89
|
yield action();
|
|
89
90
|
} catch (error) {
|
|
90
|
-
|
|
91
|
+
logScanOrder(utils, "submit action failed", scanOrderError(error), "error");
|
|
91
92
|
if (!handleMenuValidationFailure(error)) showSubmitFailedTip(error === null || error === void 0 ? void 0 : error.message);
|
|
92
93
|
} finally {
|
|
93
94
|
submittingRef.current = false;
|
|
@@ -114,15 +115,33 @@ function Check() {
|
|
|
114
115
|
}, []);
|
|
115
116
|
const doSubmit = function() {
|
|
116
117
|
var _ref3 = _asyncToGenerator(function* () {
|
|
117
|
-
|
|
118
|
+
const items = (viewModel === null || viewModel === void 0 ? void 0 : viewModel.cartItems) || [];
|
|
119
|
+
if (items.length === 0) {
|
|
118
120
|
showCheckStepEmptyCartTip();
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
123
|
try {
|
|
122
|
-
var _res$data;
|
|
124
|
+
var _viewModel$summary, _res$data, _res$data2, _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data$order_wait_, _res$data9, _viewModel$summary2, _res$data10, _viewModel$summary3, _res$data11;
|
|
125
|
+
logScanOrder(utils, "下单开始", {
|
|
126
|
+
channel,
|
|
127
|
+
entryMode,
|
|
128
|
+
requirePaymentOnSubmit: dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig["sale.require_payment_on_submit"],
|
|
129
|
+
displayedTotalAmount: viewModel === null || viewModel === void 0 || (_viewModel$summary = viewModel.summary) === null || _viewModel$summary === void 0 ? void 0 : _viewModel$summary.total_amount,
|
|
130
|
+
itemCount: items.length
|
|
131
|
+
});
|
|
123
132
|
yield runModuleAction("updateTempOrderNote", note);
|
|
124
133
|
const res = yield runModuleAction("submitScanOrder");
|
|
125
|
-
|
|
134
|
+
logScanOrder(utils, "下单接口返回", {
|
|
135
|
+
status: res === null || res === void 0 ? void 0 : res.status,
|
|
136
|
+
code: res === null || res === void 0 ? void 0 : res.code,
|
|
137
|
+
orderId: res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.order_id,
|
|
138
|
+
orderWaitPayAmount: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.order_wait_pay_amount,
|
|
139
|
+
orderWaitPayAmountType: typeof (res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.order_wait_pay_amount),
|
|
140
|
+
expectAmount: res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.expect_amount,
|
|
141
|
+
totalAmount: res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.total_amount,
|
|
142
|
+
paymentStatus: res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.payment_status,
|
|
143
|
+
message: res === null || res === void 0 ? void 0 : res.message
|
|
144
|
+
}, (res === null || res === void 0 ? void 0 : res.status) === false || !(res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.order_id) ? "error" : "info");
|
|
126
145
|
if ((res === null || res === void 0 ? void 0 : res.status) === false) {
|
|
127
146
|
if (handleMenuValidationFailure(res)) return;
|
|
128
147
|
if ((res === null || res === void 0 ? void 0 : res.code) === 6008) {
|
|
@@ -132,7 +151,7 @@ function Check() {
|
|
|
132
151
|
showSubmitFailedTip(res === null || res === void 0 ? void 0 : res.message);
|
|
133
152
|
return;
|
|
134
153
|
}
|
|
135
|
-
const orderId = res === null || res === void 0 || (_res$
|
|
154
|
+
const orderId = res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.order_id;
|
|
136
155
|
const shouldPayOnSubmit = (dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig["sale.require_payment_on_submit"]) && !isAdditionalOrder;
|
|
137
156
|
if (!orderId) {
|
|
138
157
|
showSubmitFailedTip(res === null || res === void 0 ? void 0 : res.message);
|
|
@@ -144,21 +163,48 @@ function Check() {
|
|
|
144
163
|
"scan_to_order_2": "mobile_order",
|
|
145
164
|
"scan_to_order_3": "scantoorder3"
|
|
146
165
|
}[channel] || channel;
|
|
166
|
+
const paymentAmount = (_res$data$order_wait_ = res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.order_wait_pay_amount) !== null && _res$data$order_wait_ !== void 0 ? _res$data$order_wait_ : viewModel === null || viewModel === void 0 || (_viewModel$summary2 = viewModel.summary) === null || _viewModel$summary2 === void 0 ? void 0 : _viewModel$summary2.total_amount;
|
|
167
|
+
logScanOrder(utils, "下单后支付分支", {
|
|
168
|
+
orderId,
|
|
169
|
+
channel,
|
|
170
|
+
saleChannel,
|
|
171
|
+
isAdditionalOrder,
|
|
172
|
+
requirePaymentOnSubmit: dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig["sale.require_payment_on_submit"],
|
|
173
|
+
shouldPayOnSubmit: Boolean(shouldPayOnSubmit),
|
|
174
|
+
serverAmount: res === null || res === void 0 || (_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : _res$data10.order_wait_pay_amount,
|
|
175
|
+
displayedTotalAmount: viewModel === null || viewModel === void 0 || (_viewModel$summary3 = viewModel.summary) === null || _viewModel$summary3 === void 0 ? void 0 : _viewModel$summary3.total_amount,
|
|
176
|
+
paymentAmount,
|
|
177
|
+
paymentAmountType: typeof paymentAmount,
|
|
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: shouldPayOnSubmit ? isZeroPaymentAmount(paymentAmount) ? "free-pay" : "pisell1.payment" : "order-details",
|
|
180
|
+
hasFreePayBranch: true
|
|
181
|
+
});
|
|
147
182
|
if (shouldPayOnSubmit) {
|
|
148
|
-
|
|
183
|
+
if (yield handleScanOrderFreePayment({
|
|
184
|
+
orderId,
|
|
185
|
+
amount: paymentAmount,
|
|
186
|
+
utils,
|
|
187
|
+
restoreOrder: () => runModuleAction("restoreOrder"),
|
|
188
|
+
showFailure: showSubmitFailedTip
|
|
189
|
+
})) return;
|
|
149
190
|
utils.action({
|
|
150
191
|
type: "pisell1.payment",
|
|
151
192
|
data: {
|
|
152
193
|
order_id: orderId,
|
|
153
|
-
total_amount:
|
|
194
|
+
total_amount: paymentAmount,
|
|
154
195
|
sale_channel: saleChannel
|
|
155
196
|
},
|
|
156
197
|
callback: function() {
|
|
157
198
|
var _ref2 = _asyncToGenerator(function* (_e) {
|
|
199
|
+
logScanOrder(utils, "支付回调", {
|
|
200
|
+
orderId,
|
|
201
|
+
type: _e === null || _e === void 0 ? void 0 : _e.type,
|
|
202
|
+
status: _e === null || _e === void 0 ? void 0 : _e.status
|
|
203
|
+
});
|
|
158
204
|
try {
|
|
159
205
|
yield runModuleAction("restoreOrder");
|
|
160
206
|
} catch (error) {
|
|
161
|
-
|
|
207
|
+
logScanOrder(utils, "restoreOrder after payment failed", scanOrderError(error), "error");
|
|
162
208
|
}
|
|
163
209
|
});
|
|
164
210
|
return function callback(_x2) {
|
|
@@ -171,7 +217,7 @@ function Check() {
|
|
|
171
217
|
try {
|
|
172
218
|
yield runModuleAction("restoreOrder");
|
|
173
219
|
} catch (error) {
|
|
174
|
-
|
|
220
|
+
logScanOrder(utils, "restoreOrder before redirect failed", scanOrderError(error), "error");
|
|
175
221
|
}
|
|
176
222
|
const link = `/order/details?id=${orderId}`;
|
|
177
223
|
if (utils === null || utils === void 0 || (_utils$history = utils.history) === null || _utils$history === void 0 ? void 0 : _utils$history.replace) utils.history.replace(link);
|
|
@@ -180,12 +226,12 @@ function Check() {
|
|
|
180
226
|
try {
|
|
181
227
|
yield runModuleAction("restoreOrder");
|
|
182
228
|
} catch (error) {
|
|
183
|
-
|
|
229
|
+
logScanOrder(utils, "restoreOrder after payment failed", scanOrderError(error), "error");
|
|
184
230
|
}
|
|
185
231
|
}
|
|
186
232
|
yield refreshViewModel();
|
|
187
233
|
} catch (error) {
|
|
188
|
-
|
|
234
|
+
logScanOrder(utils, "submitScanOrder failed", scanOrderError(error), "error");
|
|
189
235
|
if (handleMenuValidationFailure(error)) return;
|
|
190
236
|
if ((error === null || error === void 0 ? void 0 : error.code) === 670005) showSubmitFailedTip(String(locales.getText("pisell2.scan.order.settled.cannot.add.tip") || ""));
|
|
191
237
|
else if ((error === null || error === void 0 ? void 0 : error.code) === 670007 && (entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id)) {
|
|
@@ -233,7 +279,7 @@ function Check() {
|
|
|
233
279
|
return;
|
|
234
280
|
}
|
|
235
281
|
} catch (error) {
|
|
236
|
-
|
|
282
|
+
logScanOrder(utils, "checkManualPickupRef failed", scanOrderError(error), "error");
|
|
237
283
|
message.error((error === null || error === void 0 ? void 0 : error.message) || "Submit order failed");
|
|
238
284
|
sendMaterialWarning({
|
|
239
285
|
level: "error",
|
|
@@ -254,7 +300,7 @@ function Check() {
|
|
|
254
300
|
try {
|
|
255
301
|
yield runModuleAction("setPickupRef", value);
|
|
256
302
|
} catch (error) {
|
|
257
|
-
|
|
303
|
+
logScanOrder(utils, "setPickupRef failed", scanOrderError(error), "error");
|
|
258
304
|
message.error((error === null || error === void 0 ? void 0 : error.message) || "Submit order failed");
|
|
259
305
|
return;
|
|
260
306
|
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
|
+
import { logScanOrder, scanOrderError } from "./paymentLog.js";
|
|
4
|
+
//#region src/components/scanOrder/utils/freePayment.ts
|
|
5
|
+
function isZeroPaymentAmount(amount) {
|
|
6
|
+
return (typeof amount === "number" || typeof amount === "string") && String(amount).trim() !== "" && Number(amount) === 0;
|
|
7
|
+
}
|
|
8
|
+
/** Confirm free payment before callers clear their order or navigate away. */
|
|
9
|
+
function confirmFreePaymentIfNeeded(_x) {
|
|
10
|
+
return _confirmFreePaymentIfNeeded.apply(this, arguments);
|
|
11
|
+
}
|
|
12
|
+
function _confirmFreePaymentIfNeeded() {
|
|
13
|
+
_confirmFreePaymentIfNeeded = _asyncToGenerator(function* (options) {
|
|
14
|
+
if (options.enabled === false || !isZeroPaymentAmount(options.amount)) return { kind: "not-required" };
|
|
15
|
+
const response = yield options.freePay(String(options.orderId));
|
|
16
|
+
return (response === null || response === void 0 ? void 0 : response.status) ? {
|
|
17
|
+
kind: "paid",
|
|
18
|
+
response
|
|
19
|
+
} : {
|
|
20
|
+
kind: "failed",
|
|
21
|
+
response
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
return _confirmFreePaymentIfNeeded.apply(this, arguments);
|
|
25
|
+
}
|
|
26
|
+
/** Returns true when free payment handled the checkout (including business failure). */
|
|
27
|
+
function handleScanOrderFreePayment(_x3) {
|
|
28
|
+
return _handleScanOrderFreePayment.apply(this, arguments);
|
|
29
|
+
}
|
|
30
|
+
function _handleScanOrderFreePayment() {
|
|
31
|
+
_handleScanOrderFreePayment = _asyncToGenerator(function* (options) {
|
|
32
|
+
var _result$response, _result$response2, _result$response3, _utils$history, _utils$history2;
|
|
33
|
+
const { orderId, amount, utils, restoreOrder, showFailure } = options;
|
|
34
|
+
const result = yield confirmFreePaymentIfNeeded({
|
|
35
|
+
orderId,
|
|
36
|
+
amount,
|
|
37
|
+
freePay: function() {
|
|
38
|
+
var _ref = _asyncToGenerator(function* (id) {
|
|
39
|
+
const url = `/h5/pay/order/free-pay/${id}`;
|
|
40
|
+
logScanOrder(utils, "免费支付请求", {
|
|
41
|
+
orderId,
|
|
42
|
+
amount,
|
|
43
|
+
url
|
|
44
|
+
});
|
|
45
|
+
try {
|
|
46
|
+
return yield utils.request.post(url, {});
|
|
47
|
+
} catch (error) {
|
|
48
|
+
logScanOrder(utils, "免费支付请求异常", _objectSpread2({
|
|
49
|
+
orderId,
|
|
50
|
+
amount,
|
|
51
|
+
url
|
|
52
|
+
}, scanOrderError(error)), "error");
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return function freePay(_x2) {
|
|
57
|
+
return _ref.apply(this, arguments);
|
|
58
|
+
};
|
|
59
|
+
}()
|
|
60
|
+
});
|
|
61
|
+
if (result.kind === "not-required") return false;
|
|
62
|
+
logScanOrder(utils, "免费支付接口返回", {
|
|
63
|
+
orderId,
|
|
64
|
+
amount,
|
|
65
|
+
kind: result.kind,
|
|
66
|
+
status: (_result$response = result.response) === null || _result$response === void 0 ? void 0 : _result$response.status,
|
|
67
|
+
code: (_result$response2 = result.response) === null || _result$response2 === void 0 ? void 0 : _result$response2.code,
|
|
68
|
+
message: (_result$response3 = result.response) === null || _result$response3 === void 0 ? void 0 : _result$response3.message
|
|
69
|
+
}, result.kind === "failed" ? "error" : "info");
|
|
70
|
+
if (result.kind === "failed") {
|
|
71
|
+
var _result$response4;
|
|
72
|
+
showFailure((_result$response4 = result.response) === null || _result$response4 === void 0 ? void 0 : _result$response4.message);
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
yield restoreOrder();
|
|
77
|
+
} catch (error) {
|
|
78
|
+
logScanOrder(utils, "免费支付后清理订单失败", _objectSpread2({ orderId }, scanOrderError(error)), "error");
|
|
79
|
+
}
|
|
80
|
+
const link = `/payment-finish/success?amount=0&order_id=${encodeURIComponent(String(orderId))}`;
|
|
81
|
+
if ((_utils$history = utils.history) === null || _utils$history === void 0 ? void 0 : _utils$history.replace) utils.history.replace(link);
|
|
82
|
+
else if ((_utils$history2 = utils.history) === null || _utils$history2 === void 0 ? void 0 : _utils$history2.push) utils.history.push(link);
|
|
83
|
+
else location.replace(link);
|
|
84
|
+
return true;
|
|
85
|
+
});
|
|
86
|
+
return _handleScanOrderFreePayment.apply(this, arguments);
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { handleScanOrderFreePayment, isZeroPaymentAmount };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const assert = require('node:assert/strict');
|
|
2
|
+
const { readFileSync } = require('node:fs');
|
|
3
|
+
const { join } = require('node:path');
|
|
4
|
+
const test = require('node:test');
|
|
5
|
+
const ts = require('typescript');
|
|
6
|
+
const vm = require('node:vm');
|
|
7
|
+
const transpile = (source) => ts.transpileModule(source, {
|
|
8
|
+
compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 },
|
|
9
|
+
}).outputText;
|
|
10
|
+
const logger = {};
|
|
11
|
+
new Function('exports', transpile(readFileSync(join(__dirname, 'paymentLog.ts'), 'utf8')))(logger);
|
|
12
|
+
const api = {};
|
|
13
|
+
new Function('exports', 'require', transpile(readFileSync(join(__dirname, 'freePayment.ts'), 'utf8')))(api, () => logger);
|
|
14
|
+
|
|
15
|
+
test('only explicit zero amounts call free payment; failures and exceptions stay failures', async () => {
|
|
16
|
+
for (const amount of [0, '0.00', '0']) {
|
|
17
|
+
let id;
|
|
18
|
+
assert.equal((await api.confirmFreePaymentIfNeeded({ orderId: 123, amount, freePay: async (value) => { id = value; return { status: true }; } })).kind, 'paid');
|
|
19
|
+
assert.equal(id, '123');
|
|
20
|
+
}
|
|
21
|
+
for (const amount of [undefined, null, '', ' ', false, 'invalid', 10, -1]) {
|
|
22
|
+
assert.equal((await api.confirmFreePaymentIfNeeded({ orderId: 123, amount, freePay: async () => { throw new Error('must not call'); } })).kind, 'not-required');
|
|
23
|
+
}
|
|
24
|
+
assert.equal((await api.confirmFreePaymentIfNeeded({ orderId: 123, amount: 0, enabled: false })).kind, 'not-required');
|
|
25
|
+
assert.equal((await api.confirmFreePaymentIfNeeded({ orderId: 123, amount: 0, freePay: async () => ({ status: false }) })).kind, 'failed');
|
|
26
|
+
await assert.rejects(api.confirmFreePaymentIfNeeded({ orderId: 123, amount: 0, freePay: async () => { throw new Error('offline'); } }), /offline/);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const file = join(__dirname, '../components/Check/index.tsx');
|
|
30
|
+
const parsed = ts.createSourceFile(file, readFileSync(file, 'utf8'), ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
|
|
31
|
+
let submit;
|
|
32
|
+
function visit(node) {
|
|
33
|
+
if (ts.isVariableDeclaration(node) && node.name.getText(parsed) === 'doSubmit') submit = node.initializer.getText(parsed);
|
|
34
|
+
ts.forEachChild(node, visit);
|
|
35
|
+
}
|
|
36
|
+
visit(parsed);
|
|
37
|
+
|
|
38
|
+
test('scan order zero bypasses modal, positive preserves channel, failed free payment keeps order', async () => {
|
|
39
|
+
for (const [amount, success, payOnSubmit] of [[0, true, true], ['0.00', true, true], [5, true, true], [0, false, true], [0, true, false]]) {
|
|
40
|
+
const events = [];
|
|
41
|
+
const ctx = {
|
|
42
|
+
logScanOrder: logger.logScanOrder, scanOrderError: logger.scanOrderError,
|
|
43
|
+
viewModel: { cartItems: [{}], summary: { total_amount: 99 } }, note: '', channel: 'scan_to_order', entryMode: 'default', isAdditionalOrder: false,
|
|
44
|
+
dineInConfig: { 'sale.require_payment_on_submit': payOnSubmit },
|
|
45
|
+
runModuleAction: async (name) => { events.push(name); return name === 'submitScanOrder' ? { status: true, data: { order_id: 123, order_wait_pay_amount: amount } } : undefined; },
|
|
46
|
+
clearStepCache() {}, refreshViewModel: async () => {},
|
|
47
|
+
utils: { request: { post: async (url, body) => { assert.equal(url, '/h5/pay/order/free-pay/123'); assert.equal(Object.keys(body).length, 0); events.push('free-pay'); return { status: success }; } }, action: (a) => { assert.equal(a.data.sale_channel, 'table-order'); events.push('modal'); }, history: { replace: (path) => events.push(path) } },
|
|
48
|
+
console: { log() {}, warn() {}, error() {} },
|
|
49
|
+
showSubmitFailedTip: () => events.push('failure'),
|
|
50
|
+
isZeroPaymentAmount: api.isZeroPaymentAmount,
|
|
51
|
+
handleScanOrderFreePayment: api.handleScanOrderFreePayment,
|
|
52
|
+
};
|
|
53
|
+
await vm.runInNewContext(transpile('const run = ' + submit + '; run();'), ctx);
|
|
54
|
+
if (!payOnSubmit) { assert(!events.includes('free-pay')); assert(events.includes('/order/details?id=123')); }
|
|
55
|
+
else if (Number(amount) > 0) { assert(events.includes('modal')); assert(!events.includes('free-pay')); }
|
|
56
|
+
else {
|
|
57
|
+
assert(events.includes('free-pay')); assert(!events.includes('modal'));
|
|
58
|
+
if (success) assert(events.includes('/payment-finish/success?amount=0&order_id=123'));
|
|
59
|
+
else { assert(events.includes('failure')); assert(!events.includes('restoreOrder')); }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
test('logging uses host addLog and does not interrupt checkout when it fails', async () => {
|
|
66
|
+
const entries = [];
|
|
67
|
+
logger.logScanOrder({ getApp: () => ({ logger: { addLog: entry => entries.push(entry) } }) }, 'request', { orderId: 1 }, 'error');
|
|
68
|
+
assert.equal(entries[0].type, 'error');
|
|
69
|
+
assert.equal(entries[0].metadata.orderId, 1);
|
|
70
|
+
logger.logScanOrder({}, 'no logger');
|
|
71
|
+
logger.logScanOrder({ getApp: () => { throw new Error('unavailable'); } }, 'failure');
|
|
72
|
+
logger.logScanOrder({ getApp: () => ({ logger: { addLog: () => Promise.reject(new Error('offline')) } }) }, 'async failure');
|
|
73
|
+
await new Promise(resolve => setImmediate(resolve));
|
|
74
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/components/scanOrder/utils/paymentLog.ts
|
|
2
|
+
/** Logging must never interrupt checkout, including when the host has no logger. */
|
|
3
|
+
function logScanOrder(utils, title, metadata = {}, type = "info") {
|
|
4
|
+
try {
|
|
5
|
+
var _utils$getApp, _utils$getApp$addLog;
|
|
6
|
+
const result = (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.call(utils)) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.logger) === null || _utils$getApp === void 0 || (_utils$getApp$addLog = _utils$getApp.addLog) === null || _utils$getApp$addLog === void 0 ? void 0 : _utils$getApp$addLog.call(_utils$getApp, {
|
|
7
|
+
type,
|
|
8
|
+
title: `[scanOrder] ${title}`,
|
|
9
|
+
metadata
|
|
10
|
+
});
|
|
11
|
+
if (result && typeof result.catch === "function") result.catch(() => {});
|
|
12
|
+
} catch (_unused) {}
|
|
13
|
+
}
|
|
14
|
+
function scanOrderError(error) {
|
|
15
|
+
var _error$message, _error$response;
|
|
16
|
+
return {
|
|
17
|
+
message: (_error$message = error === null || error === void 0 ? void 0 : error.message) !== null && _error$message !== void 0 ? _error$message : String(error),
|
|
18
|
+
code: error === null || error === void 0 ? void 0 : error.code,
|
|
19
|
+
status: error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status,
|
|
20
|
+
stack: error === null || error === void 0 ? void 0 : error.stack
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { logScanOrder, scanOrderError };
|
|
@@ -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, 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";
|
|
@@ -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";
|
|
@@ -11,6 +11,7 @@ import { useSalesSdkHostBridges } from "../../plus/salesSdk/context/SalesSdkHost
|
|
|
11
11
|
import { formatTempOrderSettlementAmount } from "../../plus/multiCurrencySettlement/index.js";
|
|
12
12
|
import { useSalesSdkBusinessAvailability } from "../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
13
13
|
import { pickIdentity } from "../../plus/salesSdk/utils/identity.js";
|
|
14
|
+
import "../../plus/salesSdk/index.js";
|
|
14
15
|
import { resolveEffectiveSaleDetailAmountDue } from "../../plus/saleDetail/utils.js";
|
|
15
16
|
import { useBookingUI } from "../../plus/venueBookingDesign/context.js";
|
|
16
17
|
import { useBookingProgress } from "../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
package/es/index.js
CHANGED
|
@@ -91,6 +91,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
91
91
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
92
92
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
93
93
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
94
|
+
import "./plus/salesSdk/index.js";
|
|
94
95
|
import { defineExitPolicy, defineNavigationGuard, definePredicate, defineTrigger, defineWorkflow } from "./components/HDLKiosk/kernel/application/defineApplication.js";
|
|
95
96
|
import { accept, defineSlice, perform, require } from "./components/HDLKiosk/kernel/application/defineSlice.js";
|
|
96
97
|
import { defineKioskScanCommand, kioskScanTrigger, salesScan, startOnScan } from "./components/kiosk/sales/inputs/scan.js";
|
|
@@ -181,6 +182,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
181
182
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
182
183
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
183
184
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
185
|
+
import "./plus/pisellReservation/index.js";
|
|
184
186
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
185
187
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
186
188
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
283
|
+
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 };
|