@pisell/private-materials 6.11.219 → 6.11.220
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 +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/Card/index.d.ts +1 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Footer.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/es/plus/pisellReservation/PisellReservation.js +0 -2
- package/es/plus/pisellReservation/floorMap/floorPlanApi.d.ts +2 -2
- package/es/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.d.ts +13 -2
- package/es/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.js +46 -26
- package/es/plus/pisellReservation/hooks/useFloorMapBookingInteraction.d.ts +1 -8
- package/es/plus/pisellReservation/hooks/useFloorMapBookingInteraction.js +25 -28
- package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Card/index.d.ts +1 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Footer.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/lib/plus/pisellReservation/PisellReservation.js +0 -2
- package/lib/plus/pisellReservation/floorMap/floorPlanApi.d.ts +2 -2
- package/lib/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.d.ts +13 -2
- package/lib/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.js +32 -26
- package/lib/plus/pisellReservation/hooks/useFloorMapBookingInteraction.d.ts +1 -8
- package/lib/plus/pisellReservation/hooks/useFloorMapBookingInteraction.js +13 -37
- package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { ItemLayout, ItemProps, PresetConfig, SelectorProps, SelectorVariant } f
|
|
|
3
3
|
import './selector.less';
|
|
4
4
|
export declare const SelectorContext: React.Context<{
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
|
-
mode?: "
|
|
6
|
+
mode?: "single" | "multiple" | undefined;
|
|
7
7
|
itemLayout?: ItemLayout | undefined;
|
|
8
8
|
valueType?: "object" | "primitive" | undefined;
|
|
9
9
|
variant?: SelectorVariant | undefined;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
|
|
5
5
|
* 包括如何通过 Context 访问父组件配置
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
export declare const BasicExample: () => JSX.Element;
|
|
9
8
|
export declare const ChildrenExample: () => JSX.Element;
|
|
10
9
|
export declare const CustomItemExample: () => JSX.Element;
|
|
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"loading" | "
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "warn" | "success" | "init" | "fail" | "reject" | "pedding" | "resove" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
@@ -176,7 +176,7 @@ export declare const updateCustom: (payload: {
|
|
|
176
176
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
177
177
|
type: EActionTypes;
|
|
178
178
|
payload: {
|
|
179
|
-
status: "loading" | "
|
|
179
|
+
status: "loading" | "warn" | "success" | "fail" | "question";
|
|
180
180
|
};
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
@@ -300,7 +300,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
300
300
|
mode?: "refund" | "fullPay" | "pay" | "query" | undefined;
|
|
301
301
|
order_id?: string | number | undefined;
|
|
302
302
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
|
|
303
|
-
action?: "
|
|
303
|
+
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
304
304
|
key?: number | undefined;
|
|
305
305
|
step?: number | undefined;
|
|
306
306
|
title?: string | undefined;
|
|
@@ -310,7 +310,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
310
310
|
net?: boolean | undefined;
|
|
311
311
|
component?: string | undefined;
|
|
312
312
|
form?: string | undefined;
|
|
313
|
-
status?: "loading" | "
|
|
313
|
+
status?: "loading" | "warn" | "success" | "init" | "fail" | "reject" | "pedding" | "resove" | "question" | undefined;
|
|
314
314
|
warn?: string | undefined;
|
|
315
315
|
steps?: {
|
|
316
316
|
/** 用于重置当前步骤 */
|
|
@@ -47,7 +47,7 @@ declare type ScanData = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
-
searchType: "
|
|
50
|
+
searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
|
|
51
51
|
data: any;
|
|
52
52
|
scanCode: string;
|
|
53
53
|
} | null;
|
|
@@ -637,8 +637,6 @@ var PisellReservationCore = (props) => {
|
|
|
637
637
|
onFloorMapBookingClick,
|
|
638
638
|
dataSources,
|
|
639
639
|
mergedTableRows: tables,
|
|
640
|
-
reservationRuleProduct,
|
|
641
|
-
associated_menu_list_ids: reservationAssociatedMenuListIds,
|
|
642
640
|
reservationBiz: BIZ,
|
|
643
641
|
resourceSelectMode
|
|
644
642
|
});
|
|
@@ -6,8 +6,8 @@ export declare const RESERVATION_DEFAULT_FLOOR_PLAN_ID = 1;
|
|
|
6
6
|
export type { PostShopFloorPlanBody, PutShopFloorPlanBody, ShopFloorPlanByCodeRequestOptions, ShopFloorPlanDetail, ShopFloorPlanLayoutItem, };
|
|
7
7
|
export { buildFloorPlanPutBody, floorMapSavedConfigToRemotePatch, inferCanvasSizeFromScene, mergeFloorPlanViewRemote, parseLayoutFieldToViewConfigPatch, pickFloorPlanDetail, sceneElementsToShopLayout, viewConfigToLayoutPayload, isShopFloorPlanNotFoundResponse, isHttpNotFoundError, } from '@pisell/materials';
|
|
8
8
|
export declare function isFloorPlanDuplicateCodeError(err: unknown): boolean;
|
|
9
|
-
export declare const getShopFloorPlanByCode: (code: string, subscribe?:
|
|
10
|
-
export declare const postShopFloorPlan: (body: PostShopFloorPlanBody) => Promise<
|
|
9
|
+
export declare const getShopFloorPlanByCode: (code: string, subscribe?: ShopFloorPlanByCodeRequestOptions | undefined) => Promise<ShopFloorPlanDetail | null>;
|
|
10
|
+
export declare const postShopFloorPlan: (body: PostShopFloorPlanBody) => Promise<ShopFloorPlanDetail | null>;
|
|
11
11
|
export declare const putShopFloorPlan: (id: number, body: PutShopFloorPlanBody) => Promise<unknown>;
|
|
12
12
|
export declare const unsubscribeShopFloorPlanCodeQuery: (subscriberId: string) => Promise<void>;
|
|
13
13
|
/**
|
|
@@ -43,7 +43,18 @@ export declare function resolveBookingStripIdForUi(raw: Record<string, unknown>)
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function resolveBookingIdForHeader(raw: Record<string, unknown>): string;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
* `
|
|
46
|
+
* 预约详情弹窗:完全基于「这一条 booking raw」(`sales.getResourceBookingItem` 返回的元素,
|
|
47
|
+
* 与平面图传入的 `floorMapSourceBookings` 子项格式同源)构造 RoomCard 数据。
|
|
48
|
+
*
|
|
49
|
+
* 设计原则:
|
|
50
|
+
* - `bookings` 始终为 `[rawToBooking(raw, 0)]`,**不**再走 `mapPisellReservationRowToFloorRoomCardData`
|
|
51
|
+
* 里基于 `tableRow.cardStatus` / `floorMapSourceBookings` status 的判定,避免「completed /
|
|
52
|
+
* canceled / no_show 等非 occupied/reserved」状态导致 `bookings` 退化为空数组。
|
|
53
|
+
* - `status` 严格按 `raw.status`:`occupied` → `occupied`,其余(含 `reserved` / 历史完成 /
|
|
54
|
+
* 取消等)→ `reserved`,让小条始终展示,且历史记录以中性预约色呈现。
|
|
55
|
+
* - `sub_status` 由 booking 自身字段(`timeoutTime` / `lateTime` / `order_payment_status`)推导,
|
|
56
|
+
* 不依赖 `tableRow` 上派生过的 host 进度状态,与「完全依赖接口数据」一致。
|
|
57
|
+
* - `main_field` / `capacity` 取自 `tableRow`(桌位属性,raw 不一定带);视觉上 Modal 透传
|
|
58
|
+
* `hideHeader` / `hideHeaderCapacity`,二者主要参与数据完整性而非 header 渲染。
|
|
48
59
|
*/
|
|
49
60
|
export declare function buildDetailModalRoomCardData(raw: Record<string, unknown>, tableRow: PisellReservationTableRow | null | undefined): FloorRoomCardData;
|
|
@@ -557,38 +557,44 @@ function resolveBookingIdForHeader(raw) {
|
|
|
557
557
|
return pick(raw.booking_id) || pick(raw.booking_uid) || pick(raw.id) || "—";
|
|
558
558
|
}
|
|
559
559
|
function buildDetailModalRoomCardData(raw, tableRow) {
|
|
560
|
-
const
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
|
|
560
|
+
const cap = (tableRow == null ? void 0 : tableRow.capacityLabel) != null && String(tableRow.capacityLabel).trim() !== "" ? tableRow.capacityLabel : "—";
|
|
561
|
+
const stripTitle = resolveBookingStripIdForUi(raw).trim();
|
|
562
|
+
const main_field = stripTitle || (tableRow == null ? void 0 : tableRow.code) || "";
|
|
563
|
+
const booking = rawToBooking(raw, 0);
|
|
564
|
+
const rawStatus = String(raw.status ?? "").trim().toLowerCase();
|
|
565
|
+
const status = rawStatus === "occupied" ? "occupied" : "reserved";
|
|
566
|
+
let sub_status;
|
|
567
|
+
if (status === "occupied") {
|
|
568
|
+
if (booking.timeoutTime != null && booking.timeoutTime > 0) {
|
|
569
|
+
sub_status = "timeout";
|
|
570
|
+
} else if (booking.order_payment_status === "unpaid") {
|
|
571
|
+
sub_status = "payment_required";
|
|
572
|
+
} else {
|
|
573
|
+
sub_status = "payed";
|
|
574
|
+
}
|
|
575
|
+
} else if (booking.lateTime != null && booking.lateTime > 0) {
|
|
576
|
+
sub_status = "late";
|
|
577
|
+
} else {
|
|
578
|
+
sub_status = "not_arrived";
|
|
579
|
+
}
|
|
578
580
|
const order = raw.order ?? {};
|
|
579
581
|
const orderDisplayNumber = order.shop_full_order_number != null && String(order.shop_full_order_number).trim() !== "" ? String(order.shop_full_order_number).trim() : "";
|
|
580
582
|
const summary = order.summary;
|
|
581
583
|
const currencySymbol = order.currency_symbol != null && String(order.currency_symbol).trim() !== "" ? String(order.currency_symbol).trim() : "$";
|
|
582
584
|
const totalAmount = (summary == null ? void 0 : summary.total_amount) != null && String(summary.total_amount).trim() !== "" ? String(summary.total_amount).trim() : "";
|
|
583
585
|
const inlineTotal = totalAmount ? `${import_utils.locales.getText("pisell-reservation.booking-detail.total")}: ${totalAmount.startsWith(currencySymbol) ? totalAmount : `${currencySymbol}${totalAmount}`}` : "";
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
586
|
+
const finalBooking = {
|
|
587
|
+
...booking,
|
|
588
|
+
items_summary_suffix: inlineTotal || booking.items_summary_suffix,
|
|
589
|
+
order_display_number: orderDisplayNumber || booking.order_display_number
|
|
590
|
+
};
|
|
591
|
+
return {
|
|
592
|
+
main_field,
|
|
593
|
+
capacity: cap,
|
|
594
|
+
status,
|
|
595
|
+
sub_status,
|
|
596
|
+
bookings: [finalBooking]
|
|
597
|
+
};
|
|
592
598
|
}
|
|
593
599
|
// Annotate the CommonJS export names for ESM import in node:
|
|
594
600
|
0 && (module.exports = {
|
|
@@ -22,16 +22,9 @@ export declare function useFloorMapBookingInteraction(options: {
|
|
|
22
22
|
* 已打开的「预约详情」弹窗的 raw / 行数据。
|
|
23
23
|
*/
|
|
24
24
|
mergedTableRows: PisellReservationTableRow[];
|
|
25
|
-
/**
|
|
26
|
-
* 预约规则(fulfillment.enabled_resource_rules type=link)命中的第一个有效时长商品;
|
|
27
|
-
* 点击空桌时用它回填新建弹窗的 service.value[0]。为 null 时空桌点击不做处理。
|
|
28
|
-
*/
|
|
29
|
-
reservationRuleProduct?: any | null;
|
|
30
|
-
/** pico menu 关联餐牌 ID,传入 TicketBooking 覆盖 getProducts 的 menu_list_ids */
|
|
31
|
-
associated_menu_list_ids?: number[];
|
|
32
25
|
/**
|
|
33
26
|
* 与场控 `getPicoCodingOpenData` target 中的 BIZ 一致(如 `dine_in`)。
|
|
34
|
-
* `dine_in`
|
|
27
|
+
* 旧店铺(id=2155)非 `dine_in` 时点击有效 booking 走宿主结账抽屉。
|
|
35
28
|
*/
|
|
36
29
|
reservationBiz?: string;
|
|
37
30
|
/** 资源选择模式:点击资源时只把资源信息回传给调用方 */
|
|
@@ -28,7 +28,6 @@ var import_floorMapHostCheckout = require("../floorMap/floorMapHostCheckout");
|
|
|
28
28
|
var import_calendarAdapter = require("../data/calendarAdapter");
|
|
29
29
|
var import_bookingToReservationTables = require("../data/bookingToReservationTables");
|
|
30
30
|
var import_mapRowToFloorRoomCardData = require("../floorRoomCard/mapRowToFloorRoomCardData");
|
|
31
|
-
var import_reservationTicketBookingHostParams = require("../utils/reservationTicketBookingHostParams");
|
|
32
31
|
function bookingOrderFinancialSig(raw) {
|
|
33
32
|
const order = raw.order;
|
|
34
33
|
const sum = order == null ? void 0 : order.summary;
|
|
@@ -116,8 +115,6 @@ function useFloorMapBookingInteraction(options) {
|
|
|
116
115
|
onFloorMapBookingClick,
|
|
117
116
|
dataSources,
|
|
118
117
|
mergedTableRows,
|
|
119
|
-
reservationRuleProduct,
|
|
120
|
-
associated_menu_list_ids,
|
|
121
118
|
reservationBiz,
|
|
122
119
|
resourceSelectMode
|
|
123
120
|
} = options;
|
|
@@ -178,7 +175,12 @@ function useFloorMapBookingInteraction(options) {
|
|
|
178
175
|
const shopId = ((_b = utils == null ? void 0 : utils.getData) == null ? void 0 : _b.call(utils, "shop_id")) ?? ((_g = (_f = (_e = (_d = (_c = utils == null ? void 0 : utils.store) == null ? void 0 : _c.getState) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.global) == null ? void 0 : _f.globalConfig) == null ? void 0 : _g.id);
|
|
179
176
|
const n = Number(shopId);
|
|
180
177
|
const isLegacyCheckoutShop = Number.isFinite(n) && n === 2155;
|
|
181
|
-
|
|
178
|
+
const recHasBooking = (() => {
|
|
179
|
+
const rid = rec.id;
|
|
180
|
+
const bid = rec.booking_id;
|
|
181
|
+
return rid != null && String(rid).trim() !== "" || bid != null && String(bid).trim() !== "";
|
|
182
|
+
})();
|
|
183
|
+
if (isLegacyCheckoutShop && reservationBiz !== "dine_in" && recHasBooking) {
|
|
182
184
|
(_h = utils == null ? void 0 : utils.action) == null ? void 0 : _h.call(utils, {
|
|
183
185
|
type: "pisell1.handleOpenHostCheckoutDrawer",
|
|
184
186
|
data: { item: rec }
|
|
@@ -201,7 +203,7 @@ function useFloorMapBookingInteraction(options) {
|
|
|
201
203
|
);
|
|
202
204
|
const floorMapItemClickBefore = (0, import_react.useCallback)(
|
|
203
205
|
(args) => {
|
|
204
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
206
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
205
207
|
if (args.mode === "edit") return;
|
|
206
208
|
const rowHit = (0, import_reservationCards.findReservationRow)(args.item, args.dataSources);
|
|
207
209
|
if (resourceSelectMode == null ? void 0 : resourceSelectMode.enabled) {
|
|
@@ -234,50 +236,24 @@ function useFloorMapBookingInteraction(options) {
|
|
|
234
236
|
const bid = rec.booking_id;
|
|
235
237
|
return rid != null && String(rid).trim() !== "" || bid != null && String(bid).trim() !== "";
|
|
236
238
|
})();
|
|
237
|
-
if (!hasValidBooking) {
|
|
238
|
-
if (!reservationRuleProduct) return;
|
|
239
|
-
if (!rowHit) return;
|
|
240
|
-
const createModeConfig = (0, import_reservationTicketBookingHostParams.buildReservationTicketBookingCreateModeConfigForRow)({
|
|
241
|
-
reservationBiz,
|
|
242
|
-
associated_menu_list_ids,
|
|
243
|
-
reservationRuleProduct,
|
|
244
|
-
row: rowHit
|
|
245
|
-
});
|
|
246
|
-
if (!createModeConfig) return;
|
|
247
|
-
(_f = (_e = (_d = engineCtx == null ? void 0 : engineCtx.appHelper) == null ? void 0 : _d.utils) == null ? void 0 : _e.action) == null ? void 0 : _f.call(_e, {
|
|
248
|
-
type: "pisell1.handleOpenEditBooking",
|
|
249
|
-
data: {
|
|
250
|
-
createModeConfig
|
|
251
|
-
},
|
|
252
|
-
callback: () => {
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
239
|
const rowResolved = rowHit ?? {
|
|
258
240
|
id: String(
|
|
259
|
-
((
|
|
241
|
+
((_e = (_d = args.item._sceneElement) == null ? void 0 : _d.dataBinding) == null ? void 0 : _e.recordId) ?? "unknown"
|
|
260
242
|
),
|
|
261
|
-
code: ((
|
|
243
|
+
code: ((_f = args.item._sceneElement) == null ? void 0 : _f.name) != null ? String(args.item._sceneElement.name) : "—",
|
|
262
244
|
cardStatus: "available"
|
|
263
245
|
};
|
|
264
|
-
const sceneName = ((
|
|
246
|
+
const sceneName = ((_g = args.item._sceneElement) == null ? void 0 : _g.name) != null ? String(args.item._sceneElement.name).trim() : void 0;
|
|
247
|
+
const recForDetail = hasValidBooking ? rec : {};
|
|
265
248
|
showBookingDetail({
|
|
266
|
-
rec,
|
|
249
|
+
rec: recForDetail,
|
|
267
250
|
rowResolved,
|
|
268
251
|
event: args.event,
|
|
269
252
|
sceneElementName: sceneName,
|
|
270
253
|
floorMapItemId: String(args.item.id)
|
|
271
254
|
});
|
|
272
255
|
},
|
|
273
|
-
[
|
|
274
|
-
showBookingDetail,
|
|
275
|
-
reservationRuleProduct,
|
|
276
|
-
engineCtx,
|
|
277
|
-
associated_menu_list_ids,
|
|
278
|
-
reservationBiz,
|
|
279
|
-
resourceSelectMode
|
|
280
|
-
]
|
|
256
|
+
[showBookingDetail, resourceSelectMode]
|
|
281
257
|
);
|
|
282
258
|
const openBookingDetailFromRaw = (0, import_react.useCallback)(
|
|
283
259
|
(payload) => {
|