@pisell/private-materials 6.12.313 → 6.12.315
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/preview.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 +0 -1
- package/es/components/bigSale/components/ProductList/index.js +0 -1
- package/es/components/bigSale/components/TimeBar/index.js +0 -1
- package/es/components/bigSale/dialog.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +1 -2
- package/es/components/bigSale/templates/HDLKiosk/payment/eftposPayment.js +2 -0
- package/es/components/bigSale/templates/Kiosk/index.js +17 -17
- package/es/components/kioskSale/index.js +1 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/index.js +0 -2
- 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/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/PrintAction.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
- package/es/plus/saleDetail/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/index.js +0 -1
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +2 -1
- package/es/plus/salesSdk/types.d.ts +1 -0
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/editCartLineBooking.js +1 -0
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- 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/lib/components/bigSale/index.js +1 -1
- package/lib/components/bigSale/templates/HDLKiosk/payment/eftposPayment.js +2 -0
- package/lib/components/bigSale/templates/Kiosk/index.js +17 -16
- package/lib/components/kioskSale/index.js +1 -1
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +2 -1
- package/lib/plus/salesSdk/types.d.ts +1 -0
- package/lib/plus/salesSdk/utils/editCartLineBooking.js +1 -0
- package/package.json +3 -3
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -54
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
-
import "../../../../plus/salesSdk/index.js";
|
|
4
3
|
import dayjs from "dayjs";
|
|
5
4
|
import { useCallback, useEffect, useState } from "react";
|
|
6
5
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -14,7 +14,6 @@ import { generateProductTabs } from "../../../ticketBooking/components/ProductDi
|
|
|
14
14
|
import { useSalesSdkBusinessAvailability } from "../../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
15
15
|
import { showAddToCartToast } from "../../../../plus/salesSdk/components/showAddToCartToast.js";
|
|
16
16
|
import { mergeBookingsForDisplay } from "../../../../plus/salesSdk/utils/mergeBookingsForDisplay.js";
|
|
17
|
-
import "../../../../plus/salesSdk/index.js";
|
|
18
17
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
19
18
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
20
19
|
import locales_default from "../../locales/index.js";
|
|
@@ -4,7 +4,6 @@ import withResponsive from "../../../../responsive/withResponsive.js";
|
|
|
4
4
|
import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
7
|
-
import "../../../../plus/salesSdk/index.js";
|
|
8
7
|
import locales_default from "../../locales/index.js";
|
|
9
8
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
10
9
|
import dayjs from "dayjs";
|
|
@@ -6,7 +6,6 @@ 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";
|
|
10
9
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
11
10
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
12
11
|
import BigSale from "./index.js";
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import { useMemo } from "react";
|
|
9
8
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
10
9
|
/**
|
|
@@ -3,7 +3,6 @@ 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";
|
|
7
6
|
import { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
|
|
8
7
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
9
8
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
@@ -8,7 +8,6 @@ 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";
|
|
12
11
|
import { ResponsiveBigSaleBase } from "./Base.js";
|
|
13
12
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
14
13
|
import { isKioskPresentation } from "./templateCapabilities.js";
|
|
@@ -117,7 +116,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
|
|
|
117
116
|
variant
|
|
118
117
|
]);
|
|
119
118
|
const isPosProductSelectionFlow = resolvedTemplate !== "kiosk" && isProductSelectionFlow;
|
|
120
|
-
const fulfillmentOtherParams = useMemo(() => _objectSpread2(_objectSpread2({}, otherParams), {}, { enablePickupTiming: resolvedTemplate !== "HDLKiosk" }), [otherParams, resolvedTemplate]);
|
|
119
|
+
const fulfillmentOtherParams = useMemo(() => _objectSpread2(_objectSpread2({ enforceSingleBookingStartDate: false }, otherParams), {}, { enablePickupTiming: resolvedTemplate !== "HDLKiosk" }), [otherParams, resolvedTemplate]);
|
|
121
120
|
const resolvedSaleDetailModuleConfig = useMemo(() => isPosProductSelectionFlow ? _objectSpread2(_objectSpread2({}, saleDetailModuleConfig), {}, { cartItems: _objectSpread2(_objectSpread2({}, saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 ? void 0 : saleDetailModuleConfig.cartItems), {}, { bookingQuantityMode: "editable" }) }) : saleDetailModuleConfig, [isPosProductSelectionFlow, saleDetailModuleConfig]);
|
|
122
121
|
const runtimeRef = useRef({
|
|
123
122
|
date: void 0,
|
|
@@ -17,6 +17,8 @@ function _executeEftposPayment() {
|
|
|
17
17
|
let shouldDiscardPrepared = false;
|
|
18
18
|
try {
|
|
19
19
|
notifyMainScreenPayment(() => mainScreenGuard === null || mainScreenGuard === void 0 ? void 0 : mainScreenGuard.show());
|
|
20
|
+
if (typeof (baseSales === null || baseSales === void 0 ? void 0 : baseSales.ensureLocalOrderNumbersForCheckout) !== "function") throw new Error("当前版本不支持本地订单编号,请更新应用后重试");
|
|
21
|
+
yield baseSales.ensureLocalOrderNumbersForCheckout();
|
|
20
22
|
if (piProvider) {
|
|
21
23
|
prepared = yield preparePendingEftposPayment({
|
|
22
24
|
amount,
|
|
@@ -12,7 +12,6 @@ import { useSalesSdkBusinessAvailability } from "../../../../plus/salesSdk/conte
|
|
|
12
12
|
import { collectUnassignedHolderLines } from "../../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
13
13
|
import { isFulfillmentTimingBooking } from "../../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
14
14
|
import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
15
|
-
import "../../../../plus/salesSdk/index.js";
|
|
16
15
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
17
16
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
18
17
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -244,6 +243,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
244
243
|
const app = (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
|
|
245
244
|
const hostChannel = String((engineContext === null || engineContext === void 0 || (_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.constants) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.config) === null || _engineContext$appHel2 === void 0 ? void 0 : _engineContext$appHel2.channel) || "").trim().toLowerCase();
|
|
246
245
|
const shouldUseConsumerPayment = hostChannel === "pc" || hostChannel === "h5";
|
|
246
|
+
const shouldUseFulfillmentCheckout = shouldUseConsumerPayment || platform === "kiosk";
|
|
247
247
|
const shouldRequireLogin = isRequireLoginChannel(hostChannel);
|
|
248
248
|
const { isLoggedIn, openLoginModal } = useSalesUserLogin();
|
|
249
249
|
const [view, setView] = useState(() => normalizeKioskNavigableView(kioskShellLayout, readKioskSessionView(context.sales.bookingTicket)));
|
|
@@ -264,8 +264,8 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
264
264
|
const fulfillmentOpeningRef = useRef(false);
|
|
265
265
|
const fulfillmentCheckout = useKioskFulfillmentCheckout({
|
|
266
266
|
context,
|
|
267
|
-
enabled:
|
|
268
|
-
scopeKey: `${osKey || ""}:${businessCode || ""}:${hostChannel}`,
|
|
267
|
+
enabled: shouldUseFulfillmentCheckout,
|
|
268
|
+
scopeKey: `${osKey || ""}:${businessCode || ""}:${hostChannel}:${platform}`,
|
|
269
269
|
isActive,
|
|
270
270
|
mobile: hostChannel === "h5"
|
|
271
271
|
});
|
|
@@ -417,7 +417,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
417
417
|
...((_saleDetailModuleConf = saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 ? void 0 : saleDetailModuleConfig.hidden) !== null && _saleDetailModuleConf !== void 0 ? _saleDetailModuleConf : []).filter((moduleKey) => !KIOSK_REQUIRED_MODULES.has(moduleKey))
|
|
418
418
|
])],
|
|
419
419
|
cartItems: _objectSpread2(_objectSpread2({}, saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 ? void 0 : saleDetailModuleConfig.cartItems), {}, {
|
|
420
|
-
beforeContent:
|
|
420
|
+
beforeContent: shouldUseFulfillmentCheckout ? saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 || (_saleDetailModuleConf2 = saleDetailModuleConfig.cartItems) === null || _saleDetailModuleConf2 === void 0 ? void 0 : _saleDetailModuleConf2.beforeContent : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(KioskPickupTiming, {
|
|
421
421
|
key: `${osKey || ""}:${businessCode || ""}:${hostChannel}:${String(((_context$sales$tempOr = context.sales.tempOrder) === null || _context$sales$tempOr === void 0 || (_context$sales$tempOr = _context$sales$tempOr._extend) === null || _context$sales$tempOr === void 0 ? void 0 : _context$sales$tempOr.localId) || ((_context$sales$tempOr2 = context.sales.tempOrder) === null || _context$sales$tempOr2 === void 0 ? void 0 : _context$sales$tempOr2.external_sale_number) || ((_context$sales$tempOr3 = context.sales.tempOrder) === null || _context$sales$tempOr3 === void 0 ? void 0 : _context$sales$tempOr3.order_id) || orderId || "draft")}`,
|
|
422
422
|
context,
|
|
423
423
|
mobile: variant === "phone",
|
|
@@ -463,7 +463,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
463
463
|
orderId,
|
|
464
464
|
osKey,
|
|
465
465
|
pickupTimingError,
|
|
466
|
-
|
|
466
|
+
shouldUseFulfillmentCheckout,
|
|
467
467
|
saleDetailModuleConfig,
|
|
468
468
|
requestRemoveItemConfirmation,
|
|
469
469
|
variant
|
|
@@ -645,7 +645,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
645
645
|
};
|
|
646
646
|
const performCheckout = function() {
|
|
647
647
|
var _ref22 = _asyncToGenerator(function* () {
|
|
648
|
-
if (checkoutOpeningRef.current || !
|
|
648
|
+
if (checkoutOpeningRef.current || !shouldUseFulfillmentCheckout && isPickupTimingPending || cartItemCount === 0) return;
|
|
649
649
|
checkoutOpeningRef.current = true;
|
|
650
650
|
const openingScope = fulfillmentCheckout.captureScope();
|
|
651
651
|
const isCurrentCheckoutRequest = () => {
|
|
@@ -669,15 +669,15 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
669
669
|
setPickupTimingError(void 0);
|
|
670
670
|
try {
|
|
671
671
|
var _context$sales$bookin4, _context$sales$bookin5;
|
|
672
|
-
if (
|
|
672
|
+
if (shouldUseFulfillmentCheckout && !(yield fulfillmentCheckout.request(true))) {
|
|
673
673
|
setNavigableView("cart");
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
676
|
-
if (
|
|
676
|
+
if (shouldUseFulfillmentCheckout && !fulfillmentCheckout.isCurrent(openingScope)) return;
|
|
677
677
|
yield context.cart.waitForCartConsistency();
|
|
678
|
-
if (
|
|
678
|
+
if (shouldUseFulfillmentCheckout && !fulfillmentCheckout.isCurrent(openingScope)) return;
|
|
679
679
|
yield (_context$sales$bookin4 = context.sales.bookingTicket) === null || _context$sales$bookin4 === void 0 || (_context$sales$bookin5 = _context$sales$bookin4.preparePickupTimingForCheckout) === null || _context$sales$bookin5 === void 0 ? void 0 : _context$sales$bookin5.call(_context$sales$bookin4);
|
|
680
|
-
if (
|
|
680
|
+
if (shouldUseFulfillmentCheckout && !fulfillmentCheckout.isCurrent(openingScope)) return;
|
|
681
681
|
context.cart.refreshCartSnapshot();
|
|
682
682
|
if (!isCurrentCheckoutRequest()) return;
|
|
683
683
|
} catch (reason) {
|
|
@@ -940,7 +940,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
940
940
|
const beginCheckoutWithFulfillment = function() {
|
|
941
941
|
var _ref25 = _asyncToGenerator(function* () {
|
|
942
942
|
if (!(yield businessAvailability.ensureCanShop())) return;
|
|
943
|
-
if (!
|
|
943
|
+
if (!shouldUseFulfillmentCheckout) {
|
|
944
944
|
continueCheckout();
|
|
945
945
|
return;
|
|
946
946
|
}
|
|
@@ -996,9 +996,9 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
996
996
|
openCustomerAuth: (payload) => salesHostBridges.customerAuth.request(payload),
|
|
997
997
|
setOrderCustomer: (_context$sales$bookin31 = context.sales.bookingTicket) === null || _context$sales$bookin31 === void 0 || (_context$sales$bookin31 = _context$sales$bookin31.setOrderCustomer) === null || _context$sales$bookin31 === void 0 ? void 0 : _context$sales$bookin31.bind(context.sales.bookingTicket),
|
|
998
998
|
loadDiscountConfig: () => context.cart.loadDiscountConfig(),
|
|
999
|
-
isActive: () => isActiveRef.current && (!
|
|
999
|
+
isActive: () => isActiveRef.current && (!shouldUseFulfillmentCheckout || fulfillmentCheckout.isCurrent(openingScope))
|
|
1000
1000
|
}).then((canProceed) => {
|
|
1001
|
-
if (canProceed && isActiveRef.current && (!
|
|
1001
|
+
if (canProceed && isActiveRef.current && (!shouldUseFulfillmentCheckout || fulfillmentCheckout.isCurrent(openingScope))) return beginCheckoutWithFulfillment();
|
|
1002
1002
|
}).catch((error) => {
|
|
1003
1003
|
console.warn("[KioskBigSale] Login2 登录后同步下单客户失败", error);
|
|
1004
1004
|
}).finally(() => {
|
|
@@ -1015,7 +1015,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
1015
1015
|
},
|
|
1016
1016
|
callback: createKioskLoginContinuationHandler({
|
|
1017
1017
|
continueCheckout: beginCheckoutWithFulfillment,
|
|
1018
|
-
isActive: () => isActiveRef.current && (!
|
|
1018
|
+
isActive: () => isActiveRef.current && (!shouldUseFulfillmentCheckout || fulfillmentCheckout.isCurrent(openingScope)),
|
|
1019
1019
|
syncAuthenticatedOrderCustomer: () => syncKioskAuthenticatedOrderCustomer({
|
|
1020
1020
|
bookingTicket: context.sales.bookingTicket,
|
|
1021
1021
|
loadDiscountConfig: () => context.cart.loadDiscountConfig()
|
|
@@ -1147,8 +1147,8 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
1147
1147
|
})) : null, layoutState.showCart ? /* @__PURE__ */ React.createElement("section", {
|
|
1148
1148
|
"aria-label": locales.getText("pisell2.big-sale.kiosk.your-order"),
|
|
1149
1149
|
className: "pisell-kiosk-sale__screen pisell-kiosk-sale__cart-screen",
|
|
1150
|
-
"data-fulfillment": !
|
|
1151
|
-
},
|
|
1150
|
+
"data-fulfillment": !shouldUseFulfillmentCheckout && isPickupTimingVisible ? "true" : "false"
|
|
1151
|
+
}, shouldUseFulfillmentCheckout || !isPickupTimingVisible ? /* @__PURE__ */ React.createElement("header", { className: "pisell-kiosk-sale__cart-header" }, /* @__PURE__ */ React.createElement("h1", null, locales.getText("pisell2.big-sale.kiosk.your-order"), " ", "(", cartItemCount, ")")) : null, /* @__PURE__ */ React.createElement("div", { className: "pisell-kiosk-sale__cart-body" }, shouldUseFulfillmentCheckout && pickupTimingError ? /* @__PURE__ */ React.createElement(Alert, {
|
|
1152
1152
|
type: "error",
|
|
1153
1153
|
showIcon: true,
|
|
1154
1154
|
message: pickupTimingError,
|
|
@@ -1176,7 +1176,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
1176
1176
|
promotionAppliedCount: selectedCustomerVoucherCount,
|
|
1177
1177
|
onAddNote: openOrderNoteModal,
|
|
1178
1178
|
onBack: handleCapsuleBack,
|
|
1179
|
-
checkoutLoading: isCheckoutLoading || !
|
|
1179
|
+
checkoutLoading: isCheckoutLoading || !shouldUseFulfillmentCheckout && view === "cart" && isPickupTimingPending,
|
|
1180
1180
|
checkoutDisabled: shoppingBlocked,
|
|
1181
1181
|
onCheckout: handleCheckout,
|
|
1182
1182
|
onTogglePromotion: isVirtualSettlementOrder ? void 0 : handleToggleFloatingPromotion,
|
|
@@ -63,7 +63,7 @@ function KioskSale(props) {
|
|
|
63
63
|
const { menu_list_ids: _ignoredMenuListIds } = productLoadParams;
|
|
64
64
|
return _objectWithoutProperties(productLoadParams, _excluded2);
|
|
65
65
|
}, [productLoadParams]);
|
|
66
|
-
const resolvedOtherParams = useMemo(() => _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams || {}), channel ? { channel } : {}), {}, { enableBusinessAvailability: Boolean(kioskPresentation.platform) }, kioskPresentation.platform ? { platform: kioskPresentation.platform } : {}), [
|
|
66
|
+
const resolvedOtherParams = useMemo(() => _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams || {}), {}, { enforceSingleBookingStartDate: true }, channel ? { channel } : {}), {}, { enableBusinessAvailability: Boolean(kioskPresentation.platform) }, kioskPresentation.platform ? { platform: kioskPresentation.platform } : {}), [
|
|
67
67
|
channel,
|
|
68
68
|
kioskPresentation.platform,
|
|
69
69
|
otherParams
|
|
@@ -2,7 +2,6 @@ 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 { getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
-
import "../../plus/salesSdk/index.js";
|
|
6
5
|
import { useEffect, useRef } from "react";
|
|
7
6
|
import { useMemoizedFn } from "ahooks";
|
|
8
7
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
package/es/index.js
CHANGED
|
@@ -87,7 +87,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
87
87
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
88
88
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
89
89
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
90
|
-
import "./plus/salesSdk/index.js";
|
|
91
90
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
92
91
|
import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
|
|
93
92
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
@@ -142,7 +141,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
142
141
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
143
142
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
144
143
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
145
|
-
import "./plus/pisellReservation/index.js";
|
|
146
144
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
147
145
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
148
146
|
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,
|
|
283
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, 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,
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, 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,
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, 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,
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -13,7 +13,6 @@ import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
|
|
|
13
13
|
import locales_default from "./locales.js";
|
|
14
14
|
import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
15
15
|
import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
|
|
16
|
-
import "../salesSdk/index.js";
|
|
17
16
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
18
17
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
19
18
|
import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
|
|
4
|
-
import "../../../../salesSdk/index.js";
|
|
5
4
|
import { useMemo } from "react";
|
|
6
5
|
import { useMemoizedFn } from "ahooks";
|
|
7
6
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -4,7 +4,6 @@ import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.
|
|
|
4
4
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
5
5
|
import useLogger from "../../../../hooks/useLogger.js";
|
|
6
6
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
7
|
-
import "../../../salesSdk/index.js";
|
|
8
7
|
import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
|
|
9
8
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
10
9
|
import { EBizPrintType } from "./types.js";
|
|
@@ -10,7 +10,6 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
|
10
10
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
11
11
|
import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
12
12
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
13
|
-
import "../../../salesSdk/index.js";
|
|
14
13
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
15
14
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
16
15
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -5,7 +5,6 @@ import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js
|
|
|
5
5
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
8
|
-
import "../../../salesSdk/index.js";
|
|
9
8
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
10
9
|
import React, { memo, useMemo } from "react";
|
|
11
10
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -5,7 +5,6 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
|
|
|
5
5
|
import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
|
|
6
6
|
import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
|
|
7
7
|
import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
-
import "../salesSdk/index.js";
|
|
9
8
|
import Base_default from "./Base.js";
|
|
10
9
|
import { resolveSaleDetailOsProps } from "./osProps.js";
|
|
11
10
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import useStableInstanceId from "../../../../../../hooks/useStableInstanceId.js";
|
|
2
2
|
import { useSalesSdkDish } from "../../../../../salesSdk/hooks/useSalesSdkDish.js";
|
|
3
3
|
import { useCurrentSalesSdkDish } from "../../../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
|
|
4
|
-
import "../../../../../salesSdk/index.js";
|
|
5
4
|
import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
|
|
6
5
|
import { DishGroupView } from "./DishGroupView.js";
|
|
7
6
|
import dayjs from "dayjs";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import { useCurrentSalesSdkDish } from "../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
|
|
4
|
-
import "../../../salesSdk/index.js";
|
|
5
4
|
import { getInternalNotesByScheduleEvent } from "../../serve.js";
|
|
6
5
|
import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
|
|
7
6
|
import { DetailActions } from "../../components/DetailActions/index.js";
|
|
@@ -983,7 +983,8 @@ const SalesSdkCartProvider = ({ children, normalProductDetailConfig, deferHolder
|
|
|
983
983
|
}
|
|
984
984
|
return products;
|
|
985
985
|
}
|
|
986
|
-
|
|
986
|
+
let products = yield bookingTicket.addProductToOrder(productToAdd, booking, Object.keys(addOptions).length > 0 ? addOptions : void 0);
|
|
987
|
+
if (booking && bookingTicket.removeBookingProductsOutsideStartDate) products = yield bookingTicket.removeBookingProductsOutsideStartDate(booking.start_date);
|
|
987
988
|
const deferredConsistencyRefresh = scheduleDeferredAddConsistencyRefresh();
|
|
988
989
|
refreshCartSnapshot(deferredConsistencyRefresh.refreshVersion);
|
|
989
990
|
yield deferredConsistencyRefresh.promise;
|
|
@@ -1028,6 +1028,7 @@ interface BookingTicketHandle extends PickupTimingHandle {
|
|
|
1028
1028
|
setSalesNote?: (input: SalesSdkSetSalesNoteInput) => Promise<SalesSdkSalesNote>;
|
|
1029
1029
|
removeSalesNote?: (uuid: string) => Promise<void>;
|
|
1030
1030
|
getOrderProducts: () => ScanOrderOrderProduct[];
|
|
1031
|
+
removeBookingProductsOutsideStartDate?: (startDate: unknown) => Promise<ScanOrderOrderProduct[]>;
|
|
1031
1032
|
getDiscountList: () => any[];
|
|
1032
1033
|
getOriginalDiscountList?: () => any[];
|
|
1033
1034
|
replaceDiscountStoreLists?: (params: {
|
|
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
|
|
|
31
31
|
return typeof off === "function" ? off : () => {};
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { formatBookingDateTime, subscribeBookingDateChange };
|
|
@@ -581,6 +581,7 @@ function _editCartLineBooking() {
|
|
|
581
581
|
}, allowBookingReprice ? { allow_booking_reprice: true } : {}));
|
|
582
582
|
}
|
|
583
583
|
commitLifecycle === null || commitLifecycle === void 0 || commitLifecycle.beforeCommit();
|
|
584
|
+
if (bookingTicket.removeBookingProductsOutsideStartDate) yield bookingTicket.removeBookingProductsOutsideStartDate(bookingPatch === null || bookingPatch === void 0 ? void 0 : bookingPatch.start_date);
|
|
584
585
|
products = input.syncQuantityByRows ? yield input.syncQuantityByRows({
|
|
585
586
|
sources: targets,
|
|
586
587
|
targetQuantity,
|
|
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
-
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay,
|
|
74
|
+
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, resolveHolderDisplayConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthMethodType,
|
|
1
|
+
import { AuthMethodType, VerificationMethod } from "./shared/types.js";
|
|
2
2
|
import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
|
|
3
3
|
import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
|
|
4
|
-
import { AuthModal } from "./AuthModal.js";
|
|
4
|
+
import { AuthModal, AuthModalProps } from "./AuthModal.js";
|
|
@@ -226,4 +226,4 @@ interface RegisterFormData {
|
|
|
226
226
|
verification_token?: string;
|
|
227
227
|
}
|
|
228
228
|
//#endregion
|
|
229
|
-
export { AuthMethodType, EmailAuthConfig,
|
|
229
|
+
export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
|
|
@@ -119,7 +119,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
|
|
|
119
119
|
variant
|
|
120
120
|
]);
|
|
121
121
|
const isPosProductSelectionFlow = resolvedTemplate !== "kiosk" && isProductSelectionFlow;
|
|
122
|
-
const fulfillmentOtherParams = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, otherParams), {}, { enablePickupTiming: resolvedTemplate !== "HDLKiosk" }), [otherParams, resolvedTemplate]);
|
|
122
|
+
const fulfillmentOtherParams = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({ enforceSingleBookingStartDate: false }, otherParams), {}, { enablePickupTiming: resolvedTemplate !== "HDLKiosk" }), [otherParams, resolvedTemplate]);
|
|
123
123
|
const resolvedSaleDetailModuleConfig = (0, react.useMemo)(() => isPosProductSelectionFlow ? require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, saleDetailModuleConfig), {}, { cartItems: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 ? void 0 : saleDetailModuleConfig.cartItems), {}, { bookingQuantityMode: "editable" }) }) : saleDetailModuleConfig, [isPosProductSelectionFlow, saleDetailModuleConfig]);
|
|
124
124
|
const runtimeRef = (0, react.useRef)({
|
|
125
125
|
date: void 0,
|
|
@@ -17,6 +17,8 @@ function _executeEftposPayment() {
|
|
|
17
17
|
let shouldDiscardPrepared = false;
|
|
18
18
|
try {
|
|
19
19
|
require_mainScreenPaymentGuard.notifyMainScreenPayment(() => mainScreenGuard === null || mainScreenGuard === void 0 ? void 0 : mainScreenGuard.show());
|
|
20
|
+
if (typeof (baseSales === null || baseSales === void 0 ? void 0 : baseSales.ensureLocalOrderNumbersForCheckout) !== "function") throw new Error("当前版本不支持本地订单编号,请更新应用后重试");
|
|
21
|
+
yield baseSales.ensureLocalOrderNumbersForCheckout();
|
|
20
22
|
if (piProvider) {
|
|
21
23
|
prepared = yield require_pendingEftposLifecycle.preparePendingEftposPayment({
|
|
22
24
|
amount,
|
|
@@ -245,6 +245,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
245
245
|
const app = (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
|
|
246
246
|
const hostChannel = String((engineContext === null || engineContext === void 0 || (_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.constants) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.config) === null || _engineContext$appHel2 === void 0 ? void 0 : _engineContext$appHel2.channel) || "").trim().toLowerCase();
|
|
247
247
|
const shouldUseConsumerPayment = hostChannel === "pc" || hostChannel === "h5";
|
|
248
|
+
const shouldUseFulfillmentCheckout = shouldUseConsumerPayment || platform === "kiosk";
|
|
248
249
|
const shouldRequireLogin = require_useSalesUserLogin.isRequireLoginChannel(hostChannel);
|
|
249
250
|
const { isLoggedIn, openLoginModal } = require_useSalesUserLogin.default();
|
|
250
251
|
const [view, setView] = (0, react.useState)(() => require_layout.normalizeKioskNavigableView(kioskShellLayout, readKioskSessionView(context.sales.bookingTicket)));
|
|
@@ -265,8 +266,8 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
265
266
|
const fulfillmentOpeningRef = (0, react.useRef)(false);
|
|
266
267
|
const fulfillmentCheckout = require_useKioskFulfillmentCheckout.default({
|
|
267
268
|
context,
|
|
268
|
-
enabled:
|
|
269
|
-
scopeKey: `${osKey || ""}:${businessCode || ""}:${hostChannel}`,
|
|
269
|
+
enabled: shouldUseFulfillmentCheckout,
|
|
270
|
+
scopeKey: `${osKey || ""}:${businessCode || ""}:${hostChannel}:${platform}`,
|
|
270
271
|
isActive,
|
|
271
272
|
mobile: hostChannel === "h5"
|
|
272
273
|
});
|
|
@@ -418,7 +419,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
418
419
|
...((_saleDetailModuleConf = saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 ? void 0 : saleDetailModuleConfig.hidden) !== null && _saleDetailModuleConf !== void 0 ? _saleDetailModuleConf : []).filter((moduleKey) => !KIOSK_REQUIRED_MODULES.has(moduleKey))
|
|
419
420
|
])],
|
|
420
421
|
cartItems: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 ? void 0 : saleDetailModuleConfig.cartItems), {}, {
|
|
421
|
-
beforeContent:
|
|
422
|
+
beforeContent: shouldUseFulfillmentCheckout ? saleDetailModuleConfig === null || saleDetailModuleConfig === void 0 || (_saleDetailModuleConf2 = saleDetailModuleConfig.cartItems) === null || _saleDetailModuleConf2 === void 0 ? void 0 : _saleDetailModuleConf2.beforeContent : /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_KioskPickupTiming.default, {
|
|
422
423
|
key: `${osKey || ""}:${businessCode || ""}:${hostChannel}:${String(((_context$sales$tempOr = context.sales.tempOrder) === null || _context$sales$tempOr === void 0 || (_context$sales$tempOr = _context$sales$tempOr._extend) === null || _context$sales$tempOr === void 0 ? void 0 : _context$sales$tempOr.localId) || ((_context$sales$tempOr2 = context.sales.tempOrder) === null || _context$sales$tempOr2 === void 0 ? void 0 : _context$sales$tempOr2.external_sale_number) || ((_context$sales$tempOr3 = context.sales.tempOrder) === null || _context$sales$tempOr3 === void 0 ? void 0 : _context$sales$tempOr3.order_id) || orderId || "draft")}`,
|
|
423
424
|
context,
|
|
424
425
|
mobile: variant === "phone",
|
|
@@ -464,7 +465,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
464
465
|
orderId,
|
|
465
466
|
osKey,
|
|
466
467
|
pickupTimingError,
|
|
467
|
-
|
|
468
|
+
shouldUseFulfillmentCheckout,
|
|
468
469
|
saleDetailModuleConfig,
|
|
469
470
|
requestRemoveItemConfirmation,
|
|
470
471
|
variant
|
|
@@ -646,7 +647,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
646
647
|
};
|
|
647
648
|
const performCheckout = function() {
|
|
648
649
|
var _ref22 = require_asyncToGenerator._asyncToGenerator(function* () {
|
|
649
|
-
if (checkoutOpeningRef.current || !
|
|
650
|
+
if (checkoutOpeningRef.current || !shouldUseFulfillmentCheckout && isPickupTimingPending || cartItemCount === 0) return;
|
|
650
651
|
checkoutOpeningRef.current = true;
|
|
651
652
|
const openingScope = fulfillmentCheckout.captureScope();
|
|
652
653
|
const isCurrentCheckoutRequest = () => {
|
|
@@ -670,15 +671,15 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
670
671
|
setPickupTimingError(void 0);
|
|
671
672
|
try {
|
|
672
673
|
var _context$sales$bookin4, _context$sales$bookin5;
|
|
673
|
-
if (
|
|
674
|
+
if (shouldUseFulfillmentCheckout && !(yield fulfillmentCheckout.request(true))) {
|
|
674
675
|
setNavigableView("cart");
|
|
675
676
|
return;
|
|
676
677
|
}
|
|
677
|
-
if (
|
|
678
|
+
if (shouldUseFulfillmentCheckout && !fulfillmentCheckout.isCurrent(openingScope)) return;
|
|
678
679
|
yield context.cart.waitForCartConsistency();
|
|
679
|
-
if (
|
|
680
|
+
if (shouldUseFulfillmentCheckout && !fulfillmentCheckout.isCurrent(openingScope)) return;
|
|
680
681
|
yield (_context$sales$bookin4 = context.sales.bookingTicket) === null || _context$sales$bookin4 === void 0 || (_context$sales$bookin5 = _context$sales$bookin4.preparePickupTimingForCheckout) === null || _context$sales$bookin5 === void 0 ? void 0 : _context$sales$bookin5.call(_context$sales$bookin4);
|
|
681
|
-
if (
|
|
682
|
+
if (shouldUseFulfillmentCheckout && !fulfillmentCheckout.isCurrent(openingScope)) return;
|
|
682
683
|
context.cart.refreshCartSnapshot();
|
|
683
684
|
if (!isCurrentCheckoutRequest()) return;
|
|
684
685
|
} catch (reason) {
|
|
@@ -941,7 +942,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
941
942
|
const beginCheckoutWithFulfillment = function() {
|
|
942
943
|
var _ref25 = require_asyncToGenerator._asyncToGenerator(function* () {
|
|
943
944
|
if (!(yield businessAvailability.ensureCanShop())) return;
|
|
944
|
-
if (!
|
|
945
|
+
if (!shouldUseFulfillmentCheckout) {
|
|
945
946
|
continueCheckout();
|
|
946
947
|
return;
|
|
947
948
|
}
|
|
@@ -997,9 +998,9 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
997
998
|
openCustomerAuth: (payload) => salesHostBridges.customerAuth.request(payload),
|
|
998
999
|
setOrderCustomer: (_context$sales$bookin31 = context.sales.bookingTicket) === null || _context$sales$bookin31 === void 0 || (_context$sales$bookin31 = _context$sales$bookin31.setOrderCustomer) === null || _context$sales$bookin31 === void 0 ? void 0 : _context$sales$bookin31.bind(context.sales.bookingTicket),
|
|
999
1000
|
loadDiscountConfig: () => context.cart.loadDiscountConfig(),
|
|
1000
|
-
isActive: () => isActiveRef.current && (!
|
|
1001
|
+
isActive: () => isActiveRef.current && (!shouldUseFulfillmentCheckout || fulfillmentCheckout.isCurrent(openingScope))
|
|
1001
1002
|
}).then((canProceed) => {
|
|
1002
|
-
if (canProceed && isActiveRef.current && (!
|
|
1003
|
+
if (canProceed && isActiveRef.current && (!shouldUseFulfillmentCheckout || fulfillmentCheckout.isCurrent(openingScope))) return beginCheckoutWithFulfillment();
|
|
1003
1004
|
}).catch((error) => {
|
|
1004
1005
|
console.warn("[KioskBigSale] Login2 登录后同步下单客户失败", error);
|
|
1005
1006
|
}).finally(() => {
|
|
@@ -1016,7 +1017,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
1016
1017
|
},
|
|
1017
1018
|
callback: createKioskLoginContinuationHandler({
|
|
1018
1019
|
continueCheckout: beginCheckoutWithFulfillment,
|
|
1019
|
-
isActive: () => isActiveRef.current && (!
|
|
1020
|
+
isActive: () => isActiveRef.current && (!shouldUseFulfillmentCheckout || fulfillmentCheckout.isCurrent(openingScope)),
|
|
1020
1021
|
syncAuthenticatedOrderCustomer: () => syncKioskAuthenticatedOrderCustomer({
|
|
1021
1022
|
bookingTicket: context.sales.bookingTicket,
|
|
1022
1023
|
loadDiscountConfig: () => context.cart.loadDiscountConfig()
|
|
@@ -1148,8 +1149,8 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
1148
1149
|
})) : null, layoutState.showCart ? /* @__PURE__ */ react.default.createElement("section", {
|
|
1149
1150
|
"aria-label": _pisell_utils.locales.getText("pisell2.big-sale.kiosk.your-order"),
|
|
1150
1151
|
className: "pisell-kiosk-sale__screen pisell-kiosk-sale__cart-screen",
|
|
1151
|
-
"data-fulfillment": !
|
|
1152
|
-
},
|
|
1152
|
+
"data-fulfillment": !shouldUseFulfillmentCheckout && isPickupTimingVisible ? "true" : "false"
|
|
1153
|
+
}, shouldUseFulfillmentCheckout || !isPickupTimingVisible ? /* @__PURE__ */ react.default.createElement("header", { className: "pisell-kiosk-sale__cart-header" }, /* @__PURE__ */ react.default.createElement("h1", null, _pisell_utils.locales.getText("pisell2.big-sale.kiosk.your-order"), " ", "(", cartItemCount, ")")) : null, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__cart-body" }, shouldUseFulfillmentCheckout && pickupTimingError ? /* @__PURE__ */ react.default.createElement(antd.Alert, {
|
|
1153
1154
|
type: "error",
|
|
1154
1155
|
showIcon: true,
|
|
1155
1156
|
message: pickupTimingError,
|
|
@@ -1177,7 +1178,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesCh
|
|
|
1177
1178
|
promotionAppliedCount: selectedCustomerVoucherCount,
|
|
1178
1179
|
onAddNote: openOrderNoteModal,
|
|
1179
1180
|
onBack: handleCapsuleBack,
|
|
1180
|
-
checkoutLoading: isCheckoutLoading || !
|
|
1181
|
+
checkoutLoading: isCheckoutLoading || !shouldUseFulfillmentCheckout && view === "cart" && isPickupTimingPending,
|
|
1181
1182
|
checkoutDisabled: shoppingBlocked,
|
|
1182
1183
|
onCheckout: handleCheckout,
|
|
1183
1184
|
onTogglePromotion: isVirtualSettlementOrder ? void 0 : handleToggleFloatingPromotion,
|
|
@@ -65,7 +65,7 @@ function KioskSale(props) {
|
|
|
65
65
|
const { menu_list_ids: _ignoredMenuListIds } = productLoadParams;
|
|
66
66
|
return require_objectWithoutProperties._objectWithoutProperties(productLoadParams, _excluded2);
|
|
67
67
|
}, [productLoadParams]);
|
|
68
|
-
const resolvedOtherParams = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, otherParams || {}), channel ? { channel } : {}), {}, { enableBusinessAvailability: Boolean(kioskPresentation.platform) }, kioskPresentation.platform ? { platform: kioskPresentation.platform } : {}), [
|
|
68
|
+
const resolvedOtherParams = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, otherParams || {}), {}, { enforceSingleBookingStartDate: true }, channel ? { channel } : {}), {}, { enableBusinessAvailability: Boolean(kioskPresentation.platform) }, kioskPresentation.platform ? { platform: kioskPresentation.platform } : {}), [
|
|
69
69
|
channel,
|
|
70
70
|
kioskPresentation.platform,
|
|
71
71
|
otherParams
|