@pisell/private-materials 6.4.36 → 6.4.38
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/checkout/PaymentModal.js +22 -20
- package/es/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/checkout/PaymentModal.js +24 -21
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/package.json +2 -2
@@ -176,6 +176,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
176
176
|
}, [paymentMethods]);
|
177
177
|
var handleAddCashPayment = /*#__PURE__*/function () {
|
178
178
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(result) {
|
179
|
+
var _interaction$utils, _interaction$utils$po;
|
179
180
|
var cashPaymentMethod;
|
180
181
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
181
182
|
while (1) switch (_context.prev = _context.next) {
|
@@ -201,6 +202,19 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
201
202
|
rounding_amount: result.roundingAmount
|
202
203
|
});
|
203
204
|
case 3:
|
205
|
+
logger === null || logger === void 0 || logger.addLog({
|
206
|
+
type: 'info',
|
207
|
+
title: 'open_till',
|
208
|
+
metadata: {}
|
209
|
+
});
|
210
|
+
interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$po = _interaction$utils.postMessageToApp) === null || _interaction$utils$po === void 0 || _interaction$utils$po.call(_interaction$utils, {
|
211
|
+
module: 'till',
|
212
|
+
key: 'open_till',
|
213
|
+
data: {
|
214
|
+
type: 'cash' // cash 不需要验证钱箱权限
|
215
|
+
}
|
216
|
+
});
|
217
|
+
case 5:
|
204
218
|
case "end":
|
205
219
|
return _context.stop();
|
206
220
|
}
|
@@ -505,7 +519,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
505
519
|
// );
|
506
520
|
var orderPaymentAddedUnsubscribe = core.effects.on(CheckoutHooks.OnOrderPaymentAdded, /*#__PURE__*/function () {
|
507
521
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) {
|
508
|
-
var balanceDueAmount, autoCloseConfig, _orderInfo
|
522
|
+
var balanceDueAmount, autoCloseConfig, _orderInfo;
|
509
523
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
510
524
|
while (1) switch (_context5.prev = _context5.next) {
|
511
525
|
case 0:
|
@@ -536,25 +550,6 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
536
550
|
}
|
537
551
|
}));
|
538
552
|
case 7:
|
539
|
-
// 判断是否为现金支付
|
540
|
-
paymentMethodName = data.paymentMethodName || data.name || '';
|
541
|
-
isCashPayment = data.paymentMethodCode === 'CASHMANUAL' || /现金|現金/i.test(paymentMethodName) || /cash/i.test(paymentMethodName);
|
542
|
-
if (isCashPayment) {
|
543
|
-
logger === null || logger === void 0 || logger.addLog({
|
544
|
-
type: 'info',
|
545
|
-
title: 'open_till',
|
546
|
-
metadata: {}
|
547
|
-
});
|
548
|
-
// handleToastClose();
|
549
|
-
interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$po = _interaction$utils.postMessageToApp) === null || _interaction$utils$po === void 0 || _interaction$utils$po.call(_interaction$utils, {
|
550
|
-
module: 'till',
|
551
|
-
key: 'open_till',
|
552
|
-
data: {
|
553
|
-
type: 'cash' // cash 不需要验证钱箱权限
|
554
|
-
}
|
555
|
-
});
|
556
|
-
}
|
557
|
-
case 10:
|
558
553
|
case "end":
|
559
554
|
return _context5.stop();
|
560
555
|
}
|
@@ -1740,6 +1735,13 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
1740
1735
|
value: tempEngineContext
|
1741
1736
|
}, children);
|
1742
1737
|
};
|
1738
|
+
var orderNote = '';
|
1739
|
+
try {
|
1740
|
+
var checkoutModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1741
|
+
orderNote = checkoutModule.getOrderNote();
|
1742
|
+
} catch (error) {
|
1743
|
+
console.warn('Failed to get initial custom amount:', error);
|
1744
|
+
}
|
1743
1745
|
|
1744
1746
|
// 渲染NoteModal
|
1745
1747
|
ReactDOM.render( /*#__PURE__*/React.createElement(EngineContextProvider, null, /*#__PURE__*/React.createElement(ConfigProvider, {
|
@@ -139,10 +139,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
139
139
|
};
|
140
140
|
}, [paymentMethods]);
|
141
141
|
const handleAddCashPayment = async (result) => {
|
142
|
+
var _a2, _b2;
|
142
143
|
const cashPaymentMethod = paymentMethods.find(
|
143
144
|
(method) => {
|
144
|
-
var
|
145
|
-
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((
|
145
|
+
var _a3;
|
146
|
+
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((_a3 = method.name) == null ? void 0 : _a3.toLowerCase().includes("cash"));
|
146
147
|
}
|
147
148
|
);
|
148
149
|
await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
|
@@ -159,6 +160,19 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
159
160
|
voucher_id: 0,
|
160
161
|
rounding_amount: result.roundingAmount
|
161
162
|
}));
|
163
|
+
logger == null ? void 0 : logger.addLog({
|
164
|
+
type: "info",
|
165
|
+
title: "open_till",
|
166
|
+
metadata: {}
|
167
|
+
});
|
168
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
169
|
+
module: "till",
|
170
|
+
key: "open_till",
|
171
|
+
data: {
|
172
|
+
type: "cash"
|
173
|
+
// cash 不需要验证钱箱权限
|
174
|
+
}
|
175
|
+
});
|
162
176
|
};
|
163
177
|
const processSurcharge = (surcharge) => {
|
164
178
|
if (typeof surcharge === "string") {
|
@@ -398,7 +412,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
398
412
|
const orderPaymentAddedUnsubscribe = core.effects.on(
|
399
413
|
CheckoutHooks.OnOrderPaymentAdded,
|
400
414
|
async (data) => {
|
401
|
-
var _a2, _b2;
|
402
415
|
console.log("orderPaymentAddedUnsubscribe>>>>", data);
|
403
416
|
const balanceDueAmount2 = checkoutModule.getBalanceDueAmount();
|
404
417
|
if (Number(balanceDueAmount2) > 0) {
|
@@ -427,23 +440,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
427
440
|
}
|
428
441
|
);
|
429
442
|
}
|
430
|
-
const paymentMethodName = data.paymentMethodName || data.name || "";
|
431
|
-
const isCashPayment = data.paymentMethodCode === "CASHMANUAL" || /现金|現金/i.test(paymentMethodName) || /cash/i.test(paymentMethodName);
|
432
|
-
if (isCashPayment) {
|
433
|
-
logger == null ? void 0 : logger.addLog({
|
434
|
-
type: "info",
|
435
|
-
title: "open_till",
|
436
|
-
metadata: {}
|
437
|
-
});
|
438
|
-
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
439
|
-
module: "till",
|
440
|
-
key: "open_till",
|
441
|
-
data: {
|
442
|
-
type: "cash"
|
443
|
-
// cash 不需要验证钱箱权限
|
444
|
-
}
|
445
|
-
});
|
446
|
-
}
|
447
443
|
}
|
448
444
|
);
|
449
445
|
return () => {
|
@@ -1237,6 +1233,13 @@ var PaymentModal = ({
|
|
1237
1233
|
}, []);
|
1238
1234
|
return /* @__PURE__ */ import_react.default.createElement(TempContext.Provider, { value: tempEngineContext }, children);
|
1239
1235
|
};
|
1236
|
+
let orderNote2 = "";
|
1237
|
+
try {
|
1238
|
+
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1239
|
+
orderNote2 = checkoutModule.getOrderNote();
|
1240
|
+
} catch (error) {
|
1241
|
+
console.warn("Failed to get initial custom amount:", error);
|
1242
|
+
}
|
1240
1243
|
import_react_dom2.default.render(
|
1241
1244
|
/* @__PURE__ */ import_react.default.createElement(EngineContextProvider, null, /* @__PURE__ */ import_react.default.createElement(import_materials.ConfigProvider, { prefixCls: "pisell-lowcode", theme: {
|
1242
1245
|
token: {
|
@@ -1247,7 +1250,7 @@ var PaymentModal = ({
|
|
1247
1250
|
{
|
1248
1251
|
open: true,
|
1249
1252
|
title: import_utils.locales.getText("pisell2.text.add-order-notes"),
|
1250
|
-
value:
|
1253
|
+
value: orderNote2,
|
1251
1254
|
onConfirm: handleNoteConfirm2,
|
1252
1255
|
onDelete: handleNoteDelete2,
|
1253
1256
|
onCancel: handleNoteCancel2
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.4.
|
3
|
+
"version": "6.4.38",
|
4
4
|
"main": "./lib/index.js",
|
5
5
|
"module": "./es/index.js",
|
6
6
|
"types": "./lib/index.d.ts",
|
@@ -60,8 +60,8 @@
|
|
60
60
|
"react-resizable": "^3.0.5",
|
61
61
|
"styled-components": "^6.0.0-rc.3",
|
62
62
|
"@pisell/date-picker": "3.0.7",
|
63
|
-
"@pisell/materials": "6.4.5",
|
64
63
|
"@pisell/icon": "0.0.11",
|
64
|
+
"@pisell/materials": "6.4.5",
|
65
65
|
"@pisell/utils": "3.0.2"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|