@pisell/private-materials 3.0.53 → 3.0.55
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/render/default/view.js +8 -8
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/index.js +14 -5
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/footer/index.js +23 -16
- package/es/components/booking/deposit/DepositItem/index.js +1 -1
- package/es/components/booking/deposit/index.js +4 -1
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/info/service/addService/index.js +5 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +10 -4
- package/es/components/booking/model.d.ts +2 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/index.js +9 -4
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/footer/index.js +8 -2
- package/lib/components/booking/deposit/DepositItem/index.js +1 -1
- package/lib/components/booking/deposit/index.js +4 -1
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/info/service/addService/index.js +3 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +10 -4
- package/lib/components/booking/model.d.ts +2 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/package.json +2 -2
|
@@ -27,7 +27,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
27
27
|
|
|
28
28
|
import React, { useContext, useEffect, useMemo, useState, useRef } from "react";
|
|
29
29
|
import SearchLg from "@pisell/icon/es/SearchLg";
|
|
30
|
-
import { Input, Button, Skeleton } from "antd";
|
|
30
|
+
import { Input, Button, Skeleton, Modal } from "antd";
|
|
31
31
|
import Drawer from "../components/drawer";
|
|
32
32
|
import TabPane from "../components/tabPane";
|
|
33
33
|
import { Context, Provider } from "./model";
|
|
@@ -129,6 +129,10 @@ var Addons = Provider(function (props) {
|
|
|
129
129
|
setSearch = _useState6[1];
|
|
130
130
|
var searchRef = useRef();
|
|
131
131
|
var context = useEngineContext();
|
|
132
|
+
var _Modal$useModal = Modal.useModal(),
|
|
133
|
+
_Modal$useModal2 = _slicedToArray(_Modal$useModal, 2),
|
|
134
|
+
modal = _Modal$useModal2[0],
|
|
135
|
+
contextHolder = _Modal$useModal2[1];
|
|
132
136
|
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
|
133
137
|
isTerminal = _ref.isTerminal,
|
|
134
138
|
interaction = _ref.interaction;
|
|
@@ -414,6 +418,13 @@ var Addons = Provider(function (props) {
|
|
|
414
418
|
}
|
|
415
419
|
});
|
|
416
420
|
}
|
|
421
|
+
if (state.channelDisabledEdit) {
|
|
422
|
+
modal.warning({
|
|
423
|
+
okText: locales.getText("pisell2.text.ok"),
|
|
424
|
+
content: locales.getText("pisell2.text.terminal-edit-message")
|
|
425
|
+
});
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
417
428
|
getProducts();
|
|
418
429
|
setSearch("");
|
|
419
430
|
dispatch({
|
|
@@ -443,9 +454,7 @@ var Addons = Provider(function (props) {
|
|
|
443
454
|
if (state.disabledEdit) {
|
|
444
455
|
return [];
|
|
445
456
|
}
|
|
446
|
-
|
|
447
|
-
return [];
|
|
448
|
-
}
|
|
457
|
+
|
|
449
458
|
// 添加按钮
|
|
450
459
|
var arr = [/*#__PURE__*/React.createElement(Button, {
|
|
451
460
|
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
@@ -579,6 +588,6 @@ var Addons = Provider(function (props) {
|
|
|
579
588
|
list: renderList,
|
|
580
589
|
amountSymbol: state.amountSymbol,
|
|
581
590
|
onChange: handleAddProduct
|
|
582
|
-
})))))));
|
|
591
|
+
})))))), contextHolder);
|
|
583
592
|
});
|
|
584
593
|
export default Addons;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -40,7 +40,7 @@ import { DownOutlined } from "@ant-design/icons";
|
|
|
40
40
|
* @Date: 2024-01-30 16:51
|
|
41
41
|
*/
|
|
42
42
|
var Footer = function Footer(props) {
|
|
43
|
-
var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$addons2, _state$addons4, _state$
|
|
43
|
+
var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$addons2, _state$addons4, _state$bookingDetail10;
|
|
44
44
|
var state = props.state,
|
|
45
45
|
buttons = props.buttons,
|
|
46
46
|
dispatch = props.dispatch,
|
|
@@ -340,7 +340,7 @@ var Footer = function Footer(props) {
|
|
|
340
340
|
_setLoading(false);
|
|
341
341
|
|
|
342
342
|
// return数据 checkout时需要
|
|
343
|
-
return _context4.abrupt("return", callbackData);
|
|
343
|
+
return _context4.abrupt("return", callbackData || values);
|
|
344
344
|
case 30:
|
|
345
345
|
_context4.prev = 30;
|
|
346
346
|
_context4.t1 = _context4["catch"](13);
|
|
@@ -444,29 +444,36 @@ var Footer = function Footer(props) {
|
|
|
444
444
|
}, [isEdit, checkoutLoading, isDisabled, state, source]);
|
|
445
445
|
var handleMenuClick = /*#__PURE__*/function () {
|
|
446
446
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e) {
|
|
447
|
-
var id, res;
|
|
447
|
+
var id, customer, res, _state$bookingDetail;
|
|
448
448
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
449
449
|
while (1) switch (_context6.prev = _context6.next) {
|
|
450
450
|
case 0:
|
|
451
451
|
id = state.bookingId;
|
|
452
|
+
customer = state.bookingDetail.customer;
|
|
452
453
|
if (!isEdit) {
|
|
453
|
-
_context6.next =
|
|
454
|
+
_context6.next = 8;
|
|
454
455
|
break;
|
|
455
456
|
}
|
|
456
|
-
_context6.next =
|
|
457
|
+
_context6.next = 5;
|
|
457
458
|
return handleSave({
|
|
458
459
|
type: "checkout",
|
|
459
460
|
messageShow: false
|
|
460
461
|
});
|
|
461
|
-
case
|
|
462
|
+
case 5:
|
|
462
463
|
res = _context6.sent;
|
|
463
464
|
id = (res === null || res === void 0 ? void 0 : res.order_id) || state.bookingId;
|
|
464
|
-
|
|
465
|
+
customer = res !== null && res !== void 0 && res.customer_id ? {
|
|
466
|
+
id: res === null || res === void 0 ? void 0 : res.customer_id
|
|
467
|
+
} : state.bookingDetail.customer;
|
|
468
|
+
case 8:
|
|
465
469
|
if (e.key === 'sendMail') {
|
|
466
470
|
state.action({
|
|
467
471
|
type: 'pisell1.sendPayLinkEmail',
|
|
468
472
|
data: {
|
|
469
|
-
id: id
|
|
473
|
+
id: id,
|
|
474
|
+
is_deposit: state.bookingDetail.is_deposit || Number((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.deposit_amount),
|
|
475
|
+
deposit_payment_time: state.bookingDetail.deposit_payment_time,
|
|
476
|
+
customer: customer
|
|
470
477
|
},
|
|
471
478
|
callback: function callback() {}
|
|
472
479
|
});
|
|
@@ -480,7 +487,7 @@ var Footer = function Footer(props) {
|
|
|
480
487
|
callback: function callback() {}
|
|
481
488
|
});
|
|
482
489
|
}
|
|
483
|
-
case
|
|
490
|
+
case 10:
|
|
484
491
|
case "end":
|
|
485
492
|
return _context6.stop();
|
|
486
493
|
}
|
|
@@ -579,10 +586,10 @@ var Footer = function Footer(props) {
|
|
|
579
586
|
* @Date: 2024-01-30 16:58
|
|
580
587
|
*/
|
|
581
588
|
var isCheckout = useMemo(function () {
|
|
582
|
-
var _state$
|
|
589
|
+
var _state$bookingDetail2, _state$bookingDetail3, _state$bookingDetail4;
|
|
583
590
|
var list = ["unfulfilled", "partially_paid", "unpaid", "payment_processing"];
|
|
584
591
|
// (支付状态 = 已支付 || 部分付款 || 未付款 || 支付处理中) && 预约状态 !== 已取消
|
|
585
|
-
if (!state.bookingId || ((_state$
|
|
592
|
+
if (!state.bookingId || ((_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : (_state$bookingDetail3 = _state$bookingDetail2.bookings) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.appointment_status) !== "cancelled" && list.includes(state === null || state === void 0 ? void 0 : (_state$bookingDetail4 = state.bookingDetail) === null || _state$bookingDetail4 === void 0 ? void 0 : _state$bookingDetail4.payment_status) && !state.disabledEdit) {
|
|
586
593
|
return true;
|
|
587
594
|
} else {
|
|
588
595
|
if (total.notPaidAmount > 0) {
|
|
@@ -657,8 +664,8 @@ var Footer = function Footer(props) {
|
|
|
657
664
|
* 是否只有定金支付
|
|
658
665
|
*/
|
|
659
666
|
var isOnlyDeposit = useMemo(function () {
|
|
660
|
-
var _state$
|
|
661
|
-
if (state !== null && state !== void 0 && (_state$
|
|
667
|
+
var _state$bookingDetail5, _state$bookingDetail6, _state$bookingDetail7, _state$bookingDetail8;
|
|
668
|
+
if (state !== null && state !== void 0 && (_state$bookingDetail5 = state.bookingDetail) !== null && _state$bookingDetail5 !== void 0 && _state$bookingDetail5.deposit_payment_time && state !== null && state !== void 0 && (_state$bookingDetail6 = state.bookingDetail) !== null && _state$bookingDetail6 !== void 0 && (_state$bookingDetail7 = _state$bookingDetail6.payment_types) !== null && _state$bookingDetail7 !== void 0 && (_state$bookingDetail8 = _state$bookingDetail7.every) !== null && _state$bookingDetail8 !== void 0 && _state$bookingDetail8.call(_state$bookingDetail7, function (item) {
|
|
662
669
|
return item === 'deposit';
|
|
663
670
|
})) {
|
|
664
671
|
return true;
|
|
@@ -679,8 +686,8 @@ var Footer = function Footer(props) {
|
|
|
679
686
|
|
|
680
687
|
// 只有定金支付时,直接展示
|
|
681
688
|
if (isOnlyDeposit) {
|
|
682
|
-
var _state$
|
|
683
|
-
return "".concat(locales.getText("pisell2.text.deposit-paid"), " ").concat(formatAmount(state === null || state === void 0 ? void 0 : (_state$
|
|
689
|
+
var _state$bookingDetail9;
|
|
690
|
+
return "".concat(locales.getText("pisell2.text.deposit-paid"), " ").concat(formatAmount(state === null || state === void 0 ? void 0 : (_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.deposit_amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"), " ").concat(total.duration ? "(".concat(total.duration, ")") : "");
|
|
684
691
|
}
|
|
685
692
|
|
|
686
693
|
// 有退款金额时, 直接展示 退款:$8.00
|
|
@@ -804,7 +811,7 @@ var Footer = function Footer(props) {
|
|
|
804
811
|
className: "order-total-item-label"
|
|
805
812
|
}, locales.getText("pisell1.text.subtotal")), /*#__PURE__*/React.createElement("span", {
|
|
806
813
|
className: "order-total-item-value"
|
|
807
|
-
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))), (((_state$
|
|
814
|
+
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))), (((_state$bookingDetail10 = state.bookingDetail) === null || _state$bookingDetail10 === void 0 ? void 0 : _state$bookingDetail10.surcharge) || []).map(function (d) {
|
|
808
815
|
return /*#__PURE__*/React.createElement("div", {
|
|
809
816
|
className: "order-total-item",
|
|
810
817
|
key: d.id
|
|
@@ -41,7 +41,7 @@ var DepositItem = function DepositItem(props) {
|
|
|
41
41
|
}, {
|
|
42
42
|
key: "1",
|
|
43
43
|
disabled: isPaid || isBookingCancelled,
|
|
44
|
-
label: /*#__PURE__*/React.createElement("div", null, locales.getText("pisell2.text.
|
|
44
|
+
label: /*#__PURE__*/React.createElement("div", null, locales.getText("pisell2.text.copy-to-clipboard"))
|
|
45
45
|
}];
|
|
46
46
|
var onClick = function onClick(_ref) {
|
|
47
47
|
var key = _ref.key;
|
|
@@ -51,7 +51,10 @@ var Deposit = function Deposit(props) {
|
|
|
51
51
|
action({
|
|
52
52
|
type: 'pisell1.sendPayLinkEmail',
|
|
53
53
|
data: {
|
|
54
|
-
id: id
|
|
54
|
+
id: id,
|
|
55
|
+
is_deposit: 1,
|
|
56
|
+
deposit_payment_time: bookingDetail.deposit_payment_time,
|
|
57
|
+
customer: bookingDetail.customer
|
|
55
58
|
},
|
|
56
59
|
callback: function callback() {}
|
|
57
60
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -200,7 +200,11 @@ var Info = function Info() {
|
|
|
200
200
|
case 3:
|
|
201
201
|
data = _context3.sent;
|
|
202
202
|
setLoading(false);
|
|
203
|
-
|
|
203
|
+
|
|
204
|
+
// 只有自动获取列表的时候才设置商品, 手动点击添加按钮的时候不设置
|
|
205
|
+
if (!state.service.addModal) {
|
|
206
|
+
setDefaultService(data === null || data === void 0 ? void 0 : data.list);
|
|
207
|
+
}
|
|
204
208
|
dispatch({
|
|
205
209
|
type: "setService",
|
|
206
210
|
payload: {
|
|
@@ -145,6 +145,8 @@ declare const _default: {
|
|
|
145
145
|
'pisell2.text.payment-link': string;
|
|
146
146
|
'pisell2.text.send-mail': string;
|
|
147
147
|
'pisell2.text.copy-to-clipboard': string;
|
|
148
|
+
'pisell2.text.ok': string;
|
|
149
|
+
'pisell2.text.terminal-edit-message': string;
|
|
148
150
|
};
|
|
149
151
|
'zh-CN': {
|
|
150
152
|
'pisell2.text.refunded-amount': string;
|
|
@@ -292,6 +294,8 @@ declare const _default: {
|
|
|
292
294
|
'pisell2.text.payment-link': string;
|
|
293
295
|
'pisell2.text.send-mail': string;
|
|
294
296
|
'pisell2.text.copy-to-clipboard': string;
|
|
297
|
+
'pisell2.text.ok': string;
|
|
298
|
+
'pisell2.text.terminal-edit-message': string;
|
|
295
299
|
};
|
|
296
300
|
'zh-HK': {
|
|
297
301
|
'pisell2.text.refunded-amount': string;
|
|
@@ -439,6 +443,8 @@ declare const _default: {
|
|
|
439
443
|
'pisell2.text.payment-link': string;
|
|
440
444
|
'pisell2.text.send-mail': string;
|
|
441
445
|
'pisell2.text.copy-to-clipboard': string;
|
|
446
|
+
'pisell2.text.ok': string;
|
|
447
|
+
'pisell2.text.terminal-edit-message': string;
|
|
442
448
|
};
|
|
443
449
|
};
|
|
444
450
|
export default _default;
|
|
@@ -158,8 +158,10 @@ export default {
|
|
|
158
158
|
'pisell2.text.deposit-paid': "Deposit paid",
|
|
159
159
|
"pisell2.text.stock": "Stock",
|
|
160
160
|
'pisell2.text.payment-link': "Payment link",
|
|
161
|
-
'pisell2.text.send-mail': "Send
|
|
162
|
-
'pisell2.text.copy-to-clipboard': "Copy to clipboard"
|
|
161
|
+
'pisell2.text.send-mail': "Send email",
|
|
162
|
+
'pisell2.text.copy-to-clipboard': "Copy to clipboard",
|
|
163
|
+
'pisell2.text.ok': "OK",
|
|
164
|
+
'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the Pisell Terminal."
|
|
163
165
|
},
|
|
164
166
|
'zh-CN': {
|
|
165
167
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -326,7 +328,9 @@ export default {
|
|
|
326
328
|
"pisell2.text.stock": "库存",
|
|
327
329
|
'pisell2.text.payment-link': "付款链接",
|
|
328
330
|
'pisell2.text.send-mail': "发送邮件",
|
|
329
|
-
'pisell2.text.copy-to-clipboard': "复制到剪切板"
|
|
331
|
+
'pisell2.text.copy-to-clipboard': "复制到剪切板",
|
|
332
|
+
'pisell2.text.ok': "好的",
|
|
333
|
+
'pisell2.text.terminal-edit-message': "此操作不可使用,如需使用请至Pisell 终端设备操作。"
|
|
330
334
|
},
|
|
331
335
|
'zh-HK': {
|
|
332
336
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -493,6 +497,8 @@ export default {
|
|
|
493
497
|
"pisell2.text.stock": "庫存",
|
|
494
498
|
'pisell2.text.payment-link': "付款鏈接",
|
|
495
499
|
'pisell2.text.send-mail': "發送郵件",
|
|
496
|
-
'pisell2.text.copy-to-clipboard': "複製到剪切板"
|
|
500
|
+
'pisell2.text.copy-to-clipboard': "複製到剪切板",
|
|
501
|
+
'pisell2.text.ok': "好的",
|
|
502
|
+
'pisell2.text.terminal-edit-message': "此操作不可使用,如需使用請至Pisell 終端設備操作。"
|
|
497
503
|
}
|
|
498
504
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -88,7 +89,7 @@ export declare const walkInData: {
|
|
|
88
89
|
id: number;
|
|
89
90
|
nickname: string;
|
|
90
91
|
};
|
|
91
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
92
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
92
93
|
state: FormState;
|
|
93
94
|
} & {
|
|
94
95
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,7 +69,7 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
72
73
|
state: FormState;
|
|
73
74
|
} & {
|
|
74
75
|
dispatch: (params: {
|
|
@@ -127,6 +127,7 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
127
127
|
const [search, setSearch] = (0, import_react.useState)("");
|
|
128
128
|
const searchRef = (0, import_react.useRef)();
|
|
129
129
|
const context = (0, import_useEngineContext.default)();
|
|
130
|
+
const [modal, contextHolder] = import_antd.Modal.useModal();
|
|
130
131
|
const { isTerminal, interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
131
132
|
(0, import_react.useEffect)(() => {
|
|
132
133
|
dispatch({
|
|
@@ -312,6 +313,13 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
312
313
|
}
|
|
313
314
|
});
|
|
314
315
|
}
|
|
316
|
+
if (state.channelDisabledEdit) {
|
|
317
|
+
modal.warning({
|
|
318
|
+
okText: import_utils3.locales.getText("pisell2.text.ok"),
|
|
319
|
+
content: import_utils3.locales.getText("pisell2.text.terminal-edit-message")
|
|
320
|
+
});
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
315
323
|
getProducts();
|
|
316
324
|
setSearch("");
|
|
317
325
|
dispatch({
|
|
@@ -331,9 +339,6 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
331
339
|
if (state.disabledEdit) {
|
|
332
340
|
return [];
|
|
333
341
|
}
|
|
334
|
-
if (state.channelDisabledEdit) {
|
|
335
|
-
return [];
|
|
336
|
-
}
|
|
337
342
|
let arr = [
|
|
338
343
|
/* @__PURE__ */ import_react.default.createElement(
|
|
339
344
|
import_antd.Button,
|
|
@@ -477,7 +482,7 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
477
482
|
)
|
|
478
483
|
))
|
|
479
484
|
))
|
|
480
|
-
));
|
|
485
|
+
), contextHolder);
|
|
481
486
|
});
|
|
482
487
|
var addons_default = Addons;
|
|
483
488
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -190,7 +190,7 @@ var Footer = (props) => {
|
|
|
190
190
|
}
|
|
191
191
|
state == null ? void 0 : state.callback(callbackData);
|
|
192
192
|
_setLoading(false);
|
|
193
|
-
return callbackData;
|
|
193
|
+
return callbackData || values;
|
|
194
194
|
} catch (err) {
|
|
195
195
|
console.log(err);
|
|
196
196
|
if ((err == null ? void 0 : err.code) === 70101) {
|
|
@@ -238,16 +238,22 @@ var Footer = (props) => {
|
|
|
238
238
|
);
|
|
239
239
|
}, [isEdit, checkoutLoading, isDisabled, state, source]);
|
|
240
240
|
const handleMenuClick = async (e) => {
|
|
241
|
+
var _a2;
|
|
241
242
|
let id = state.bookingId;
|
|
243
|
+
let customer = state.bookingDetail.customer;
|
|
242
244
|
if (isEdit) {
|
|
243
245
|
const res = await handleSave({ type: "checkout", messageShow: false });
|
|
244
246
|
id = (res == null ? void 0 : res.order_id) || state.bookingId;
|
|
247
|
+
customer = (res == null ? void 0 : res.customer_id) ? { id: res == null ? void 0 : res.customer_id } : state.bookingDetail.customer;
|
|
245
248
|
}
|
|
246
249
|
if (e.key === "sendMail") {
|
|
247
250
|
state.action({
|
|
248
251
|
type: "pisell1.sendPayLinkEmail",
|
|
249
252
|
data: {
|
|
250
|
-
id
|
|
253
|
+
id,
|
|
254
|
+
is_deposit: state.bookingDetail.is_deposit || Number((_a2 = state.bookingDetail) == null ? void 0 : _a2.deposit_amount),
|
|
255
|
+
deposit_payment_time: state.bookingDetail.deposit_payment_time,
|
|
256
|
+
customer
|
|
251
257
|
},
|
|
252
258
|
callback: () => {
|
|
253
259
|
}
|
|
@@ -79,7 +79,7 @@ var DepositItem = (props) => {
|
|
|
79
79
|
{
|
|
80
80
|
key: "1",
|
|
81
81
|
disabled: isPaid || isBookingCancelled,
|
|
82
|
-
label: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("pisell2.text.
|
|
82
|
+
label: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("pisell2.text.copy-to-clipboard"))
|
|
83
83
|
}
|
|
84
84
|
];
|
|
85
85
|
const onClick = ({ key }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -132,7 +132,9 @@ var Info = () => {
|
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
setLoading(false);
|
|
135
|
-
|
|
135
|
+
if (!state.service.addModal) {
|
|
136
|
+
setDefaultService(data == null ? void 0 : data.list);
|
|
137
|
+
}
|
|
136
138
|
dispatch({
|
|
137
139
|
type: "setService",
|
|
138
140
|
payload: {
|
|
@@ -145,6 +145,8 @@ declare const _default: {
|
|
|
145
145
|
'pisell2.text.payment-link': string;
|
|
146
146
|
'pisell2.text.send-mail': string;
|
|
147
147
|
'pisell2.text.copy-to-clipboard': string;
|
|
148
|
+
'pisell2.text.ok': string;
|
|
149
|
+
'pisell2.text.terminal-edit-message': string;
|
|
148
150
|
};
|
|
149
151
|
'zh-CN': {
|
|
150
152
|
'pisell2.text.refunded-amount': string;
|
|
@@ -292,6 +294,8 @@ declare const _default: {
|
|
|
292
294
|
'pisell2.text.payment-link': string;
|
|
293
295
|
'pisell2.text.send-mail': string;
|
|
294
296
|
'pisell2.text.copy-to-clipboard': string;
|
|
297
|
+
'pisell2.text.ok': string;
|
|
298
|
+
'pisell2.text.terminal-edit-message': string;
|
|
295
299
|
};
|
|
296
300
|
'zh-HK': {
|
|
297
301
|
'pisell2.text.refunded-amount': string;
|
|
@@ -439,6 +443,8 @@ declare const _default: {
|
|
|
439
443
|
'pisell2.text.payment-link': string;
|
|
440
444
|
'pisell2.text.send-mail': string;
|
|
441
445
|
'pisell2.text.copy-to-clipboard': string;
|
|
446
|
+
'pisell2.text.ok': string;
|
|
447
|
+
'pisell2.text.terminal-edit-message': string;
|
|
442
448
|
};
|
|
443
449
|
};
|
|
444
450
|
export default _default;
|