@pisell/private-materials 3.0.87 → 3.0.89
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 +3 -3
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/index.d.ts +2 -2
- package/es/components/booking/components/footer/index.js +172 -157
- package/es/components/booking/deposit/DepositItem/index.d.ts +4 -3
- package/es/components/booking/deposit/DepositItem/index.js +22 -21
- package/es/components/booking/deposit/index.d.ts +1 -1
- package/es/components/booking/deposit/index.js +23 -18
- 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 +1 -2
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +5 -3
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +140 -77
- package/es/components/booking/info/clientVariant/vertical/index.js +8 -4
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +1 -2
- package/es/components/booking/info/service/addService/index.js +1 -1
- package/es/components/booking/info/service/editService/index.d.ts +2 -2
- package/es/components/booking/info/service/editService/index.js +60 -59
- package/es/components/booking/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/booking/utils.js +3 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/index.d.ts +2 -2
- package/lib/components/booking/components/footer/index.js +27 -12
- package/lib/components/booking/deposit/DepositItem/index.d.ts +4 -3
- package/lib/components/booking/deposit/DepositItem/index.js +3 -2
- package/lib/components/booking/deposit/index.d.ts +1 -1
- package/lib/components/booking/deposit/index.js +32 -6
- 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 +1 -2
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +5 -3
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +16 -12
- package/lib/components/booking/info/clientVariant/vertical/index.js +17 -13
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +1 -2
- package/lib/components/booking/info/service/addService/index.js +1 -1
- package/lib/components/booking/info/service/editService/index.d.ts +2 -2
- package/lib/components/booking/info/service/editService/index.js +16 -15
- package/lib/components/booking/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/booking/utils.js +1 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/package.json +1 -1
|
@@ -17,19 +17,19 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
17
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
18
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
import React, { useEffect, useMemo, useState } from
|
|
21
|
-
import ChevronDown from
|
|
22
|
-
import classNames from
|
|
23
|
-
import { Skeleton, message, Dropdown, Space, Modal } from
|
|
24
|
-
import { formatAmount, locales } from
|
|
25
|
-
import { Button } from
|
|
20
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
21
|
+
import ChevronDown from '@pisell/icon/es/ChevronDown';
|
|
22
|
+
import classNames from 'classnames';
|
|
23
|
+
import { Skeleton, message, Dropdown, Space, Modal } from 'antd';
|
|
24
|
+
import { formatAmount, locales } from '@pisell/utils';
|
|
25
|
+
import { Button } from 'antd';
|
|
26
26
|
import { formatProducts } from "../../addons";
|
|
27
27
|
import { formatValues } from "./utils";
|
|
28
28
|
import { getSumTotal, is_price_include_tax } from "./amount";
|
|
29
29
|
import FooterMenus from "./FooterMenus";
|
|
30
30
|
import "./index.less";
|
|
31
31
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
32
|
-
import { DownOutlined } from
|
|
32
|
+
import { DownOutlined } from '@ant-design/icons';
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* @title: 底部
|
|
@@ -64,63 +64,67 @@ var Footer = function Footer(props) {
|
|
|
64
64
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
65
65
|
isTerminal = _context$appHelper$ut.isTerminal,
|
|
66
66
|
interaction = _context$appHelper$ut.interaction,
|
|
67
|
-
store = _context$appHelper$ut.store
|
|
67
|
+
store = _context$appHelper$ut.store,
|
|
68
|
+
storage = _context$appHelper$ut.storage;
|
|
68
69
|
var isShowPaymentLink = store === null || store === void 0 ? void 0 : (_store$getState = store.getState) === null || _store$getState === void 0 ? void 0 : (_store$getState$call = _store$getState.call(store)) === null || _store$getState$call === void 0 ? void 0 : (_store$getState$call$ = _store$getState$call.global) === null || _store$getState$call$ === void 0 ? void 0 : _store$getState$call$.paymentLinkBtnShow;
|
|
69
70
|
var _Modal$useModal = Modal.useModal(),
|
|
70
71
|
_Modal$useModal2 = _slicedToArray(_Modal$useModal, 2),
|
|
71
72
|
modal = _Modal$useModal2[0],
|
|
72
73
|
contextHolder = _Modal$useModal2[1];
|
|
73
74
|
var setActiveTab = state.setActiveTab;
|
|
75
|
+
var isTeam = useMemo(function () {
|
|
76
|
+
return storage.get('channel') === 'android_team_portal' || storage.get('channel') === 'ios_team_portal';
|
|
77
|
+
}, []);
|
|
74
78
|
var actionMap = {
|
|
75
79
|
sale: {
|
|
76
|
-
label: locales.getText(
|
|
77
|
-
key:
|
|
80
|
+
label: locales.getText('pisell2.text.addons'),
|
|
81
|
+
key: 'sale'
|
|
78
82
|
},
|
|
79
83
|
paymentLink: {
|
|
80
|
-
label: locales.getText(
|
|
81
|
-
key:
|
|
84
|
+
label: locales.getText('pisell2.text.payment-link'),
|
|
85
|
+
key: 'payment',
|
|
82
86
|
children: [{
|
|
83
|
-
label: locales.getText(
|
|
84
|
-
key:
|
|
87
|
+
label: locales.getText('pisell2.text.send-mail'),
|
|
88
|
+
key: 'sendMail'
|
|
85
89
|
}, {
|
|
86
|
-
label: locales.getText(
|
|
87
|
-
key:
|
|
90
|
+
label: locales.getText('pisell2.text.copy-to-clipboard'),
|
|
91
|
+
key: 'copy'
|
|
88
92
|
}]
|
|
89
93
|
},
|
|
90
94
|
print: {
|
|
91
|
-
label:
|
|
92
|
-
key:
|
|
95
|
+
label: 'Print',
|
|
96
|
+
key: 'print'
|
|
93
97
|
},
|
|
94
98
|
orderDetail: {
|
|
95
|
-
label: locales.getText(
|
|
96
|
-
key:
|
|
99
|
+
label: locales.getText('pisell2.text.deposit-order-detail'),
|
|
100
|
+
key: 'orderDetail'
|
|
97
101
|
},
|
|
98
102
|
refund: {
|
|
99
|
-
label: locales.getText(
|
|
100
|
-
key:
|
|
103
|
+
label: locales.getText('pisell2.text.refund'),
|
|
104
|
+
key: 'refund'
|
|
101
105
|
},
|
|
102
106
|
rebook: {
|
|
103
|
-
label: locales.getText(
|
|
104
|
-
key:
|
|
107
|
+
label: locales.getText('pisell2.text.rebook'),
|
|
108
|
+
key: 'rebook'
|
|
105
109
|
},
|
|
106
110
|
cancelOrder: {
|
|
107
|
-
label:
|
|
108
|
-
key:
|
|
111
|
+
label: 'Cancel order',
|
|
112
|
+
key: 'cancelOrder'
|
|
109
113
|
}
|
|
110
114
|
};
|
|
111
115
|
useEffect(function () {
|
|
112
116
|
if (state.bookingDetail) {
|
|
113
117
|
state.action({
|
|
114
|
-
type:
|
|
118
|
+
type: 'pisell1.registerPlugin',
|
|
115
119
|
data: {
|
|
116
|
-
pluginList: [
|
|
120
|
+
pluginList: ['RefundPlugin']
|
|
117
121
|
}
|
|
118
122
|
});
|
|
119
123
|
}
|
|
120
124
|
}, [state.bookingDetail]);
|
|
121
125
|
useEffect(function () {
|
|
122
126
|
store === null || store === void 0 ? void 0 : store.dispatch({
|
|
123
|
-
type:
|
|
127
|
+
type: 'global/_getPaymentLinkBtnShow'
|
|
124
128
|
});
|
|
125
129
|
}, []);
|
|
126
130
|
|
|
@@ -132,7 +136,7 @@ var Footer = function Footer(props) {
|
|
|
132
136
|
var transaction_habit_selection = useMemo(function () {
|
|
133
137
|
var _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7;
|
|
134
138
|
return (state === null || state === void 0 ? void 0 : (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : (_state$bookingConfig6 = _state$bookingConfig5.config) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.information_tab) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.transaction_habit_selection) || {
|
|
135
|
-
type:
|
|
139
|
+
type: 'service_now_pay_later',
|
|
136
140
|
button_rows: 1
|
|
137
141
|
};
|
|
138
142
|
}, [state === null || state === void 0 ? void 0 : (_state$bookingConfig8 = state.bookingConfig) === null || _state$bookingConfig8 === void 0 ? void 0 : (_state$bookingConfig9 = _state$bookingConfig8.config) === null || _state$bookingConfig9 === void 0 ? void 0 : _state$bookingConfig9.information_tab]);
|
|
@@ -229,15 +233,15 @@ var Footer = function Footer(props) {
|
|
|
229
233
|
break;
|
|
230
234
|
}
|
|
231
235
|
return _context.abrupt("return", interaction === null || interaction === void 0 ? void 0 : (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 ? void 0 : (_interaction$utils$po = _interaction$utils.postMessageToApp) === null || _interaction$utils$po === void 0 ? void 0 : _interaction$utils$po.call(_interaction$utils, {
|
|
232
|
-
module:
|
|
233
|
-
key:
|
|
236
|
+
module: 'booking',
|
|
237
|
+
key: 'booking_checkout',
|
|
234
238
|
data: {
|
|
235
239
|
order_id: order_id
|
|
236
240
|
}
|
|
237
241
|
}));
|
|
238
242
|
case 2:
|
|
239
243
|
state.action({
|
|
240
|
-
type:
|
|
244
|
+
type: 'pisell1.handlePayment',
|
|
241
245
|
data: {
|
|
242
246
|
orderId: order_id
|
|
243
247
|
},
|
|
@@ -275,7 +279,7 @@ var Footer = function Footer(props) {
|
|
|
275
279
|
}
|
|
276
280
|
_context2.next = 3;
|
|
277
281
|
return handleSave({
|
|
278
|
-
type:
|
|
282
|
+
type: 'checkout'
|
|
279
283
|
});
|
|
280
284
|
case 3:
|
|
281
285
|
res = _context2.sent;
|
|
@@ -316,13 +320,13 @@ var Footer = function Footer(props) {
|
|
|
316
320
|
shop_discount_reason: state.bookingDetail.shop_discount_reason
|
|
317
321
|
});
|
|
318
322
|
case 4:
|
|
319
|
-
message.success(locales.getText(
|
|
323
|
+
message.success(locales.getText('pisell2.text.addons') + locales.getText('pisell2.text.updated'));
|
|
320
324
|
_context3.next = 10;
|
|
321
325
|
break;
|
|
322
326
|
case 7:
|
|
323
327
|
_context3.prev = 7;
|
|
324
328
|
_context3.t0 = _context3["catch"](0);
|
|
325
|
-
console.log(
|
|
329
|
+
console.log('state.bookingId && state.addons.edit', _context3.t0);
|
|
326
330
|
case 10:
|
|
327
331
|
case "end":
|
|
328
332
|
return _context3.stop();
|
|
@@ -350,12 +354,12 @@ var Footer = function Footer(props) {
|
|
|
350
354
|
case 0:
|
|
351
355
|
type = _ref4.type, _ref4$messageShow = _ref4.messageShow, messageShow = _ref4$messageShow === void 0 ? true : _ref4$messageShow;
|
|
352
356
|
// 区分loading, 是点击的checkout 还是save
|
|
353
|
-
_setLoading = type ===
|
|
357
|
+
_setLoading = type === 'checkout' ? setCheckoutLoading : setLoading;
|
|
354
358
|
_setLoading(true);
|
|
355
|
-
editApi = state.renderType ===
|
|
356
|
-
createApi = state.renderType ===
|
|
359
|
+
editApi = state.renderType === 'eventBooking' ? state.apis.editEventBooking : state.apis.editBooking;
|
|
360
|
+
createApi = state.renderType === 'eventBooking' ? state.apis.createEventBooking : state.apis.createBooking;
|
|
357
361
|
saveOtherValue = {};
|
|
358
|
-
if (!(type ===
|
|
362
|
+
if (!(type === 'save')) {
|
|
359
363
|
_context4.next = 13;
|
|
360
364
|
break;
|
|
361
365
|
}
|
|
@@ -391,7 +395,7 @@ var Footer = function Footer(props) {
|
|
|
391
395
|
case 23:
|
|
392
396
|
callbackData = _context4.sent;
|
|
393
397
|
if (messageShow) {
|
|
394
|
-
message.success(locales.getText(state.bookingId ?
|
|
398
|
+
message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
|
|
395
399
|
}
|
|
396
400
|
case 25:
|
|
397
401
|
// 回调关闭弹窗
|
|
@@ -433,9 +437,9 @@ var Footer = function Footer(props) {
|
|
|
433
437
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
434
438
|
while (1) switch (_context5.prev = _context5.next) {
|
|
435
439
|
case 0:
|
|
436
|
-
status =
|
|
440
|
+
status = 'completed';
|
|
437
441
|
dispatch({
|
|
438
|
-
type:
|
|
442
|
+
type: 'setStatus',
|
|
439
443
|
payload: status
|
|
440
444
|
});
|
|
441
445
|
_context5.next = 4;
|
|
@@ -444,7 +448,7 @@ var Footer = function Footer(props) {
|
|
|
444
448
|
});
|
|
445
449
|
case 4:
|
|
446
450
|
data = _context5.sent;
|
|
447
|
-
message.success(locales.getText(
|
|
451
|
+
message.success(locales.getText('pisell1.text.edit-status-success'));
|
|
448
452
|
state === null || state === void 0 ? void 0 : state.callback({
|
|
449
453
|
order_id: state.bookingId
|
|
450
454
|
});
|
|
@@ -470,16 +474,16 @@ var Footer = function Footer(props) {
|
|
|
470
474
|
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
471
475
|
var _interaction$utils2, _interaction$utils2$p;
|
|
472
476
|
return interaction === null || interaction === void 0 ? void 0 : (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 ? void 0 : (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 ? void 0 : _interaction$utils2$p.call(_interaction$utils2, {
|
|
473
|
-
module:
|
|
474
|
-
key:
|
|
477
|
+
module: 'booking',
|
|
478
|
+
key: 'booking_refund',
|
|
475
479
|
data: {
|
|
476
480
|
order_id: state.bookingId
|
|
477
481
|
},
|
|
478
|
-
origin:
|
|
482
|
+
origin: '/booking'
|
|
479
483
|
});
|
|
480
484
|
}
|
|
481
485
|
state.action({
|
|
482
|
-
type:
|
|
486
|
+
type: 'pisell1.handleRefund',
|
|
483
487
|
data: {
|
|
484
488
|
orderId: state.bookingId
|
|
485
489
|
},
|
|
@@ -500,15 +504,15 @@ var Footer = function Footer(props) {
|
|
|
500
504
|
* @Date: 2024-01-30 16:57
|
|
501
505
|
*/
|
|
502
506
|
var checkoutButton = useMemo(function () {
|
|
503
|
-
var buttonType =
|
|
504
|
-
if (transaction_habit_selection.type ===
|
|
505
|
-
buttonType =
|
|
507
|
+
var buttonType = 'primary';
|
|
508
|
+
if (transaction_habit_selection.type === 'service_now_pay_later') {
|
|
509
|
+
buttonType = 'default';
|
|
506
510
|
}
|
|
507
|
-
if (source ===
|
|
508
|
-
buttonType =
|
|
511
|
+
if (source === 'payment') {
|
|
512
|
+
buttonType = 'primary';
|
|
509
513
|
}
|
|
510
514
|
if (!isEdit) {
|
|
511
|
-
buttonType =
|
|
515
|
+
buttonType = 'primary';
|
|
512
516
|
}
|
|
513
517
|
return /*#__PURE__*/React.createElement(Button, {
|
|
514
518
|
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
@@ -520,7 +524,7 @@ var Footer = function Footer(props) {
|
|
|
520
524
|
handleCheckout();
|
|
521
525
|
},
|
|
522
526
|
disabled: isDisabled
|
|
523
|
-
}, locales.getText(
|
|
527
|
+
}, locales.getText('pisell2.text.checkout'));
|
|
524
528
|
}, [isEdit, checkoutLoading, isDisabled, state, source]);
|
|
525
529
|
var handleMenuClick = /*#__PURE__*/function () {
|
|
526
530
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e) {
|
|
@@ -536,7 +540,7 @@ var Footer = function Footer(props) {
|
|
|
536
540
|
}
|
|
537
541
|
_context6.next = 5;
|
|
538
542
|
return handleSave({
|
|
539
|
-
type:
|
|
543
|
+
type: 'checkout',
|
|
540
544
|
messageShow: false
|
|
541
545
|
});
|
|
542
546
|
case 5:
|
|
@@ -546,10 +550,10 @@ var Footer = function Footer(props) {
|
|
|
546
550
|
id: res === null || res === void 0 ? void 0 : res.customer_id
|
|
547
551
|
} : state.bookingDetail.customer;
|
|
548
552
|
case 8:
|
|
549
|
-
if (e.key ===
|
|
553
|
+
if (e.key === 'sendMail') {
|
|
550
554
|
console.log(e);
|
|
551
555
|
state.action({
|
|
552
|
-
type:
|
|
556
|
+
type: 'pisell1.sendPayLinkEmail',
|
|
553
557
|
data: {
|
|
554
558
|
id: id,
|
|
555
559
|
is_deposit: state.bookingDetail.is_deposit || Number((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.deposit_amount),
|
|
@@ -560,9 +564,9 @@ var Footer = function Footer(props) {
|
|
|
560
564
|
callback: function callback() {}
|
|
561
565
|
});
|
|
562
566
|
}
|
|
563
|
-
if (e.key ===
|
|
567
|
+
if (e.key === 'copy') {
|
|
564
568
|
state.action({
|
|
565
|
-
type:
|
|
569
|
+
type: 'pisell1.genClientPayLink',
|
|
566
570
|
data: {
|
|
567
571
|
id: id
|
|
568
572
|
},
|
|
@@ -590,8 +594,8 @@ var Footer = function Footer(props) {
|
|
|
590
594
|
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
591
595
|
var _interaction$utils3, _interaction$utils3$p;
|
|
592
596
|
return interaction === null || interaction === void 0 ? void 0 : (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 ? void 0 : (_interaction$utils3$p = _interaction$utils3.postMessageToApp) === null || _interaction$utils3$p === void 0 ? void 0 : _interaction$utils3$p.call(_interaction$utils3, {
|
|
593
|
-
module:
|
|
594
|
-
key:
|
|
597
|
+
module: 'booking',
|
|
598
|
+
key: 'edit_order',
|
|
595
599
|
data: {
|
|
596
600
|
order_id: state.bookingId
|
|
597
601
|
}
|
|
@@ -599,12 +603,12 @@ var Footer = function Footer(props) {
|
|
|
599
603
|
}
|
|
600
604
|
if (state.channelDisabledEdit) {
|
|
601
605
|
modal.warning({
|
|
602
|
-
okText: locales.getText(
|
|
603
|
-
content: locales.getText(
|
|
606
|
+
okText: locales.getText('pisell2.text.ok'),
|
|
607
|
+
content: locales.getText('pisell2.text.terminal-edit-message')
|
|
604
608
|
});
|
|
605
609
|
return;
|
|
606
610
|
}
|
|
607
|
-
setActiveTab === null || setActiveTab === void 0 ? void 0 : setActiveTab(
|
|
611
|
+
setActiveTab === null || setActiveTab === void 0 ? void 0 : setActiveTab('addons');
|
|
608
612
|
};
|
|
609
613
|
// 打印
|
|
610
614
|
var handlePrint = function handlePrint() {};
|
|
@@ -612,16 +616,16 @@ var Footer = function Footer(props) {
|
|
|
612
616
|
var handleOrderDetail = function handleOrderDetail() {
|
|
613
617
|
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
614
618
|
return interaction.utils.postMessageToApp({
|
|
615
|
-
module:
|
|
616
|
-
key:
|
|
619
|
+
module: 'booking',
|
|
620
|
+
key: 'view_order',
|
|
617
621
|
data: {
|
|
618
622
|
order_id: state.bookingId
|
|
619
623
|
},
|
|
620
|
-
origin:
|
|
624
|
+
origin: '/booking'
|
|
621
625
|
});
|
|
622
626
|
}
|
|
623
627
|
state.action({
|
|
624
|
-
type:
|
|
628
|
+
type: 'pisell1.goOrderDetail',
|
|
625
629
|
data: {
|
|
626
630
|
orderId: state.bookingId
|
|
627
631
|
},
|
|
@@ -634,11 +638,11 @@ var Footer = function Footer(props) {
|
|
|
634
638
|
var handleCancel = function handleCancel() {};
|
|
635
639
|
var paymentLinkButton = useMemo(function () {
|
|
636
640
|
var items = [{
|
|
637
|
-
label: locales.getText(
|
|
638
|
-
key:
|
|
641
|
+
label: locales.getText('pisell2.text.send-mail'),
|
|
642
|
+
key: 'sendMail'
|
|
639
643
|
}, {
|
|
640
|
-
label: locales.getText(
|
|
641
|
-
key:
|
|
644
|
+
label: locales.getText('pisell2.text.copy-to-clipboard'),
|
|
645
|
+
key: 'copy'
|
|
642
646
|
}];
|
|
643
647
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
644
648
|
menu: {
|
|
@@ -647,7 +651,7 @@ var Footer = function Footer(props) {
|
|
|
647
651
|
}
|
|
648
652
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
649
653
|
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
650
|
-
}, /*#__PURE__*/React.createElement(Space, null, locales.getText(
|
|
654
|
+
}, /*#__PURE__*/React.createElement(Space, null, locales.getText('pisell2.text.payment-link'), /*#__PURE__*/React.createElement(DownOutlined, null))));
|
|
651
655
|
}, [handleMenuClick]);
|
|
652
656
|
|
|
653
657
|
/**
|
|
@@ -659,21 +663,21 @@ var Footer = function Footer(props) {
|
|
|
659
663
|
* @Date: 2024-01-30 16:58
|
|
660
664
|
*/
|
|
661
665
|
var saveButton = useMemo(function () {
|
|
662
|
-
var buttonType =
|
|
663
|
-
if (transaction_habit_selection.type ===
|
|
664
|
-
buttonType =
|
|
666
|
+
var buttonType = 'default';
|
|
667
|
+
if (transaction_habit_selection.type === 'service_now_pay_later') {
|
|
668
|
+
buttonType = 'primary';
|
|
665
669
|
}
|
|
666
670
|
return /*#__PURE__*/React.createElement(Button, {
|
|
667
671
|
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
668
672
|
type: buttonType,
|
|
669
673
|
onClick: function onClick() {
|
|
670
674
|
handleSave({
|
|
671
|
-
type:
|
|
675
|
+
type: 'save'
|
|
672
676
|
});
|
|
673
677
|
},
|
|
674
678
|
disabled: isDisabled || !isEdit,
|
|
675
679
|
loading: loading
|
|
676
|
-
}, locales.getText(
|
|
680
|
+
}, locales.getText('pisell2.text.save'));
|
|
677
681
|
}, [loading, isDisabled, isEdit, infoEdit, addonsEdit, state]);
|
|
678
682
|
|
|
679
683
|
/**
|
|
@@ -687,10 +691,10 @@ var Footer = function Footer(props) {
|
|
|
687
691
|
var completeButton = useMemo(function () {
|
|
688
692
|
return /*#__PURE__*/React.createElement(Button, {
|
|
689
693
|
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
690
|
-
type:
|
|
694
|
+
type: 'primary',
|
|
691
695
|
onClick: onSelect,
|
|
692
|
-
disabled: state.appointment_status ===
|
|
693
|
-
}, locales.getText(
|
|
696
|
+
disabled: state.appointment_status === 'completed'
|
|
697
|
+
}, locales.getText('pisell2.text.status.completed'));
|
|
694
698
|
}, [state.appointment_status]);
|
|
695
699
|
|
|
696
700
|
/**
|
|
@@ -705,7 +709,7 @@ var Footer = function Footer(props) {
|
|
|
705
709
|
return /*#__PURE__*/React.createElement(Button, {
|
|
706
710
|
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
707
711
|
onClick: handleRebook
|
|
708
|
-
}, locales.getText(
|
|
712
|
+
}, locales.getText('pisell2.text.rebook'));
|
|
709
713
|
}, [state === null || state === void 0 ? void 0 : state.onRebook]);
|
|
710
714
|
|
|
711
715
|
/**
|
|
@@ -721,7 +725,7 @@ var Footer = function Footer(props) {
|
|
|
721
725
|
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
722
726
|
type: "default",
|
|
723
727
|
onClick: handleRefund
|
|
724
|
-
}, locales.getText(
|
|
728
|
+
}, locales.getText('pisell2.text.refund'));
|
|
725
729
|
}, []);
|
|
726
730
|
var buttonMap = {
|
|
727
731
|
checkout: checkoutButton,
|
|
@@ -742,9 +746,9 @@ var Footer = function Footer(props) {
|
|
|
742
746
|
*/
|
|
743
747
|
var isCheckout = useMemo(function () {
|
|
744
748
|
var _state$bookingDetail3, _state$bookingDetail4, _state$bookingDetail5;
|
|
745
|
-
var list = [
|
|
749
|
+
var list = ['unfulfilled', 'partially_paid', 'unpaid', 'payment_processing'];
|
|
746
750
|
// (支付状态 = 已支付 || 部分付款 || 未付款 || 支付处理中) && 预约状态 !== 已取消
|
|
747
|
-
if (!state.bookingId || ((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : (_state$bookingDetail4 = _state$bookingDetail3.bookings) === null || _state$bookingDetail4 === void 0 ? void 0 : _state$bookingDetail4.appointment_status) !==
|
|
751
|
+
if (!state.bookingId || ((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : (_state$bookingDetail4 = _state$bookingDetail3.bookings) === null || _state$bookingDetail4 === void 0 ? void 0 : _state$bookingDetail4.appointment_status) !== 'cancelled' && list.includes(state === null || state === void 0 ? void 0 : (_state$bookingDetail5 = state.bookingDetail) === null || _state$bookingDetail5 === void 0 ? void 0 : _state$bookingDetail5.payment_status) && !state.disabledEdit) {
|
|
748
752
|
return true;
|
|
749
753
|
} else {
|
|
750
754
|
if (total.notPaidAmount > 0) {
|
|
@@ -758,10 +762,10 @@ var Footer = function Footer(props) {
|
|
|
758
762
|
if (!state.bookingId) {
|
|
759
763
|
return [];
|
|
760
764
|
}
|
|
761
|
-
if (source !==
|
|
765
|
+
if (source !== 'info') {
|
|
762
766
|
return [];
|
|
763
767
|
}
|
|
764
|
-
if (state.renderType ===
|
|
768
|
+
if (state.renderType === 'eventBooking') {
|
|
765
769
|
return [];
|
|
766
770
|
}
|
|
767
771
|
// 支付链接
|
|
@@ -769,7 +773,7 @@ var Footer = function Footer(props) {
|
|
|
769
773
|
arr.push(actionMap.paymentLink);
|
|
770
774
|
}
|
|
771
775
|
if (transaction_habit_selection.button_rows == 1) {
|
|
772
|
-
if (state.appointment_status !==
|
|
776
|
+
if (state.appointment_status !== 'cancelled') {
|
|
773
777
|
if (!state.disabledEdit) {
|
|
774
778
|
arr.push(actionMap.sale);
|
|
775
779
|
}
|
|
@@ -781,18 +785,21 @@ var Footer = function Footer(props) {
|
|
|
781
785
|
// arr.push(actionMap.print);
|
|
782
786
|
// }
|
|
783
787
|
// }
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
788
|
+
if (!isTeam) {
|
|
789
|
+
if (transaction_habit_selection.button_rows == 1) {
|
|
790
|
+
arr.push(actionMap.orderDetail);
|
|
791
|
+
}
|
|
787
792
|
}
|
|
788
793
|
|
|
789
794
|
// 退款
|
|
790
|
-
if (
|
|
791
|
-
|
|
795
|
+
if (!isTeam) {
|
|
796
|
+
if (total.paidAmount > 0) {
|
|
797
|
+
arr.push(actionMap.refund);
|
|
798
|
+
}
|
|
792
799
|
}
|
|
793
800
|
|
|
794
801
|
// 重新预约
|
|
795
|
-
if (state.appointment_status !==
|
|
802
|
+
if (state.appointment_status !== 'cancelled') {
|
|
796
803
|
arr.push(actionMap.rebook);
|
|
797
804
|
}
|
|
798
805
|
|
|
@@ -802,12 +809,12 @@ var Footer = function Footer(props) {
|
|
|
802
809
|
}, [state, total, isShowPaymentLink, source]);
|
|
803
810
|
var _buttons = useMemo(function () {
|
|
804
811
|
// 如果预约是取消状态,则不展示任何按钮
|
|
805
|
-
if (state.appointment_status ===
|
|
812
|
+
if (state.appointment_status === 'cancelled') {
|
|
806
813
|
return [buttonMap.rebook];
|
|
807
814
|
}
|
|
808
815
|
|
|
809
816
|
// addons 默认为新增按钮, 如果有新增数据 则添加save按钮
|
|
810
|
-
if (source ===
|
|
817
|
+
if (source === 'addons') {
|
|
811
818
|
var arr = [];
|
|
812
819
|
arr = _toConsumableArray(buttons);
|
|
813
820
|
if (isEdit) {
|
|
@@ -822,31 +829,36 @@ var Footer = function Footer(props) {
|
|
|
822
829
|
// }
|
|
823
830
|
|
|
824
831
|
// payment
|
|
825
|
-
if (source ===
|
|
832
|
+
if (source === 'payment') {
|
|
826
833
|
var _arr2 = [];
|
|
827
834
|
if (state.bookingId && isShowPaymentLink) {
|
|
828
835
|
_arr2.push(buttonMap.paymentLink);
|
|
829
836
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
+
if (!isTeam) {
|
|
838
|
+
// 有已支付金额, 展示退款
|
|
839
|
+
if (total.paidAmount > 0) {
|
|
840
|
+
_arr2.push(buttonMap.refund);
|
|
841
|
+
}
|
|
842
|
+
// 有未支付金额 展示checkout
|
|
843
|
+
if (isCheckout) {
|
|
844
|
+
_arr2.push(buttonMap.checkout);
|
|
845
|
+
}
|
|
837
846
|
}
|
|
838
847
|
return _arr2;
|
|
839
848
|
}
|
|
840
849
|
|
|
841
850
|
// info
|
|
842
|
-
if (source ===
|
|
851
|
+
if (source === 'info') {
|
|
843
852
|
var _arr3 = [];
|
|
844
853
|
// if (state.bookingId && isShowPaymentLink) {
|
|
845
854
|
// arr.push(buttonMap.paymentLink);
|
|
846
855
|
// }
|
|
847
856
|
// 有未支付金额 展示checkout
|
|
848
857
|
if (isCheckout) {
|
|
849
|
-
|
|
858
|
+
// 有未支付金额 展示checkout
|
|
859
|
+
if (!isTeam) {
|
|
860
|
+
_arr3.push(buttonMap.checkout);
|
|
861
|
+
}
|
|
850
862
|
} else {
|
|
851
863
|
// 没有任何编辑时,展示完成按钮
|
|
852
864
|
if (!isEdit) {
|
|
@@ -857,15 +869,18 @@ var Footer = function Footer(props) {
|
|
|
857
869
|
if (isEdit) {
|
|
858
870
|
_arr3.push(buttonMap.save);
|
|
859
871
|
}
|
|
872
|
+
if (_arr3.length === 0) {
|
|
873
|
+
return [buttonMap.rebook];
|
|
874
|
+
}
|
|
860
875
|
return _arr3;
|
|
861
876
|
}
|
|
862
|
-
if (source ===
|
|
877
|
+
if (source === 'addTime') {
|
|
863
878
|
var _arr4 = [];
|
|
864
879
|
_arr4 = _toConsumableArray(buttons);
|
|
865
880
|
return _arr4;
|
|
866
881
|
}
|
|
867
882
|
return [];
|
|
868
|
-
}, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state]);
|
|
883
|
+
}, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state, isTeam]);
|
|
869
884
|
|
|
870
885
|
/**
|
|
871
886
|
* 是否只有定金支付
|
|
@@ -873,7 +888,7 @@ var Footer = function Footer(props) {
|
|
|
873
888
|
var isOnlyDeposit = useMemo(function () {
|
|
874
889
|
var _state$bookingDetail6, _state$bookingDetail7, _state$bookingDetail8, _state$bookingDetail9;
|
|
875
890
|
if (state !== null && state !== void 0 && (_state$bookingDetail6 = state.bookingDetail) !== null && _state$bookingDetail6 !== void 0 && _state$bookingDetail6.deposit_payment_time && state !== null && state !== void 0 && (_state$bookingDetail7 = state.bookingDetail) !== null && _state$bookingDetail7 !== void 0 && (_state$bookingDetail8 = _state$bookingDetail7.payment_types) !== null && _state$bookingDetail8 !== void 0 && (_state$bookingDetail9 = _state$bookingDetail8.every) !== null && _state$bookingDetail9 !== void 0 && _state$bookingDetail9.call(_state$bookingDetail8, function (item) {
|
|
876
|
-
return item ===
|
|
891
|
+
return item === 'deposit';
|
|
877
892
|
})) {
|
|
878
893
|
return true;
|
|
879
894
|
}
|
|
@@ -889,27 +904,27 @@ var Footer = function Footer(props) {
|
|
|
889
904
|
* @Date: 2024-01-30 17:00
|
|
890
905
|
*/
|
|
891
906
|
var totalText = useMemo(function () {
|
|
892
|
-
var str =
|
|
907
|
+
var str = '';
|
|
893
908
|
|
|
894
909
|
// 只有定金支付时,直接展示
|
|
895
910
|
if (isOnlyDeposit) {
|
|
896
911
|
var _state$bookingDetail10;
|
|
897
|
-
return "".concat(locales.getText(
|
|
912
|
+
return "".concat(locales.getText('pisell2.text.deposit-paid'), " ").concat(formatAmount(state === null || state === void 0 ? void 0 : (_state$bookingDetail10 = state.bookingDetail) === null || _state$bookingDetail10 === void 0 ? void 0 : _state$bookingDetail10.deposit_amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'), " ").concat(total.duration ? "(".concat(total.duration, ")") : '');
|
|
898
913
|
}
|
|
899
914
|
|
|
900
915
|
// 有退款金额时, 直接展示 退款:$8.00
|
|
901
916
|
if (total.totalRefundAmount > 0) {
|
|
902
|
-
return "".concat(locales.getText(
|
|
917
|
+
return "".concat(locales.getText('pisell2.text.refunded-amount'), ": ").concat(formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
903
918
|
}
|
|
904
919
|
|
|
905
920
|
// 如果待支付金额小于0 则展示全额支付
|
|
906
921
|
if (total.notPaidAmount <= 0 && state.bookingId) {
|
|
907
|
-
str = "".concat(locales.getText(
|
|
922
|
+
str = "".concat(locales.getText('pisell1.text.fully-paid'), ": ").concat(formatAmount(total.sumTotalAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
908
923
|
}
|
|
909
924
|
|
|
910
925
|
// 待支付金额大于0 并且是新增时, 展示 待支付金额
|
|
911
926
|
if (total.notPaidAmount > 0 || !state.bookingId) {
|
|
912
|
-
str = "".concat(locales.getText(
|
|
927
|
+
str = "".concat(locales.getText('pisell2.text.to-pay'), ": ").concat(formatAmount(total.notPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
913
928
|
}
|
|
914
929
|
if (total.duration) {
|
|
915
930
|
str = str + " (".concat(total.duration, ")");
|
|
@@ -926,14 +941,14 @@ var Footer = function Footer(props) {
|
|
|
926
941
|
* @Date: 2024-01-30 17:01
|
|
927
942
|
*/
|
|
928
943
|
var arrearsText = useMemo(function () {
|
|
929
|
-
var str =
|
|
944
|
+
var str = '';
|
|
930
945
|
// 只有定金支付时不展示退款金额
|
|
931
946
|
if (isOnlyDeposit) {
|
|
932
947
|
return str;
|
|
933
948
|
}
|
|
934
949
|
// 欠款
|
|
935
950
|
if (total.dueAmount < 0) {
|
|
936
|
-
str = "".concat(locales.getText(
|
|
951
|
+
str = "".concat(locales.getText('pisell1.text.refund-customer'), ": ").concat(formatAmount(total.dueAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
937
952
|
}
|
|
938
953
|
return str;
|
|
939
954
|
}, [state, total, isOnlyDeposit]);
|
|
@@ -948,17 +963,17 @@ var Footer = function Footer(props) {
|
|
|
948
963
|
*/
|
|
949
964
|
var taxText = useMemo(function () {
|
|
950
965
|
if (!(state !== null && state !== void 0 && state.bookingDetail)) {
|
|
951
|
-
return
|
|
966
|
+
return '';
|
|
952
967
|
}
|
|
953
|
-
var str =
|
|
968
|
+
var str = '';
|
|
954
969
|
str = str + state.bookingDetail.tax_title;
|
|
955
|
-
str = str +
|
|
970
|
+
str = str + ' ' + Number(state.bookingDetail.tax_rate) * 100 + '%';
|
|
956
971
|
|
|
957
972
|
// 判断税费是 包含在订单内 还是单独的
|
|
958
973
|
if (is_price_include_tax(state)) {
|
|
959
|
-
str = str +
|
|
974
|
+
str = str + ' ' + locales.getText('pisell1.text.included');
|
|
960
975
|
} else {
|
|
961
|
-
str = str +
|
|
976
|
+
str = str + ' ' + locales.getText('pisell1.text.not-contain');
|
|
962
977
|
}
|
|
963
978
|
return str;
|
|
964
979
|
}, [state === null || state === void 0 ? void 0 : state.bookingDetail]);
|
|
@@ -978,37 +993,37 @@ var Footer = function Footer(props) {
|
|
|
978
993
|
if (!state.bookingDetail) {
|
|
979
994
|
return true;
|
|
980
995
|
}
|
|
981
|
-
if (!((_state$addons3 = state.addons) !== null && _state$addons3 !== void 0 && _state$addons3.load) && state.renderType !==
|
|
996
|
+
if (!((_state$addons3 = state.addons) !== null && _state$addons3 !== void 0 && _state$addons3.load) && state.renderType !== 'eventBooking') {
|
|
982
997
|
return true;
|
|
983
998
|
}
|
|
984
999
|
}
|
|
985
1000
|
return false;
|
|
986
1001
|
}, [state.bookingId, state.bookingDetail, (_state$addons4 = state.addons) === null || _state$addons4 === void 0 ? void 0 : _state$addons4.load, state.renderType]);
|
|
987
1002
|
var menuChange = function menuChange(e) {
|
|
988
|
-
console.log(
|
|
1003
|
+
console.log('e.key', e.key);
|
|
989
1004
|
switch (e.key) {
|
|
990
|
-
case
|
|
1005
|
+
case 'sendMail':
|
|
991
1006
|
handleMenuClick(e);
|
|
992
1007
|
break;
|
|
993
|
-
case
|
|
1008
|
+
case 'copy':
|
|
994
1009
|
handleMenuClick(e);
|
|
995
1010
|
break;
|
|
996
|
-
case
|
|
1011
|
+
case 'rebook':
|
|
997
1012
|
handleRebook();
|
|
998
1013
|
break;
|
|
999
|
-
case
|
|
1014
|
+
case 'sale':
|
|
1000
1015
|
handleSale();
|
|
1001
1016
|
break;
|
|
1002
|
-
case
|
|
1017
|
+
case 'print':
|
|
1003
1018
|
handlePrint();
|
|
1004
1019
|
break;
|
|
1005
|
-
case
|
|
1020
|
+
case 'orderDetail':
|
|
1006
1021
|
handleOrderDetail();
|
|
1007
1022
|
break;
|
|
1008
|
-
case
|
|
1023
|
+
case 'refund':
|
|
1009
1024
|
handleRefund();
|
|
1010
1025
|
break;
|
|
1011
|
-
case
|
|
1026
|
+
case 'cancelOrder':
|
|
1012
1027
|
handleCancel();
|
|
1013
1028
|
break;
|
|
1014
1029
|
default:
|
|
@@ -1033,13 +1048,13 @@ var Footer = function Footer(props) {
|
|
|
1033
1048
|
onClick: function onClick() {
|
|
1034
1049
|
setShowDetail(!showDetail);
|
|
1035
1050
|
}
|
|
1036
|
-
}, locales.getText(
|
|
1037
|
-
className: classNames(
|
|
1038
|
-
|
|
1051
|
+
}, locales.getText('pisell2.text.details'), ' ', /*#__PURE__*/React.createElement(ChevronDown, {
|
|
1052
|
+
className: classNames('pisell-lowcode__booking-footer-right-icon', {
|
|
1053
|
+
'pisell-lowcode__booking-footer-right-icon-show': showDetail
|
|
1039
1054
|
})
|
|
1040
1055
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1041
|
-
className: classNames(
|
|
1042
|
-
|
|
1056
|
+
className: classNames('pisell-lowcode__booking-footer-total-detail', {
|
|
1057
|
+
'pisell-lowcode__booking-footer-total-detail-show': showDetail
|
|
1043
1058
|
})
|
|
1044
1059
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1045
1060
|
className: "order-total-item-border"
|
|
@@ -1047,9 +1062,9 @@ var Footer = function Footer(props) {
|
|
|
1047
1062
|
className: "order-total-item"
|
|
1048
1063
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1049
1064
|
className: "order-total-item-label"
|
|
1050
|
-
}, locales.getText(
|
|
1065
|
+
}, locales.getText('pisell1.text.subtotal')), /*#__PURE__*/React.createElement("span", {
|
|
1051
1066
|
className: "order-total-item-value"
|
|
1052
|
-
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1067
|
+
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), (((_state$bookingDetail11 = state.bookingDetail) === null || _state$bookingDetail11 === void 0 ? void 0 : _state$bookingDetail11.surcharge) || []).map(function (d) {
|
|
1053
1068
|
return /*#__PURE__*/React.createElement("div", {
|
|
1054
1069
|
className: "order-total-item",
|
|
1055
1070
|
key: d.id
|
|
@@ -1057,65 +1072,65 @@ var Footer = function Footer(props) {
|
|
|
1057
1072
|
className: "order-total-item-label"
|
|
1058
1073
|
}, d.name[state.locale]), /*#__PURE__*/React.createElement("span", {
|
|
1059
1074
|
className: "order-total-item-value"
|
|
1060
|
-
}, formatAmount(d.amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1075
|
+
}, formatAmount(d.amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$')));
|
|
1061
1076
|
}), state.bookingId ? /*#__PURE__*/React.createElement("div", {
|
|
1062
1077
|
className: "order-total-item"
|
|
1063
1078
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1064
1079
|
className: "order-total-item-label"
|
|
1065
1080
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1066
1081
|
className: ""
|
|
1067
|
-
}, locales.getText(
|
|
1082
|
+
}, locales.getText('pisell1.text.tax')), /*#__PURE__*/React.createElement("div", {
|
|
1068
1083
|
className: "",
|
|
1069
1084
|
style: {
|
|
1070
1085
|
fontSize: 14
|
|
1071
1086
|
}
|
|
1072
1087
|
}, taxText)), /*#__PURE__*/React.createElement("span", {
|
|
1073
1088
|
className: "order-total-item-value"
|
|
1074
|
-
}, formatAmount(total.tax, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1089
|
+
}, formatAmount(total.tax, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null, state.bookingId ? /*#__PURE__*/React.createElement("div", {
|
|
1075
1090
|
className: "order-total-item"
|
|
1076
1091
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1077
1092
|
className: "order-total-item-label"
|
|
1078
|
-
}, locales.getText(
|
|
1093
|
+
}, locales.getText('pisell2.text.order-discount')), /*#__PURE__*/React.createElement("span", {
|
|
1079
1094
|
className: "order-total-item-value"
|
|
1080
|
-
}, formatAmount(total.shopDiscount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1095
|
+
}, formatAmount(total.shopDiscount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null, /*#__PURE__*/React.createElement("div", {
|
|
1081
1096
|
className: "order-total-item"
|
|
1082
1097
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1083
1098
|
className: "order-total-item-label order-total-item-label-bold"
|
|
1084
|
-
}, locales.getText(
|
|
1099
|
+
}, locales.getText('pisell1.text.total')), /*#__PURE__*/React.createElement("span", {
|
|
1085
1100
|
className: "order-total-item-value"
|
|
1086
|
-
}, formatAmount(total.expectAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1101
|
+
}, formatAmount(total.expectAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), !!total.roundingAmount && /*#__PURE__*/React.createElement("div", {
|
|
1087
1102
|
className: "order-total-item"
|
|
1088
1103
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1089
1104
|
className: "order-total-item-label"
|
|
1090
1105
|
}, locales.getText('pisell1.text.rounding')), /*#__PURE__*/React.createElement("span", {
|
|
1091
1106
|
className: "order-total-item-value"
|
|
1092
|
-
}, formatAmount(total.roundingAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1107
|
+
}, formatAmount(total.roundingAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), state.bookingId ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1093
1108
|
className: "order-total-item-border"
|
|
1094
1109
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1095
1110
|
className: "order-total-item"
|
|
1096
1111
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1097
1112
|
className: "order-total-item-label order-total-item-label-bold"
|
|
1098
|
-
}, locales.getText(
|
|
1113
|
+
}, locales.getText('pisell2.text.amount-paid-on-order')), /*#__PURE__*/React.createElement("span", {
|
|
1099
1114
|
className: "order-total-item-value"
|
|
1100
|
-
}, formatAmount(total.orderPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1115
|
+
}, formatAmount(total.orderPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), /*#__PURE__*/React.createElement("div", {
|
|
1101
1116
|
className: "order-total-item"
|
|
1102
1117
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1103
1118
|
className: "order-total-item-label"
|
|
1104
|
-
}, locales.getText(
|
|
1119
|
+
}, locales.getText('pisell1.text.payment-fee')), /*#__PURE__*/React.createElement("span", {
|
|
1105
1120
|
className: "order-total-item-value"
|
|
1106
|
-
}, formatAmount(total.paySurchargeFee, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1121
|
+
}, formatAmount(total.paySurchargeFee, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), /*#__PURE__*/React.createElement("div", {
|
|
1107
1122
|
className: "order-total-item"
|
|
1108
1123
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1109
1124
|
className: "order-total-item-label order-total-item-label-bold"
|
|
1110
|
-
}, locales.getText(
|
|
1125
|
+
}, locales.getText('pisell2.text.amount-actually-paid-by-the-customer')), /*#__PURE__*/React.createElement("span", {
|
|
1111
1126
|
className: "order-total-item-value"
|
|
1112
|
-
}, formatAmount(total.actualPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1127
|
+
}, formatAmount(total.actualPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), total.totalRefundAmount > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
1113
1128
|
className: "order-total-item"
|
|
1114
1129
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1115
1130
|
className: "order-total-item-label order-total-item-label-bold"
|
|
1116
|
-
}, locales.getText(
|
|
1131
|
+
}, locales.getText('pisell2.text.refunded-amount')), /*#__PURE__*/React.createElement("span", {
|
|
1117
1132
|
className: "order-total-item-value"
|
|
1118
|
-
}, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) ||
|
|
1133
|
+
}, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null) : null), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
|
|
1119
1134
|
className: "pisell-lowcode__booking-footer-buttons"
|
|
1120
1135
|
}, /*#__PURE__*/React.createElement(FooterMenus, {
|
|
1121
1136
|
items: moreButton,
|
|
@@ -1123,12 +1138,12 @@ var Footer = function Footer(props) {
|
|
|
1123
1138
|
dispatch: dispatch,
|
|
1124
1139
|
source: source,
|
|
1125
1140
|
menuChange: menuChange
|
|
1126
|
-
}), _buttons), source ===
|
|
1141
|
+
}), _buttons), source === 'info' && state.bookingId && !state.disabledEdit && (transaction_habit_selection === null || transaction_habit_selection === void 0 ? void 0 : transaction_habit_selection.button_rows) == 2 ? /*#__PURE__*/React.createElement("div", {
|
|
1127
1142
|
className: "pisell-lowcode__booking-footer-buttons",
|
|
1128
1143
|
style: {
|
|
1129
1144
|
marginTop: 12
|
|
1130
1145
|
}
|
|
1131
|
-
}, state.appointment_status !==
|
|
1146
|
+
}, state.appointment_status !== 'cancelled' ? /*#__PURE__*/React.createElement(Button, {
|
|
1132
1147
|
onClick: function onClick() {
|
|
1133
1148
|
return handleSale();
|
|
1134
1149
|
},
|