@pisell/private-materials 6.12.277 → 6.12.278
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 +12 -12
- package/build/lowcode/view.js +12 -12
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/ProductList/index.js +1 -0
- package/es/components/bigSale/components/TimeBar/index.js +1 -0
- package/es/components/bigSale/dialog.js +1 -0
- package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
- package/es/components/bigSale/index.js +1 -0
- package/es/components/bigSale/templates/HDLKiosk/payment/HDLKioskPaymentRuntime.js +1 -0
- package/es/components/bigSale/templates/Kiosk/index.js +1 -0
- package/es/components/bigSale/templates/Kiosk/useKioskFulfillmentCheckout.js +6 -5
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/NavigationHintIcon.js +2 -1
- package/es/components/eventBooking/locales.js +10 -0
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/index.js +2 -0
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/pisellReservation/index.js +17 -0
- package/es/plus/saleDetail/Base.js +1 -0
- package/es/plus/saleDetail/actions/index.js +5 -2
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/PrintAction.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
- package/es/plus/saleDetail/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/index.js +1 -0
- package/es/plus/salesSdk/components/FulfillmentTiming/Picker.js +4 -1
- package/es/plus/salesSdk/components/FulfillmentTiming/index.js +2 -1
- package/es/plus/salesSdk/components/FulfillmentTiming/locales.js +130 -3
- package/es/plus/salesSdk/components/FulfillmentTiming/messages.js +40 -0
- package/es/plus/salesSdk/index.js +54 -0
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/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/templates/HDLKiosk/payment/HDLKioskPaymentRuntime.js +1 -0
- package/lib/components/bigSale/templates/Kiosk/useKioskFulfillmentCheckout.js +6 -5
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/NavigationHintIcon.js +2 -1
- package/lib/components/eventBooking/locales.js +10 -0
- package/lib/plus/saleDetail/actions/index.js +5 -2
- package/lib/plus/salesSdk/components/FulfillmentTiming/Picker.js +4 -1
- package/lib/plus/salesSdk/components/FulfillmentTiming/index.js +2 -1
- package/lib/plus/salesSdk/components/FulfillmentTiming/locales.js +130 -3
- package/lib/plus/salesSdk/components/FulfillmentTiming/messages.js +42 -0
- package/package.json +2 -2
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
+
import "../../../../plus/salesSdk/index.js";
|
|
3
4
|
import dayjs from "dayjs";
|
|
4
5
|
import { useCallback, useEffect, useState } from "react";
|
|
5
6
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -14,6 +14,7 @@ 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";
|
|
17
18
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
18
19
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
19
20
|
import locales_default from "../../locales/index.js";
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
import locales_default from "../../locales/index.js";
|
|
8
9
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
9
10
|
import dayjs from "dayjs";
|
|
@@ -6,6 +6,7 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
6
6
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
7
7
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
8
8
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
9
|
+
import "../../plus/salesSdk/index.js";
|
|
9
10
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
10
11
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
11
12
|
import BigSale from "./index.js";
|
|
@@ -4,6 +4,7 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
|
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
6
|
import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import { useMemo } from "react";
|
|
8
9
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
9
10
|
/**
|
|
@@ -3,6 +3,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
3
3
|
import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from "../../../plus/salesSdk/utils/buildDefaultLoadProductsParams.js";
|
|
4
4
|
import { useSalesSdkUIHosts } from "../../../plus/salesSdk/context/SalesSdkUIHostsContext.js";
|
|
5
5
|
import { SalesSdkRootRefreshContext } from "../../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
6
|
+
import "../../../plus/salesSdk/index.js";
|
|
6
7
|
import { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
|
|
7
8
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
9
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
@@ -8,6 +8,7 @@ import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
|
8
8
|
import { useSalesSdkCustomer } from "../../plus/salesSdk/hooks/useSalesSdkCustomer.js";
|
|
9
9
|
import { SalesSdkProvider } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
10
10
|
import { SalesSdkBookingContextProvider } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
11
|
+
import "../../plus/salesSdk/index.js";
|
|
11
12
|
import { ResponsiveBigSaleBase } from "./Base.js";
|
|
12
13
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
13
14
|
import { isKioskPresentation } from "./templateCapabilities.js";
|
|
@@ -239,6 +239,7 @@ function HDLKioskPaymentRuntime({ active, context, controllerRef, onPaymentResul
|
|
|
239
239
|
var _baseSales$getOtherPa;
|
|
240
240
|
const otherParams = (yield baseSales === null || baseSales === void 0 || (_baseSales$getOtherPa = baseSales.getOtherParams) === null || _baseSales$getOtherPa === void 0 ? void 0 : _baseSales$getOtherPa.call(baseSales)) || (baseSales === null || baseSales === void 0 ? void 0 : baseSales.otherParams) || {};
|
|
241
241
|
const result = yield globalApp.runFunction("authorizeAction", {
|
|
242
|
+
waitingTemplate: "hdl-kiosk",
|
|
242
243
|
params: {
|
|
243
244
|
action: "pay",
|
|
244
245
|
business_code: otherParams.businessCode || otherParams.business_code,
|
|
@@ -12,6 +12,7 @@ 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";
|
|
15
16
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
16
17
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
17
18
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
2
2
|
import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
3
|
import useLocale from "../../../../hooks/useLocale.js";
|
|
4
4
|
import { isFulfillmentTimingBooking } from "../../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
5
|
+
import { getFulfillmentErrorMessage, getFulfillmentText } from "../../../../plus/salesSdk/components/FulfillmentTiming/messages.js";
|
|
5
6
|
import { resolveFulfillmentCheckout } from "../../../../plus/salesSdk/utils/fulfillmentCheckout.js";
|
|
6
7
|
import { isPersistedBigSaleOrderId } from "../../utils/orderIdentity.js";
|
|
7
8
|
import KioskFulfillmentModal from "./KioskFulfillmentModal.js";
|
|
@@ -46,9 +47,8 @@ function useKioskFulfillmentCheckout(options) {
|
|
|
46
47
|
const [open, setOpen] = useState(false);
|
|
47
48
|
const [draft, setDraft] = useState(emptyDraft);
|
|
48
49
|
const draftRef = useRef(draft);
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const changedError = chinese ? "订单已变化,请重新结账。" : "The order changed. Please start checkout again.";
|
|
50
|
+
const loadError = getFulfillmentText("pisell2.fulfillment.load.fulfillment.failed", locale);
|
|
51
|
+
const changedError = getFulfillmentText("pisell2.fulfillment.order.changed", locale);
|
|
52
52
|
const update = useCallback((patch) => {
|
|
53
53
|
draftRef.current = _objectSpread2(_objectSpread2({}, draftRef.current), patch);
|
|
54
54
|
if (mounted.current) setDraft(draftRef.current);
|
|
@@ -159,7 +159,7 @@ function useKioskFulfillmentCheckout(options) {
|
|
|
159
159
|
update({
|
|
160
160
|
loading: false,
|
|
161
161
|
saving: false,
|
|
162
|
-
error: reason
|
|
162
|
+
error: getFulfillmentErrorMessage(reason, locale, "pisell2.fulfillment.load.fulfillment.failed")
|
|
163
163
|
});
|
|
164
164
|
setOpen(true);
|
|
165
165
|
} else if (pending.current === session && sequence === loadSequence.current) reset();
|
|
@@ -175,6 +175,7 @@ function useKioskFulfillmentCheckout(options) {
|
|
|
175
175
|
isCurrent,
|
|
176
176
|
loadAvailability,
|
|
177
177
|
loadError,
|
|
178
|
+
locale,
|
|
178
179
|
reset,
|
|
179
180
|
update
|
|
180
181
|
]);
|
|
@@ -238,7 +239,7 @@ function useKioskFulfillmentCheckout(options) {
|
|
|
238
239
|
} catch (reason) {
|
|
239
240
|
if (pending.current === session && isCurrent(session)) update({
|
|
240
241
|
saving: false,
|
|
241
|
-
error: reason
|
|
242
|
+
error: getFulfillmentErrorMessage(reason, locale)
|
|
242
243
|
});
|
|
243
244
|
else if (pending.current === session) reset();
|
|
244
245
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { locales } from "@pisell/utils";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
//#region src/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/NavigationHintIcon.tsx
|
|
4
5
|
/**
|
|
@@ -8,7 +9,7 @@ import classNames from "classnames";
|
|
|
8
9
|
const NavigationHintIcon = ({ direction, disabled = false, animated = false, onClick }) => /* @__PURE__ */ React.createElement("button", {
|
|
9
10
|
type: "button",
|
|
10
11
|
className: classNames("calendar-week-navigation__compact-chevron", `calendar-week-navigation__compact-chevron--${direction}`, animated && "calendar-week-navigation__compact-chevron--animated", disabled && "calendar-week-navigation__compact-chevron--disabled"),
|
|
11
|
-
"aria-label": direction === "left" ? "
|
|
12
|
+
"aria-label": locales.getText(direction === "left" ? "pisell2.event.calendar.previous.week" : "pisell2.event.calendar.next.week"),
|
|
12
13
|
disabled,
|
|
13
14
|
onClick
|
|
14
15
|
}, /* @__PURE__ */ React.createElement("svg", {
|
|
@@ -7,6 +7,8 @@ var locales_default = {
|
|
|
7
7
|
"pisell2.event.calendar.limit.filling.up.fast": "Filling up fast",
|
|
8
8
|
"pisell2.event.calendar.limit.lots.of.space": "Lots of space",
|
|
9
9
|
"pisell2.event.calendar.select.date": "Select a date",
|
|
10
|
+
"pisell2.event.calendar.previous.week": "Previous week",
|
|
11
|
+
"pisell2.event.calendar.next.week": "Next week",
|
|
10
12
|
"pisell2.event.calendar.time.select": "Select a time slot",
|
|
11
13
|
"pisell2.event.calendar.time.required": "Please select a session time",
|
|
12
14
|
"pisell2.event.calendar.time.empty": "No time slots are available",
|
|
@@ -99,6 +101,8 @@ var locales_default = {
|
|
|
99
101
|
"pisell2.event.calendar.limit.filling.up.fast": "名额有限",
|
|
100
102
|
"pisell2.event.calendar.limit.lots.of.space": "名额充足",
|
|
101
103
|
"pisell2.event.calendar.select.date": "选择日期",
|
|
104
|
+
"pisell2.event.calendar.previous.week": "上一周",
|
|
105
|
+
"pisell2.event.calendar.next.week": "下一周",
|
|
102
106
|
"pisell2.event.calendar.time.select": "选择时间段",
|
|
103
107
|
"pisell2.event.calendar.time.required": "请选择预约时间段",
|
|
104
108
|
"pisell2.event.calendar.time.empty": "暂无可预约时间段",
|
|
@@ -191,6 +195,8 @@ var locales_default = {
|
|
|
191
195
|
"pisell2.event.calendar.limit.filling.up.fast": "名額有限",
|
|
192
196
|
"pisell2.event.calendar.limit.lots.of.space": "名額充足",
|
|
193
197
|
"pisell2.event.calendar.select.date": "選擇日期",
|
|
198
|
+
"pisell2.event.calendar.previous.week": "上一週",
|
|
199
|
+
"pisell2.event.calendar.next.week": "下一週",
|
|
194
200
|
"pisell2.event.calendar.time.select": "選擇時間段",
|
|
195
201
|
"pisell2.event.calendar.time.required": "請選擇預約時間段",
|
|
196
202
|
"pisell2.event.calendar.time.empty": "暫無可預約時間段",
|
|
@@ -283,6 +289,8 @@ var locales_default = {
|
|
|
283
289
|
"pisell2.event.calendar.limit.filling.up.fast": "残りわずか",
|
|
284
290
|
"pisell2.event.calendar.limit.lots.of.space": "空きあり",
|
|
285
291
|
"pisell2.event.calendar.select.date": "日付を選択",
|
|
292
|
+
"pisell2.event.calendar.previous.week": "前の週",
|
|
293
|
+
"pisell2.event.calendar.next.week": "次の週",
|
|
286
294
|
"pisell2.event.calendar.time.select": "時間帯を選択",
|
|
287
295
|
"pisell2.event.calendar.time.required": "予約時間帯を選択してください",
|
|
288
296
|
"pisell2.event.calendar.time.empty": "予約可能な時間帯がありません",
|
|
@@ -375,6 +383,8 @@ var locales_default = {
|
|
|
375
383
|
"pisell2.event.calendar.limit.filling.up.fast": "Enchendo rapidamente",
|
|
376
384
|
"pisell2.event.calendar.limit.lots.of.space": "Muito espaço",
|
|
377
385
|
"pisell2.event.calendar.select.date": "Selecionar data",
|
|
386
|
+
"pisell2.event.calendar.previous.week": "Semana anterior",
|
|
387
|
+
"pisell2.event.calendar.next.week": "Próxima semana",
|
|
378
388
|
"pisell2.event.calendar.time.select": "Selecionar horário",
|
|
379
389
|
"pisell2.event.calendar.time.required": "Selecione um horário de reserva",
|
|
380
390
|
"pisell2.event.calendar.time.empty": "Não há horários disponíveis",
|
|
@@ -2,6 +2,7 @@ import useEngineContext from "../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
3
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
+
import "../../plus/salesSdk/index.js";
|
|
5
6
|
import { useEffect, useRef } from "react";
|
|
6
7
|
import { useMemoizedFn } from "ahooks";
|
|
7
8
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
package/es/index.js
CHANGED
|
@@ -87,6 +87,7 @@ 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";
|
|
90
91
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
91
92
|
import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
|
|
92
93
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
@@ -141,6 +142,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
141
142
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
142
143
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
143
144
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
145
|
+
import "./plus/pisellReservation/index.js";
|
|
144
146
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
145
147
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
146
148
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
283
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, findFirstVirtualCurrencyAsset, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getReservedVirtualSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
|
|
|
259
259
|
return rows;
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
|
-
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
|
|
|
78
78
|
PisellToast({ content: err instanceof Error ? err.message : String(err) });
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
|
|
|
927
927
|
];
|
|
928
928
|
}
|
|
929
929
|
//#endregion
|
|
930
|
-
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./serve/formResourcePage.js";
|
|
2
|
+
import "./floorRoomCard/mapRowToFloorRoomCardData.js";
|
|
3
|
+
import "./floorRoomCard/ReservationFloorRoomCard.js";
|
|
4
|
+
import "./floorMap/reservationMock.js";
|
|
5
|
+
import "./floorMap/floorPlanApi.js";
|
|
6
|
+
import "./reservationConstants.js";
|
|
7
|
+
import "./data/bookingToReservationTables.js";
|
|
8
|
+
import "./data/formResourceToReservationTables.js";
|
|
9
|
+
import "./data/salesEmbeddedResourceToTableRows.js";
|
|
10
|
+
import "./floorMap/reservationCards.js";
|
|
11
|
+
import "./PisellReservation.js";
|
|
12
|
+
import "./PisellReservationBookingPage.js";
|
|
13
|
+
import "./PisellVenueControlPage.js";
|
|
14
|
+
import "./PisellVenueWallPage.js";
|
|
15
|
+
import "./PisellReservationTablePage.js";
|
|
16
|
+
import "./components/SelectFloorMapResourceDialog.js";
|
|
17
|
+
export {};
|
|
@@ -13,6 +13,7 @@ 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";
|
|
16
17
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
17
18
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
18
19
|
import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
|
|
@@ -3,6 +3,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
3
3
|
import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
4
4
|
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
5
5
|
import { usePosPermission } from "../../../pro/posPermission/index.js";
|
|
6
|
+
import useLocale from "../../../hooks/useLocale.js";
|
|
6
7
|
import PaymentKeyboard from "../../../pro/priceKeyboard/components/paymentKeyboard/index.js";
|
|
7
8
|
import DiscountKeyboard from "../../../pro/priceKeyboard/components/discountKeyboard/index.js";
|
|
8
9
|
import { isHolderConfirmCancelled } from "../../salesSdk/holderConfirm/createHolderConfirmBridge.js";
|
|
@@ -17,6 +18,7 @@ import { getClientDisplayName, isWalkInCustomer, normalizeCustomer } from "../co
|
|
|
17
18
|
import { SalesSdkRootRefreshContext } from "../../salesSdk/context/SalesSdkProvider.js";
|
|
18
19
|
import { resolveEffectiveSaleDetailAmountDue } from "../utils.js";
|
|
19
20
|
import { SaveConfirmModal, shouldOpenSaveConfirmModal } from "../../salesSdk/components/SaveConfirmModal.js";
|
|
21
|
+
import { getFulfillmentErrorMessage } from "../../salesSdk/components/FulfillmentTiming/messages.js";
|
|
20
22
|
import FulfillmentReferenceModal from "../../salesSdk/components/FulfillmentReferenceModal.js";
|
|
21
23
|
import { CHECKOUT_VISIBLE_PAYMENT_CODES, SPI_PAYMENT_CODES, resolvePiPaymentProvider } from "../../../components/checkout/constants.js";
|
|
22
24
|
import PaymentMethodRuntime_default from "../../../components/checkout/paymentRuntime/PaymentMethodRuntime.js";
|
|
@@ -87,6 +89,7 @@ function isPaymentActionRuntimeKey(key) {
|
|
|
87
89
|
}
|
|
88
90
|
function SaleOrderActionProvider({ actionConfigs, actionOverrides, children, context, enableFulfillmentReferencePrompt = false, onExternalPaymentSettled, variant }) {
|
|
89
91
|
var _engineContext$appHel, _engineContext$appHel2, _engineContext$appHel3, _engineContext$appHel4, _engineContext$appHel5, _engineContext$appHel9, _engineContext$appHel10, _cart$items, _cart$bookings, _sales$bookingTicket2, _sales$bookingTicket3, _tempOrder$order_id, _tempOrder$note, _summary$summary2, _selectFloorConfig$bu;
|
|
92
|
+
const fulfillmentLocale = useLocale();
|
|
90
93
|
const Toast = useToast();
|
|
91
94
|
const engineContext = useEngineContext();
|
|
92
95
|
const paymentResultLocale = ((_engineContext$appHel = engineContext.appHelper) === null || _engineContext$appHel === void 0 || (_engineContext$appHel = _engineContext$appHel.utils) === null || _engineContext$appHel === void 0 || (_engineContext$appHel2 = _engineContext$appHel.getApp) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.call(_engineContext$appHel)) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.locales) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel3 = _engineContext$appHel2.getLocale) === null || _engineContext$appHel3 === void 0 ? void 0 : _engineContext$appHel3.call(_engineContext$appHel2)) || ((_engineContext$appHel4 = engineContext.appHelper) === null || _engineContext$appHel4 === void 0 || (_engineContext$appHel4 = _engineContext$appHel4.utils) === null || _engineContext$appHel4 === void 0 || (_engineContext$appHel4 = _engineContext$appHel4.storage) === null || _engineContext$appHel4 === void 0 || (_engineContext$appHel5 = _engineContext$appHel4.get) === null || _engineContext$appHel5 === void 0 ? void 0 : _engineContext$appHel5.call(_engineContext$appHel4, "umi_locale")) || "en";
|
|
@@ -288,7 +291,7 @@ function SaleOrderActionProvider({ actionConfigs, actionOverrides, children, con
|
|
|
288
291
|
setShowFulfillmentReference(true);
|
|
289
292
|
});
|
|
290
293
|
} catch (error) {
|
|
291
|
-
const errorMessage = error
|
|
294
|
+
const errorMessage = getFulfillmentErrorMessage(error, fulfillmentLocale);
|
|
292
295
|
message.error(errorMessage);
|
|
293
296
|
settleExternalPayment(options === null || options === void 0 ? void 0 : options.externalRequestId, {
|
|
294
297
|
status: "failed",
|
|
@@ -342,7 +345,7 @@ function SaleOrderActionProvider({ actionConfigs, actionOverrides, children, con
|
|
|
342
345
|
if (!pendingAction.shouldSkipPrompt() && fulfillmentReferenceEnabled) yield Promise.resolve(sales.bookingTicket.setPickupRef(buzzer));
|
|
343
346
|
refreshSalesRootSnapshot === null || refreshSalesRootSnapshot === void 0 || refreshSalesRootSnapshot();
|
|
344
347
|
} catch (error) {
|
|
345
|
-
const errorMessage = error
|
|
348
|
+
const errorMessage = getFulfillmentErrorMessage(error, fulfillmentLocale);
|
|
346
349
|
message.error(errorMessage);
|
|
347
350
|
setFulfillmentReferenceSaving(false);
|
|
348
351
|
return;
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { useMemoizedFn } from "ahooks";
|
|
6
7
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
|
|
8
9
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
9
10
|
import { EBizPrintType } from "./types.js";
|
|
@@ -10,6 +10,7 @@ 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";
|
|
13
14
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
14
15
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
15
16
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -5,6 +5,7 @@ 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";
|
|
8
9
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
9
10
|
import React, { memo, useMemo } from "react";
|
|
10
11
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -5,6 +5,7 @@ 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";
|
|
8
9
|
import Base_default from "./Base.js";
|
|
9
10
|
import { resolveSaleDetailOsProps } from "./osProps.js";
|
|
10
11
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
|
|
5
6
|
import { DishGroupView } from "./DishGroupView.js";
|
|
6
7
|
import dayjs from "dayjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import { getInternalNotesByScheduleEvent } from "../../serve.js";
|
|
5
6
|
import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
|
|
6
7
|
import { DetailActions } from "../../components/DetailActions/index.js";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
|
+
import useLocale from "../../../../hooks/useLocale.js";
|
|
3
4
|
import TimeResourceSelector from "../../../../components/eventBooking/components/timeResourceSelector/index.js";
|
|
4
5
|
import BookingAvailabilityCalendar from "../../../../components/eventBooking/components/bookingAvailabilityCalendar/index.js";
|
|
5
6
|
import { useAvailability } from "./useAvailability.js";
|
|
7
|
+
import { getFulfillmentErrorMessage } from "./messages.js";
|
|
6
8
|
import dayjs from "dayjs";
|
|
7
9
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
8
10
|
import { Alert, Button, DatePicker, Spin } from "antd";
|
|
@@ -51,6 +53,7 @@ function storeMinute(now, timezone) {
|
|
|
51
53
|
}
|
|
52
54
|
/** Adapts Pickup candidates to the same calendar and time widgets used by SKU Detail. */
|
|
53
55
|
function FulfillmentTimingPicker({ value, onChange, loadAvailability, isPos, mobile, disabled, onStateChange }) {
|
|
56
|
+
const locale = useLocale();
|
|
54
57
|
const manual = isPos && value.source === "pos_manual";
|
|
55
58
|
const queryDate = manual ? void 0 : value.date;
|
|
56
59
|
const query = useAvailability(loadAvailability, true, queryDate);
|
|
@@ -142,7 +145,7 @@ function FulfillmentTimingPicker({ value, onChange, loadAvailability, isPos, mob
|
|
|
142
145
|
const selectedSlot = availability === null || availability === void 0 ? void 0 : availability.slots.find((slot) => value.instant ? slot.instant === value.instant : slot.date === value.date && slot.time === value.time);
|
|
143
146
|
const selectedIds = useMemo(() => selectedSlot ? [selectedSlot.id] : [], [selectedSlot === null || selectedSlot === void 0 ? void 0 : selectedSlot.id]);
|
|
144
147
|
const staleSelection = !manual && !loading && availability && availability.date === value.date && value.time && !selectedSlot ? text("selection.expired") : void 0;
|
|
145
|
-
const reportedError = queryError
|
|
148
|
+
const reportedError = queryError ? getFulfillmentErrorMessage(queryError, locale, "pisell2.fulfillment.load.failed") : changeError || manualError || staleSelection;
|
|
146
149
|
const stateCallbackRef = useRef(onStateChange);
|
|
147
150
|
stateCallbackRef.current = onStateChange;
|
|
148
151
|
useEffect(() => {
|
|
@@ -17,7 +17,8 @@ const knownModes = new Set([
|
|
|
17
17
|
"pick_up",
|
|
18
18
|
"takeaway",
|
|
19
19
|
"delivery",
|
|
20
|
-
"dine_in"
|
|
20
|
+
"dine_in",
|
|
21
|
+
"table_service"
|
|
21
22
|
]);
|
|
22
23
|
const serviceLabel = (mode) => knownModes.has(mode) ? text(mode) : mode.replace(/_/g, " ");
|
|
23
24
|
const summary = (value) => value.date && value.time ? `${value.date} · ${value.time}` : "";
|