@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
|
@@ -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;
|
|
@@ -764,8 +764,6 @@ export var PisellReservationCore = function PisellReservationCore(props) {
|
|
|
764
764
|
onFloorMapBookingClick: onFloorMapBookingClick,
|
|
765
765
|
dataSources: dataSources,
|
|
766
766
|
mergedTableRows: tables,
|
|
767
|
-
reservationRuleProduct: reservationRuleProduct,
|
|
768
|
-
associated_menu_list_ids: reservationAssociatedMenuListIds,
|
|
769
767
|
reservationBiz: BIZ,
|
|
770
768
|
resourceSelectMode: resourceSelectMode
|
|
771
769
|
}),
|
|
@@ -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;
|
|
@@ -669,37 +669,57 @@ export function resolveBookingIdForHeader(raw) {
|
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
|
-
*
|
|
673
|
-
* `
|
|
672
|
+
* 预约详情弹窗:完全基于「这一条 booking raw」(`sales.getResourceBookingItem` 返回的元素,
|
|
673
|
+
* 与平面图传入的 `floorMapSourceBookings` 子项格式同源)构造 RoomCard 数据。
|
|
674
|
+
*
|
|
675
|
+
* 设计原则:
|
|
676
|
+
* - `bookings` 始终为 `[rawToBooking(raw, 0)]`,**不**再走 `mapPisellReservationRowToFloorRoomCardData`
|
|
677
|
+
* 里基于 `tableRow.cardStatus` / `floorMapSourceBookings` status 的判定,避免「completed /
|
|
678
|
+
* canceled / no_show 等非 occupied/reserved」状态导致 `bookings` 退化为空数组。
|
|
679
|
+
* - `status` 严格按 `raw.status`:`occupied` → `occupied`,其余(含 `reserved` / 历史完成 /
|
|
680
|
+
* 取消等)→ `reserved`,让小条始终展示,且历史记录以中性预约色呈现。
|
|
681
|
+
* - `sub_status` 由 booking 自身字段(`timeoutTime` / `lateTime` / `order_payment_status`)推导,
|
|
682
|
+
* 不依赖 `tableRow` 上派生过的 host 进度状态,与「完全依赖接口数据」一致。
|
|
683
|
+
* - `main_field` / `capacity` 取自 `tableRow`(桌位属性,raw 不一定带);视觉上 Modal 透传
|
|
684
|
+
* `hideHeader` / `hideHeaderCapacity`,二者主要参与数据完整性而非 header 渲染。
|
|
674
685
|
*/
|
|
675
686
|
export function buildDetailModalRoomCardData(raw, tableRow) {
|
|
676
|
-
var
|
|
677
|
-
var
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
687
|
+
var _raw$status, _ref13;
|
|
688
|
+
var cap = (tableRow === null || tableRow === void 0 ? void 0 : tableRow.capacityLabel) != null && String(tableRow.capacityLabel).trim() !== '' ? tableRow.capacityLabel : '—';
|
|
689
|
+
var stripTitle = resolveBookingStripIdForUi(raw).trim();
|
|
690
|
+
var main_field = stripTitle || (tableRow === null || tableRow === void 0 ? void 0 : tableRow.code) || '';
|
|
691
|
+
var booking = rawToBooking(raw, 0);
|
|
692
|
+
var rawStatus = String((_raw$status = raw.status) !== null && _raw$status !== void 0 ? _raw$status : '').trim().toLowerCase();
|
|
693
|
+
var status = rawStatus === 'occupied' ? 'occupied' : 'reserved';
|
|
694
|
+
var sub_status;
|
|
695
|
+
if (status === 'occupied') {
|
|
696
|
+
if (booking.timeoutTime != null && booking.timeoutTime > 0) {
|
|
697
|
+
sub_status = 'timeout';
|
|
698
|
+
} else if (booking.order_payment_status === 'unpaid') {
|
|
699
|
+
sub_status = 'payment_required';
|
|
700
|
+
} else {
|
|
701
|
+
sub_status = 'payed';
|
|
702
|
+
}
|
|
703
|
+
} else if (booking.lateTime != null && booking.lateTime > 0) {
|
|
704
|
+
sub_status = 'late';
|
|
705
|
+
} else {
|
|
706
|
+
sub_status = 'not_arrived';
|
|
707
|
+
}
|
|
708
|
+
var order = (_ref13 = raw.order) !== null && _ref13 !== void 0 ? _ref13 : {};
|
|
693
709
|
var orderDisplayNumber = order.shop_full_order_number != null && String(order.shop_full_order_number).trim() !== '' ? String(order.shop_full_order_number).trim() : '';
|
|
694
710
|
var summary = order.summary;
|
|
695
711
|
var currencySymbol = order.currency_symbol != null && String(order.currency_symbol).trim() !== '' ? String(order.currency_symbol).trim() : '$';
|
|
696
712
|
var totalAmount = (summary === null || summary === void 0 ? void 0 : summary.total_amount) != null && String(summary.total_amount).trim() !== '' ? String(summary.total_amount).trim() : '';
|
|
697
713
|
var inlineTotal = totalAmount ? "".concat(locales.getText('pisell-reservation.booking-detail.total'), ": ").concat(totalAmount.startsWith(currencySymbol) ? totalAmount : "".concat(currencySymbol).concat(totalAmount)) : '';
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
714
|
+
var finalBooking = _objectSpread(_objectSpread({}, booking), {}, {
|
|
715
|
+
items_summary_suffix: inlineTotal || booking.items_summary_suffix,
|
|
716
|
+
order_display_number: orderDisplayNumber || booking.order_display_number
|
|
717
|
+
});
|
|
718
|
+
return {
|
|
719
|
+
main_field: main_field,
|
|
720
|
+
capacity: cap,
|
|
721
|
+
status: status,
|
|
722
|
+
sub_status: sub_status,
|
|
723
|
+
bookings: [finalBooking]
|
|
724
|
+
};
|
|
705
725
|
}
|
|
@@ -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
|
/** 资源选择模式:点击资源时只把资源信息回传给调用方 */
|
|
@@ -11,8 +11,6 @@ import { resolveFloorMapHostCheckoutRecord } from "../floorMap/floorMapHostCheck
|
|
|
11
11
|
import { extractFloorMapSourceBookingForRow, findMergedTableRowForBookingRaw } from "../data/calendarAdapter";
|
|
12
12
|
import { extractResourceRecordIds } from "../data/bookingToReservationTables";
|
|
13
13
|
import { resolveFloorRoomCardContactTiers } from "../floorRoomCard/mapRowToFloorRoomCardData";
|
|
14
|
-
import { buildReservationTicketBookingCreateModeConfigForRow } from "../utils/reservationTicketBookingHostParams";
|
|
15
|
-
|
|
16
14
|
/**
|
|
17
15
|
* 与详情弹窗 {@link bookingDetailOrderStripFromRaw} 同源:`order.summary` 总价/应付、商品件数与顶层
|
|
18
16
|
* `products` 行数。仅改时间时不一定会触达 summary;加商品/改价会变更 summary 或 product 行。
|
|
@@ -100,8 +98,6 @@ export function useFloorMapBookingInteraction(options) {
|
|
|
100
98
|
onFloorMapBookingClick = options.onFloorMapBookingClick,
|
|
101
99
|
dataSources = options.dataSources,
|
|
102
100
|
mergedTableRows = options.mergedTableRows,
|
|
103
|
-
reservationRuleProduct = options.reservationRuleProduct,
|
|
104
|
-
associated_menu_list_ids = options.associated_menu_list_ids,
|
|
105
101
|
reservationBiz = options.reservationBiz,
|
|
106
102
|
resourceSelectMode = options.resourceSelectMode;
|
|
107
103
|
var _useState = useState(false),
|
|
@@ -182,7 +178,18 @@ export function useFloorMapBookingInteraction(options) {
|
|
|
182
178
|
var shopId = (_utils$getData = utils === null || utils === void 0 || (_utils$getData2 = utils.getData) === null || _utils$getData2 === void 0 ? void 0 : _utils$getData2.call(utils, 'shop_id')) !== null && _utils$getData !== void 0 ? _utils$getData : utils === null || utils === void 0 || (_utils$store = utils.store) === null || _utils$store === void 0 || (_utils$store$getState = _utils$store.getState) === null || _utils$store$getState === void 0 || (_utils$store$getState = _utils$store$getState.call(_utils$store)) === null || _utils$store$getState === void 0 || (_utils$store$getState = _utils$store$getState.global) === null || _utils$store$getState === void 0 || (_utils$store$getState = _utils$store$getState.globalConfig) === null || _utils$store$getState === void 0 ? void 0 : _utils$store$getState.id;
|
|
183
179
|
var n = Number(shopId);
|
|
184
180
|
var isLegacyCheckoutShop = Number.isFinite(n) && n === 2155;
|
|
185
|
-
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 空桌走详情 Modal 时 rec 是占位空对象,没有 id / booking_id;
|
|
184
|
+
* 旧店铺结账抽屉强依赖具体 booking,故空 rec 时跳过此分支,
|
|
185
|
+
* 直接进内置预约详情 Modal 看历史已完成 / 未付款记录。
|
|
186
|
+
*/
|
|
187
|
+
var recHasBooking = function () {
|
|
188
|
+
var rid = rec.id;
|
|
189
|
+
var bid = rec.booking_id;
|
|
190
|
+
return rid != null && String(rid).trim() !== '' || bid != null && String(bid).trim() !== '';
|
|
191
|
+
}();
|
|
192
|
+
if (isLegacyCheckoutShop && reservationBiz !== 'dine_in' && recHasBooking) {
|
|
186
193
|
var _utils$action;
|
|
187
194
|
utils === null || utils === void 0 || (_utils$action = utils.action) === null || _utils$action === void 0 || _utils$action.call(utils, {
|
|
188
195
|
type: 'pisell1.handleOpenHostCheckoutDrawer',
|
|
@@ -234,7 +241,10 @@ export function useFloorMapBookingInteraction(options) {
|
|
|
234
241
|
|
|
235
242
|
/**
|
|
236
243
|
* 空桌判定:rec 缺失、或 rec 上 id / booking_id 都为空。
|
|
237
|
-
*
|
|
244
|
+
* 空桌时不再直接打开新建预约 Modal,而是与有 booking 的情况一致打开预约详情
|
|
245
|
+
* Modal——「当前空桌」≠「历史空桌」,详情 Modal 内 `sales.getResourceBookingItem`
|
|
246
|
+
* 仍以 `tableRow` 解出的 resourceId 拉取已完成 / 未付款等历史数据;新建入口由
|
|
247
|
+
* Modal 自身的「新建」按钮承担。
|
|
238
248
|
*/
|
|
239
249
|
var hasValidBooking = function () {
|
|
240
250
|
if (!rec || _typeof(rec) !== 'object') return false;
|
|
@@ -242,40 +252,27 @@ export function useFloorMapBookingInteraction(options) {
|
|
|
242
252
|
var bid = rec.booking_id;
|
|
243
253
|
return rid != null && String(rid).trim() !== '' || bid != null && String(bid).trim() !== '';
|
|
244
254
|
}();
|
|
245
|
-
if (!hasValidBooking) {
|
|
246
|
-
var _engineCtx$appHelper2, _engineCtx$appHelper3;
|
|
247
|
-
if (!reservationRuleProduct) return;
|
|
248
|
-
if (!rowHit) return;
|
|
249
|
-
var createModeConfig = buildReservationTicketBookingCreateModeConfigForRow({
|
|
250
|
-
reservationBiz: reservationBiz,
|
|
251
|
-
associated_menu_list_ids: associated_menu_list_ids,
|
|
252
|
-
reservationRuleProduct: reservationRuleProduct,
|
|
253
|
-
row: rowHit
|
|
254
|
-
});
|
|
255
|
-
if (!createModeConfig) return;
|
|
256
|
-
engineCtx === null || engineCtx === void 0 || (_engineCtx$appHelper2 = engineCtx.appHelper) === null || _engineCtx$appHelper2 === void 0 || (_engineCtx$appHelper2 = _engineCtx$appHelper2.utils) === null || _engineCtx$appHelper2 === void 0 || (_engineCtx$appHelper3 = _engineCtx$appHelper2.action) === null || _engineCtx$appHelper3 === void 0 || _engineCtx$appHelper3.call(_engineCtx$appHelper2, {
|
|
257
|
-
type: 'pisell1.handleOpenEditBooking',
|
|
258
|
-
data: {
|
|
259
|
-
createModeConfig: createModeConfig
|
|
260
|
-
},
|
|
261
|
-
callback: function callback() {}
|
|
262
|
-
});
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
255
|
var rowResolved = rowHit !== null && rowHit !== void 0 ? rowHit : {
|
|
266
256
|
id: String((_args$item$_sceneElem4 = (_args$item$_sceneElem5 = args.item._sceneElement) === null || _args$item$_sceneElem5 === void 0 || (_args$item$_sceneElem5 = _args$item$_sceneElem5.dataBinding) === null || _args$item$_sceneElem5 === void 0 ? void 0 : _args$item$_sceneElem5.recordId) !== null && _args$item$_sceneElem4 !== void 0 ? _args$item$_sceneElem4 : 'unknown'),
|
|
267
257
|
code: ((_args$item$_sceneElem6 = args.item._sceneElement) === null || _args$item$_sceneElem6 === void 0 ? void 0 : _args$item$_sceneElem6.name) != null ? String(args.item._sceneElement.name) : '—',
|
|
268
258
|
cardStatus: 'available'
|
|
269
259
|
};
|
|
270
260
|
var sceneName = ((_args$item$_sceneElem7 = args.item._sceneElement) === null || _args$item$_sceneElem7 === void 0 ? void 0 : _args$item$_sceneElem7.name) != null ? String(args.item._sceneElement.name).trim() : undefined;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* 空桌时构造一个最小占位 rec:仅为绕过详情 Modal `raw == null` 的卫兵
|
|
264
|
+
* (`ReservationBookingDetailModal#canShow`、`useResourceBookingItem`),
|
|
265
|
+
* 不参与任何展示逻辑——三段子列表均来自 `sales.getResourceBookingItem`。
|
|
266
|
+
*/
|
|
267
|
+
var recForDetail = hasValidBooking ? rec : {};
|
|
271
268
|
showBookingDetail({
|
|
272
|
-
rec:
|
|
269
|
+
rec: recForDetail,
|
|
273
270
|
rowResolved: rowResolved,
|
|
274
271
|
event: args.event,
|
|
275
272
|
sceneElementName: sceneName,
|
|
276
273
|
floorMapItemId: String(args.item.id)
|
|
277
274
|
});
|
|
278
|
-
}, [showBookingDetail,
|
|
275
|
+
}, [showBookingDetail, resourceSelectMode]);
|
|
279
276
|
var openBookingDetailFromRaw = useCallback(function (payload) {
|
|
280
277
|
var _payload$row, _ref6, _ref7, _rec$relation_form_na;
|
|
281
278
|
var rec = payload.raw;
|