@pisell/private-materials 6.12.373 → 6.12.375
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/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
- package/es/components/bigSale/components/ProductList/index.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 +1 -6
- package/es/components/bigSale/templates/Kiosk/index.js +4 -5
- package/es/components/bigSale/templates/Kiosk/zeroAmountCheckout.js +14 -6
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/components/vendingMachine/DispensePage.js +5 -3
- package/es/components/vendingMachine/README.md +4 -2
- package/es/components/vendingMachine/VendingCatalog.js +2 -9
- package/es/components/vendingMachine/VendingSale.js +10 -4
- package/es/components/vendingMachine/VoucherSkuList.js +4 -3
- package/es/components/vendingMachine/locales.d.ts +2 -0
- package/es/components/vendingMachine/locales.js +11 -1
- package/es/index.js +0 -2
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/PrintAction.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/components/bigSale/index.js +1 -5
- package/lib/components/bigSale/templates/Kiosk/index.js +3 -3
- package/lib/components/bigSale/templates/Kiosk/zeroAmountCheckout.js +15 -7
- package/lib/components/vendingMachine/DispensePage.js +5 -3
- package/lib/components/vendingMachine/README.md +4 -2
- package/lib/components/vendingMachine/VendingCatalog.js +1 -8
- package/lib/components/vendingMachine/VendingSale.js +10 -4
- package/lib/components/vendingMachine/VoucherSkuList.js +4 -3
- package/lib/components/vendingMachine/locales.d.ts +2 -0
- package/lib/components/vendingMachine/locales.js +11 -1
- package/package.json +1 -1
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -54
|
@@ -61,11 +61,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
|
|
|
61
61
|
const pisellos = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.pisellos;
|
|
62
62
|
const isProductMergeDisabled = context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.utils) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.businessUtils) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.isProductMergeDisabled;
|
|
63
63
|
const shouldMergeProductLines = (0, react.useMemo)(() => () => typeof isProductMergeDisabled !== "function" || !isProductMergeDisabled(), [isProductMergeDisabled]);
|
|
64
|
-
const defaultProviderOsKey = [
|
|
65
|
-
osKey,
|
|
66
|
-
mode,
|
|
67
|
-
businessCode
|
|
68
|
-
].filter(Boolean).join("-");
|
|
64
|
+
const defaultProviderOsKey = businessCode ? `bookingTicket-${osKey}-${businessCode}` : [osKey, mode].filter(Boolean).join("-");
|
|
69
65
|
const providerOsKey = osModuleName || defaultProviderOsKey;
|
|
70
66
|
const providerModuleName = providerOsKey;
|
|
71
67
|
const { runtime } = require_useRuntime.useRuntime();
|
|
@@ -1027,8 +1027,8 @@ function KioskBigSaleTemplate({ isActive = true, catalogPreparation, osKey, prod
|
|
|
1027
1027
|
showCheckoutFailure(String(_pisell_utils.locales.getText("pisell2.big-sale.kiosk.payment-failure-description")));
|
|
1028
1028
|
return;
|
|
1029
1029
|
}
|
|
1030
|
-
const
|
|
1031
|
-
if (shouldUseConsumerPayment ||
|
|
1030
|
+
const shouldRedirectOnlineOrderingZeroAmount = require_zeroAmountCheckout.isOnlineOrderingZeroAmountValue(platform, totalAmount);
|
|
1031
|
+
if (shouldUseConsumerPayment || shouldRedirectOnlineOrderingZeroAmount) {
|
|
1032
1032
|
publishKioskCollaborationPreviewStatus(app, "checkout");
|
|
1033
1033
|
yield launchKioskConsumerPaymentAfterReset({
|
|
1034
1034
|
action: utils.action,
|
|
@@ -1051,7 +1051,7 @@ function KioskBigSaleTemplate({ isActive = true, catalogPreparation, osKey, prod
|
|
|
1051
1051
|
persistKioskSessionView(context.sales.bookingTicket, "catalog");
|
|
1052
1052
|
},
|
|
1053
1053
|
recalcSummary: context.cart.recalcSummary,
|
|
1054
|
-
redirectZeroAmount:
|
|
1054
|
+
redirectZeroAmount: shouldRedirectOnlineOrderingZeroAmount,
|
|
1055
1055
|
replace: (path) => {
|
|
1056
1056
|
var _utils$history3, _app$history6;
|
|
1057
1057
|
if (typeof (utils === null || utils === void 0 || (_utils$history3 = utils.history) === null || _utils$history3 === void 0 ? void 0 : _utils$history3.replace) === "function") {
|
|
@@ -9,6 +9,8 @@ function toFiniteKioskAmount(value) {
|
|
|
9
9
|
function resolveKioskAmountDue(summary) {
|
|
10
10
|
var _toFiniteKioskAmount;
|
|
11
11
|
if (!summary) return null;
|
|
12
|
+
const serverWaitPayAmount = toFiniteKioskAmount(summary.order_wait_pay_amount);
|
|
13
|
+
if (serverWaitPayAmount !== null) return serverWaitPayAmount;
|
|
12
14
|
const orderPaidAmount = toFiniteKioskAmount(summary.order_paid_amount);
|
|
13
15
|
if (orderPaidAmount !== null && orderPaidAmount > 0) return toFiniteKioskAmount(summary.amount_gap);
|
|
14
16
|
return (_toFiniteKioskAmount = toFiniteKioskAmount(summary.expect_amount)) !== null && _toFiniteKioskAmount !== void 0 ? _toFiniteKioskAmount : toFiniteKioskAmount(summary.total_amount);
|
|
@@ -16,17 +18,23 @@ function resolveKioskAmountDue(summary) {
|
|
|
16
18
|
function isKioskZeroAmountCheckout(summary) {
|
|
17
19
|
return resolveKioskAmountDue(summary) === 0;
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Online ordering runs in both H5 and desktop (pc) containers. A zero due
|
|
23
|
+
* amount must submit directly in either container instead of opening the
|
|
24
|
+
* payment-method UI.
|
|
25
|
+
*/
|
|
26
|
+
function isOnlineOrderingZeroAmountCheckout(platform, summary) {
|
|
27
|
+
return isOnlineOrderingZeroAmountValue(platform, resolveKioskAmountDue(summary));
|
|
21
28
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
29
|
+
function isOnlineOrderingZeroAmountValue(platform, amount) {
|
|
30
|
+
const normalizedPlatform = String(platform || "").trim().toLowerCase();
|
|
31
|
+
return (normalizedPlatform === "h5" || normalizedPlatform === "pc") && toFiniteKioskAmount(amount) === 0;
|
|
24
32
|
}
|
|
25
33
|
function isKioskPlatformZeroAmountCheckout(platform, summary) {
|
|
26
34
|
return require_platform.isSelfServicePlatform(platform) && isKioskZeroAmountCheckout(summary);
|
|
27
35
|
}
|
|
28
36
|
function shouldSubmitKioskOrderBeforeCheckout(options) {
|
|
29
|
-
return options.shouldUseConsumerPayment ||
|
|
37
|
+
return options.shouldUseConsumerPayment || isOnlineOrderingZeroAmountCheckout(options.platform, options.summary) || isKioskPlatformZeroAmountCheckout(options.platform, options.summary);
|
|
30
38
|
}
|
|
31
39
|
function resolveKioskSubmittedPayableAmount(result, tempOrderSummary, contextSummary) {
|
|
32
40
|
var _result$data, _result$data2, _result$data3;
|
|
@@ -83,9 +91,9 @@ function resolveKioskNoPaymentResultViewModel(options) {
|
|
|
83
91
|
});
|
|
84
92
|
}
|
|
85
93
|
//#endregion
|
|
86
|
-
exports.isH5ZeroAmountCheckout = isH5ZeroAmountCheckout;
|
|
87
|
-
exports.isH5ZeroAmountValue = isH5ZeroAmountValue;
|
|
88
94
|
exports.isKioskPlatformZeroAmountCheckout = isKioskPlatformZeroAmountCheckout;
|
|
95
|
+
exports.isOnlineOrderingZeroAmountCheckout = isOnlineOrderingZeroAmountCheckout;
|
|
96
|
+
exports.isOnlineOrderingZeroAmountValue = isOnlineOrderingZeroAmountValue;
|
|
89
97
|
exports.resolveKioskAmountDue = resolveKioskAmountDue;
|
|
90
98
|
exports.resolveKioskNoPaymentResultViewModel = resolveKioskNoPaymentResultViewModel;
|
|
91
99
|
exports.resolveKioskNoPaymentSubmitParams = resolveKioskNoPaymentSubmitParams;
|
|
@@ -20,7 +20,7 @@ const statusIcons = {
|
|
|
20
20
|
uncertain: "circle-alert"
|
|
21
21
|
};
|
|
22
22
|
const itemDisplayStatus = (item) => item.status === "failed" && item.uncertain ? "uncertain" : item.status;
|
|
23
|
-
function DispensePage({ brand, sale, progress, error, stage, seconds, onHome }) {
|
|
23
|
+
function DispensePage({ brand, sale, isRedemption, progress, error, stage, seconds, onHome }) {
|
|
24
24
|
var _items, _progress$inventorySy;
|
|
25
25
|
const { text: t, localized } = require_locales.useVendingLocale();
|
|
26
26
|
const contentRef = (0, react.useRef)(null);
|
|
@@ -34,6 +34,8 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
|
|
|
34
34
|
const scrollTargetKey = (_items = items[currentIndex >= 0 ? currentIndex : processed - 1]) === null || _items === void 0 ? void 0 : _items.key;
|
|
35
35
|
const currentNumber = currentIndex >= 0 ? currentIndex + 1 : Math.min(processed + 1, items.length);
|
|
36
36
|
const complete = stage === "result";
|
|
37
|
+
const collectionErrorKey = isRedemption ? "redemptionCollectionError" : "postPaymentError";
|
|
38
|
+
const partialDescriptionKey = isRedemption ? "redemptionPartialDescription" : "partialDescription";
|
|
37
39
|
const allSuccess = complete && !error && (progress === null || progress === void 0 ? void 0 : progress.status) === "complete" && items.length > 0 && success === items.length;
|
|
38
40
|
(0, react.useLayoutEffect)(() => {
|
|
39
41
|
const content = contentRef.current;
|
|
@@ -64,7 +66,7 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
|
|
|
64
66
|
return /* @__PURE__ */ react.default.createElement("section", { className: "vm-dispense-screen" }, /* @__PURE__ */ react.default.createElement("header", { className: "vm-dispense-brand" }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Brand, {
|
|
65
67
|
name: brand,
|
|
66
68
|
compact: true
|
|
67
|
-
})), /* @__PURE__ */ react.default.createElement("div", { className: "vm-dispense-heading" }, /* @__PURE__ */ react.default.createElement("h1", null, t(complete ? allSuccess ? "complete" : "partial" : "dispensing")), /* @__PURE__ */ react.default.createElement("p", null, t(error ?
|
|
69
|
+
})), /* @__PURE__ */ react.default.createElement("div", { className: "vm-dispense-heading" }, /* @__PURE__ */ react.default.createElement("h1", null, t(complete ? allSuccess ? "complete" : "partial" : "dispensing")), /* @__PURE__ */ react.default.createElement("p", null, t(error ? collectionErrorKey : complete ? allSuccess ? "completeDescription" : partialDescriptionKey : "dispenseDescription", { brand }))), /* @__PURE__ */ react.default.createElement("div", {
|
|
68
70
|
className: "vm-dispense-content",
|
|
69
71
|
ref: contentRef
|
|
70
72
|
}, !!items.length ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("section", {
|
|
@@ -96,7 +98,7 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
|
|
|
96
98
|
}, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Icon, { name: "loader-circle" }), t("preparing")) : null, complete && /* @__PURE__ */ react.default.createElement("div", {
|
|
97
99
|
className: "vm-dispense-collection-note" + (allSuccess ? "" : " vm-dispense-attention"),
|
|
98
100
|
role: allSuccess ? "note" : "alert"
|
|
99
|
-
}, /* @__PURE__ */ react.default.createElement("span", { className: "vm-dispense-note-icon" }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Icon, { name: allSuccess ? "hand" : "circle-alert" })), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("p", null, t(allSuccess ? "collectDescription" :
|
|
101
|
+
}, /* @__PURE__ */ react.default.createElement("span", { className: "vm-dispense-note-icon" }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Icon, { name: allSuccess ? "hand" : "circle-alert" })), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("p", null, t(allSuccess ? "collectDescription" : collectionErrorKey)), !allSuccess && !!items.length && /* @__PURE__ */ react.default.createElement("p", { className: "vm-dispense-summary" }, t(uncertain ? "summaryUncertain" : "summary", {
|
|
100
102
|
success,
|
|
101
103
|
failed: items.length - success - uncertain,
|
|
102
104
|
uncertain
|
|
@@ -32,7 +32,7 @@ Home 右上角参照 `webpos/beta` 的 HDLKiosk 提供地球图标与语言下
|
|
|
32
32
|
|
|
33
33
|
购买列表和兑换列表的主按钮直接进入现有结账流程,不再先进入购物车确认页;购买列表的购物车按钮和金额入口可主动打开完整购物车,兑换列表底栏仅保留已选数量/额度摘要,不显示购物车按钮。支付返回到发起结账时的列表或购物车,保留本单选择。普通 Kiosk 同样支持列表直接结账,H5/PC 保留各自既有结账入口。共享 Kiosk 模板在所有平台移除结账前的“Do you have a coupon or card?”询问弹窗,手动打开优惠面板、扫码和输入优惠码的入口仍保留;登录、库存预检、零元确认与出货继续沿用原逻辑。
|
|
34
34
|
|
|
35
|
-
购买列表与兑换列表通过内部 `useVendingCartInteraction` 共用防重复操作、扫码/支付锁检查、购物车同步等待、会话失效校验及忙碌状态上报。页面分别保留购买 SKU
|
|
35
|
+
购买列表与兑换列表通过内部 `useVendingCartInteraction` 共用防重复操作、扫码/支付锁检查、购物车同步等待、会话失效校验及忙碌状态上报。页面分别保留购买 SKU 库存判断和兑换券额度规则;自动选中与平铺规格选择同样不能绕过扫码、支付或订单切换锁。购买卡片调整数量期间保留原数量文案,不显示延迟 Loading 提示;处理锁和无障碍忙碌状态仍保留。此 hook 仅由两个售货机列表使用,不接入普通 Kiosk、H5 或 POS。
|
|
36
36
|
|
|
37
37
|
兑换页的自动选中、详情加购与平铺 SKU 选择共用内部 `addVoucherProduct`,统一商品数据清理、动态券额度、持有人参数和加购后的券恢复。平铺数量直接读取购物车,各次操作即时提交;失败或取消保留此前已成功的选择。入口扫码只向已有销售实例交接请求,初始化由首页准备流程负责。
|
|
38
38
|
|
|
@@ -44,7 +44,7 @@ Home 右上角参照 `webpos/beta` 的 HDLKiosk 提供地球图标与语言下
|
|
|
44
44
|
|
|
45
45
|
购买卡片和兑换平铺选项均支持点击整块区域加一,包含独立的键盘可访问按钮;加减控件及数量区域不冒泡触发卡片加购。点击沿用加号的库存、可用状态和处理锁,兑换还受剩余券额度约束;兑换选择即时同步购物车,不再需要额外的确认或取消步骤。
|
|
46
46
|
|
|
47
|
-
不可用 SKU 使用浅白色整卡遮罩,灰色邮戳式状态印章按整张卡片绝对居中,不因数量控件偏移;印章以矢量双圆环、倾斜字牌和波纹构成,文字随语言切换。仅库存状态 ready 且原始可售数量为 0 时显示 Sold Out,其它不可用情况显示 Unavailable
|
|
47
|
+
不可用 SKU 使用浅白色整卡遮罩,灰色邮戳式状态印章按整张卡片绝对居中,不因数量控件偏移;印章以矢量双圆环、倾斜字牌和波纹构成,文字随语言切换。仅库存状态 ready 且原始可售数量为 0 时显示 Sold Out,其它不可用情况显示 Unavailable。购物车已占满库存时提示 Limit reached;券额度已用完时不显示 No redemptions left,仍禁止继续增加,且不显示遮罩。读取库存时显示 Loading。已选数量仍可减少或清零。
|
|
48
48
|
|
|
49
49
|
宿主销售模块的 `otherParams.platform` 与 `otherParams.channel` 使用 `vending`,页面仍复用 `template="kiosk"`。共享自助场景判断支持 kiosk/vending,保留商品布局、客户验证、预约选择及零元订单完成方式;实际商品、定价与订单渠道保持 `vending`。需配套使用支持 vending 云端结账的 PisellOS;非零元使用独立支付页,售货机始终排除现金支付。
|
|
50
50
|
|
|
@@ -65,6 +65,8 @@ Home 的 Redeem Socks 入口打开独立 `RedeemPage`,展示扫码指引、扫
|
|
|
65
65
|
|
|
66
66
|
宿主应提供稳定的服务回调引用。租户、业务、门店或设备变化会重置组件会话并取消旧队列订阅;单纯切换语言保留当前页面状态。出货全部成功后 30 秒返回 Idle,失败由用户主动返回;出货和结果页底部始终显示联系工作人员文案。
|
|
67
67
|
|
|
68
|
+
出货交接时随订单快照保存本单是否来自兑换列表。兑换流程的出货失败或部分出货结果只提示工作人员协助,不显示 Your order is paid 或顶部的 Your payment is complete;普通购买仍保留付款完成文案。对应提示覆盖全部五种界面语言。
|
|
69
|
+
|
|
68
70
|
单件结果可附带 `message`、`code` 和 `uncertain`。宿主无法确认物理出货结果时返回 `success: false, uncertain: true`;队列仍以 `failed` 标识已处理的非成功项,展示时单独标记为“需要核对”,不计入明确未出货数量、不启动成功倒计时。`message` 展示宿主提供的本地化原因。硬件调用、结果分类与是否重试由宿主管理,物料不调用原生插件。
|
|
69
71
|
|
|
70
72
|
队列快照可附带 `inventorySync`(`syncing / synced / review`),独立于物理出货结果。宿主汇总扣库存后可更新此状态;待核对时结果页提示工作人员处理,但不会改变成功件数或重新启动 30 秒倒计时。物料不发起扣库存或自动补偿。
|
|
@@ -37,13 +37,6 @@ function VendingCatalog({ brand, context, products, loading, isActive, inventory
|
|
|
37
37
|
onBusyChange,
|
|
38
38
|
errorMessage: t("catalogUpdateFailed")
|
|
39
39
|
});
|
|
40
|
-
const [showMutationProgress, setShowMutationProgress] = (0, react.useState)(false);
|
|
41
|
-
(0, react.useEffect)(() => {
|
|
42
|
-
setShowMutationProgress(false);
|
|
43
|
-
if (!mutatingRowKey) return;
|
|
44
|
-
const timer = setTimeout(() => setShowMutationProgress(true), 200);
|
|
45
|
-
return () => clearTimeout(timer);
|
|
46
|
-
}, [mutatingRowKey]);
|
|
47
40
|
const ticket = context.sales.bookingTicket;
|
|
48
41
|
const productsRef = (0, react.useRef)(products);
|
|
49
42
|
productsRef.current = products;
|
|
@@ -199,7 +192,7 @@ function VendingCatalog({ brand, context, products, loading, isActive, inventory
|
|
|
199
192
|
}), /* @__PURE__ */ react.default.createElement("div", { className: "vm-catalog-card-heading" }, /* @__PURE__ */ react.default.createElement(Heading, null, label), /* @__PURE__ */ react.default.createElement("strong", null, require_index$1.formatTempOrderSettlementAmount(order, row.price))), showStatusOverlay && /* @__PURE__ */ react.default.createElement(require_SkuStatusOverlay.default, { label: t(soldOut ? "catalogSoldOut" : "catalogUnavailableLabel") }), checkingStock && /* @__PURE__ */ react.default.createElement("span", {
|
|
200
193
|
className: "vm-catalog-stock-loading",
|
|
201
194
|
role: "status"
|
|
202
|
-
}, t("loading")), (!unavailable || row.quantity > 0) && /* @__PURE__ */ react.default.createElement("div", { className: "vm-catalog-quantity" }, /* @__PURE__ */ react.default.createElement("span", null,
|
|
195
|
+
}, t("loading")), (!unavailable || row.quantity > 0) && /* @__PURE__ */ react.default.createElement("div", { className: "vm-catalog-quantity" }, /* @__PURE__ */ react.default.createElement("span", null, limitReached ? t("catalogLimitReached") : t(row.quantity > 0 ? "catalogAdded" : "catalogQuantity")), /* @__PURE__ */ react.default.createElement("div", {
|
|
203
196
|
role: "group",
|
|
204
197
|
"aria-label": name,
|
|
205
198
|
"aria-disabled": busy,
|
|
@@ -25,7 +25,7 @@ const RESULT_RETURN_SECONDS = 30;
|
|
|
25
25
|
const DEFAULT_HOME_IDLE_TIMEOUT_MS = 3e4;
|
|
26
26
|
const SALE_DETAIL_MODULE_CONFIG = { cartItems: { renderProductLineItemStatus: require_VoucherRedemptionStamp.renderVendingCartItemStatus } };
|
|
27
27
|
function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource, scanEnabled = true, isActive = true, isVisible = true, idleRequest = 0, homeIdleTimeoutMs = DEFAULT_HOME_IDLE_TIMEOUT_MS, onHomePageActiveChange, onLocaleChange, brand, subtitle, machine, onRequestSettings, onRequestStaff, onPrerenderComplete, className, style }) {
|
|
28
|
-
var _scan$pending2;
|
|
28
|
+
var _scan$pending2, _sale$snapshot, _sale$isRedemption;
|
|
29
29
|
const { text: t } = require_locales.useVendingLocale();
|
|
30
30
|
const themeStyle = require_useVendingTheme.default();
|
|
31
31
|
const toast = (0, _pisell_materials.useToast)();
|
|
@@ -329,6 +329,10 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
|
|
|
329
329
|
}, [onPrerenderComplete]);
|
|
330
330
|
const onPaidCheckout = (0, react.useCallback)((payload) => {
|
|
331
331
|
const snapshot = (0, lodash.cloneDeep)(payload);
|
|
332
|
+
const completedSale = {
|
|
333
|
+
snapshot,
|
|
334
|
+
isRedemption: catalogView === "vouchers"
|
|
335
|
+
};
|
|
332
336
|
const saleContext = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, context), {}, { businessCode: payload.businessCode || context.businessCode });
|
|
333
337
|
const isCurrentScope = () => mounted.current && active.current && isCurrentContext(context);
|
|
334
338
|
return require_asyncToGenerator._asyncToGenerator(function* () {
|
|
@@ -337,7 +341,7 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
|
|
|
337
341
|
var _unsubscribeJob$curre3;
|
|
338
342
|
if (!(yield shouldDispenseAfterSale(saleContext))) return false;
|
|
339
343
|
if (!isCurrentScope()) return true;
|
|
340
|
-
setSale(
|
|
344
|
+
setSale(completedSale);
|
|
341
345
|
setProgress(null);
|
|
342
346
|
setDispenseError(false);
|
|
343
347
|
setStage("dispense");
|
|
@@ -360,7 +364,7 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
|
|
|
360
364
|
update(nextJob.getSnapshot());
|
|
361
365
|
} catch (_unused) {
|
|
362
366
|
if (isCurrentScope()) {
|
|
363
|
-
setSale(
|
|
367
|
+
setSale(completedSale);
|
|
364
368
|
setDispenseError(true);
|
|
365
369
|
setStage("result");
|
|
366
370
|
}
|
|
@@ -368,6 +372,7 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
|
|
|
368
372
|
return true;
|
|
369
373
|
})();
|
|
370
374
|
}, [
|
|
375
|
+
catalogView,
|
|
371
376
|
context,
|
|
372
377
|
isCurrentContext,
|
|
373
378
|
setIdlePaused,
|
|
@@ -588,7 +593,8 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
|
|
|
588
593
|
}
|
|
589
594
|
})), isFulfillment && /* @__PURE__ */ react.default.createElement(require_CustomerScreens.CustomerViewport, null, /* @__PURE__ */ react.default.createElement(require_DispensePage.default, {
|
|
590
595
|
brand,
|
|
591
|
-
sale,
|
|
596
|
+
sale: (_sale$snapshot = sale === null || sale === void 0 ? void 0 : sale.snapshot) !== null && _sale$snapshot !== void 0 ? _sale$snapshot : null,
|
|
597
|
+
isRedemption: (_sale$isRedemption = sale === null || sale === void 0 ? void 0 : sale.isRedemption) !== null && _sale$isRedemption !== void 0 ? _sale$isRedemption : false,
|
|
592
598
|
progress,
|
|
593
599
|
error: dispenseError,
|
|
594
600
|
stage,
|
|
@@ -24,6 +24,7 @@ function VoucherSkuList({ choices, busy, disabled, blocked, inventoryRefreshing,
|
|
|
24
24
|
}, group.label && /* @__PURE__ */ react.default.createElement("legend", { className: "vm-voucher-sku-group-title" }, group.dimensionName && /* @__PURE__ */ react.default.createElement("span", { className: "vm-sku-group-dimension" }, group.dimensionName), /* @__PURE__ */ react.default.createElement("h3", null, group.label)), /* @__PURE__ */ react.default.createElement("div", { className: "vm-voucher-sku-options" }, group.rows.map(({ row, label }) => {
|
|
25
25
|
const { quantity, maxQuantity, available, soldOut, loading, limitReason } = choicesByKey.get(row.key);
|
|
26
26
|
const checkingStock = inventoryRefreshing || loading;
|
|
27
|
+
const statusText = checkingStock ? t("loading") : limitReason === "stock" ? t("catalogLimitReached") : null;
|
|
27
28
|
const showStatusOverlay = (!available || soldOut) && !checkingStock;
|
|
28
29
|
const canIncrease = !disabled && !blocked && !checkingStock && available && !soldOut && quantity < maxQuantity;
|
|
29
30
|
const Heading = group.label ? "h4" : "h3";
|
|
@@ -50,9 +51,9 @@ function VoucherSkuList({ choices, busy, disabled, blocked, inventoryRefreshing,
|
|
|
50
51
|
"aria-hidden": "true"
|
|
51
52
|
}), /* @__PURE__ */ react.default.createElement("div", { className: "vm-voucher-sku-label" }, /* @__PURE__ */ react.default.createElement(Heading, null, label), !group.label && row.specification && label !== row.specification && /* @__PURE__ */ react.default.createElement("p", null, row.specification), /* @__PURE__ */ react.default.createElement("p", {
|
|
52
53
|
className: "vm-voucher-sku-status",
|
|
53
|
-
role:
|
|
54
|
-
"aria-hidden": !
|
|
55
|
-
},
|
|
54
|
+
role: statusText ? "status" : void 0,
|
|
55
|
+
"aria-hidden": !statusText
|
|
56
|
+
}, statusText)), showStatusOverlay && /* @__PURE__ */ react.default.createElement(require_SkuStatusOverlay.default, { label: t(soldOut ? "catalogSoldOut" : "catalogUnavailableLabel") }), /* @__PURE__ */ react.default.createElement("div", {
|
|
56
57
|
className: `vm-voucher-sku-quantity${showStatusOverlay && quantity === 0 ? " is-hidden" : ""}`,
|
|
57
58
|
role: "group",
|
|
58
59
|
"aria-label": row.label,
|
|
@@ -113,7 +113,7 @@ const en = {
|
|
|
113
113
|
scanPreparingHint: "Please wait. The shopping page will open automatically.",
|
|
114
114
|
scanPrepareFailed: "Unable to open the shopping page",
|
|
115
115
|
scanPrepareFailedHint: "Please try again, or go back to start over.",
|
|
116
|
-
scanResolveFailed: "
|
|
116
|
+
scanResolveFailed: "The code is invalid",
|
|
117
117
|
scanProcessing: "Processing…",
|
|
118
118
|
scanNoVouchers: "No valid product vouchers were found.",
|
|
119
119
|
scanVoucherNotStarted: "Your product vouchers are not valid yet.",
|
|
@@ -216,6 +216,8 @@ const en = {
|
|
|
216
216
|
partial: "Some items need attention",
|
|
217
217
|
partialDescription: "Your payment is complete. A staff member can help with the remaining items.",
|
|
218
218
|
postPaymentError: "Your order is paid. Please contact a staff member to complete collection.",
|
|
219
|
+
redemptionPartialDescription: "A staff member can help with the remaining items.",
|
|
220
|
+
redemptionCollectionError: "Please contact a staff member to complete collection.",
|
|
219
221
|
summary: "{success} dispensed · {failed} not dispensed",
|
|
220
222
|
returning: "Back to start in {seconds}s",
|
|
221
223
|
itemNumber: "Item {number}",
|
|
@@ -443,6 +445,8 @@ const translations = {
|
|
|
443
445
|
partial: "部分商品需要工作人员协助",
|
|
444
446
|
partialDescription: "订单已支付,请联系工作人员处理未出货的商品。",
|
|
445
447
|
postPaymentError: "订单已支付,请联系工作人员协助取货。",
|
|
448
|
+
redemptionPartialDescription: "请联系工作人员处理未出货的商品。",
|
|
449
|
+
redemptionCollectionError: "请联系工作人员协助取货。",
|
|
446
450
|
summary: "成功 {success} 件 · 未出货 {failed} 件",
|
|
447
451
|
returning: "{seconds} 秒后返回首页",
|
|
448
452
|
itemNumber: "第 {number} 件",
|
|
@@ -668,6 +672,8 @@ const translations = {
|
|
|
668
672
|
partial: "部分商品需要工作人員協助",
|
|
669
673
|
partialDescription: "訂單已付款,請聯絡工作人員處理未出貨的商品。",
|
|
670
674
|
postPaymentError: "訂單已付款,請聯絡工作人員協助取貨。",
|
|
675
|
+
redemptionPartialDescription: "請聯絡工作人員處理未出貨的商品。",
|
|
676
|
+
redemptionCollectionError: "請聯絡工作人員協助取貨。",
|
|
671
677
|
summary: "成功 {success} 件 · 未出貨 {failed} 件",
|
|
672
678
|
returning: "{seconds} 秒後返回首頁",
|
|
673
679
|
itemNumber: "第 {number} 件",
|
|
@@ -893,6 +899,8 @@ const translations = {
|
|
|
893
899
|
partial: "スタッフの確認が必要です",
|
|
894
900
|
partialDescription: "お支払いは完了しています。未排出の商品についてスタッフにお問い合わせください。",
|
|
895
901
|
postPaymentError: "お支払いは完了しています。スタッフにお問い合わせください。",
|
|
902
|
+
redemptionPartialDescription: "未排出の商品についてスタッフにお問い合わせください。",
|
|
903
|
+
redemptionCollectionError: "スタッフにお問い合わせください。",
|
|
896
904
|
summary: "排出済み {success} 点 · 未排出 {failed} 点",
|
|
897
905
|
returning: "{seconds} 秒後にホームに戻ります",
|
|
898
906
|
itemNumber: "商品 {number}",
|
|
@@ -1118,6 +1126,8 @@ const translations = {
|
|
|
1118
1126
|
partial: "Alguns produtos precisam de atenção",
|
|
1119
1127
|
partialDescription: "O pagamento foi concluído. Procure um funcionário para os produtos restantes.",
|
|
1120
1128
|
postPaymentError: "Seu pedido está pago. Procure um funcionário para concluir a retirada.",
|
|
1129
|
+
redemptionPartialDescription: "Procure um funcionário para os produtos restantes.",
|
|
1130
|
+
redemptionCollectionError: "Procure um funcionário para concluir a retirada.",
|
|
1121
1131
|
summary: "{success} entregues · {failed} não entregues",
|
|
1122
1132
|
returning: "Voltando ao início em {seconds}s",
|
|
1123
1133
|
itemNumber: "Item {number}",
|
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 {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import "./hosts/createInstanceHostBridge.js";
|
|
2
|
-
import "./holderConfirm/createHolderConfirmBridge.js";
|
|
3
|
-
import "./giftSelect/createGiftSelectBridge.js";
|
|
4
|
-
import "./context/SalesSdkHostBridgesContext.js";
|
|
5
|
-
import "./utils/formatHolderOptions.js";
|
|
6
|
-
import "./utils/enrichCartLineHolderDisplay.js";
|
|
7
|
-
import "./context/SalesSdkHolderContext.js";
|
|
8
|
-
import "../multiCurrencySettlement/index.js";
|
|
9
|
-
import "./utils/customerAuthGate.js";
|
|
10
|
-
import "./context/SalesSdkBusinessAvailabilityContext.js";
|
|
11
|
-
import "./utils/appendPromotionTags.js";
|
|
12
|
-
import "./utils/productSkuOptions.js";
|
|
13
|
-
import "./context/SalesSdkUIHostsContext.js";
|
|
14
|
-
import "./utils/runAddProductFlow.js";
|
|
15
|
-
import "./components/showAddToCartToast.js";
|
|
16
|
-
import "./utils/resolveAddProductDebounceKey.js";
|
|
17
|
-
import "./utils/identity.js";
|
|
18
|
-
import "./utils/resolveInCartQuantityForAddToast.js";
|
|
19
|
-
import "./utils/addProductWithFlowDebounced.js";
|
|
20
|
-
import "./utils/bookingDate.js";
|
|
21
|
-
import "./utils/holderSubmitValidation.js";
|
|
22
|
-
import "./utils/removeOrderProducts.js";
|
|
23
|
-
import "./selectors.js";
|
|
24
|
-
import "./utils/enrich.js";
|
|
25
|
-
import "./giftSelect/createOpenGiftSelectHost.js";
|
|
26
|
-
import "./utils/ensureHoldersBeforeSubmit.js";
|
|
27
|
-
import "./hooks/useSalesSdk.js";
|
|
28
|
-
import "./bookingEditService/BookingEditServiceDrawer.js";
|
|
29
|
-
import "./hosts/BookingEditHostRenderer.js";
|
|
30
|
-
import "./hosts/CustomerAuthHostRenderer.js";
|
|
31
|
-
import "./hooks/useSalesSdkCart.js";
|
|
32
|
-
import "./hooks/useSalesSdkCustomer.js";
|
|
33
|
-
import "./normalProductDetail/NormalProductDetailHostRenderer.js";
|
|
34
|
-
import "./hosts/createOpenBookingEditHost.js";
|
|
35
|
-
import "./hosts/createOpenMultiDaySelectHost.js";
|
|
36
|
-
import "./hosts/createOpenHolderSelectHost.js";
|
|
37
|
-
import "./hosts/createOpenCustomerAuthHost.js";
|
|
38
|
-
import "./demo/hosts/legacyOpenProductDetail.js";
|
|
39
|
-
import "./hosts/createCompositeOpenProductDetailHost.js";
|
|
40
|
-
import "./normalProductDetail/createOpenNormalProductDetailHost.js";
|
|
41
|
-
import "./normalProductDetail/createOpenBookingSelectionFlowHost.js";
|
|
42
|
-
import "./giftSelect/GiftSelectModal.js";
|
|
43
|
-
import "./giftSelect/GiftSelectHostRenderer.js";
|
|
44
|
-
import "./allergy/AllergySelectionModal.js";
|
|
45
|
-
import "./context/SalesSdkProvider.js";
|
|
46
|
-
import "./context/SalesSdkDishContext.js";
|
|
47
|
-
import "./context/SalesSdkBookingContext.js";
|
|
48
|
-
import "./hooks/useSalesSdkSummary.js";
|
|
49
|
-
import "./hooks/useSalesSdkProducts.js";
|
|
50
|
-
import "./demo/index.js";
|
|
51
|
-
import "./hooks/useSalesSdkDish.js";
|
|
52
|
-
import "./hooks/useCurrentSalesSdkDish.js";
|
|
53
|
-
import "./hooks/useSyncOsModule.js";
|
|
54
|
-
export {};
|