@pisell/private-materials 6.4.37 → 6.4.39
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/checkout/PaymentModal.js +15 -20
- package/es/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/checkout/PaymentModal.js +16 -20
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/package.json +4 -4
@@ -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
|
}
|
@@ -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 () => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.4.
|
3
|
+
"version": "6.4.39",
|
4
4
|
"main": "./lib/index.js",
|
5
5
|
"module": "./es/index.js",
|
6
6
|
"types": "./lib/index.d.ts",
|
@@ -59,10 +59,10 @@
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
60
60
|
"react-resizable": "^3.0.5",
|
61
61
|
"styled-components": "^6.0.0-rc.3",
|
62
|
-
"@pisell/
|
63
|
-
"@pisell/materials": "6.4.
|
62
|
+
"@pisell/date-picker": "3.0.7",
|
63
|
+
"@pisell/materials": "6.4.6",
|
64
64
|
"@pisell/utils": "3.0.2",
|
65
|
-
"@pisell/
|
65
|
+
"@pisell/icon": "0.0.11"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"react": "^18.0.0",
|