@pisell/private-materials 6.11.657 → 6.11.659
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.js +12 -12
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.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/useBigSaleProductListConfig.js +0 -1
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
- package/es/components/bigSale/hooks/useSyncBigSaleCartToCds.js +141 -75
- package/es/components/bigSale/index.js +1 -0
- package/es/components/bigSale/locales/index.js +15 -0
- package/es/components/bigSale/templates/Kiosk/index.js +1 -0
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
- package/es/index.js +2 -0
- 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/components/Client/hooks/useClientSelectorProps.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/index.js +51 -0
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/customerAuthGate.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 -1
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/components/bigSale/hooks/useSyncBigSaleCartToCds.js +143 -76
- package/lib/components/bigSale/locales/index.js +15 -0
- package/package.json +5 -5
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +0 -3
- 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
|
|
@@ -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 dayjs from "dayjs";
|
|
9
10
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -5,6 +5,7 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
5
5
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
8
|
+
import "../../plus/salesSdk/index.js";
|
|
8
9
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
9
10
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
10
11
|
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
|
/**
|
|
@@ -2,7 +2,6 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import { generateProductTabs, sortProductsByTabOrder } from "../../ticketBooking/components/ProductDisplayAdapter/utils.js";
|
|
4
4
|
import { ProductDisplayPresets } from "../../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
5
|
-
import "../../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
6
5
|
import { mergeBigSaleProductListPreferences } from "../utils/productListPreferences.js";
|
|
7
6
|
import { useMemo, useRef } from "react";
|
|
8
7
|
import isEqual from "lodash/isEqual";
|
|
@@ -3,6 +3,7 @@ import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
|
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 { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
7
8
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
8
9
|
import { buildReplacementBookingResourcesFromReservationRow } from "../../../plus/pisellReservation/utils/reservationTicketBookingHostParams.js";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
3
|
+
import { resolveLocalizedText } from "../../../plus/salesSdk/utils/resolveLocalizedText.js";
|
|
3
4
|
import { resolveFixedPaymentMethodName } from "../../../hooks/useFixedPaymentMethodNameMap.js";
|
|
4
5
|
import { getLineProductOptions, normalizeOptionForDisplay } from "../../../plus/salesSdk/utils/productSkuOptions.js";
|
|
5
6
|
import { resolveEffectiveSaleDetailAmountDue } from "../../../plus/saleDetail/utils.js";
|
|
6
7
|
import { formatBigSaleBookingTime } from "../utils/formatTime.js";
|
|
7
8
|
import { useEffect } from "react";
|
|
8
9
|
import { formatAmount, formatWeightValue, getWeightUnitSymbol, locales, resolveWeighingSnapshot } from "@pisell/utils";
|
|
10
|
+
import Decimal from "decimal.js";
|
|
9
11
|
//#region src/components/bigSale/hooks/useSyncBigSaleCartToCds.ts
|
|
10
12
|
const EMPTY_CART_UPDATE = {
|
|
11
13
|
total: "0",
|
|
@@ -33,13 +35,12 @@ const toFiniteNumber = (value, fallback = 0) => {
|
|
|
33
35
|
};
|
|
34
36
|
const callLocaleText = (key, ...args) => {
|
|
35
37
|
const text = locales.getText(key);
|
|
36
|
-
return typeof text === "function" ? text(...args) : text;
|
|
38
|
+
return resolveLocalizedText(typeof text === "function" ? text(...args) : text);
|
|
37
39
|
};
|
|
38
40
|
const postCartUpdateToCds = (utils, data) => {
|
|
39
41
|
var _utils$interaction;
|
|
40
42
|
const postMessageToApp = utils === null || utils === void 0 || (_utils$interaction = utils.interaction) === null || _utils$interaction === void 0 || (_utils$interaction = _utils$interaction.utils) === null || _utils$interaction === void 0 ? void 0 : _utils$interaction.postMessageToApp;
|
|
41
43
|
if (typeof postMessageToApp !== "function") return;
|
|
42
|
-
console.log("postCartUpdateToCds data", data);
|
|
43
44
|
try {
|
|
44
45
|
postMessageToApp({
|
|
45
46
|
module: "cds",
|
|
@@ -158,107 +159,148 @@ const getProductFormatMessage = (cartLine, params) => {
|
|
|
158
159
|
appendBundleMessages(lines, product, currencySymbol);
|
|
159
160
|
return lines.length ? `${lines.join("\n")}\n` : "";
|
|
160
161
|
};
|
|
161
|
-
const collectDiscountFees = (product) => {
|
|
162
|
-
const discountList = toArray(product === null || product === void 0 ? void 0 : product.discount_list);
|
|
163
|
-
if (!discountList.length) return [];
|
|
164
|
-
return discountList.map((discount) => {
|
|
165
|
-
var _discount$discount;
|
|
166
|
-
return {
|
|
167
|
-
isReduce: (discount === null || discount === void 0 ? void 0 : discount.type) === "good_pass",
|
|
168
|
-
title: (discount === null || discount === void 0 || (_discount$discount = discount.discount) === null || _discount$discount === void 0 ? void 0 : _discount$discount.title) || "",
|
|
169
|
-
price: discount === null || discount === void 0 ? void 0 : discount.amount,
|
|
170
|
-
type: discount === null || discount === void 0 ? void 0 : discount.type
|
|
171
|
-
};
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
162
|
const isPendingWalletPayment = (payment) => {
|
|
175
163
|
const voucherId = payment === null || payment === void 0 ? void 0 : payment.voucher_id;
|
|
176
164
|
return (payment === null || payment === void 0 ? void 0 : payment.status) === "payment_pending" && voucherId !== void 0 && voucherId !== null && voucherId !== "" && Number(voucherId) !== 0;
|
|
177
165
|
};
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
166
|
+
const ORDER_PASS_TYPES = new Set(["good_pass", ...new Set(["discount_card", "product_discount_card"])]);
|
|
167
|
+
const WALLET_PAYMENT_CODES = new Set([
|
|
168
|
+
"PRODUCTVOUCHER",
|
|
169
|
+
"POINTCARD",
|
|
170
|
+
"GIFTCARD"
|
|
171
|
+
]);
|
|
172
|
+
const collectItemDiscountFees = (products) => {
|
|
173
|
+
const amount = products.reduce((total, product) => {
|
|
174
|
+
return toArray(product === null || product === void 0 ? void 0 : product.discount_list).filter((discount) => String((discount === null || discount === void 0 ? void 0 : discount.type) || "").toLowerCase() === "product").reduce((productTotal, discount) => productTotal.plus(toFiniteNumber(discount === null || discount === void 0 ? void 0 : discount.amount)), total);
|
|
175
|
+
}, new Decimal(0));
|
|
176
|
+
if (!amount.gt(0)) return [];
|
|
177
|
+
return [{
|
|
178
|
+
isReduce: true,
|
|
179
|
+
title: callLocaleText("pisell2.big-sale.item-discount"),
|
|
180
|
+
price: amount.toNumber(),
|
|
181
|
+
type: "item_discount"
|
|
182
|
+
}];
|
|
195
183
|
};
|
|
196
|
-
const
|
|
197
|
-
|
|
184
|
+
const collectSurchargeFees = (summary) => {
|
|
185
|
+
const surchargeFees = toArray(summary === null || summary === void 0 ? void 0 : summary.surcharges).filter((surcharge) => toFiniteNumber(surcharge === null || surcharge === void 0 ? void 0 : surcharge.amount) > 0).map((surcharge) => ({
|
|
186
|
+
isReduce: false,
|
|
187
|
+
title: resolveLocalizedText(surcharge === null || surcharge === void 0 ? void 0 : surcharge.name) || callLocaleText("pisell2.sale-detail.surcharge"),
|
|
188
|
+
price: surcharge.amount,
|
|
189
|
+
type: "surcharge"
|
|
190
|
+
}));
|
|
191
|
+
if (surchargeFees.length) return surchargeFees;
|
|
192
|
+
if (toFiniteNumber(summary === null || summary === void 0 ? void 0 : summary.surcharge_fee) <= 0) return [];
|
|
193
|
+
return [{
|
|
194
|
+
isReduce: false,
|
|
195
|
+
title: callLocaleText("pisell2.sale-detail.surcharge"),
|
|
196
|
+
price: summary.surcharge_fee,
|
|
197
|
+
type: "surcharge"
|
|
198
|
+
}];
|
|
198
199
|
};
|
|
199
|
-
const
|
|
200
|
-
return toArray(
|
|
201
|
-
|
|
200
|
+
const collectOrderPassFees = (orderDiscounts) => {
|
|
201
|
+
return toArray(orderDiscounts).filter((discount) => {
|
|
202
|
+
const type = String((discount === null || discount === void 0 ? void 0 : discount.tag) || (discount === null || discount === void 0 ? void 0 : discount.type) || "").toLowerCase();
|
|
203
|
+
return ORDER_PASS_TYPES.has(type) && toFiniteNumber(discount === null || discount === void 0 ? void 0 : discount.savedAmount) > 0;
|
|
204
|
+
}).map((discount) => {
|
|
205
|
+
const type = String((discount === null || discount === void 0 ? void 0 : discount.tag) || (discount === null || discount === void 0 ? void 0 : discount.type) || "").toLowerCase();
|
|
206
|
+
return {
|
|
207
|
+
isReduce: true,
|
|
208
|
+
title: resolveLocalizedText(discount === null || discount === void 0 ? void 0 : discount.format_title),
|
|
209
|
+
price: discount === null || discount === void 0 ? void 0 : discount.savedAmount,
|
|
210
|
+
type: type === "good_pass" ? "good_pass" : "discount_card"
|
|
211
|
+
};
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
const collectWalletPaymentFees = (payments, locale) => {
|
|
215
|
+
return toArray(payments).filter((payment) => {
|
|
202
216
|
const code = String((payment === null || payment === void 0 ? void 0 : payment.code) || "").toUpperCase();
|
|
203
|
-
|
|
204
|
-
|
|
217
|
+
return isPendingWalletPayment(payment) && WALLET_PAYMENT_CODES.has(code);
|
|
218
|
+
}).map((payment) => {
|
|
219
|
+
var _payment$fund_record;
|
|
220
|
+
const methodName = resolveFixedPaymentMethodName(String((payment === null || payment === void 0 ? void 0 : payment.code) || "").toUpperCase(), locale);
|
|
221
|
+
const walletPassName = resolveLocalizedText(payment === null || payment === void 0 || (_payment$fund_record = payment.fund_record) === null || _payment$fund_record === void 0 ? void 0 : _payment$fund_record.wallet_pass_name);
|
|
222
|
+
const price = new Decimal(toFiniteNumber(payment === null || payment === void 0 ? void 0 : payment.amount)).plus(toFiniteNumber(payment === null || payment === void 0 ? void 0 : payment.rounding_amount)).toFixed(2);
|
|
205
223
|
return {
|
|
224
|
+
isReduce: true,
|
|
206
225
|
title: walletPassName || methodName,
|
|
207
|
-
price
|
|
226
|
+
price,
|
|
208
227
|
type: "wallet_payment",
|
|
209
|
-
isReduce: true,
|
|
210
228
|
message: walletPassName && methodName && walletPassName !== methodName ? methodName : void 0
|
|
211
229
|
};
|
|
212
230
|
});
|
|
213
231
|
};
|
|
214
232
|
const buildCdsProductPayload = (cartLine, params) => {
|
|
215
|
-
var _product$
|
|
233
|
+
var _product$num, _note;
|
|
216
234
|
const { line, product } = cartLine;
|
|
217
235
|
const productFormatMessage = getProductFormatMessage(cartLine, params);
|
|
236
|
+
const price = toFiniteNumber(product === null || product === void 0 ? void 0 : product.selling_price);
|
|
237
|
+
const originalPrice = toFiniteNumber(product === null || product === void 0 ? void 0 : product.original_price, price);
|
|
218
238
|
const payload = {
|
|
219
239
|
productID: product === null || product === void 0 ? void 0 : product.product_id,
|
|
220
|
-
title: (product === null || product === void 0 ? void 0 : product.title)
|
|
240
|
+
title: resolveLocalizedText(product === null || product === void 0 ? void 0 : product.title),
|
|
221
241
|
cover: product === null || product === void 0 ? void 0 : product.cover,
|
|
222
|
-
price
|
|
242
|
+
price,
|
|
223
243
|
buyCount: (_product$num = product === null || product === void 0 ? void 0 : product.num) !== null && _product$num !== void 0 ? _product$num : 0,
|
|
224
244
|
productFormatMessage,
|
|
225
245
|
note: (_note = line === null || line === void 0 ? void 0 : line.note) !== null && _note !== void 0 ? _note : product === null || product === void 0 ? void 0 : product.note,
|
|
226
246
|
isWeightProduct: resolveWeighingSnapshot(product) ? 1 : 0
|
|
227
247
|
};
|
|
228
|
-
if (
|
|
229
|
-
var _product$original_pri;
|
|
230
|
-
payload.modifyPrice = Number((_product$original_pri = product === null || product === void 0 ? void 0 : product.original_price) !== null && _product$original_pri !== void 0 ? _product$original_pri : 0);
|
|
231
|
-
}
|
|
248
|
+
if (originalPrice !== price) payload.modifyPrice = originalPrice;
|
|
232
249
|
return payload;
|
|
233
250
|
};
|
|
234
251
|
const buildCartUpdatePayload = (context, params) => {
|
|
235
|
-
var _context$summary, _context$sales,
|
|
252
|
+
var _context$summary, _context$sales, _context$sales2, _bookingTicket$getOrd, _amountSnapshot$summa, _bookingTicket$getTem, _summary$product_orig, _context$cart, _ref, _amountSnapshot$total, _amountSnapshot$summa2, _amountSnapshot$summa3;
|
|
236
253
|
const cartLines = getCartProductLines(context === null || context === void 0 ? void 0 : context.cart);
|
|
237
254
|
if (!cartLines.length) return _objectSpread2({ currency_symbol: params.currencySymbol }, EMPTY_CART_UPDATE);
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
const summary = (
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
255
|
+
const products = cartLines.map((cartLine) => buildCdsProductPayload(cartLine, params));
|
|
256
|
+
const contextSummary = (_context$summary = context.summary) === null || _context$summary === void 0 ? void 0 : _context$summary.summary;
|
|
257
|
+
const tempOrder = (_context$sales = context.sales) === null || _context$sales === void 0 ? void 0 : _context$sales.tempOrder;
|
|
258
|
+
const bookingTicket = (_context$sales2 = context.sales) === null || _context$sales2 === void 0 ? void 0 : _context$sales2.bookingTicket;
|
|
259
|
+
const amountSnapshot = bookingTicket === null || bookingTicket === void 0 || (_bookingTicket$getOrd = bookingTicket.getOrderAmountSnapshot) === null || _bookingTicket$getOrd === void 0 ? void 0 : _bookingTicket$getOrd.call(bookingTicket);
|
|
260
|
+
const summary = (_amountSnapshot$summa = amountSnapshot === null || amountSnapshot === void 0 ? void 0 : amountSnapshot.summary) !== null && _amountSnapshot$summa !== void 0 ? _amountSnapshot$summa : contextSummary;
|
|
261
|
+
const currentTempOrder = (bookingTicket === null || bookingTicket === void 0 || (_bookingTicket$getTem = bookingTicket.getTempOrder) === null || _bookingTicket$getTem === void 0 ? void 0 : _bookingTicket$getTem.call(bookingTicket)) || tempOrder;
|
|
262
|
+
const payments = currentTempOrder === null || currentTempOrder === void 0 ? void 0 : currentTempOrder.payments;
|
|
263
|
+
const isTaxIncluded = Number(tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.is_price_include_tax) === 1;
|
|
264
|
+
const cartProducts = cartLines.map((cartLine) => cartLine.product);
|
|
265
|
+
const fees = [
|
|
266
|
+
{
|
|
267
|
+
title: callLocaleText("pisell2.big-sale.subtotal"),
|
|
268
|
+
price: (_summary$product_orig = summary === null || summary === void 0 ? void 0 : summary.product_original_amount) !== null && _summary$product_orig !== void 0 ? _summary$product_orig : "0",
|
|
269
|
+
type: "subtotal",
|
|
270
|
+
message: callLocaleText("pisell2.big-sale.cart-items", products.length)
|
|
271
|
+
},
|
|
272
|
+
...collectItemDiscountFees(cartProducts),
|
|
273
|
+
...collectSurchargeFees(summary)
|
|
274
|
+
];
|
|
275
|
+
if (toFiniteNumber(summary === null || summary === void 0 ? void 0 : summary.tax_fee) > 0) {
|
|
276
|
+
const taxTitle = resolveLocalizedText(summary === null || summary === void 0 ? void 0 : summary.tax_title) || callLocaleText("pisell2.sale-detail.tax");
|
|
277
|
+
const taxIncludedTitle = callLocaleText(isTaxIncluded ? "pisell2.big-sale.tax-included" : "pisell2.big-sale.tax-not-included");
|
|
278
|
+
fees.push({
|
|
279
|
+
isReduce: false,
|
|
280
|
+
title: `${taxTitle} (${taxIncludedTitle})`,
|
|
281
|
+
price: summary === null || summary === void 0 ? void 0 : summary.tax_fee,
|
|
282
|
+
type: "tax"
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
const cartOrderPassFees = collectOrderPassFees(context === null || context === void 0 || (_context$cart = context.cart) === null || _context$cart === void 0 ? void 0 : _context$cart.discountList);
|
|
286
|
+
fees.push(...cartOrderPassFees.length ? cartOrderPassFees : collectOrderPassFees(tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.discount_list));
|
|
287
|
+
if (toFiniteNumber(tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.shop_discount) > 0) fees.push({
|
|
288
|
+
isReduce: true,
|
|
289
|
+
title: callLocaleText("pisell2.sale-detail.manual-order-adjustment"),
|
|
290
|
+
price: tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.shop_discount,
|
|
291
|
+
type: "order_discount"
|
|
252
292
|
});
|
|
253
|
-
|
|
293
|
+
fees.push(...collectWalletPaymentFees(payments, params.locale));
|
|
294
|
+
const effectiveAmountDue = resolveEffectiveSaleDetailAmountDue({
|
|
295
|
+
baseSalesAmountGap: amountSnapshot === null || amountSnapshot === void 0 ? void 0 : amountSnapshot.amountGap,
|
|
254
296
|
amountGap: summary === null || summary === void 0 ? void 0 : summary.amount_gap,
|
|
255
|
-
fallbackAmount: (
|
|
256
|
-
orderPaidAmount: summary === null || summary === void 0 ? void 0 : summary.order_paid_amount,
|
|
297
|
+
fallbackAmount: (_ref = (_amountSnapshot$total = amountSnapshot === null || amountSnapshot === void 0 ? void 0 : amountSnapshot.totalAmount) !== null && _amountSnapshot$total !== void 0 ? _amountSnapshot$total : summary === null || summary === void 0 ? void 0 : summary.total_amount) !== null && _ref !== void 0 ? _ref : summary === null || summary === void 0 ? void 0 : summary.expect_amount,
|
|
298
|
+
orderPaidAmount: (_amountSnapshot$summa2 = amountSnapshot === null || amountSnapshot === void 0 || (_amountSnapshot$summa3 = amountSnapshot.summary) === null || _amountSnapshot$summa3 === void 0 ? void 0 : _amountSnapshot$summa3.order_paid_amount) !== null && _amountSnapshot$summa2 !== void 0 ? _amountSnapshot$summa2 : summary === null || summary === void 0 ? void 0 : summary.order_paid_amount,
|
|
257
299
|
payments
|
|
258
|
-
})
|
|
300
|
+
});
|
|
259
301
|
return {
|
|
260
302
|
currency_symbol: params.currencySymbol,
|
|
261
|
-
total: effectiveAmountDue
|
|
303
|
+
total: effectiveAmountDue.toFixed(2),
|
|
262
304
|
products,
|
|
263
305
|
fees
|
|
264
306
|
};
|
|
@@ -267,7 +309,7 @@ const buildCartUpdatePayload = (context, params) => {
|
|
|
267
309
|
* Standard 大促模板购物车变更时,向 Native CDS 同步购物车快照。
|
|
268
310
|
*/
|
|
269
311
|
function useSyncBigSaleCartToCds(context, options = {}) {
|
|
270
|
-
var _context$
|
|
312
|
+
var _context$cart2, _context$cart3, _context$cart4, _context$cart5, _context$summary2, _context$sales3, _context$sales4, _context$sales5, _context$sales7;
|
|
271
313
|
const engineContext = useEngineContext();
|
|
272
314
|
const { enabled = true } = options;
|
|
273
315
|
useEffect(() => {
|
|
@@ -280,13 +322,37 @@ function useSyncBigSaleCartToCds(context, options = {}) {
|
|
|
280
322
|
locale
|
|
281
323
|
}));
|
|
282
324
|
}, [
|
|
283
|
-
context === null || context === void 0 || (_context$
|
|
284
|
-
context === null || context === void 0 || (_context$
|
|
285
|
-
context === null || context === void 0 || (_context$
|
|
325
|
+
context === null || context === void 0 || (_context$cart2 = context.cart) === null || _context$cart2 === void 0 ? void 0 : _context$cart2.bookings,
|
|
326
|
+
context === null || context === void 0 || (_context$cart3 = context.cart) === null || _context$cart3 === void 0 ? void 0 : _context$cart3.discountList,
|
|
327
|
+
context === null || context === void 0 || (_context$cart4 = context.cart) === null || _context$cart4 === void 0 ? void 0 : _context$cart4.displayLines,
|
|
328
|
+
context === null || context === void 0 || (_context$cart5 = context.cart) === null || _context$cart5 === void 0 ? void 0 : _context$cart5.items,
|
|
286
329
|
context === null || context === void 0 || (_context$summary2 = context.summary) === null || _context$summary2 === void 0 ? void 0 : _context$summary2.summary,
|
|
287
|
-
context === null || context === void 0 || (_context$
|
|
288
|
-
context === null || context === void 0 || (_context$
|
|
289
|
-
context === null || context === void 0 || (_context$
|
|
330
|
+
context === null || context === void 0 || (_context$sales3 = context.sales) === null || _context$sales3 === void 0 ? void 0 : _context$sales3.tempOrder,
|
|
331
|
+
context === null || context === void 0 || (_context$sales4 = context.sales) === null || _context$sales4 === void 0 || (_context$sales4 = _context$sales4.tempOrder) === null || _context$sales4 === void 0 ? void 0 : _context$sales4.payments,
|
|
332
|
+
context === null || context === void 0 || (_context$sales5 = context.sales) === null || _context$sales5 === void 0 ? void 0 : _context$sales5.bookingTicket,
|
|
333
|
+
engineContext,
|
|
334
|
+
enabled
|
|
335
|
+
]);
|
|
336
|
+
useEffect(() => {
|
|
337
|
+
var _context$sales6, _engineContext$appHel2;
|
|
338
|
+
if (!enabled) return void 0;
|
|
339
|
+
const bookingTicket = context === null || context === void 0 || (_context$sales6 = context.sales) === null || _context$sales6 === void 0 ? void 0 : _context$sales6.bookingTicket;
|
|
340
|
+
if (!bookingTicket || typeof bookingTicket.effectsOn !== "function") return;
|
|
341
|
+
const utils = (engineContext === null || engineContext === void 0 || (_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 ? void 0 : _engineContext$appHel2.utils) || {};
|
|
342
|
+
const off = bookingTicket.effectsOn("onTempOrderReplaced", () => {
|
|
343
|
+
var _bookingTicket$getTem2;
|
|
344
|
+
const tempOrder = (_bookingTicket$getTem2 = bookingTicket.getTempOrder) === null || _bookingTicket$getTem2 === void 0 ? void 0 : _bookingTicket$getTem2.call(bookingTicket);
|
|
345
|
+
if (!tempOrder) return;
|
|
346
|
+
if (toArray(tempOrder.products).length > 0 || toArray(tempOrder.bookings).length > 0) return;
|
|
347
|
+
postCartUpdateToCds(utils, _objectSpread2({ currency_symbol: getCurrencySymbol(utils) }, EMPTY_CART_UPDATE));
|
|
348
|
+
});
|
|
349
|
+
return () => {
|
|
350
|
+
try {
|
|
351
|
+
off();
|
|
352
|
+
} catch (_unused) {}
|
|
353
|
+
};
|
|
354
|
+
}, [
|
|
355
|
+
context === null || context === void 0 || (_context$sales7 = context.sales) === null || _context$sales7 === void 0 ? void 0 : _context$sales7.bookingTicket,
|
|
290
356
|
engineContext,
|
|
291
357
|
enabled
|
|
292
358
|
]);
|
|
@@ -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 dayjs from "dayjs";
|
|
@@ -75,6 +75,9 @@ var locales_default = {
|
|
|
75
75
|
"pisell2.big-sale.action.checkout-cart": "Checkout",
|
|
76
76
|
"pisell2.big-sale.cart-items": (number) => `${number}items`,
|
|
77
77
|
"pisell2.big-sale.subtotal": "Subtotal",
|
|
78
|
+
"pisell2.big-sale.item-discount": "Item discount",
|
|
79
|
+
"pisell2.big-sale.tax-included": "Included",
|
|
80
|
+
"pisell2.big-sale.tax-not-included": "Not included",
|
|
78
81
|
"pisell2.big-sale.hour-minute": (hour, minute) => {
|
|
79
82
|
if (hour <= 0 && minute <= 0) return `0min`;
|
|
80
83
|
return `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`;
|
|
@@ -181,6 +184,9 @@ var locales_default = {
|
|
|
181
184
|
"pisell2.big-sale.action.checkout-cart": "结账",
|
|
182
185
|
"pisell2.big-sale.cart-items": (number) => `${number}件商品`,
|
|
183
186
|
"pisell2.big-sale.subtotal": "小计",
|
|
187
|
+
"pisell2.big-sale.item-discount": "商品折扣",
|
|
188
|
+
"pisell2.big-sale.tax-included": "已包含",
|
|
189
|
+
"pisell2.big-sale.tax-not-included": "未包含",
|
|
184
190
|
"pisell2.big-sale.hour-minute": (hour, minute) => {
|
|
185
191
|
if (hour <= 0 && minute <= 0) return `0分钟`;
|
|
186
192
|
return `${hour > 0 ? `${hour}小时` : ""}${minute > 0 ? `${minute}分钟` : ""}`;
|
|
@@ -287,6 +293,9 @@ var locales_default = {
|
|
|
287
293
|
"pisell2.big-sale.action.checkout-cart": "結賬",
|
|
288
294
|
"pisell2.big-sale.cart-items": (number) => `${number}件商品`,
|
|
289
295
|
"pisell2.big-sale.subtotal": "小計",
|
|
296
|
+
"pisell2.big-sale.item-discount": "商品折扣",
|
|
297
|
+
"pisell2.big-sale.tax-included": "已包含",
|
|
298
|
+
"pisell2.big-sale.tax-not-included": "未包含",
|
|
290
299
|
"pisell2.big-sale.hour-minute": (hour, minute) => {
|
|
291
300
|
if (hour <= 0 && minute <= 0) return `0分鐘`;
|
|
292
301
|
return `${hour > 0 ? `${hour}小時` : ""}${minute > 0 ? `${minute}分鐘` : ""}`;
|
|
@@ -393,6 +402,9 @@ var locales_default = {
|
|
|
393
402
|
"pisell2.big-sale.action.checkout-cart": "チェックアウト",
|
|
394
403
|
"pisell2.big-sale.cart-items": (number) => `${number}件`,
|
|
395
404
|
"pisell2.big-sale.subtotal": "小計",
|
|
405
|
+
"pisell2.big-sale.item-discount": "商品割引",
|
|
406
|
+
"pisell2.big-sale.tax-included": "税込み",
|
|
407
|
+
"pisell2.big-sale.tax-not-included": "税別",
|
|
396
408
|
"pisell2.big-sale.hour-minute": (hour, minute) => {
|
|
397
409
|
if (hour <= 0 && minute <= 0) return `0分`;
|
|
398
410
|
return `${hour > 0 ? `${hour}時間` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}分` : ""}`;
|
|
@@ -499,6 +511,9 @@ var locales_default = {
|
|
|
499
511
|
"pisell2.big-sale.action.checkout-cart": "Checkout",
|
|
500
512
|
"pisell2.big-sale.cart-items": (number) => `${number}itens`,
|
|
501
513
|
"pisell2.big-sale.subtotal": "Subtotal",
|
|
514
|
+
"pisell2.big-sale.item-discount": "Desconto de item",
|
|
515
|
+
"pisell2.big-sale.tax-included": "Incluído",
|
|
516
|
+
"pisell2.big-sale.tax-not-included": "Não incluído",
|
|
502
517
|
"pisell2.big-sale.hour-minute": (hour, minute) => {
|
|
503
518
|
if (hour <= 0 && minute <= 0) return `0min`;
|
|
504
519
|
return `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`;
|
|
@@ -6,6 +6,7 @@ import useSalesUserLogin, { isRequireLoginChannel } from "../../../../hooks/useS
|
|
|
6
6
|
import { resolvePaymentResultToastV2ViewModel } from "../../../checkout/components/PaymentResultToastV2/resolve.js";
|
|
7
7
|
import PaymentResultToastV2_default from "../../../checkout/components/PaymentResultToastV2/index.js";
|
|
8
8
|
import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
9
|
+
import "../../../../plus/salesSdk/index.js";
|
|
9
10
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
10
11
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
11
12
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -2,6 +2,7 @@ import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import useEngineContext from "../../hooks/useEngineContext.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
|
|
@@ -19,7 +19,6 @@ import { useProducts } from "../../hooks/pisellos/useProducts.js";
|
|
|
19
19
|
import { useService } from "../../../booking/info/service/serviceManager/index.js";
|
|
20
20
|
import ProductDisplayAdapter_default from "../ProductDisplayAdapter/ProductDisplayAdapter.js";
|
|
21
21
|
import { resolveProductDisplayConfig } from "../ProductDisplayAdapter/types.js";
|
|
22
|
-
import "../ProductDisplayAdapter/index.js";
|
|
23
22
|
import notAvailable_default from "../notAvailable/index.js";
|
|
24
23
|
import MultiDayTimeSelectModal from "./MultiDayTimeSelectModal.js";
|
|
25
24
|
import dayjs from "dayjs";
|
package/es/index.js
CHANGED
|
@@ -85,6 +85,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
85
85
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
86
86
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
87
87
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
88
|
+
import "./plus/salesSdk/index.js";
|
|
88
89
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
89
90
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
90
91
|
import BigSale from "./components/bigSale/index.js";
|
|
@@ -137,6 +138,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
137
138
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
138
139
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
139
140
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
141
|
+
import "./plus/pisellReservation/index.js";
|
|
140
142
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
141
143
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
142
144
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -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 {};
|
|
@@ -11,6 +11,7 @@ import { useSalesSdkCart } from "../salesSdk/hooks/useSalesSdkCart.js";
|
|
|
11
11
|
import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
|
|
12
12
|
import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
13
13
|
import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
|
|
14
|
+
import "../salesSdk/index.js";
|
|
14
15
|
import locales_default from "./locales.js";
|
|
15
16
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
16
17
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import useEngineContext from "../../../../../hooks/useEngineContext.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
|
|
@@ -9,6 +9,7 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
|
9
9
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
10
10
|
import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
11
11
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
12
|
+
import "../../../salesSdk/index.js";
|
|
12
13
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
13
14
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
14
15
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -3,6 +3,7 @@ import { resolvePaymentMethodName, usePaymentMethodNameMap } from "../../../pise
|
|
|
3
3
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
|
+
import "../../../salesSdk/index.js";
|
|
6
7
|
import React, { memo, useMemo } from "react";
|
|
7
8
|
import { formatAmount, locales } from "@pisell/utils";
|
|
8
9
|
import Decimal from "decimal.js";
|
|
@@ -4,6 +4,7 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
|
|
|
4
4
|
import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
|
|
5
5
|
import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
|
|
6
6
|
import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
7
|
+
import "../salesSdk/index.js";
|
|
7
8
|
import Base_default from "./Base.js";
|
|
8
9
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
9
10
|
//#region src/plus/saleDetail/index.tsx
|
|
@@ -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 { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import useEngineContext from "../../../../hooks/useEngineContext.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";
|