@pisell/private-materials 6.12.440 → 6.12.441
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 +10 -10
- package/build/lowcode/view.js +10 -10
- 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 +0 -1
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/kiosk/components/Shell/useKioskMemberAction.js +0 -1
- package/es/components/kiosk/sales/KioskSaleSession.js +0 -1
- package/es/components/kiosk/sales/useCheckout.js +0 -1
- package/es/components/kiosk/sales/useSaleSessionExit.js +0 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/components/venueBookingSales/checkout/VenueBookingHolderStep.js +8 -2
- package/es/components/venueBookingSales/checkout/VenueHolderCreateModal.js +5 -1
- package/es/components/venueBookingSales/checkout/VenueKioskHolderCreateModal.js +155 -0
- package/es/components/venueBookingSales/checkout/kioskHolderForm.js +124 -0
- package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +0 -1
- package/es/components/venueBookingSales/checkout/useVenueCustomerAccess.js +0 -1
- package/es/components/venueBookingSales/checkout/useVenueKioskCheckout.js +0 -1
- package/es/components/venueBookingSales/extras/VenueExtraDetailModal.js +0 -1
- package/es/components/venueBookingSales/useVenueBookingSession.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/pisellReservation/utils/calendarBookingSelection.js +4 -4
- package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
- 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/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/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/es/pro/skuDetailModal/flow/calendarEntry.js +2 -2
- package/lib/components/venueBookingSales/checkout/VenueBookingHolderStep.js +7 -0
- package/lib/components/venueBookingSales/checkout/VenueHolderCreateModal.js +5 -1
- package/lib/components/venueBookingSales/checkout/VenueKioskHolderCreateModal.js +157 -0
- package/lib/components/venueBookingSales/checkout/kioskHolderForm.js +124 -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
|
|
@@ -20,7 +20,6 @@ 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";
|
|
24
23
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
25
24
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
26
25
|
import locales_default$1 from "../../locales/index.js";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import locales_default from "../../locales/index.js";
|
|
10
9
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
11
10
|
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 { resolveCustomerDetailAppearance } from "../../pro/skuDetailModal/customerDetailPolicy.js";
|
|
13
12
|
import { resolveKioskPlatformSource, resolveKioskPresentation } from "../kioskSale/resolveKioskPresentation.js";
|
|
14
13
|
import { isVenueKioskRuntime } from "../venueBookingSales/kiosk/customer.js";
|
|
@@ -14,7 +14,6 @@ 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";
|
|
18
17
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
19
18
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
20
19
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -3,7 +3,6 @@ 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";
|
|
7
6
|
import { useKioskSale } from "../../sales/KioskSaleContext.js";
|
|
8
7
|
import { captureShoppingOrder } from "../../sales/shopping/orderIdentity.js";
|
|
9
8
|
import { maskCustomerPhone } from "./memberPhone.js";
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import { resolveSaleDetailProductQuantity, resolveSaleDetailTempOrder } from "../../../plus/saleDetail/utils.js";
|
|
9
8
|
import locales_default from "../../bigSale/locales/index.js";
|
|
10
9
|
import { KioskSaleContext } from "./KioskSaleContext.js";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import { defaultCheckoutOptions } from "../app/contracts.js";
|
|
10
9
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
11
10
|
import { useSalesCommands } from "../runtime/operations/useSalesCommands.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
7
6
|
import { useEffect, useRef, useState } from "react";
|
|
8
7
|
import { useMemoizedFn } from "ahooks";
|
|
@@ -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 { TEMP_ORDER_SYNC_REQUEST_MESSAGE_TYPE, getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
-
import "../../plus/salesSdk/index.js";
|
|
6
5
|
import { useEffect, useRef, useState } from "react";
|
|
7
6
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
|
8
7
|
function createRequestId() {
|
|
@@ -7,13 +7,12 @@ 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";
|
|
11
10
|
import { isProgressTarget } from "../../../plus/venueBookingDesign/shared/booking-progress.js";
|
|
12
11
|
import { useBookingProgress } from "../../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
|
13
12
|
import { Button as Button$1 } from "../../../plus/venueBookingDesign/shared/Controls.js";
|
|
14
13
|
import { HolderSection, OrderItem } from "../../../plus/venueBookingDesign/shared/OrderContent.js";
|
|
15
14
|
import { localizedText, orderIdentity } from "../presentation.js";
|
|
16
|
-
import { ensureVenueKioskCustomer, venueKioskCustomerAuthRequest, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
15
|
+
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerAuthRequest, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
17
16
|
import { calendarDateLabel } from "../../../plus/venueBookingDesign/booking-date.js";
|
|
18
17
|
import { inspectVenueHolderState, isVenueHolderCreateUncertain, isVenueHolderWriteUncertain, markVenueHolderCreateUncertain, markVenueHolderWriteUncertain, venueHolderOrderIdentity } from "./holderState.js";
|
|
19
18
|
import { confirmationErrorMessage } from "./errorMessage.js";
|
|
@@ -604,6 +603,13 @@ const VenueBookingHolderStep = forwardRef((props, ref) => {
|
|
|
604
603
|
}, contents.map((child) => /* @__PURE__ */ React.createElement("li", { key: child.key }, /* @__PURE__ */ React.createElement("span", null, child.name || text("Included item", "套餐子商品")), /* @__PURE__ */ React.createElement("span", null, "× ", child.quantity))))), /* @__PURE__ */ React.createElement("div", { className: "child-assignments" }, assignments));
|
|
605
604
|
}), props.afterAssignments), creating && current(creating.identity) && /* @__PURE__ */ React.createElement(VenueHolderCreateModal, {
|
|
606
605
|
formId: creating.formId,
|
|
606
|
+
key: isVenueKioskRuntime(handle) ? JSON.stringify([
|
|
607
|
+
creating.identity,
|
|
608
|
+
creating.uid,
|
|
609
|
+
creating.index,
|
|
610
|
+
creating.base
|
|
611
|
+
]) : void 0,
|
|
612
|
+
kiosk: isVenueKioskRuntime(handle),
|
|
607
613
|
customerId: resolveBookingEditCustomerId(handle === null || handle === void 0 || (_handle$getTempOrder7 = handle.getTempOrder) === null || _handle$getTempOrder7 === void 0 ? void 0 : _handle$getTempOrder7.call(handle), void 0, handle === null || handle === void 0 || (_handle$getOrderCusto = handle.getOrderCustomerSnapshot) === null || _handle$getOrderCusto === void 0 || (_handle$getOrderCusto = _handle$getOrderCusto.call(handle)) === null || _handle$getOrderCusto === void 0 ? void 0 : _handle$getOrderCusto.id),
|
|
608
614
|
locale,
|
|
609
615
|
isCurrent: () => current(creating.identity),
|
|
@@ -8,11 +8,15 @@ import { Button as Button$1 } from "../../../plus/venueBookingDesign/shared/Cont
|
|
|
8
8
|
import { Dialog, legacyBookingOverlaySelector } from "../../../plus/venueBookingDesign/Dialog.js";
|
|
9
9
|
import { confirmationErrorMessage } from "./errorMessage.js";
|
|
10
10
|
import { normalizeVenueHolderCreateRecord } from "./holderCreateResult.js";
|
|
11
|
+
import VenueKioskHolderCreateModal from "./VenueKioskHolderCreateModal.js";
|
|
11
12
|
import React, { useEffect, useRef, useState } from "react";
|
|
12
13
|
import { Alert, Spin } from "antd";
|
|
13
14
|
//#region src/components/venueBookingSales/checkout/VenueHolderCreateModal.tsx
|
|
15
|
+
function VenueHolderCreateModal(props) {
|
|
16
|
+
return props.kiosk ? /* @__PURE__ */ React.createElement(VenueKioskHolderCreateModal, props) : /* @__PURE__ */ React.createElement(VenueWebHolderCreateModal, props);
|
|
17
|
+
}
|
|
14
18
|
/** Same FormCard and customer binding as the host FormPlugin, scoped to the new booking theme. */
|
|
15
|
-
function
|
|
19
|
+
function VenueWebHolderCreateModal({ formId, customerId, locale, onClose, onCreated, onUnconfirmed, isCurrent }) {
|
|
16
20
|
const platform = usePlatform();
|
|
17
21
|
const [FormCard] = useComponents({ components: ["FormCard"] });
|
|
18
22
|
const [config, setConfig] = useState();
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
2
|
+
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
|
+
import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
4
|
+
import { isWalkIn } from "../../booking/utils.js";
|
|
5
|
+
import { getCachedWaiverFormDetail } from "../../booking/utils/waiverFormDetailCache.js";
|
|
6
|
+
import { getCachedProductHolderFormDetail } from "../../../plus/salesSdk/utils/productHolderFormDetailCache.js";
|
|
7
|
+
import { Button as Button$1 } from "../../../plus/venueBookingDesign/shared/Controls.js";
|
|
8
|
+
import { createKioskHolderFormController } from "./kioskHolderForm.js";
|
|
9
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
10
|
+
import { Alert, Spin } from "antd";
|
|
11
|
+
//#region src/components/venueBookingSales/checkout/VenueKioskHolderCreateModal.tsx
|
|
12
|
+
/** The real Kiosk owns its existing form popup. Only loading/error feedback stays
|
|
13
|
+
* in this page; it never mounts the PC/H5 FormCard or a second Dialog. */
|
|
14
|
+
function VenueKioskHolderCreateModal(props) {
|
|
15
|
+
const { formId, customerId, locale } = props;
|
|
16
|
+
const engine = useEngineContext();
|
|
17
|
+
const latest = useRef(props);
|
|
18
|
+
latest.current = props;
|
|
19
|
+
const controller = useRef();
|
|
20
|
+
if (!controller.current) controller.current = createKioskHolderFormController();
|
|
21
|
+
const generation = useRef(0);
|
|
22
|
+
const mounted = useRef(true);
|
|
23
|
+
const submitted = useRef(false);
|
|
24
|
+
const notified = useRef(false);
|
|
25
|
+
const [error, setError] = useState();
|
|
26
|
+
const [uncertain, setUncertain] = useState(false);
|
|
27
|
+
const [working, setWorking] = useState(true);
|
|
28
|
+
const [attempt, setAttempt] = useState(0);
|
|
29
|
+
const chinese = String(locale || "").startsWith("zh");
|
|
30
|
+
const text = (en, zh) => chinese ? zh : en;
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
var _controller$current;
|
|
33
|
+
mounted.current = true;
|
|
34
|
+
const owner = ++generation.current;
|
|
35
|
+
const current = () => {
|
|
36
|
+
var _latest$current$custo;
|
|
37
|
+
return mounted.current && generation.current === owner && String(latest.current.formId) === String(formId) && String((_latest$current$custo = latest.current.customerId) !== null && _latest$current$custo !== void 0 ? _latest$current$custo : "") === String(customerId !== null && customerId !== void 0 ? customerId : "") && latest.current.isCurrent();
|
|
38
|
+
};
|
|
39
|
+
(_controller$current = controller.current) === null || _controller$current === void 0 || _controller$current.close();
|
|
40
|
+
submitted.current = false;
|
|
41
|
+
setWorking(true);
|
|
42
|
+
setError(void 0);
|
|
43
|
+
const unconfirmed = () => {
|
|
44
|
+
if (!notified.current) {
|
|
45
|
+
notified.current = true;
|
|
46
|
+
latest.current.onUnconfirmed();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
(function() {
|
|
50
|
+
var _ref = _asyncToGenerator(function* () {
|
|
51
|
+
var _detail$form_field, _detail$form_type, _detail$form, _fields$find, _engine$appHelper;
|
|
52
|
+
const detail = yield getCachedProductHolderFormDetail(Number(formId), "kiosk");
|
|
53
|
+
if (!current()) return;
|
|
54
|
+
if (!detail) throw new Error("Holder form unavailable");
|
|
55
|
+
const fields = (_detail$form_field = detail.form_field) !== null && _detail$form_field !== void 0 ? _detail$form_field : detail.field;
|
|
56
|
+
const linked = ((_detail$form_type = detail.form_type) !== null && _detail$form_type !== void 0 ? _detail$form_type : (_detail$form = detail.form) === null || _detail$form === void 0 ? void 0 : _detail$form.form_type) === "minors" ? fields === null || fields === void 0 || (_fields$find = fields.find((field) => field.filed_type === "form_to_form" && field.status === "hide")) === null || _fields$find === void 0 || (_fields$find = _fields$find.setting) === null || _fields$find === void 0 ? void 0 : _fields$find.linkedTable : void 0;
|
|
57
|
+
const targetId = Number(linked || formId);
|
|
58
|
+
const source = linked ? yield getCachedWaiverFormDetail(targetId, "kiosk") : detail;
|
|
59
|
+
if (!current()) return;
|
|
60
|
+
if (!source) throw new Error("Linked holder form unavailable");
|
|
61
|
+
const boundCustomerId = isWalkIn(customerId !== null && customerId !== void 0 ? customerId : void 0) ? void 0 : customerId;
|
|
62
|
+
const formDataConfig = _objectSpread2(_objectSpread2({}, source), {}, {
|
|
63
|
+
form_id: targetId,
|
|
64
|
+
is_franchisor: detail.is_franchisor
|
|
65
|
+
});
|
|
66
|
+
delete formDataConfig.customer_id;
|
|
67
|
+
if (boundCustomerId != null) formDataConfig.customer_id = boundCustomerId;
|
|
68
|
+
controller.current.open({
|
|
69
|
+
action: typeof (engine === null || engine === void 0 || (_engine$appHelper = engine.appHelper) === null || _engine$appHelper === void 0 || (_engine$appHelper = _engine$appHelper.utils) === null || _engine$appHelper === void 0 ? void 0 : _engine$appHelper.action) === "function" ? (payload) => engine.appHelper.utils.action(payload) : void 0,
|
|
70
|
+
request: {
|
|
71
|
+
formId: targetId,
|
|
72
|
+
formDataConfig,
|
|
73
|
+
customerId: boundCustomerId,
|
|
74
|
+
zIndex: 1101
|
|
75
|
+
},
|
|
76
|
+
isCurrent: current,
|
|
77
|
+
onOpened: () => {
|
|
78
|
+
if (current()) setWorking(false);
|
|
79
|
+
},
|
|
80
|
+
onSaved: (event) => {
|
|
81
|
+
if (!current() || submitted.current) return;
|
|
82
|
+
submitted.current = true;
|
|
83
|
+
setWorking(true);
|
|
84
|
+
_asyncToGenerator(function* () {
|
|
85
|
+
try {
|
|
86
|
+
yield latest.current.onCreated({
|
|
87
|
+
record: event.record,
|
|
88
|
+
linkedWaiver: !!linked
|
|
89
|
+
});
|
|
90
|
+
if (current()) latest.current.onClose();
|
|
91
|
+
} catch (_unused) {
|
|
92
|
+
if (current()) {
|
|
93
|
+
setUncertain(true);
|
|
94
|
+
unconfirmed();
|
|
95
|
+
setError(text("The profile was saved. Refresh the list to select it.", "档案已保存,请刷新列表后选择,勿重复创建。"));
|
|
96
|
+
}
|
|
97
|
+
} finally {
|
|
98
|
+
if (current()) setWorking(false);
|
|
99
|
+
}
|
|
100
|
+
})();
|
|
101
|
+
},
|
|
102
|
+
onCancelled: () => {
|
|
103
|
+
if (current()) latest.current.onClose();
|
|
104
|
+
},
|
|
105
|
+
onError: (reason) => {
|
|
106
|
+
if (!current()) return;
|
|
107
|
+
setWorking(false);
|
|
108
|
+
if (reason.uncertain) {
|
|
109
|
+
setUncertain(true);
|
|
110
|
+
unconfirmed();
|
|
111
|
+
setError(text("The save result is unknown. Close this form and refresh the profile list before trying again.", "保存结果尚未确认,请关闭表单并刷新档案列表后核对,勿重复创建。"));
|
|
112
|
+
} else setError(reason.code === "HOST_UNAVAILABLE" ? text("The kiosk holder form service is unavailable. Please update this terminal and retry.", "终端持有人表单服务不可用,请更新终端后重试。") : text("Unable to load the holder form. Please retry.", "无法加载持有人表单,请重试。"));
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
return function run() {
|
|
117
|
+
return _ref.apply(this, arguments);
|
|
118
|
+
};
|
|
119
|
+
})()().catch(() => {
|
|
120
|
+
if (current()) {
|
|
121
|
+
setWorking(false);
|
|
122
|
+
setError(text("Unable to load the holder form. Please retry.", "无法加载持有人表单,请重试。"));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return () => {
|
|
126
|
+
var _controller$current2;
|
|
127
|
+
mounted.current = false;
|
|
128
|
+
++generation.current;
|
|
129
|
+
(_controller$current2 = controller.current) === null || _controller$current2 === void 0 || _controller$current2.close();
|
|
130
|
+
};
|
|
131
|
+
}, [
|
|
132
|
+
formId,
|
|
133
|
+
customerId,
|
|
134
|
+
attempt
|
|
135
|
+
]);
|
|
136
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
137
|
+
className: "venue-holder-create-feedback",
|
|
138
|
+
"aria-busy": working
|
|
139
|
+
}, working && /* @__PURE__ */ React.createElement(Spin, null), error && /* @__PURE__ */ React.createElement(Alert, {
|
|
140
|
+
type: "error",
|
|
141
|
+
showIcon: true,
|
|
142
|
+
message: error,
|
|
143
|
+
action: /* @__PURE__ */ React.createElement(React.Fragment, null, !uncertain && !submitted.current && /* @__PURE__ */ React.createElement(Button$1, { onClick: () => setAttempt((value) => value + 1) }, text("Retry", "重试")), /* @__PURE__ */ React.createElement(Button$1, {
|
|
144
|
+
disabled: working && submitted.current,
|
|
145
|
+
onClick: () => {
|
|
146
|
+
var _controller$current3;
|
|
147
|
+
if (working && submitted.current) return;
|
|
148
|
+
(_controller$current3 = controller.current) === null || _controller$current3 === void 0 || _controller$current3.close();
|
|
149
|
+
latest.current.onClose();
|
|
150
|
+
}
|
|
151
|
+
}, text("Close", "关闭")))
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { VenueKioskHolderCreateModal as default };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
//#region src/components/venueBookingSales/checkout/kioskHolderForm.ts
|
|
3
|
+
var KioskHolderFormError = class extends Error {
|
|
4
|
+
constructor(message, code, uncertain = false) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.code = code;
|
|
7
|
+
this.uncertain = uncertain;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const recordValue = (value) => !!value && Object.prototype.toString.call(value) === "[object Object]";
|
|
11
|
+
const validHandle = (value) => {
|
|
12
|
+
if (!value || typeof value !== "object") return false;
|
|
13
|
+
const handle = value;
|
|
14
|
+
return handle.kind === "booking-holder-form" && handle.version === 1 && typeof handle.close === "function";
|
|
15
|
+
};
|
|
16
|
+
/** Holder creation can return linked waiver records without a top-level ID.
|
|
17
|
+
* Keep its contract separate from the resource form's saved-record contract. */
|
|
18
|
+
function createKioskHolderFormController() {
|
|
19
|
+
let active;
|
|
20
|
+
const closeHandle = (handle) => {
|
|
21
|
+
try {
|
|
22
|
+
handle === null || handle === void 0 || handle.close();
|
|
23
|
+
} catch (_unused) {}
|
|
24
|
+
};
|
|
25
|
+
const close = () => {
|
|
26
|
+
const previous = active;
|
|
27
|
+
active = void 0;
|
|
28
|
+
if (!previous) return;
|
|
29
|
+
previous.done = true;
|
|
30
|
+
closeHandle(previous.handle);
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
close,
|
|
34
|
+
isOpen: () => Boolean(active && !active.done),
|
|
35
|
+
open(options) {
|
|
36
|
+
close();
|
|
37
|
+
if (!options.isCurrent()) return;
|
|
38
|
+
const owner = { done: false };
|
|
39
|
+
active = owner;
|
|
40
|
+
const current = () => active === owner && !owner.done && options.isCurrent();
|
|
41
|
+
const finish = () => {
|
|
42
|
+
owner.done = true;
|
|
43
|
+
if (active === owner) active = void 0;
|
|
44
|
+
};
|
|
45
|
+
const fail = (error) => {
|
|
46
|
+
if (!current()) return;
|
|
47
|
+
finish();
|
|
48
|
+
closeHandle(owner.handle);
|
|
49
|
+
options.onError(error);
|
|
50
|
+
};
|
|
51
|
+
const unavailable = () => new KioskHolderFormError("The kiosk holder form service is unavailable.", "HOST_UNAVAILABLE");
|
|
52
|
+
const formId = options.request.formId;
|
|
53
|
+
const customerId = options.request.customerId;
|
|
54
|
+
if (!Number.isSafeInteger(formId) || formId <= 0 || !recordValue(options.request.formDataConfig) || customerId != null && (!Number.isSafeInteger(Number(customerId)) || Number(customerId) <= 1) || !options.action) {
|
|
55
|
+
fail(unavailable());
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const receive = (event) => {
|
|
59
|
+
if (!current()) return;
|
|
60
|
+
try {
|
|
61
|
+
if (!event || Number(event.formId) !== formId) {
|
|
62
|
+
fail(new KioskHolderFormError("The holder form does not match this request.", "FORM_MISMATCH", true));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (event.status === "opened") options.onOpened(event);
|
|
66
|
+
else if (event.status === "saved") {
|
|
67
|
+
if (!recordValue(event.record)) {
|
|
68
|
+
fail(new KioskHolderFormError("The holder form did not return a confirmed save.", "SAVED_RESULT_INVALID", true));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const record = JSON.parse(JSON.stringify(event.record));
|
|
72
|
+
if (!recordValue(record)) {
|
|
73
|
+
fail(new KioskHolderFormError("The holder form returned invalid records.", "SAVED_RESULT_INVALID", true));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
finish();
|
|
77
|
+
options.onSaved(_objectSpread2(_objectSpread2({}, event), {}, { record }));
|
|
78
|
+
} else if (event.status === "cancelled") {
|
|
79
|
+
finish();
|
|
80
|
+
options.onCancelled();
|
|
81
|
+
} else if (event.status === "error") fail(new KioskHolderFormError(event.message || "Unable to load the holder form.", event.code || "HOST_ERROR", !!event.uncertain));
|
|
82
|
+
else fail(new KioskHolderFormError("The holder form service returned an invalid response.", "HOST_RESPONSE_INVALID"));
|
|
83
|
+
} catch (reason) {
|
|
84
|
+
fail(new KioskHolderFormError(reason instanceof Error ? reason.message : "Invalid holder form response.", "HOST_RESPONSE_INVALID", true));
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
let dispatching = true;
|
|
88
|
+
const buffered = [];
|
|
89
|
+
try {
|
|
90
|
+
const handle = options.action({
|
|
91
|
+
type: "pisell1.goBookingHolderForm",
|
|
92
|
+
data: _objectSpread2(_objectSpread2({}, options.request), {}, {
|
|
93
|
+
formDataConfig: JSON.parse(JSON.stringify(options.request.formDataConfig)),
|
|
94
|
+
isCurrent: current
|
|
95
|
+
}),
|
|
96
|
+
callback(event) {
|
|
97
|
+
if (dispatching) buffered.push(event);
|
|
98
|
+
else receive(event);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
dispatching = false;
|
|
102
|
+
if (!current()) {
|
|
103
|
+
buffered.length = 0;
|
|
104
|
+
if (validHandle(handle)) closeHandle(handle);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (!validHandle(handle)) {
|
|
108
|
+
if (handle && typeof handle.then === "function") Promise.resolve(handle).catch(() => {});
|
|
109
|
+
buffered.length = 0;
|
|
110
|
+
fail(unavailable());
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
owner.handle = handle;
|
|
114
|
+
buffered.splice(0).forEach(receive);
|
|
115
|
+
} catch (reason) {
|
|
116
|
+
dispatching = false;
|
|
117
|
+
buffered.length = 0;
|
|
118
|
+
fail(new KioskHolderFormError(reason instanceof Error ? reason.message : "Unable to open the holder form.", "HOST_ERROR"));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { createKioskHolderFormController };
|
|
@@ -7,7 +7,6 @@ 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";
|
|
11
10
|
import { isSalesOrderSubmitSuccess } from "../../../plus/saleDetail/components/DetailActions/utils.js";
|
|
12
11
|
import { resolveKioskDeferredSubmission } from "../../bigSale/templates/Kiosk/deferredCheckout.js";
|
|
13
12
|
import { isH5ZeroAmountValue, toFiniteKioskAmount } from "../../bigSale/templates/Kiosk/zeroAmountCheckout.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { orderIdentity } from "../presentation.js";
|
|
7
6
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerAuthRequest } from "../kiosk/customer.js";
|
|
8
7
|
import { confirmationErrorMessage } from "./errorMessage.js";
|
|
@@ -3,7 +3,6 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
3
3
|
import useInitLocalesOnce from "../../../hooks/useInitLocalesOnce.js";
|
|
4
4
|
import { isHolderConfirmCancelled } from "../../../plus/salesSdk/holderConfirm/createHolderConfirmBridge.js";
|
|
5
5
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
6
|
-
import "../../../plus/salesSdk/index.js";
|
|
7
6
|
import locales_default from "../../bigSale/locales/index.js";
|
|
8
7
|
import { usePaymentScreenProtection } from "../../checkout/paymentRuntime/usePaymentScreenProtection.js";
|
|
9
8
|
import { isSalesOrderSubmitSuccess } from "../../../plus/saleDetail/components/DetailActions/utils.js";
|
|
@@ -10,7 +10,6 @@ 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";
|
|
14
13
|
import { localizedText, orderIdentity } from "../presentation.js";
|
|
15
14
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
16
15
|
import { ProductDescription } from "../../../plus/venueBookingDesign/shared/ProductDescription.js";
|
|
@@ -11,7 +11,6 @@ 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";
|
|
15
14
|
import { resolveEffectiveSaleDetailAmountDue } from "../../plus/saleDetail/utils.js";
|
|
16
15
|
import { useBookingUI } from "../../plus/venueBookingDesign/context.js";
|
|
17
16
|
import { useBookingProgress } from "../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
package/es/index.js
CHANGED
|
@@ -91,7 +91,6 @@ 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";
|
|
95
94
|
import { defineExitPolicy, defineNavigationGuard, definePredicate, defineTrigger, defineWorkflow } from "./components/HDLKiosk/kernel/application/defineApplication.js";
|
|
96
95
|
import { accept, defineSlice, perform, require } from "./components/HDLKiosk/kernel/application/defineSlice.js";
|
|
97
96
|
import { defineKioskScanCommand, kioskScanTrigger, salesScan, startOnScan } from "./components/kiosk/sales/inputs/scan.js";
|
|
@@ -182,7 +181,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
182
181
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
183
182
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
184
183
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
185
|
-
import "./plus/pisellReservation/index.js";
|
|
186
184
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
187
185
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
188
186
|
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 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utcPlugin from "dayjs/plugin/utc";
|
|
3
|
+
import timezonePlugin from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/utils/calendarBookingSelection.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utcPlugin);
|
|
6
|
+
dayjs.extend(timezonePlugin);
|
|
7
7
|
/** Resolve the same shop clock used by the POS host; previews use the device clock. */
|
|
8
8
|
function resolveReservationTimeZone(utils) {
|
|
9
9
|
var _utils$getStore$getSt, _utils$getStore, _utils$getStore$getSt2, _utils$store, _utils$store$getState, _utils$getApp, _utils$getApp$getStor, _utils$getApp$getStor2, _core$tenant, _core$core, _core$core2, _state$core, _state$core2, _utils$getData, _state$global, _state$global2, _state$global3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import utcPlugin from "dayjs/plugin/utc";
|
|
4
|
+
import timezonePlugin from "dayjs/plugin/timezone";
|
|
5
5
|
//#region src/plus/saasDevice/devicePasscodes/model.ts
|
|
6
|
-
dayjs.extend(
|
|
7
|
-
dayjs.extend(
|
|
6
|
+
dayjs.extend(utcPlugin);
|
|
7
|
+
dayjs.extend(timezonePlugin);
|
|
8
8
|
const INITIAL_DEVICE_PASSCODE_STATE = {
|
|
9
9
|
deviceIds: [],
|
|
10
10
|
devicesById: {}
|
|
@@ -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";
|
|
@@ -2,7 +2,6 @@ import useEngineContext from "../../../../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import { resolveContactsInfo } from "../utils.js";
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
|
|
5
|
-
import "../../../../salesSdk/index.js";
|
|
6
5
|
import { useMemo } from "react";
|
|
7
6
|
import { useMemoizedFn } from "ahooks";
|
|
8
7
|
//#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";
|