@pisell/private-materials 3.0.28 → 3.0.29
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 +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/components/collapsibleList/index.js +1 -1
- package/es/components/booking/components/footer/utils.js +5 -1
- package/es/components/booking/deposit/ClientItem/index.d.ts +18 -0
- package/es/components/booking/deposit/ClientItem/index.js +43 -0
- package/es/components/booking/deposit/ClientItem/index.less +37 -0
- package/es/components/booking/deposit/DepositItem/index.d.ts +20 -0
- package/es/components/booking/deposit/DepositItem/index.js +105 -0
- package/es/components/booking/deposit/DepositItem/index.less +88 -0
- package/es/components/booking/deposit/EditDepositModal/index.d.ts +9 -0
- package/es/components/booking/deposit/EditDepositModal/index.js +126 -0
- package/es/components/booking/deposit/EditDepositModal/index.less +24 -0
- package/es/components/booking/deposit/index.d.ts +3 -0
- package/es/components/booking/deposit/index.js +164 -0
- package/es/components/booking/deposit/index.less +3 -0
- package/es/components/booking/deposit/serve.d.ts +8 -0
- package/es/components/booking/deposit/serve.js +27 -0
- package/es/components/booking/info/service/addService/index.js +2 -2
- package/es/components/booking/info/service/editService/index.js +50 -21
- package/es/components/booking/locales.d.ts +54 -0
- package/es/components/booking/locales.js +57 -3
- package/es/components/booking/utils.d.ts +37 -0
- package/es/components/booking/utils.js +71 -8
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/components/booking/components/collapsibleList/index.js +1 -1
- package/lib/components/booking/components/footer/utils.js +4 -1
- package/lib/components/booking/deposit/ClientItem/index.d.ts +18 -0
- package/lib/components/booking/deposit/ClientItem/index.js +71 -0
- package/lib/components/booking/deposit/ClientItem/index.less +37 -0
- package/lib/components/booking/deposit/DepositItem/index.d.ts +20 -0
- package/lib/components/booking/deposit/DepositItem/index.js +112 -0
- package/lib/components/booking/deposit/DepositItem/index.less +88 -0
- package/lib/components/booking/deposit/EditDepositModal/index.d.ts +9 -0
- package/lib/components/booking/deposit/EditDepositModal/index.js +131 -0
- package/lib/components/booking/deposit/EditDepositModal/index.less +24 -0
- package/lib/components/booking/deposit/index.d.ts +3 -0
- package/lib/components/booking/deposit/index.js +186 -0
- package/lib/components/booking/deposit/index.less +3 -0
- package/lib/components/booking/deposit/serve.d.ts +8 -0
- package/lib/components/booking/deposit/serve.js +30 -0
- package/lib/components/booking/info/service/addService/index.js +2 -2
- package/lib/components/booking/info/service/editService/index.js +33 -11
- package/lib/components/booking/locales.d.ts +54 -0
- package/lib/components/booking/locales.js +57 -3
- package/lib/components/booking/utils.d.ts +37 -0
- package/lib/components/booking/utils.js +33 -10
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lowcode/booking-deposit/meta.ts +93 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.pisell-lowcode__edit-deposit-modal {
|
|
2
|
+
.pisell-lowcode-modal-footer {
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
}
|
|
6
|
+
.pisell-lowcode__edit-deposit-modal-field-list {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 20px;
|
|
10
|
+
margin-bottom: 32px;
|
|
11
|
+
}
|
|
12
|
+
.pisell-lowcode__edit-deposit-modal-field {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 6px;
|
|
16
|
+
.pisell-lowcode__edit-deposit-modal-field-label {
|
|
17
|
+
color: var(--Gray-700, #344054);
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
line-height: 20px; /* 142.857% */
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/deposit/index.tsx
|
|
30
|
+
var deposit_exports = {};
|
|
31
|
+
__export(deposit_exports, {
|
|
32
|
+
default: () => deposit_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(deposit_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_emptyBooking = __toESM(require("../components/emptyBooking"));
|
|
38
|
+
var import_tabPane = __toESM(require("../components/tabPane"));
|
|
39
|
+
var import_DepositItem = __toESM(require("./DepositItem"));
|
|
40
|
+
var import_EditDepositModal = __toESM(require("./EditDepositModal"));
|
|
41
|
+
var import_antd = require("antd");
|
|
42
|
+
var import_amount = require("../components/footer/amount");
|
|
43
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
44
|
+
var import_utils2 = require("../utils");
|
|
45
|
+
var import_serve = require("./serve");
|
|
46
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
47
|
+
var Deposit = (props) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
const { globalState, setState } = props;
|
|
50
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
51
|
+
const [modal, contextHolder] = import_antd.Modal.useModal();
|
|
52
|
+
const editDepositModalRef = (0, import_react.useRef)();
|
|
53
|
+
const context = (0, import_useEngineContext.default)();
|
|
54
|
+
const { isTerminal, interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
55
|
+
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
56
|
+
const { bookingDetail, bookingId, amountSymbol, generatePaymentLink, locale } = globalState;
|
|
57
|
+
const create = () => {
|
|
58
|
+
var _a2, _b2;
|
|
59
|
+
(_b2 = (_a2 = editDepositModalRef.current) == null ? void 0 : _a2.handleOpen) == null ? void 0 : _b2.call(_a2);
|
|
60
|
+
};
|
|
61
|
+
const deleteDeposit = () => {
|
|
62
|
+
modal.confirm({
|
|
63
|
+
title: import_utils.locales.getText("pisell2.text.deposit-delete-message-title"),
|
|
64
|
+
content: import_utils.locales.getText("pisell2.text.deposit-delete-message"),
|
|
65
|
+
onOk() {
|
|
66
|
+
(0, import_serve.editDepositAmount)(bookingDetail.id, {
|
|
67
|
+
deposit_amount: 0
|
|
68
|
+
}).then((res) => {
|
|
69
|
+
setState({
|
|
70
|
+
bookingDetail: {
|
|
71
|
+
...bookingDetail,
|
|
72
|
+
deposit_amount: 0
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const total = (0, import_react.useMemo)(() => {
|
|
80
|
+
return (0, import_amount.getSumTotal)(globalState, false);
|
|
81
|
+
}, [globalState]);
|
|
82
|
+
const depositList = (0, import_react.useMemo)(() => {
|
|
83
|
+
if (!bookingId)
|
|
84
|
+
return [];
|
|
85
|
+
if (Number(bookingDetail == null ? void 0 : bookingDetail.deposit_amount) === 0)
|
|
86
|
+
return [];
|
|
87
|
+
return [
|
|
88
|
+
{
|
|
89
|
+
customer: bookingDetail == null ? void 0 : bookingDetail.customer,
|
|
90
|
+
status: (bookingDetail == null ? void 0 : bookingDetail.deposit_payment_time) ? "paid" : "unpaid",
|
|
91
|
+
totalAmount: total.expectAmount,
|
|
92
|
+
depositAmount: bookingDetail == null ? void 0 : bookingDetail.deposit_amount,
|
|
93
|
+
createdTime: (0, import_dayjs.default)(bookingDetail == null ? void 0 : bookingDetail.created_at).format(locale === "en" ? "dddd, D MMMM YYYY HH:mm" : "YYYY-MM-DD HH:mm"),
|
|
94
|
+
orderId: bookingDetail == null ? void 0 : bookingDetail.id,
|
|
95
|
+
orderNumber: bookingDetail == null ? void 0 : bookingDetail.shop_full_order_number,
|
|
96
|
+
amountSymbol: (globalState == null ? void 0 : globalState.amountSymbol) || "$",
|
|
97
|
+
totalAmountStr: (0, import_utils.formatAmount)(
|
|
98
|
+
total.expectAmount,
|
|
99
|
+
2,
|
|
100
|
+
(globalState == null ? void 0 : globalState.amountSymbol) || "$"
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
];
|
|
104
|
+
}, [bookingDetail, total == null ? void 0 : total.expectAmount, globalState == null ? void 0 : globalState.amountSymbol, bookingDetail == null ? void 0 : bookingDetail.deposit_amount]);
|
|
105
|
+
const isBookingCancelled = ((_b = bookingDetail == null ? void 0 : bookingDetail.bookings) == null ? void 0 : _b.appointment_status) === "cancelled";
|
|
106
|
+
const isPaid = (bookingDetail == null ? void 0 : bookingDetail.payment_time) !== null;
|
|
107
|
+
const footer = (0, import_react.useMemo)(() => {
|
|
108
|
+
if (!bookingId)
|
|
109
|
+
return null;
|
|
110
|
+
if (isBookingCancelled)
|
|
111
|
+
return null;
|
|
112
|
+
if (isPaid)
|
|
113
|
+
return null;
|
|
114
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-deposit-footer" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "large", block: true, onClick: depositList.length > 0 ? deleteDeposit : create }, depositList.length > 0 ? import_utils.locales.getText("pisell2.text.deposit-delete") : import_utils.locales.getText("pisell2.text.add")));
|
|
115
|
+
}, [depositList, isBookingCancelled, isPaid]);
|
|
116
|
+
const handleEdit = (e, item) => {
|
|
117
|
+
var _a2, _b2;
|
|
118
|
+
(_b2 = (_a2 = editDepositModalRef.current) == null ? void 0 : _a2.handleOpen) == null ? void 0 : _b2.call(_a2, item.depositAmount);
|
|
119
|
+
};
|
|
120
|
+
const handleChange = (amount) => {
|
|
121
|
+
(0, import_serve.editDepositAmount)(bookingDetail.id, {
|
|
122
|
+
deposit_amount: amount
|
|
123
|
+
}).then((res) => {
|
|
124
|
+
setState({
|
|
125
|
+
bookingDetail: {
|
|
126
|
+
...bookingDetail,
|
|
127
|
+
deposit_amount: amount
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
const handleGoOrderDetail = () => {
|
|
133
|
+
var _a2, _b2;
|
|
134
|
+
if (isTerminal == null ? void 0 : isTerminal()) {
|
|
135
|
+
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
136
|
+
module: "booking",
|
|
137
|
+
key: "edit_order",
|
|
138
|
+
data: {
|
|
139
|
+
order_id: bookingDetail.id
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
globalState.action({
|
|
144
|
+
type: "pisell1.goOrderDetail",
|
|
145
|
+
data: {
|
|
146
|
+
"[unique_order_id]": bookingDetail.id
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
151
|
+
import_tabPane.default,
|
|
152
|
+
{
|
|
153
|
+
loading,
|
|
154
|
+
header: import_utils.locales.getText("pisell2.text.deposit-list"),
|
|
155
|
+
footer
|
|
156
|
+
},
|
|
157
|
+
!bookingId || !depositList.length ? /* @__PURE__ */ import_react.default.createElement(
|
|
158
|
+
import_emptyBooking.default,
|
|
159
|
+
{
|
|
160
|
+
description: !bookingId ? void 0 : import_utils.locales.getText("pisell2.text.deposit-list-empty")
|
|
161
|
+
}
|
|
162
|
+
) : depositList.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
|
163
|
+
import_DepositItem.default,
|
|
164
|
+
{
|
|
165
|
+
key: item.status,
|
|
166
|
+
...item,
|
|
167
|
+
generatePaymentLink,
|
|
168
|
+
handleGoOrderDetail,
|
|
169
|
+
onEdit: (e) => handleEdit(e, item),
|
|
170
|
+
isPaid,
|
|
171
|
+
isBookingCancelled
|
|
172
|
+
}
|
|
173
|
+
)),
|
|
174
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
175
|
+
import_EditDepositModal.default,
|
|
176
|
+
{
|
|
177
|
+
totalAmount: total.expectAmount,
|
|
178
|
+
ref: editDepositModalRef,
|
|
179
|
+
amountSymbol,
|
|
180
|
+
onChange: handleChange
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
contextHolder
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
var deposit_default = Deposit;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/booking/deposit/serve.ts
|
|
20
|
+
var serve_exports = {};
|
|
21
|
+
__export(serve_exports, {
|
|
22
|
+
editDepositAmount: () => editDepositAmount
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(serve_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var editDepositAmount = async (orderId, params) => import_utils.request.getRequest().put(`/shop/order/appointment/deposit/${orderId}`, params);
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
editDepositAmount
|
|
30
|
+
});
|
|
@@ -160,12 +160,11 @@ var Info = () => {
|
|
|
160
160
|
quantity: 1,
|
|
161
161
|
price: item.price,
|
|
162
162
|
product_name: item.title,
|
|
163
|
-
other: e
|
|
163
|
+
other: JSON.parse(JSON.stringify(e))
|
|
164
164
|
},
|
|
165
165
|
new: 1
|
|
166
166
|
};
|
|
167
167
|
let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
|
168
|
-
console.log("_total", e);
|
|
169
168
|
cacheItem._extend.total = _total;
|
|
170
169
|
cacheItem._extend.origin_total = _total;
|
|
171
170
|
const _isEdit = !!state.service.cacheItem;
|
|
@@ -173,6 +172,7 @@ var Info = () => {
|
|
|
173
172
|
cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
174
173
|
cacheItem.new = 0;
|
|
175
174
|
}
|
|
175
|
+
console.log("_total", cacheItem);
|
|
176
176
|
dispatch({
|
|
177
177
|
type: "setService",
|
|
178
178
|
payload: {
|
|
@@ -49,7 +49,7 @@ var import_utils3 = require("../../../utils");
|
|
|
49
49
|
var import_like = __toESM(require("../like"));
|
|
50
50
|
var import_mock = require("../../../mock");
|
|
51
51
|
var Info = () => {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
53
53
|
const [form] = import_antd.Form.useForm();
|
|
54
54
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
55
55
|
const useLikeStatus = import_antd.Form.useWatch("like_status", form);
|
|
@@ -117,6 +117,7 @@ var Info = () => {
|
|
|
117
117
|
(_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time,
|
|
118
118
|
import_utils.locales.locale
|
|
119
119
|
);
|
|
120
|
+
let timeSlices = [...obj.timeSlices];
|
|
120
121
|
let durationSlicesBasedOnTime = [...obj.durationSlicesBasedOnTime];
|
|
121
122
|
if (flexibleOption) {
|
|
122
123
|
durationSlicesBasedOnTime.unshift(flexibleOption);
|
|
@@ -129,11 +130,22 @@ var Info = () => {
|
|
|
129
130
|
disabled: true
|
|
130
131
|
});
|
|
131
132
|
}
|
|
133
|
+
if (useStartTime && useStartTime !== "now" && !timeSlices.some((d) => d.value === useStartTime)) {
|
|
134
|
+
timeSlices.unshift({
|
|
135
|
+
label: (0, import_dayjs.default)(useStartTime, "HH:mm").format("hh:mm A"),
|
|
136
|
+
value: useStartTime
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
timeSlices.unshift({
|
|
140
|
+
label: import_utils.locales.getText("pisell2.text.now"),
|
|
141
|
+
value: "now"
|
|
142
|
+
});
|
|
132
143
|
return {
|
|
133
144
|
...obj,
|
|
145
|
+
timeSlices,
|
|
134
146
|
durationSlicesBasedOnTime
|
|
135
147
|
};
|
|
136
|
-
}, [state, import_utils.locales.locale, useDuration, flexibleOption]);
|
|
148
|
+
}, [state, import_utils.locales.locale, useDuration, useStartTime, flexibleOption]);
|
|
137
149
|
(0, import_react.useEffect)(() => {
|
|
138
150
|
try {
|
|
139
151
|
if (useDuration.indexOf("flexible_") == 0) {
|
|
@@ -167,9 +179,19 @@ var Info = () => {
|
|
|
167
179
|
})
|
|
168
180
|
);
|
|
169
181
|
_list = _list.sort((a, b) => b.usable ? 1 : -1);
|
|
170
|
-
if (useResource
|
|
182
|
+
if (useResource) {
|
|
183
|
+
if (!_list.find((d) => d.form_record_id === useResource)) {
|
|
184
|
+
form.setFieldsValue({
|
|
185
|
+
resource: 0
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
let _useResource = 0;
|
|
190
|
+
if (_list.length === 2) {
|
|
191
|
+
_useResource = _list[1].form_record_id;
|
|
192
|
+
}
|
|
171
193
|
form.setFieldsValue({
|
|
172
|
-
resource:
|
|
194
|
+
resource: _useResource
|
|
173
195
|
});
|
|
174
196
|
}
|
|
175
197
|
dispatch({
|
|
@@ -245,7 +267,7 @@ var Info = () => {
|
|
|
245
267
|
form.setFieldsValue({ discount });
|
|
246
268
|
};
|
|
247
269
|
const onFinish = (values) => {
|
|
248
|
-
var _a2
|
|
270
|
+
var _a2;
|
|
249
271
|
let _list = [...state.service.value];
|
|
250
272
|
let _item = { ...state.service.cacheItem, errorList };
|
|
251
273
|
let _extend = {
|
|
@@ -263,10 +285,10 @@ var Info = () => {
|
|
|
263
285
|
_extend.bundle_edit = 1;
|
|
264
286
|
}
|
|
265
287
|
_item._extend = _extend;
|
|
266
|
-
|
|
288
|
+
let _id = _item == null ? void 0 : _item._id;
|
|
289
|
+
if (!_list.some((d) => d._id === _id)) {
|
|
267
290
|
_list.push(_item);
|
|
268
291
|
} else {
|
|
269
|
-
let _id = _item == null ? void 0 : _item._id;
|
|
270
292
|
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
271
293
|
}
|
|
272
294
|
(0, import_utils3.deleteCacheParams)();
|
|
@@ -330,7 +352,7 @@ var Info = () => {
|
|
|
330
352
|
const bundles = (0, import_react.useMemo)(() => {
|
|
331
353
|
var _a2, _b2, _c2, _d2;
|
|
332
354
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
|
333
|
-
}, [(_f = state.service) == null ? void 0 : _f.cacheItem]);
|
|
355
|
+
}, [(_i = (_h = (_g = (_f = state.service) == null ? void 0 : _f.cacheItem) == null ? void 0 : _g._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle]);
|
|
334
356
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
335
357
|
import_drawer.default,
|
|
336
358
|
{
|
|
@@ -364,7 +386,7 @@ var Info = () => {
|
|
|
364
386
|
});
|
|
365
387
|
}
|
|
366
388
|
},
|
|
367
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((
|
|
389
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_l = (_k = (_j = state.service) == null ? void 0 : _j.cacheItem) == null ? void 0 : _k._extend) == null ? void 0 : _l.product_name) || "-"),
|
|
368
390
|
/* @__PURE__ */ import_react.default.createElement(
|
|
369
391
|
import_collapsibleList.default,
|
|
370
392
|
{
|
|
@@ -389,8 +411,8 @@ var Info = () => {
|
|
|
389
411
|
precision: 2,
|
|
390
412
|
style: { width: "100%" },
|
|
391
413
|
min: 0,
|
|
392
|
-
max: ((
|
|
393
|
-
placeholder: ((
|
|
414
|
+
max: ((_n = (_m = state.service.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.origin_total) || 0,
|
|
415
|
+
placeholder: ((_p = (_o = state.service.cacheItem) == null ? void 0 : _o._extend) == null ? void 0 : _p.origin_total) || "0"
|
|
394
416
|
}
|
|
395
417
|
)
|
|
396
418
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -122,6 +122,24 @@ declare const _default: {
|
|
|
122
122
|
'pisell2.text.order.sales.channel.tableorder': string;
|
|
123
123
|
'pisell2.text.order.sales.channel.reserve': string;
|
|
124
124
|
'pisell2.text.rebook': string;
|
|
125
|
+
'pisell2.text.now': string;
|
|
126
|
+
'pisell2.text.deposit-list': string;
|
|
127
|
+
'pisell2.text.deposit-item-status-paid': string;
|
|
128
|
+
'pisell2.text.deposit-item-status-unpaid': string;
|
|
129
|
+
'pisell2.text.deposit-order-total': string;
|
|
130
|
+
'pisell2.text.deposit-order-detail': string;
|
|
131
|
+
'pisell2.text.deposit-collect-deposit': string;
|
|
132
|
+
'pisell2.text.deposit-order-no': string;
|
|
133
|
+
'pisell2.text.deposit-amount': string;
|
|
134
|
+
'pisell2.text.deposit-deposit-amount': string;
|
|
135
|
+
'pisell2.text.deposit-generate-payment-link': string;
|
|
136
|
+
'pisell2.text.deposit-list-empty': string;
|
|
137
|
+
'pisell2.text.deposit-amount-message': string;
|
|
138
|
+
'pisell2.text.deposit-amount-message2': string;
|
|
139
|
+
'pisell2.text.deposit-amount-message3': string;
|
|
140
|
+
'pisell2.text.deposit-delete': string;
|
|
141
|
+
'pisell2.text.deposit-delete-message-title': string;
|
|
142
|
+
'pisell2.text.deposit-delete-message': string;
|
|
125
143
|
};
|
|
126
144
|
'zh-CN': {
|
|
127
145
|
'pisell2.text.refunded-amount': string;
|
|
@@ -246,6 +264,24 @@ declare const _default: {
|
|
|
246
264
|
'pisell2.text.order.sales.channel.tableorder': string;
|
|
247
265
|
'pisell2.text.order.sales.channel.reserve': string;
|
|
248
266
|
'pisell2.text.rebook': string;
|
|
267
|
+
'pisell2.text.now': string;
|
|
268
|
+
'pisell2.text.deposit-list': string;
|
|
269
|
+
'pisell2.text.deposit-item-status-paid': string;
|
|
270
|
+
'pisell2.text.deposit-item-status-unpaid': string;
|
|
271
|
+
'pisell2.text.deposit-order-total': string;
|
|
272
|
+
'pisell2.text.deposit-order-detail': string;
|
|
273
|
+
'pisell2.text.deposit-collect-deposit': string;
|
|
274
|
+
'pisell2.text.deposit-order-no': string;
|
|
275
|
+
'pisell2.text.deposit-amount': string;
|
|
276
|
+
'pisell2.text.deposit-deposit-amount': string;
|
|
277
|
+
'pisell2.text.deposit-generate-payment-link': string;
|
|
278
|
+
'pisell2.text.deposit-list-empty': string;
|
|
279
|
+
'pisell2.text.deposit-amount-message': string;
|
|
280
|
+
'pisell2.text.deposit-amount-message2': string;
|
|
281
|
+
'pisell2.text.deposit-amount-message3': string;
|
|
282
|
+
'pisell2.text.deposit-delete': string;
|
|
283
|
+
'pisell2.text.deposit-delete-message-title': string;
|
|
284
|
+
'pisell2.text.deposit-delete-message': string;
|
|
249
285
|
};
|
|
250
286
|
'zh-HK': {
|
|
251
287
|
'pisell2.text.refunded-amount': string;
|
|
@@ -370,6 +406,24 @@ declare const _default: {
|
|
|
370
406
|
'pisell2.text.order.sales.channel.tableorder': string;
|
|
371
407
|
'pisell2.text.order.sales.channel.reserve': string;
|
|
372
408
|
'pisell2.text.rebook': string;
|
|
409
|
+
'pisell2.text.now': string;
|
|
410
|
+
'pisell2.text.deposit-list': string;
|
|
411
|
+
'pisell2.text.deposit-item-status-paid': string;
|
|
412
|
+
'pisell2.text.deposit-item-status-unpaid': string;
|
|
413
|
+
'pisell2.text.deposit-order-total': string;
|
|
414
|
+
'pisell2.text.deposit-order-detail': string;
|
|
415
|
+
'pisell2.text.deposit-collect-deposit': string;
|
|
416
|
+
'pisell2.text.deposit-order-no': string;
|
|
417
|
+
'pisell2.text.deposit-amount': string;
|
|
418
|
+
'pisell2.text.deposit-deposit-amount': string;
|
|
419
|
+
'pisell2.text.deposit-generate-payment-link': string;
|
|
420
|
+
'pisell2.text.deposit-list-empty': string;
|
|
421
|
+
'pisell2.text.deposit-amount-message': string;
|
|
422
|
+
'pisell2.text.deposit-amount-message2': string;
|
|
423
|
+
'pisell2.text.deposit-amount-message3': string;
|
|
424
|
+
'pisell2.text.deposit-delete': string;
|
|
425
|
+
'pisell2.text.deposit-delete-message-title': string;
|
|
426
|
+
'pisell2.text.deposit-delete-message': string;
|
|
373
427
|
};
|
|
374
428
|
};
|
|
375
429
|
export default _default;
|
|
@@ -154,7 +154,25 @@ var locales_default = {
|
|
|
154
154
|
"pisell2.text.order.sales.channel.boxcocal": "Boxlocal",
|
|
155
155
|
"pisell2.text.order.sales.channel.tableorder": "Table Order",
|
|
156
156
|
"pisell2.text.order.sales.channel.reserve": "Google Reservation",
|
|
157
|
-
"pisell2.text.rebook": "Rebook"
|
|
157
|
+
"pisell2.text.rebook": "Rebook",
|
|
158
|
+
"pisell2.text.now": "Now",
|
|
159
|
+
"pisell2.text.deposit-list": "Deposit List",
|
|
160
|
+
"pisell2.text.deposit-item-status-paid": "Paid",
|
|
161
|
+
"pisell2.text.deposit-item-status-unpaid": "Unpaid",
|
|
162
|
+
"pisell2.text.deposit-order-total": "Order Total",
|
|
163
|
+
"pisell2.text.deposit-order-detail": "Order Details",
|
|
164
|
+
"pisell2.text.deposit-collect-deposit": "Collect Deposit",
|
|
165
|
+
"pisell2.text.deposit-order-no": "Order No",
|
|
166
|
+
"pisell2.text.deposit-amount": "Amount",
|
|
167
|
+
"pisell2.text.deposit-deposit-amount": "Deposit Amount",
|
|
168
|
+
"pisell2.text.deposit-generate-payment-link": "Generate Payment Link",
|
|
169
|
+
"pisell2.text.deposit-list-empty": "Please add a deposit",
|
|
170
|
+
"pisell2.text.deposit-amount-message": "Amount must be greater than 0",
|
|
171
|
+
"pisell2.text.deposit-amount-message2": "The deposit amount cannot be greater than the total order amount",
|
|
172
|
+
"pisell2.text.deposit-amount-message3": "Please enter the deposit amount",
|
|
173
|
+
"pisell2.text.deposit-delete": "Delete deposit",
|
|
174
|
+
"pisell2.text.deposit-delete-message-title": "Prompt",
|
|
175
|
+
"pisell2.text.deposit-delete-message": "It cannot be restored after deletion. Please confirm the operation."
|
|
158
176
|
},
|
|
159
177
|
"zh-CN": {
|
|
160
178
|
"pisell2.text.refunded-amount": "已退金额",
|
|
@@ -292,7 +310,25 @@ var locales_default = {
|
|
|
292
310
|
"pisell2.text.order.sales.channel.boxcocal": "Boxlocal",
|
|
293
311
|
"pisell2.text.order.sales.channel.tableorder": "扫码点餐",
|
|
294
312
|
"pisell2.text.order.sales.channel.reserve": "谷歌预约",
|
|
295
|
-
"pisell2.text.rebook": "再次预约"
|
|
313
|
+
"pisell2.text.rebook": "再次预约",
|
|
314
|
+
"pisell2.text.now": "现在",
|
|
315
|
+
"pisell2.text.deposit-list": "定金列表",
|
|
316
|
+
"pisell2.text.deposit-item-status-paid": "已支付",
|
|
317
|
+
"pisell2.text.deposit-item-status-unpaid": "未支付",
|
|
318
|
+
"pisell2.text.deposit-order-total": "订单总额",
|
|
319
|
+
"pisell2.text.deposit-order-detail": "订单详情",
|
|
320
|
+
"pisell2.text.deposit-collect-deposit": "收定金",
|
|
321
|
+
"pisell2.text.deposit-order-no": "订单编号",
|
|
322
|
+
"pisell2.text.deposit-amount": "金额",
|
|
323
|
+
"pisell2.text.deposit-deposit-amount": "定金金额",
|
|
324
|
+
"pisell2.text.deposit-generate-payment-link": "生成支付链接",
|
|
325
|
+
"pisell2.text.deposit-list-empty": "请添加定金",
|
|
326
|
+
"pisell2.text.deposit-amount-message": "金额必须大于0",
|
|
327
|
+
"pisell2.text.deposit-amount-message2": "定金金额不能大于订单总额",
|
|
328
|
+
"pisell2.text.deposit-amount-message3": "请输入定金金额",
|
|
329
|
+
"pisell2.text.deposit-delete": "删除定金",
|
|
330
|
+
"pisell2.text.deposit-delete-message-title": "提示",
|
|
331
|
+
"pisell2.text.deposit-delete-message": "删除后不可恢复,请确认操作"
|
|
296
332
|
},
|
|
297
333
|
"zh-HK": {
|
|
298
334
|
"pisell2.text.refunded-amount": "已退金額",
|
|
@@ -430,6 +466,24 @@ var locales_default = {
|
|
|
430
466
|
"pisell2.text.order.sales.channel.boxcocal": "Boxlocal",
|
|
431
467
|
"pisell2.text.order.sales.channel.tableorder": "掃碼點餐",
|
|
432
468
|
"pisell2.text.order.sales.channel.reserve": "谷歌預約",
|
|
433
|
-
"pisell2.text.rebook": "再次預約"
|
|
469
|
+
"pisell2.text.rebook": "再次預約",
|
|
470
|
+
"pisell2.text.now": "現在",
|
|
471
|
+
"pisell2.text.deposit-list": "定金列表",
|
|
472
|
+
"pisell2.text.deposit-item-status-paid": "已支付",
|
|
473
|
+
"pisell2.text.deposit-item-status-unpaid": "未支付",
|
|
474
|
+
"pisell2.text.deposit-order-total": "訂單總額",
|
|
475
|
+
"pisell2.text.deposit-order-detail": "訂單詳情",
|
|
476
|
+
"pisell2.text.deposit-collect-deposit": "收定金",
|
|
477
|
+
"pisell2.text.deposit-order-no": "訂單編號",
|
|
478
|
+
"pisell2.text.deposit-amount": "金額",
|
|
479
|
+
"pisell2.text.deposit-deposit-amount": "定金金額",
|
|
480
|
+
"pisell2.text.deposit-generate-payment-link": "生成支付鏈接",
|
|
481
|
+
"pisell2.text.deposit-list-empty": "請添加定金",
|
|
482
|
+
"pisell2.text.deposit-amount-message": "金額必須大於0",
|
|
483
|
+
"pisell2.text.deposit-amount-message2": "定金金額不能大於訂單總額",
|
|
484
|
+
"pisell2.text.deposit-amount-message3": "請輸入定金金額",
|
|
485
|
+
"pisell2.text.deposit-delete": "刪除定金",
|
|
486
|
+
"pisell2.text.deposit-delete-message-title": "提示",
|
|
487
|
+
"pisell2.text.deposit-delete-message": "刪除後不可恢復,請確認操作"
|
|
434
488
|
}
|
|
435
489
|
};
|
|
@@ -13,7 +13,24 @@ declare class Request {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
export declare const request: Request;
|
|
16
|
+
/**
|
|
17
|
+
* @title: 格式化持续时长用于展示
|
|
18
|
+
* @description:
|
|
19
|
+
* @param {number} service_times
|
|
20
|
+
* @return {*}
|
|
21
|
+
* @Author: zhiwei.Wang
|
|
22
|
+
* @Date: 2024-04-26 14:00
|
|
23
|
+
*/
|
|
16
24
|
export declare const getDiscountTime: (service_times: number) => string;
|
|
25
|
+
/**
|
|
26
|
+
* @title: 时间切片
|
|
27
|
+
* @description:
|
|
28
|
+
* @param {any} config
|
|
29
|
+
* @param {string} locale
|
|
30
|
+
* @return {*}
|
|
31
|
+
* @Author: zhiwei.Wang
|
|
32
|
+
* @Date: 2024-04-26 13:59
|
|
33
|
+
*/
|
|
17
34
|
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
|
|
18
35
|
timeSlices: {
|
|
19
36
|
label: string;
|
|
@@ -24,6 +41,26 @@ export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
|
|
|
24
41
|
value: number;
|
|
25
42
|
}[];
|
|
26
43
|
};
|
|
44
|
+
export declare const getNowTime: () => string;
|
|
45
|
+
export declare const isNowTime: (time: string) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @title: 获取服务的开始时间, 如果是now 转换为当前的时间
|
|
48
|
+
* @description:
|
|
49
|
+
* @param {string} start_time
|
|
50
|
+
* @return {*}
|
|
51
|
+
* @Author: zhiwei.Wang
|
|
52
|
+
* @Date: 2024-04-26 14:03
|
|
53
|
+
*/
|
|
54
|
+
export declare const getServeStartTime: (start_time: string) => string;
|
|
55
|
+
/**
|
|
56
|
+
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
57
|
+
* @description:
|
|
58
|
+
* @param {any} item
|
|
59
|
+
* @param {any} currentDate
|
|
60
|
+
* @return {*}
|
|
61
|
+
* @Author: zhiwei.Wang
|
|
62
|
+
* @Date: 2024-04-26 14:04
|
|
63
|
+
*/
|
|
27
64
|
export declare const getServiceTime: (item: any, currentDate: any) => string;
|
|
28
65
|
export declare const findNextSlice: ({ timeSlices, index, date }: {
|
|
29
66
|
timeSlices: any[];
|