@pisell/private-materials 3.4.72 → 3.4.74
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/Sales/Cart/index.d.ts +1 -1
- package/es/components/Sales/Cart/index.js +18 -3
- package/es/components/Sales/Checkout/utils.js +57 -1
- package/es/components/Sales/Summary/index.d.ts +2 -0
- package/es/components/Sales/Summary/index.js +7 -2
- package/es/components/Sales/Summary/utils.d.ts +10 -3
- package/es/components/Sales/Summary/utils.js +57 -10
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +62 -4
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +5 -1
- package/es/components/appointmentBooking/components/Deposit/index.js +9 -4
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/device.js +208 -36
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +4 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +4 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +79 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/index.less +7 -6
- package/es/components/eventBooking/components/Provider/Cart/index.js +2 -7
- package/es/components/eventBooking/components/Provider/Content/index.less +1 -1
- package/es/components/eventBooking/components/Voucher/index.js +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/subTotal/index.d.ts +2 -0
- package/es/components/subTotal/index.js +42 -20
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/plus/orderList/config.d.ts +1 -0
- package/es/plus/saasAttendance/index.d.ts +6 -0
- package/es/plus/saasAttendance/index.js +5 -0
- package/es/plus/saasAttendance/locales.d.ts +318 -0
- package/es/plus/saasAttendance/locales.js +354 -0
- package/es/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/BasicInfoTab.js +96 -0
- package/es/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
- package/es/plus/saasAttendance/settings/ClockInMethodTab.js +81 -0
- package/es/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
- package/es/plus/saasAttendance/settings/CorrectionPolicyTab.js +293 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +109 -0
- package/es/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
- package/es/plus/saasAttendance/settings/components/MapField.js +810 -0
- package/es/plus/saasAttendance/settings/components/index.d.ts +3 -0
- package/es/plus/saasAttendance/settings/components/index.js +2 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +8 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.js +216 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.less +70 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/index.js +438 -0
- package/es/plus/saasAttendance/settings/index.d.ts +18 -0
- package/es/plus/saasAttendance/settings/index.js +255 -0
- package/es/plus/saasAttendance/settings/index.less +495 -0
- package/es/plus/saasAttendance/settings/serve.d.ts +27 -0
- package/es/plus/saasAttendance/settings/serve.js +83 -0
- package/es/plus/saasAttendance/settings/types.d.ts +128 -0
- package/es/plus/saasAttendance/settings/types.js +1 -0
- package/es/plus/selectHolder/locales.d.ts +6 -0
- package/es/plus/selectHolder/locales.js +6 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/components/Sales/Cart/index.d.ts +1 -1
- package/lib/components/Sales/Cart/index.js +20 -7
- package/lib/components/Sales/Checkout/utils.js +64 -1
- package/lib/components/Sales/Summary/index.d.ts +2 -0
- package/lib/components/Sales/Summary/index.js +8 -2
- package/lib/components/Sales/Summary/utils.d.ts +10 -3
- package/lib/components/Sales/Summary/utils.js +38 -13
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +52 -4
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +5 -1
- package/lib/components/appointmentBooking/components/Deposit/index.js +7 -4
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/device.js +108 -23
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +4 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +3 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +77 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +7 -6
- package/lib/components/eventBooking/components/Provider/Cart/index.js +2 -2
- package/lib/components/eventBooking/components/Provider/Content/index.less +1 -1
- package/lib/components/eventBooking/components/Voucher/index.js +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/subTotal/index.d.ts +2 -0
- package/lib/components/subTotal/index.js +34 -20
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/orderList/config.d.ts +1 -0
- package/lib/plus/saasAttendance/index.d.ts +6 -0
- package/lib/plus/saasAttendance/index.js +39 -0
- package/lib/plus/saasAttendance/locales.d.ts +318 -0
- package/lib/plus/saasAttendance/locales.js +342 -0
- package/lib/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/BasicInfoTab.js +152 -0
- package/lib/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/ClockInMethodTab.js +88 -0
- package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.js +369 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +106 -0
- package/lib/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
- package/lib/plus/saasAttendance/settings/components/MapField.js +631 -0
- package/lib/plus/saasAttendance/settings/components/index.d.ts +3 -0
- package/lib/plus/saasAttendance/settings/components/index.js +42 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.js +247 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.less +70 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/index.js +447 -0
- package/lib/plus/saasAttendance/settings/index.d.ts +18 -0
- package/lib/plus/saasAttendance/settings/index.js +283 -0
- package/lib/plus/saasAttendance/settings/index.less +495 -0
- package/lib/plus/saasAttendance/settings/serve.d.ts +27 -0
- package/lib/plus/saasAttendance/settings/serve.js +54 -0
- package/lib/plus/saasAttendance/settings/types.d.ts +128 -0
- package/lib/plus/saasAttendance/settings/types.js +17 -0
- package/lib/plus/selectHolder/locales.d.ts +6 -0
- package/lib/plus/selectHolder/locales.js +6 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lowcode/eco-cup-list/meta.ts +63 -0
- package/lowcode/eco-customer-list/meta.ts +63 -0
- package/lowcode/saas-attendance-settings/meta.ts +56 -0
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "success" | "page" | "
|
|
12
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "success" | "page" | "
|
|
13
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -43,6 +43,8 @@ var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
|
|
|
43
43
|
var import_store = require("./store");
|
|
44
44
|
var import_manufacturer = require("./manufacturer");
|
|
45
45
|
var import_device = require("./device.less");
|
|
46
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
47
|
+
var import_utils2 = require("@pisell/utils");
|
|
46
48
|
var device_default = ({
|
|
47
49
|
api,
|
|
48
50
|
onChange,
|
|
@@ -54,12 +56,15 @@ var device_default = ({
|
|
|
54
56
|
client,
|
|
55
57
|
formatAmount = (number, precision, symbol) => `${symbol}${number}`
|
|
56
58
|
}) => {
|
|
59
|
+
const context = (0, import_useEngineContext.default)();
|
|
60
|
+
const { isTerminal, interaction } = context.appHelper.utils || {};
|
|
57
61
|
const store = (0, import_store.useContextData)();
|
|
58
|
-
const { device, symbol, mode, eftpos } = store;
|
|
62
|
+
const { device, symbol, mode, eftpos, order_id } = store;
|
|
59
63
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
60
64
|
const [dataStaus, setDataStaus] = (0, import_react.useState)(true);
|
|
61
65
|
const [list, setList] = (0, import_react.useState)([]);
|
|
62
66
|
const dispatch = (0, import_store.useDispatch)();
|
|
67
|
+
const timerRef = (0, import_react.useRef)();
|
|
63
68
|
const onClick = (event) => {
|
|
64
69
|
if (!net) {
|
|
65
70
|
import_antd.message.open({
|
|
@@ -72,10 +77,41 @@ var device_default = ({
|
|
|
72
77
|
const [index] = [Number(event.currentTarget.dataset.index)];
|
|
73
78
|
setDevice(list[index]);
|
|
74
79
|
};
|
|
80
|
+
const triggerCloseButton = (bool) => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
if (!(isTerminal == null ? void 0 : isTerminal())) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
(_b = (_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.postMessageToApp) == null ? void 0 : _b.call(_a, {
|
|
86
|
+
module: "pos",
|
|
87
|
+
key: "other",
|
|
88
|
+
data: {
|
|
89
|
+
key: bool ? "show_close_button" : "hide_close_button"
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const closeFirstWithDelayShow = () => {
|
|
94
|
+
timerRef.current && clearTimeout(timerRef.current);
|
|
95
|
+
if (!(isTerminal == null ? void 0 : isTerminal())) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
triggerCloseButton(false);
|
|
99
|
+
timerRef.current = setTimeout(() => {
|
|
100
|
+
triggerCloseButton(true);
|
|
101
|
+
}, 5e3);
|
|
102
|
+
};
|
|
103
|
+
const clearTimer = () => {
|
|
104
|
+
if (timerRef.current) {
|
|
105
|
+
clearTimeout(timerRef.current);
|
|
106
|
+
timerRef.current = void 0;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
75
109
|
(0, import_ahooks.useMount)(() => {
|
|
76
110
|
setLoading(true);
|
|
111
|
+
closeFirstWithDelayShow();
|
|
77
112
|
api.getDeviceList({ type: eftpos, status: "paired" }).then(
|
|
78
113
|
(res) => {
|
|
114
|
+
clearTimer();
|
|
79
115
|
setLoading(false);
|
|
80
116
|
if (res && Array.isArray(res.list) && res.list.length > 0) {
|
|
81
117
|
if (device_number) {
|
|
@@ -100,24 +136,65 @@ var device_default = ({
|
|
|
100
136
|
setList(setDeviceList(res.list));
|
|
101
137
|
if (res.list.length === 1) {
|
|
102
138
|
setDevice(res.list[0]);
|
|
139
|
+
} else {
|
|
140
|
+
triggerCloseButton(true);
|
|
103
141
|
}
|
|
104
142
|
return;
|
|
105
143
|
}
|
|
144
|
+
triggerCloseButton(true);
|
|
106
145
|
setDataStaus(false);
|
|
107
146
|
},
|
|
108
147
|
() => {
|
|
148
|
+
clearTimer();
|
|
149
|
+
triggerCloseButton(true);
|
|
109
150
|
setDataStaus(false);
|
|
110
151
|
setLoading(false);
|
|
111
152
|
}
|
|
112
153
|
);
|
|
113
154
|
});
|
|
114
|
-
|
|
155
|
+
(0, import_ahooks.useUnmount)(() => {
|
|
156
|
+
timerRef.current && clearTimeout(timerRef.current);
|
|
157
|
+
});
|
|
158
|
+
const checkIsActiveWithDelay = async (time = 100) => {
|
|
159
|
+
var _a, _b, _c;
|
|
160
|
+
if (!(isTerminal == null ? void 0 : isTerminal())) {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
await new Promise((resolve) => setTimeout(resolve, time));
|
|
164
|
+
if ((_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.asyncDataManager) {
|
|
165
|
+
try {
|
|
166
|
+
const activeStatus = await ((_c = (_b = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _b.asyncDataManager) == null ? void 0 : _c.call(_b, {
|
|
167
|
+
module: "get",
|
|
168
|
+
key: "pay_webview_active"
|
|
169
|
+
}));
|
|
170
|
+
return activeStatus !== "unActive";
|
|
171
|
+
} catch (error) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return true;
|
|
176
|
+
};
|
|
177
|
+
const setDevice = async (device2) => {
|
|
115
178
|
dispatch((0, import_store.updateDevice)({ device: device2 }));
|
|
116
179
|
if (typeof api.selectDevice === "function") {
|
|
117
180
|
api.selectDevice(device2);
|
|
118
181
|
}
|
|
119
182
|
if (typeof onChange === "function") {
|
|
120
183
|
if (mode === import_const.ModeEnum.Pay) {
|
|
184
|
+
triggerCloseButton(false);
|
|
185
|
+
const isActive = await checkIsActiveWithDelay(100);
|
|
186
|
+
if (!isActive) {
|
|
187
|
+
(0, import_utils2.sendWarningLog)({
|
|
188
|
+
title: "支付-当前页面非活跃状态,无法进行支付",
|
|
189
|
+
content: [
|
|
190
|
+
{
|
|
191
|
+
key: "activeStatus",
|
|
192
|
+
value: JSON.stringify({ order_id, isActive })
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
});
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
121
198
|
if (device2.pay) {
|
|
122
199
|
dispatch(
|
|
123
200
|
(0, import_store.updateState)({
|
|
@@ -152,34 +229,42 @@ var device_default = ({
|
|
|
152
229
|
className: "pisell-lowcode__eft-pay-device-list",
|
|
153
230
|
style: isMobile ? { marginTop: "20px" } : {}
|
|
154
231
|
},
|
|
155
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
156
|
-
|
|
232
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
233
|
+
import_antd.Spin,
|
|
157
234
|
{
|
|
158
|
-
|
|
235
|
+
spinning: loading,
|
|
236
|
+
size: "large",
|
|
237
|
+
style: { flex: 1, overflow: "auto", minHeight: "200px" }
|
|
159
238
|
},
|
|
160
|
-
|
|
239
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
161
240
|
"div",
|
|
162
241
|
{
|
|
163
|
-
|
|
164
|
-
className: `pisell-lowcode__eft-pay-device ${id === (device == null ? void 0 : device.id) ? "active" : ""}`,
|
|
165
|
-
"data-index": index,
|
|
166
|
-
onClick,
|
|
167
|
-
role: "button",
|
|
168
|
-
tabIndex: index
|
|
242
|
+
style: { display: "flex", flexDirection: "column", gap: "10px" }
|
|
169
243
|
},
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
), ": ", formatAmount(`${pay.surcharge}`, 2, symbol), " (", import_utils.locales.getText(
|
|
173
|
-
"page.eftpos-pay.text.surcharge.edit.rate"
|
|
174
|
-
), ":", pay.surRate, "% +", " ", formatAmount(`${pay.surMoney}`, 2, symbol), ")"))),
|
|
175
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: { flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
176
|
-
import_ChevronRight.default,
|
|
244
|
+
list.map(({ id, name, pay }, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
245
|
+
"div",
|
|
177
246
|
{
|
|
178
|
-
|
|
179
|
-
|
|
247
|
+
key: id,
|
|
248
|
+
className: `pisell-lowcode__eft-pay-device ${id === (device == null ? void 0 : device.id) ? "active" : ""}`,
|
|
249
|
+
"data-index": index,
|
|
250
|
+
onClick,
|
|
251
|
+
role: "button",
|
|
252
|
+
tabIndex: index
|
|
253
|
+
},
|
|
254
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-name" }, name), mode === import_const.ModeEnum.Refund ? null : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-money" }, pay.totalUnit), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-sucharge" }, import_utils.locales.getText(
|
|
255
|
+
"page.eftpos-pay.text.surcharge.edit.inc.surcharge"
|
|
256
|
+
), ": ", formatAmount(`${pay.surcharge}`, 2, symbol), " (", import_utils.locales.getText(
|
|
257
|
+
"page.eftpos-pay.text.surcharge.edit.rate"
|
|
258
|
+
), ":", pay.surRate, "% +", " ", formatAmount(`${pay.surMoney}`, 2, symbol), ")"))),
|
|
259
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
260
|
+
import_ChevronRight.default,
|
|
261
|
+
{
|
|
262
|
+
style: { fontWeight: "600", fontSize: "24px" }
|
|
263
|
+
}
|
|
264
|
+
))
|
|
180
265
|
))
|
|
181
|
-
)
|
|
182
|
-
)
|
|
266
|
+
)
|
|
267
|
+
)
|
|
183
268
|
) : /* @__PURE__ */ import_react.default.createElement(
|
|
184
269
|
"div",
|
|
185
270
|
{
|
|
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
@@ -35,7 +35,8 @@ module.exports = __toCommonJS(Deposit_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_Sales = require("../../../../../Sales");
|
|
37
37
|
var import_Deposit = require("../../../../../appointmentBooking/components/Deposit");
|
|
38
|
-
var Deposit = () => {
|
|
38
|
+
var Deposit = (props) => {
|
|
39
|
+
const { showTitle = true } = props;
|
|
39
40
|
const {
|
|
40
41
|
deposit,
|
|
41
42
|
isAgreeDepositPolicy,
|
|
@@ -45,6 +46,7 @@ var Deposit = () => {
|
|
|
45
46
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
47
|
import_Deposit.DepositContent,
|
|
47
48
|
{
|
|
49
|
+
showTitle,
|
|
48
50
|
isAgreeDepositPolicy: !!isAgreeDepositPolicy,
|
|
49
51
|
setIsAgreeDepositPolicy,
|
|
50
52
|
deposit,
|
|
@@ -38,12 +38,13 @@ var import_shoppingCart = __toESM(require("../../../../../shoppingCart"));
|
|
|
38
38
|
var import_Sales = require("../../../../../Sales");
|
|
39
39
|
var import_SelectHolderModal = __toESM(require("../../SelectHolderModal"));
|
|
40
40
|
var import_ContinueButton = __toESM(require("../ContinueButton"));
|
|
41
|
-
var
|
|
41
|
+
var import__ = require("../../../../../index");
|
|
42
|
+
var import_useEngineContext = __toESM(require("../../../../../../hooks/useEngineContext"));
|
|
42
43
|
var import_Deposit = __toESM(require("../Deposit"));
|
|
43
44
|
var import_Voucher = __toESM(require("../../../Voucher"));
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
46
|
var CartItem = () => {
|
|
46
|
-
var _a;
|
|
47
|
+
var _a, _b;
|
|
47
48
|
const { open, holderData, selectedHolderIds } = (0, import_Sales.useHolder)();
|
|
48
49
|
const {
|
|
49
50
|
deleteCartItem,
|
|
@@ -51,13 +52,23 @@ var CartItem = () => {
|
|
|
51
52
|
cartData,
|
|
52
53
|
addNoteToCartItem
|
|
53
54
|
} = (0, import_Sales.useCart)();
|
|
54
|
-
const {
|
|
55
|
+
const {
|
|
56
|
+
taxTitle,
|
|
57
|
+
taxRate,
|
|
58
|
+
totalTaxFee,
|
|
59
|
+
isPriceIncludeTax,
|
|
60
|
+
total,
|
|
61
|
+
deposit,
|
|
62
|
+
subtotal,
|
|
63
|
+
surcharge
|
|
64
|
+
} = (0, import_Sales.useSummary)();
|
|
55
65
|
const { isLastStep } = (0, import_Sales.useStep)();
|
|
66
|
+
const context = (0, import_useEngineContext.default)();
|
|
67
|
+
const { translation } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
56
68
|
const handleClickCard = (e, type, key) => {
|
|
57
69
|
if (type === "note") {
|
|
58
70
|
return addNoteToCartItem(e);
|
|
59
71
|
}
|
|
60
|
-
console.log(e, type, key, "wh9988767");
|
|
61
72
|
if (type === "delete") {
|
|
62
73
|
return deleteCartItem(e);
|
|
63
74
|
}
|
|
@@ -65,6 +76,60 @@ var CartItem = () => {
|
|
|
65
76
|
return deleteCartItemByHolder(key);
|
|
66
77
|
}
|
|
67
78
|
};
|
|
79
|
+
const showDeposit = (0, import_react.useMemo)(() => {
|
|
80
|
+
var _a2;
|
|
81
|
+
return ((_a2 = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _a2.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit);
|
|
82
|
+
}, [(_b = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _b.length, deposit == null ? void 0 : deposit.hasDeposit]);
|
|
83
|
+
const subTotalList = (0, import_react.useMemo)(() => {
|
|
84
|
+
const surchargeList = ((surcharge == null ? void 0 : surcharge.surchargeList) || []).map(
|
|
85
|
+
(d, index) => {
|
|
86
|
+
return {
|
|
87
|
+
key: `custom_surcharge_${index}`,
|
|
88
|
+
label: translation(d == null ? void 0 : d.name),
|
|
89
|
+
value: d.amount
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
return [
|
|
94
|
+
{
|
|
95
|
+
key: "deposit",
|
|
96
|
+
value: deposit == null ? void 0 : deposit.total,
|
|
97
|
+
label: import_utils.locales.getText("pisell2.appointment.deposit"),
|
|
98
|
+
hidden: !showDeposit
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "sub_total",
|
|
102
|
+
value: subtotal
|
|
103
|
+
},
|
|
104
|
+
...surchargeList,
|
|
105
|
+
{
|
|
106
|
+
key: "tax",
|
|
107
|
+
value: totalTaxFee,
|
|
108
|
+
hidden: Number(totalTaxFee) <= 0,
|
|
109
|
+
tax: {
|
|
110
|
+
rate: taxRate,
|
|
111
|
+
is_price_include_tax: isPriceIncludeTax,
|
|
112
|
+
title: taxTitle
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: "custom_total",
|
|
117
|
+
value: total,
|
|
118
|
+
label: import_utils.locales.getText("pisell2.event.total"),
|
|
119
|
+
bold: !showDeposit
|
|
120
|
+
}
|
|
121
|
+
];
|
|
122
|
+
}, [
|
|
123
|
+
total,
|
|
124
|
+
subtotal,
|
|
125
|
+
surcharge == null ? void 0 : surcharge.surchargeList,
|
|
126
|
+
deposit == null ? void 0 : deposit.total,
|
|
127
|
+
taxRate,
|
|
128
|
+
isPriceIncludeTax,
|
|
129
|
+
totalTaxFee,
|
|
130
|
+
taxTitle,
|
|
131
|
+
showDeposit
|
|
132
|
+
]);
|
|
68
133
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
69
134
|
"div",
|
|
70
135
|
{
|
|
@@ -89,7 +154,14 @@ var CartItem = () => {
|
|
|
89
154
|
onChange: (e, type, key) => handleClickCard(e, type, key)
|
|
90
155
|
}
|
|
91
156
|
)),
|
|
92
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, null), /* @__PURE__ */ import_react.default.createElement(
|
|
157
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, null), /* @__PURE__ */ import_react.default.createElement(
|
|
158
|
+
import__.SubTotal,
|
|
159
|
+
{
|
|
160
|
+
list: subTotalList,
|
|
161
|
+
style: { padding: 0 },
|
|
162
|
+
children: showDeposit ? /* @__PURE__ */ import_react.default.createElement(import_Deposit.default, { showTitle: false }) : null
|
|
163
|
+
}
|
|
164
|
+
), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
|
|
93
165
|
), /* @__PURE__ */ import_react.default.createElement(import_SelectHolderModal.default, { open }));
|
|
94
166
|
};
|
|
95
167
|
var Item_default = CartItem;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
.cart-item-wrap {
|
|
2
2
|
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
3
5
|
.content {
|
|
4
6
|
background: #fff;
|
|
5
7
|
padding: 20px;
|
|
8
|
+
height: auto;
|
|
9
|
+
overflow: auto;
|
|
6
10
|
.pisell-lowcode__shopping-cart-content {
|
|
7
11
|
.ant-card-body {
|
|
8
12
|
padding: 0;
|
|
@@ -71,15 +75,12 @@
|
|
|
71
75
|
|
|
72
76
|
.content {
|
|
73
77
|
flex: 1;
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
padding: 20px 20px 4px;
|
|
79
|
+
max-height: 100%;
|
|
76
80
|
}
|
|
77
81
|
.event-footer {
|
|
78
82
|
z-index: 10;
|
|
79
|
-
|
|
80
|
-
bottom: 0;
|
|
81
|
-
left: 0;
|
|
82
|
-
right: 0;
|
|
83
|
+
flex: none;
|
|
83
84
|
border-top: 1px solid #eaecf0;
|
|
84
85
|
padding: 14px 24px 24px;
|
|
85
86
|
margin-top: 0;
|
|
@@ -47,13 +47,13 @@ var Cart = ({ open, onCancel }) => {
|
|
|
47
47
|
closable: true,
|
|
48
48
|
onCancel: () => onCancel(),
|
|
49
49
|
bodyStyle: {
|
|
50
|
-
padding:
|
|
50
|
+
padding: 0
|
|
51
51
|
},
|
|
52
52
|
destroyOnClose: true,
|
|
53
53
|
className: `event-cart-modal`,
|
|
54
54
|
footer: null
|
|
55
55
|
},
|
|
56
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
56
|
+
/* @__PURE__ */ import_react.default.createElement(import_Item.default, null)
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
59
|
var Cart_default = Cart;
|
|
@@ -78,7 +78,7 @@ var VoucherCard = () => {
|
|
|
78
78
|
const batchUpdateCart = (productList) => {
|
|
79
79
|
if (!(productList == null ? void 0 : productList.length)) return;
|
|
80
80
|
productList.forEach((product) => {
|
|
81
|
-
updateCartItem(product);
|
|
81
|
+
updateCartItem(product, "deposit");
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
(0, import_react.useEffect)(() => {
|
|
@@ -10,7 +10,6 @@ import RuleSetting from './ruleSetting';
|
|
|
10
10
|
import TaxSelect from './taxSelect';
|
|
11
11
|
import ToCPay from './pay/toC';
|
|
12
12
|
import WalletList from './walletList';
|
|
13
|
-
import Wallet from './wallet';
|
|
14
13
|
import WorkspaceListDetail from './workSpaceListDetail/';
|
|
15
14
|
import WorkspaceList from './workSpaceList';
|
|
16
15
|
import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
@@ -21,4 +20,4 @@ import PinModal from './pinModal';
|
|
|
21
20
|
import PinVerifyModal from './pinVerifyModal';
|
|
22
21
|
import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './authentication/admin';
|
|
23
22
|
import Registry from './systemSettings/registry';
|
|
24
|
-
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal,
|
|
23
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, };
|
package/lib/components/index.js
CHANGED
|
@@ -56,7 +56,6 @@ __export(components_exports, {
|
|
|
56
56
|
SubTotal: () => import_subTotal.default,
|
|
57
57
|
TaxSelect: () => import_taxSelect.default,
|
|
58
58
|
ToCPay: () => import_toC.default,
|
|
59
|
-
Wallet: () => import_wallet.default,
|
|
60
59
|
WalletList: () => import_walletList.default,
|
|
61
60
|
WorkspaceList: () => import_workSpaceList.default,
|
|
62
61
|
WorkspaceListDetail: () => import_workSpaceListDetail.default
|
|
@@ -74,7 +73,6 @@ var import_ruleSetting = __toESM(require("./ruleSetting"));
|
|
|
74
73
|
var import_taxSelect = __toESM(require("./taxSelect"));
|
|
75
74
|
var import_toC = __toESM(require("./pay/toC"));
|
|
76
75
|
var import_walletList = __toESM(require("./walletList"));
|
|
77
|
-
var import_wallet = __toESM(require("./wallet"));
|
|
78
76
|
var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
|
|
79
77
|
var import_workSpaceList = __toESM(require("./workSpaceList"));
|
|
80
78
|
var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
|
|
@@ -114,7 +112,6 @@ var import_registry = __toESM(require("./systemSettings/registry"));
|
|
|
114
112
|
SubTotal,
|
|
115
113
|
TaxSelect,
|
|
116
114
|
ToCPay,
|
|
117
|
-
Wallet,
|
|
118
115
|
WalletList,
|
|
119
116
|
WorkspaceList,
|
|
120
117
|
WorkspaceListDetail
|
|
@@ -12,11 +12,13 @@ export interface SubTotalItem extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
is_price_include_tax?: boolean;
|
|
13
13
|
title?: string;
|
|
14
14
|
};
|
|
15
|
+
bold?: boolean;
|
|
15
16
|
}
|
|
16
17
|
interface SubTotalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
18
|
list: SubTotalItem[];
|
|
18
19
|
mode?: 'column1' | 'column2';
|
|
19
20
|
describe?: string;
|
|
21
|
+
children?: React.ReactNode;
|
|
20
22
|
}
|
|
21
23
|
declare const SubTotal: (props: SubTotalProps) => JSX.Element;
|
|
22
24
|
export default SubTotal;
|