@pisell/private-materials 6.12.221 → 6.12.222
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 +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
- package/es/components/bigSale/components/TimeBar/index.js +0 -1
- package/es/components/bigSale/dialog.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +0 -1
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/index.js +0 -2
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- package/es/plus/piPaymentOld/ui/eftpos/amount.js +6 -3
- package/es/plus/piPaymentOld/ui/eftpos/pages/DevicePage.js +9 -21
- package/es/plus/piPaymentUI/eftpos/amount.js +6 -3
- package/es/plus/piPaymentUI/eftpos/pages/DevicePage.js +9 -21
- 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/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
- package/es/plus/saleDetail/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/index.js +0 -1
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/plus/piPaymentOld/ui/eftpos/amount.js +6 -2
- package/lib/plus/piPaymentOld/ui/eftpos/pages/DevicePage.js +9 -22
- package/lib/plus/piPaymentUI/eftpos/amount.js +6 -2
- package/lib/plus/piPaymentUI/eftpos/pages/DevicePage.js +9 -22
- package/package.json +1 -1
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -53
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
-
import "../../../../plus/salesSdk/index.js";
|
|
4
3
|
import dayjs from "dayjs";
|
|
5
4
|
import { useCallback, useEffect, useState } from "react";
|
|
6
5
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import locales_default from "../../locales/index.js";
|
|
9
8
|
import dayjs from "dayjs";
|
|
10
9
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
10
9
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
11
10
|
import BigSale from "./index.js";
|
|
@@ -4,7 +4,6 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
|
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
6
|
import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
|
|
7
|
-
import "../../../plus/salesSdk/index.js";
|
|
8
7
|
import { useMemo } from "react";
|
|
9
8
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
10
9
|
/**
|
|
@@ -3,7 +3,6 @@ import 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";
|
|
7
6
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
7
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
9
8
|
import { buildReplacementBookingResourcesFromReservationRow } from "../../../plus/pisellReservation/utils/reservationTicketBookingHostParams.js";
|
|
@@ -8,7 +8,6 @@ import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
|
8
8
|
import { useSalesSdkCustomer } from "../../plus/salesSdk/hooks/useSalesSdkCustomer.js";
|
|
9
9
|
import { SalesSdkProvider } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
10
10
|
import { SalesSdkBookingContextProvider } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
11
|
-
import "../../plus/salesSdk/index.js";
|
|
12
11
|
import { ResponsiveBigSaleBase } from "./Base.js";
|
|
13
12
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
14
13
|
import { isKioskPresentation } from "./templateCapabilities.js";
|
|
@@ -10,7 +10,6 @@ import PaymentResultToastV2_default from "../../../checkout/components/PaymentRe
|
|
|
10
10
|
import { freePayApi } from "../../../Sales/Checkout/serve.js";
|
|
11
11
|
import { collectUnassignedHolderLines } from "../../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
12
12
|
import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
13
|
-
import "../../../../plus/salesSdk/index.js";
|
|
14
13
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
15
14
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
16
15
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { useEffect, useRef } from "react";
|
|
7
6
|
import { useMemoizedFn } from "ahooks";
|
|
8
7
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
package/es/index.js
CHANGED
|
@@ -86,7 +86,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
86
86
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
87
87
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
88
88
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
89
|
-
import "./plus/salesSdk/index.js";
|
|
90
89
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
91
90
|
import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
|
|
92
91
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
@@ -140,7 +139,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
140
139
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
141
140
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
142
141
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
143
|
-
import "./plus/pisellReservation/index.js";
|
|
144
142
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
145
143
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
146
144
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct,
|
|
283
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
@@ -15,8 +15,11 @@ const decimal = (value) => {
|
|
|
15
15
|
const readerSurcharge = (reader) => {
|
|
16
16
|
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
17
17
|
const setting = (reader === null || reader === void 0 ? void 0 : reader.setting) || {};
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* useOriginSurcharge 表示由卡机收取原始手续费;surcharge=false 表示商户已关闭
|
|
20
|
+
* Pisell 手续费。两种场景都不得继续使用 Reader 中可能残留的历史费率。
|
|
21
|
+
*/
|
|
22
|
+
if (setting.useOriginSurcharge || setting.surcharge === false) return {
|
|
20
23
|
rate: 0,
|
|
21
24
|
fixed: 0
|
|
22
25
|
};
|
|
@@ -61,4 +64,4 @@ const updateEftposDraftAmount = (draft, input) => {
|
|
|
61
64
|
});
|
|
62
65
|
};
|
|
63
66
|
//#endregion
|
|
64
|
-
export { updateEftposDraftAmount };
|
|
67
|
+
export { buildPaymentAmountQuote, updateEftposDraftAmount };
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { EftposProvider, PaymentMode } from "../contracts/index.js";
|
|
2
|
+
import { buildPaymentAmountQuote } from "../amount.js";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { locales } from "@pisell/utils";
|
|
4
|
-
import Decimal from "decimal.js";
|
|
5
5
|
import ChevronRight from "@pisell/icon/es/ChevronRight";
|
|
6
6
|
//#region src/plus/piPaymentOld/ui/eftpos/pages/DevicePage.tsx
|
|
7
|
-
/** 转成 Decimal。 */
|
|
8
|
-
const toDecimal = (value) => {
|
|
9
|
-
try {
|
|
10
|
-
return new Decimal(value === void 0 || value === null || value === "" ? 0 : value);
|
|
11
|
-
} catch (_error) {
|
|
12
|
-
return new Decimal(0);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
7
|
/** 从 reader setting 计算设备列表展示金额。 */
|
|
16
8
|
const resolveReaderPay = (reader, options) => {
|
|
17
|
-
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
18
9
|
/** pay/setting 均来自不同版本后端,读取时需要保持兼容。 */
|
|
19
10
|
const pay = reader.pay;
|
|
20
|
-
|
|
11
|
+
const setting = reader.setting || {};
|
|
12
|
+
if (pay && !setting.useOriginSurcharge && setting.surcharge !== false) {
|
|
21
13
|
var _pay$surRate, _pay$surMoney, _pay$surcharge;
|
|
22
14
|
return {
|
|
23
15
|
totalUnit: String(pay.totalUnit || pay.total || ""),
|
|
@@ -26,17 +18,13 @@ const resolveReaderPay = (reader, options) => {
|
|
|
26
18
|
surcharge: String((_pay$surcharge = pay.surcharge) !== null && _pay$surcharge !== void 0 ? _pay$surcharge : "")
|
|
27
19
|
};
|
|
28
20
|
}
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const rate = setting.useOriginSurcharge ? new Decimal(0) : toDecimal((_ref = (_ref2 = (_ref3 = (_setting$surcharge_ra = setting.surcharge_rate) !== null && _setting$surcharge_ra !== void 0 ? _setting$surcharge_ra : setting.surRate) !== null && _ref3 !== void 0 ? _ref3 : setting.constant_rate) !== null && _ref2 !== void 0 ? _ref2 : setting.surcharge) !== null && _ref !== void 0 ? _ref : 0);
|
|
32
|
-
const fixed = setting.useOriginSurcharge ? new Decimal(0) : toDecimal((_ref4 = (_ref5 = (_setting$surcharge_fi = setting.surcharge_fixed) !== null && _setting$surcharge_fi !== void 0 ? _setting$surcharge_fi : setting.surMoney) !== null && _ref5 !== void 0 ? _ref5 : setting.constant_money) !== null && _ref4 !== void 0 ? _ref4 : 0);
|
|
33
|
-
/** 设备卡片展示的总手续费与最终扣款额,只用于选择前的预览。 */
|
|
34
|
-
const surcharge = amount.mul(rate.div(100)).add(fixed);
|
|
21
|
+
/** 设备预览与选择 Reader 后的实际支付报价必须使用同一套金额规则。 */
|
|
22
|
+
const quote = buildPaymentAmountQuote(options === null || options === void 0 ? void 0 : options.amount, options === null || options === void 0 ? void 0 : options.surcharge, reader);
|
|
35
23
|
return {
|
|
36
|
-
totalUnit:
|
|
37
|
-
surRate:
|
|
38
|
-
surMoney:
|
|
39
|
-
surcharge:
|
|
24
|
+
totalUnit: quote.total,
|
|
25
|
+
surRate: quote.surchargeRate,
|
|
26
|
+
surMoney: quote.surchargeFixed,
|
|
27
|
+
surcharge: quote.surchargeTotal
|
|
40
28
|
};
|
|
41
29
|
};
|
|
42
30
|
/** 获取 MX51 pairing id。 */
|
|
@@ -15,8 +15,11 @@ const decimal = (value) => {
|
|
|
15
15
|
const readerSurcharge = (reader) => {
|
|
16
16
|
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
17
17
|
const setting = (reader === null || reader === void 0 ? void 0 : reader.setting) || {};
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* useOriginSurcharge 表示由卡机收取原始手续费;surcharge=false 表示商户已关闭
|
|
20
|
+
* Pisell 手续费。两种场景都不得继续使用 Reader 中可能残留的历史费率。
|
|
21
|
+
*/
|
|
22
|
+
if (setting.useOriginSurcharge || setting.surcharge === false) return {
|
|
20
23
|
rate: 0,
|
|
21
24
|
fixed: 0
|
|
22
25
|
};
|
|
@@ -61,4 +64,4 @@ const updateEftposDraftAmount = (draft, input) => {
|
|
|
61
64
|
});
|
|
62
65
|
};
|
|
63
66
|
//#endregion
|
|
64
|
-
export { updateEftposDraftAmount };
|
|
67
|
+
export { buildPaymentAmountQuote, updateEftposDraftAmount };
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { EftposProvider, PaymentMode } from "../contracts/index.js";
|
|
2
|
+
import { buildPaymentAmountQuote } from "../amount.js";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { locales } from "@pisell/utils";
|
|
4
|
-
import Decimal from "decimal.js";
|
|
5
5
|
import ChevronRight from "@pisell/icon/es/ChevronRight";
|
|
6
6
|
//#region src/plus/piPaymentUI/eftpos/pages/DevicePage.tsx
|
|
7
|
-
/** 转成 Decimal。 */
|
|
8
|
-
const toDecimal = (value) => {
|
|
9
|
-
try {
|
|
10
|
-
return new Decimal(value === void 0 || value === null || value === "" ? 0 : value);
|
|
11
|
-
} catch (_error) {
|
|
12
|
-
return new Decimal(0);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
7
|
/** 从 reader setting 计算设备列表展示金额。 */
|
|
16
8
|
const resolveReaderPay = (reader, options) => {
|
|
17
|
-
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
18
9
|
/** pay/setting 均来自不同版本后端,读取时需要保持兼容。 */
|
|
19
10
|
const pay = reader.pay;
|
|
20
|
-
|
|
11
|
+
const setting = reader.setting || {};
|
|
12
|
+
if (pay && !setting.useOriginSurcharge && setting.surcharge !== false) {
|
|
21
13
|
var _pay$surRate, _pay$surMoney, _pay$surcharge;
|
|
22
14
|
return {
|
|
23
15
|
totalUnit: String(pay.totalUnit || pay.total || ""),
|
|
@@ -26,17 +18,13 @@ const resolveReaderPay = (reader, options) => {
|
|
|
26
18
|
surcharge: String((_pay$surcharge = pay.surcharge) !== null && _pay$surcharge !== void 0 ? _pay$surcharge : "")
|
|
27
19
|
};
|
|
28
20
|
}
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const rate = setting.useOriginSurcharge ? new Decimal(0) : toDecimal((_ref = (_ref2 = (_ref3 = (_setting$surcharge_ra = setting.surcharge_rate) !== null && _setting$surcharge_ra !== void 0 ? _setting$surcharge_ra : setting.surRate) !== null && _ref3 !== void 0 ? _ref3 : setting.constant_rate) !== null && _ref2 !== void 0 ? _ref2 : setting.surcharge) !== null && _ref !== void 0 ? _ref : 0);
|
|
32
|
-
const fixed = setting.useOriginSurcharge ? new Decimal(0) : toDecimal((_ref4 = (_ref5 = (_setting$surcharge_fi = setting.surcharge_fixed) !== null && _setting$surcharge_fi !== void 0 ? _setting$surcharge_fi : setting.surMoney) !== null && _ref5 !== void 0 ? _ref5 : setting.constant_money) !== null && _ref4 !== void 0 ? _ref4 : 0);
|
|
33
|
-
/** 设备卡片展示的总手续费与最终扣款额,只用于选择前的预览。 */
|
|
34
|
-
const surcharge = amount.mul(rate.div(100)).add(fixed);
|
|
21
|
+
/** 设备预览与选择 Reader 后的实际支付报价必须使用同一套金额规则。 */
|
|
22
|
+
const quote = buildPaymentAmountQuote(options === null || options === void 0 ? void 0 : options.amount, options === null || options === void 0 ? void 0 : options.surcharge, reader);
|
|
35
23
|
return {
|
|
36
|
-
totalUnit:
|
|
37
|
-
surRate:
|
|
38
|
-
surMoney:
|
|
39
|
-
surcharge:
|
|
24
|
+
totalUnit: quote.total,
|
|
25
|
+
surRate: quote.surchargeRate,
|
|
26
|
+
surMoney: quote.surchargeFixed,
|
|
27
|
+
surcharge: quote.surchargeTotal
|
|
40
28
|
};
|
|
41
29
|
};
|
|
42
30
|
/** 获取 MX51 pairing id。 */
|
|
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
|
|
|
259
259
|
return rows;
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
|
-
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds,
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
|
|
|
78
78
|
PisellToast({ content: err instanceof Error ? err.message : String(err) });
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { PISELL_RESERVATION_FLOOR_PLAN_CODE,
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
|
|
|
927
927
|
];
|
|
928
928
|
}
|
|
929
929
|
//#endregion
|
|
930
|
-
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels,
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -11,7 +11,6 @@ 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";
|
|
15
14
|
import locales_default from "./locales.js";
|
|
16
15
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
17
16
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { useMemo } from "react";
|
|
6
5
|
import { useMemoizedFn } from "ahooks";
|
|
7
6
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -10,7 +10,6 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
|
10
10
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
11
11
|
import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
12
12
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
13
|
-
import "../../../salesSdk/index.js";
|
|
14
13
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
15
14
|
import { getNumericAmount, getSalesHostModule, invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
16
15
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
@@ -5,7 +5,6 @@ import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js
|
|
|
5
5
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
8
|
-
import "../../../salesSdk/index.js";
|
|
9
8
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
10
9
|
import React, { memo, useMemo } from "react";
|
|
11
10
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import Base_default from "./Base.js";
|
|
9
8
|
import { resolveSaleDetailOsProps } from "./osProps.js";
|
|
10
9
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
|
|
6
5
|
import { DishGroupView } from "./DishGroupView.js";
|
|
7
6
|
import dayjs from "dayjs";
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { getInternalNotesByScheduleEvent } from "../../serve.js";
|
|
6
5
|
import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
|
|
7
6
|
import { DetailActions } from "../../components/DetailActions/index.js";
|
|
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
|
|
|
31
31
|
return typeof off === "function" ? off : () => {};
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { formatBookingDateTime, subscribeBookingDateChange };
|
|
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
-
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay,
|
|
74
|
+
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, resolveHolderDisplayConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthMethodType,
|
|
1
|
+
import { AuthMethodType, VerificationMethod } from "./shared/types.js";
|
|
2
2
|
import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
|
|
3
3
|
import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
|
|
4
|
-
import { AuthModal } from "./AuthModal.js";
|
|
4
|
+
import { AuthModal, AuthModalProps } from "./AuthModal.js";
|
|
@@ -226,4 +226,4 @@ interface RegisterFormData {
|
|
|
226
226
|
verification_token?: string;
|
|
227
227
|
}
|
|
228
228
|
//#endregion
|
|
229
|
-
export { AuthMethodType, EmailAuthConfig,
|
|
229
|
+
export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
|
|
@@ -17,8 +17,11 @@ const decimal = (value) => {
|
|
|
17
17
|
const readerSurcharge = (reader) => {
|
|
18
18
|
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
19
19
|
const setting = (reader === null || reader === void 0 ? void 0 : reader.setting) || {};
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* useOriginSurcharge 表示由卡机收取原始手续费;surcharge=false 表示商户已关闭
|
|
22
|
+
* Pisell 手续费。两种场景都不得继续使用 Reader 中可能残留的历史费率。
|
|
23
|
+
*/
|
|
24
|
+
if (setting.useOriginSurcharge || setting.surcharge === false) return {
|
|
22
25
|
rate: 0,
|
|
23
26
|
fixed: 0
|
|
24
27
|
};
|
|
@@ -63,4 +66,5 @@ const updateEftposDraftAmount = (draft, input) => {
|
|
|
63
66
|
});
|
|
64
67
|
};
|
|
65
68
|
//#endregion
|
|
69
|
+
exports.buildPaymentAmountQuote = buildPaymentAmountQuote;
|
|
66
70
|
exports.updateEftposDraftAmount = updateEftposDraftAmount;
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
const require_index = require("../contracts/index.js");
|
|
3
|
+
const require_amount = require("../amount.js");
|
|
3
4
|
let react = require("react");
|
|
4
5
|
react = require_runtime.__toESM(react);
|
|
5
6
|
let _pisell_utils = require("@pisell/utils");
|
|
6
|
-
let decimal_js = require("decimal.js");
|
|
7
|
-
decimal_js = require_runtime.__toESM(decimal_js);
|
|
8
7
|
let _pisell_icon_es_ChevronRight = require("@pisell/icon/es/ChevronRight");
|
|
9
8
|
_pisell_icon_es_ChevronRight = require_runtime.__toESM(_pisell_icon_es_ChevronRight);
|
|
10
9
|
//#region src/plus/piPaymentOld/ui/eftpos/pages/DevicePage.tsx
|
|
11
|
-
/** 转成 Decimal。 */
|
|
12
|
-
const toDecimal = (value) => {
|
|
13
|
-
try {
|
|
14
|
-
return new decimal_js.default(value === void 0 || value === null || value === "" ? 0 : value);
|
|
15
|
-
} catch (_error) {
|
|
16
|
-
return new decimal_js.default(0);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
10
|
/** 从 reader setting 计算设备列表展示金额。 */
|
|
20
11
|
const resolveReaderPay = (reader, options) => {
|
|
21
|
-
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
22
12
|
/** pay/setting 均来自不同版本后端,读取时需要保持兼容。 */
|
|
23
13
|
const pay = reader.pay;
|
|
24
|
-
|
|
14
|
+
const setting = reader.setting || {};
|
|
15
|
+
if (pay && !setting.useOriginSurcharge && setting.surcharge !== false) {
|
|
25
16
|
var _pay$surRate, _pay$surMoney, _pay$surcharge;
|
|
26
17
|
return {
|
|
27
18
|
totalUnit: String(pay.totalUnit || pay.total || ""),
|
|
@@ -30,17 +21,13 @@ const resolveReaderPay = (reader, options) => {
|
|
|
30
21
|
surcharge: String((_pay$surcharge = pay.surcharge) !== null && _pay$surcharge !== void 0 ? _pay$surcharge : "")
|
|
31
22
|
};
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const rate = setting.useOriginSurcharge ? new decimal_js.default(0) : toDecimal((_ref = (_ref2 = (_ref3 = (_setting$surcharge_ra = setting.surcharge_rate) !== null && _setting$surcharge_ra !== void 0 ? _setting$surcharge_ra : setting.surRate) !== null && _ref3 !== void 0 ? _ref3 : setting.constant_rate) !== null && _ref2 !== void 0 ? _ref2 : setting.surcharge) !== null && _ref !== void 0 ? _ref : 0);
|
|
36
|
-
const fixed = setting.useOriginSurcharge ? new decimal_js.default(0) : toDecimal((_ref4 = (_ref5 = (_setting$surcharge_fi = setting.surcharge_fixed) !== null && _setting$surcharge_fi !== void 0 ? _setting$surcharge_fi : setting.surMoney) !== null && _ref5 !== void 0 ? _ref5 : setting.constant_money) !== null && _ref4 !== void 0 ? _ref4 : 0);
|
|
37
|
-
/** 设备卡片展示的总手续费与最终扣款额,只用于选择前的预览。 */
|
|
38
|
-
const surcharge = amount.mul(rate.div(100)).add(fixed);
|
|
24
|
+
/** 设备预览与选择 Reader 后的实际支付报价必须使用同一套金额规则。 */
|
|
25
|
+
const quote = require_amount.buildPaymentAmountQuote(options === null || options === void 0 ? void 0 : options.amount, options === null || options === void 0 ? void 0 : options.surcharge, reader);
|
|
39
26
|
return {
|
|
40
|
-
totalUnit:
|
|
41
|
-
surRate:
|
|
42
|
-
surMoney:
|
|
43
|
-
surcharge:
|
|
27
|
+
totalUnit: quote.total,
|
|
28
|
+
surRate: quote.surchargeRate,
|
|
29
|
+
surMoney: quote.surchargeFixed,
|
|
30
|
+
surcharge: quote.surchargeTotal
|
|
44
31
|
};
|
|
45
32
|
};
|
|
46
33
|
/** 获取 MX51 pairing id。 */
|
|
@@ -17,8 +17,11 @@ const decimal = (value) => {
|
|
|
17
17
|
const readerSurcharge = (reader) => {
|
|
18
18
|
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
19
19
|
const setting = (reader === null || reader === void 0 ? void 0 : reader.setting) || {};
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* useOriginSurcharge 表示由卡机收取原始手续费;surcharge=false 表示商户已关闭
|
|
22
|
+
* Pisell 手续费。两种场景都不得继续使用 Reader 中可能残留的历史费率。
|
|
23
|
+
*/
|
|
24
|
+
if (setting.useOriginSurcharge || setting.surcharge === false) return {
|
|
22
25
|
rate: 0,
|
|
23
26
|
fixed: 0
|
|
24
27
|
};
|
|
@@ -63,4 +66,5 @@ const updateEftposDraftAmount = (draft, input) => {
|
|
|
63
66
|
});
|
|
64
67
|
};
|
|
65
68
|
//#endregion
|
|
69
|
+
exports.buildPaymentAmountQuote = buildPaymentAmountQuote;
|
|
66
70
|
exports.updateEftposDraftAmount = updateEftposDraftAmount;
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
const require_index = require("../contracts/index.js");
|
|
3
|
+
const require_amount = require("../amount.js");
|
|
3
4
|
let react = require("react");
|
|
4
5
|
react = require_runtime.__toESM(react);
|
|
5
6
|
let _pisell_utils = require("@pisell/utils");
|
|
6
|
-
let decimal_js = require("decimal.js");
|
|
7
|
-
decimal_js = require_runtime.__toESM(decimal_js);
|
|
8
7
|
let _pisell_icon_es_ChevronRight = require("@pisell/icon/es/ChevronRight");
|
|
9
8
|
_pisell_icon_es_ChevronRight = require_runtime.__toESM(_pisell_icon_es_ChevronRight);
|
|
10
9
|
//#region src/plus/piPaymentUI/eftpos/pages/DevicePage.tsx
|
|
11
|
-
/** 转成 Decimal。 */
|
|
12
|
-
const toDecimal = (value) => {
|
|
13
|
-
try {
|
|
14
|
-
return new decimal_js.default(value === void 0 || value === null || value === "" ? 0 : value);
|
|
15
|
-
} catch (_error) {
|
|
16
|
-
return new decimal_js.default(0);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
10
|
/** 从 reader setting 计算设备列表展示金额。 */
|
|
20
11
|
const resolveReaderPay = (reader, options) => {
|
|
21
|
-
var _ref, _ref2, _ref3, _setting$surcharge_ra, _ref4, _ref5, _setting$surcharge_fi;
|
|
22
12
|
/** pay/setting 均来自不同版本后端,读取时需要保持兼容。 */
|
|
23
13
|
const pay = reader.pay;
|
|
24
|
-
|
|
14
|
+
const setting = reader.setting || {};
|
|
15
|
+
if (pay && !setting.useOriginSurcharge && setting.surcharge !== false) {
|
|
25
16
|
var _pay$surRate, _pay$surMoney, _pay$surcharge;
|
|
26
17
|
return {
|
|
27
18
|
totalUnit: String(pay.totalUnit || pay.total || ""),
|
|
@@ -30,17 +21,13 @@ const resolveReaderPay = (reader, options) => {
|
|
|
30
21
|
surcharge: String((_pay$surcharge = pay.surcharge) !== null && _pay$surcharge !== void 0 ? _pay$surcharge : "")
|
|
31
22
|
};
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const rate = setting.useOriginSurcharge ? new decimal_js.default(0) : toDecimal((_ref = (_ref2 = (_ref3 = (_setting$surcharge_ra = setting.surcharge_rate) !== null && _setting$surcharge_ra !== void 0 ? _setting$surcharge_ra : setting.surRate) !== null && _ref3 !== void 0 ? _ref3 : setting.constant_rate) !== null && _ref2 !== void 0 ? _ref2 : setting.surcharge) !== null && _ref !== void 0 ? _ref : 0);
|
|
36
|
-
const fixed = setting.useOriginSurcharge ? new decimal_js.default(0) : toDecimal((_ref4 = (_ref5 = (_setting$surcharge_fi = setting.surcharge_fixed) !== null && _setting$surcharge_fi !== void 0 ? _setting$surcharge_fi : setting.surMoney) !== null && _ref5 !== void 0 ? _ref5 : setting.constant_money) !== null && _ref4 !== void 0 ? _ref4 : 0);
|
|
37
|
-
/** 设备卡片展示的总手续费与最终扣款额,只用于选择前的预览。 */
|
|
38
|
-
const surcharge = amount.mul(rate.div(100)).add(fixed);
|
|
24
|
+
/** 设备预览与选择 Reader 后的实际支付报价必须使用同一套金额规则。 */
|
|
25
|
+
const quote = require_amount.buildPaymentAmountQuote(options === null || options === void 0 ? void 0 : options.amount, options === null || options === void 0 ? void 0 : options.surcharge, reader);
|
|
39
26
|
return {
|
|
40
|
-
totalUnit:
|
|
41
|
-
surRate:
|
|
42
|
-
surMoney:
|
|
43
|
-
surcharge:
|
|
27
|
+
totalUnit: quote.total,
|
|
28
|
+
surRate: quote.surchargeRate,
|
|
29
|
+
surMoney: quote.surchargeFixed,
|
|
30
|
+
surcharge: quote.surchargeTotal
|
|
44
31
|
};
|
|
45
32
|
};
|
|
46
33
|
/** 获取 MX51 pairing id。 */
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|