@pisell/private-materials 3.0.198 → 3.0.199
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 +142 -142
- 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/booking/addons/model.d.ts +1 -1
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -45
- package/es/components/booking/components/footer/index.js +40 -84
- package/es/components/booking/components/footer/utils.js +32 -218
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
- package/es/components/booking/info/main.js +8 -20
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.js +5 -54
- package/es/components/booking/info/service/addService/index.js +20 -127
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -11
- package/es/components/booking/info/service/addService/utils.js +24 -49
- package/es/components/booking/info/service/editService/index.js +41 -232
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/utils.d.ts +0 -9
- package/es/components/booking/info/utils.js +0 -13
- package/es/components/booking/locales.d.ts +0 -60
- package/es/components/booking/locales.js +3 -75
- package/es/components/booking/model.d.ts +1 -4
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +22 -126
- package/es/components/eftpos/form/index.js +12 -6
- package/es/components/eftpos/group/index.d.ts +1 -2
- package/es/components/eftpos/group/index.js +1 -2
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftpos/receipt/index.d.ts +24 -0
- package/es/components/eftpos/receipt/index.js +96 -0
- package/es/components/eftposPay/helper.d.ts +1 -0
- package/es/components/eftposPay/helper.js +14 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/tyro/index.js +51 -20
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/booking/addons/model.d.ts +1 -1
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -26
- package/lib/components/booking/components/footer/index.js +4 -25
- package/lib/components/booking/components/footer/utils.js +31 -144
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
- package/lib/components/booking/info/main.js +4 -11
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.js +25 -61
- package/lib/components/booking/info/service/addService/index.js +28 -95
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
- package/lib/components/booking/info/service/addService/utils.js +10 -31
- package/lib/components/booking/info/service/editService/index.js +122 -271
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/utils.d.ts +0 -9
- package/lib/components/booking/info/utils.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -60
- package/lib/components/booking/locales.js +3 -63
- package/lib/components/booking/model.d.ts +1 -4
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +15 -79
- package/lib/components/eftpos/form/index.js +12 -6
- package/lib/components/eftpos/group/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.js +0 -1
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +24 -0
- package/lib/components/eftpos/receipt/index.js +88 -0
- package/lib/components/eftposPay/helper.d.ts +1 -0
- package/lib/components/eftposPay/helper.js +21 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/tyro/index.js +36 -7
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/package.json +4 -4
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -119
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -158
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -3
- package/es/components/booking/info/service2/index.js +0 -58
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -145
- package/es/components/booking/info/service2/utils.js +0 -436
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -96
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -72
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -14
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -68
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -39
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -119
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -111
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -113
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -3
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -145
- package/lib/components/booking/info/service2/utils.js +0 -320
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -77
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -79
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -39
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -92
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -48,8 +48,6 @@ var import_icons = require("@ant-design/icons");
|
|
|
48
48
|
var import_serve = require("./serve");
|
|
49
49
|
var import_serve2 = require("../../info2/serve");
|
|
50
50
|
var import_utils3 = require("../../info/utils");
|
|
51
|
-
var import_utils4 = require("../../info/service2/utils");
|
|
52
|
-
var import_AppointmentProductModal = __toESM(require("./AppointmentProductModal"));
|
|
53
51
|
var Footer = (props) => {
|
|
54
52
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
55
53
|
const { state, buttons, dispatch, source } = props;
|
|
@@ -57,7 +55,6 @@ var Footer = (props) => {
|
|
|
57
55
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
58
56
|
const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
|
|
59
57
|
const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
|
|
60
|
-
const appointmentProductRef = (0, import_react.useRef)(null);
|
|
61
58
|
const context = (0, import_useEngineContext.default)();
|
|
62
59
|
const { isTerminal, interaction, store, storage } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
63
60
|
(0, import_react.useEffect)(() => {
|
|
@@ -213,11 +210,6 @@ var Footer = (props) => {
|
|
|
213
210
|
};
|
|
214
211
|
const handleCheckout = async () => {
|
|
215
212
|
if (isEdit) {
|
|
216
|
-
if ((0, import_utils4.isDayBooking)(state)) {
|
|
217
|
-
const isHasDayProducts = handleDaySubmit();
|
|
218
|
-
if (isHasDayProducts)
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
213
|
const res = await handleSave({ type: "checkout" });
|
|
222
214
|
goCheckout((res == null ? void 0 : res.order_id) || state.bookingId);
|
|
223
215
|
return;
|
|
@@ -244,7 +236,7 @@ var Footer = (props) => {
|
|
|
244
236
|
if ((0, import_utils3.isBooking4Shop)(
|
|
245
237
|
(_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id,
|
|
246
238
|
state.renderType
|
|
247
|
-
)
|
|
239
|
+
)) {
|
|
248
240
|
return {
|
|
249
241
|
editBooking: import_serve2.editBookings,
|
|
250
242
|
createBooking: import_serve2.createBookings
|
|
@@ -255,24 +247,11 @@ var Footer = (props) => {
|
|
|
255
247
|
createBooking: state.apis.createBooking
|
|
256
248
|
};
|
|
257
249
|
};
|
|
258
|
-
const handleDaySubmit = () => {
|
|
259
|
-
var _a2;
|
|
260
|
-
const _isHasDayProducts = (0, import_utils4.isHasDayAppointmentProduct)(state);
|
|
261
|
-
if (_isHasDayProducts) {
|
|
262
|
-
(_a2 = appointmentProductRef == null ? void 0 : appointmentProductRef.current) == null ? void 0 : _a2.open();
|
|
263
|
-
}
|
|
264
|
-
return _isHasDayProducts;
|
|
265
|
-
};
|
|
266
250
|
const handleSave = async ({
|
|
267
251
|
type,
|
|
268
252
|
messageShow = true
|
|
269
253
|
}) => {
|
|
270
254
|
var _a2;
|
|
271
|
-
if ((0, import_utils4.isDayBooking)(state)) {
|
|
272
|
-
const isHasDayProducts = handleDaySubmit();
|
|
273
|
-
if (isHasDayProducts)
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
255
|
let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
|
|
277
256
|
_setLoading(true);
|
|
278
257
|
const { createBooking, editBooking } = getApis();
|
|
@@ -668,7 +647,7 @@ var Footer = (props) => {
|
|
|
668
647
|
}
|
|
669
648
|
if (transaction_habit_selection.button_rows == 1) {
|
|
670
649
|
if (state.appointment_status !== "cancelled") {
|
|
671
|
-
if (!state.disabledEdit && !state.isBookingCreatePage
|
|
650
|
+
if (!state.disabledEdit && !state.isBookingCreatePage) {
|
|
672
651
|
arr.push(actionMap.sale);
|
|
673
652
|
}
|
|
674
653
|
}
|
|
@@ -882,7 +861,7 @@ var Footer = (props) => {
|
|
|
882
861
|
className: "pisell-lowcode__booking-footer-buttons",
|
|
883
862
|
style: { marginTop: 12 }
|
|
884
863
|
},
|
|
885
|
-
state.appointment_status !== "cancelled" && !state.isBookingCreatePage
|
|
864
|
+
state.appointment_status !== "cancelled" && !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(
|
|
886
865
|
import_antd2.Button,
|
|
887
866
|
{
|
|
888
867
|
onClick: () => handleSale(),
|
|
@@ -900,6 +879,6 @@ var Footer = (props) => {
|
|
|
900
879
|
},
|
|
901
880
|
actionMap.orderDetail.label
|
|
902
881
|
)
|
|
903
|
-
) : null, contextHolder
|
|
882
|
+
) : null, contextHolder);
|
|
904
883
|
};
|
|
905
884
|
var footer_default = Footer;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
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
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
|
|
29
19
|
// src/components/booking/components/footer/utils.ts
|
|
@@ -34,13 +24,9 @@ __export(utils_exports, {
|
|
|
34
24
|
formatValues: () => formatValues
|
|
35
25
|
});
|
|
36
26
|
module.exports = __toCommonJS(utils_exports);
|
|
37
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
38
27
|
var import_utils = require("../../utils");
|
|
39
28
|
var import_utils2 = require("../../utils");
|
|
40
29
|
var import_utilsByBooking = require("../../info2/utilsByBooking");
|
|
41
|
-
var import_utils3 = require("../../utils");
|
|
42
|
-
var import_status = require("../../info/service2/status");
|
|
43
|
-
var import_utils4 = require("../../info/service2/utils");
|
|
44
30
|
var formatNote = (data) => {
|
|
45
31
|
var _a;
|
|
46
32
|
return ((_a = data.notes) == null ? void 0 : _a.orderNote) || "";
|
|
@@ -91,7 +77,7 @@ var formatProductBundle = (bundle) => {
|
|
|
91
77
|
var getSubType = (item) => {
|
|
92
78
|
var _a;
|
|
93
79
|
const _type = (_a = item.duration) == null ? void 0 : _a.type;
|
|
94
|
-
if (_type) {
|
|
80
|
+
if (_type && _type !== "days") {
|
|
95
81
|
return _type;
|
|
96
82
|
}
|
|
97
83
|
return "minutes";
|
|
@@ -127,115 +113,39 @@ var formatResource = (service) => {
|
|
|
127
113
|
return void 0;
|
|
128
114
|
}
|
|
129
115
|
};
|
|
130
|
-
var
|
|
131
|
-
var _a, _b, _c, _d, _e;
|
|
132
|
-
const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
133
|
-
let obj = {
|
|
134
|
-
customer_id: values.customer_id,
|
|
135
|
-
form_id,
|
|
136
|
-
form_record: [((_e = item._extend) == null ? void 0 : _e.holder_id) || 0]
|
|
137
|
-
};
|
|
138
|
-
if (state.isFranchisee) {
|
|
139
|
-
obj.is_source_shop = 1;
|
|
140
|
-
}
|
|
141
|
-
return obj;
|
|
142
|
-
};
|
|
143
|
-
var formatProducts = (item) => {
|
|
144
|
-
var _a, _b;
|
|
145
|
-
const total = Number(item._extend.total);
|
|
146
|
-
const origin_total = Number(item._extend.origin_total);
|
|
147
|
-
const discount_amount = origin_total - total;
|
|
148
|
-
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
149
|
-
return {
|
|
150
|
-
"num": item._extend.quantity,
|
|
151
|
-
"price": item._extend.price,
|
|
152
|
-
"product_id": (item == null ? void 0 : item.product_id) || item.id,
|
|
153
|
-
"discount_amount": discount_amount,
|
|
154
|
-
"product_discount_reason": item._extend.discount_reason || "",
|
|
155
|
-
"is_charge_tax": item.is_charge_tax,
|
|
156
|
-
"note": (item == null ? void 0 : item.note) || "",
|
|
157
|
-
"discountway": item._extend.discountway || "num",
|
|
158
|
-
"discount_per": item._extend.discount_per,
|
|
159
|
-
"discount_type": item._extend.discount_type || discount_type,
|
|
160
|
-
"order_detail_id": item._extend.order_detail_id || 0,
|
|
161
|
-
"product_bundle": formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
|
|
162
|
-
"bundle_edit": item._extend.bundle_edit
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
var formatDayRelationProducts = (data, booking_item) => {
|
|
116
|
+
var formatBookings = (data) => {
|
|
166
117
|
const list = data.service.value;
|
|
167
|
-
let relation_products = list == null ? void 0 : list.filter((item) => {
|
|
168
|
-
var _a;
|
|
169
|
-
const holderId = (_a = item._extend) == null ? void 0 : _a.holder_id;
|
|
170
|
-
const bookingHolderId = booking_item._extend.holder_id;
|
|
171
|
-
const isAppointment = import_status.appointmentTypes.includes(item.extension_type);
|
|
172
|
-
return holderId && holderId === bookingHolderId && !isAppointment;
|
|
173
|
-
});
|
|
174
|
-
relation_products = relation_products.map((item) => {
|
|
175
|
-
return formatProducts(item);
|
|
176
|
-
});
|
|
177
|
-
return relation_products || [];
|
|
178
|
-
};
|
|
179
|
-
var formatAppointmentProductLists = (data) => {
|
|
180
|
-
var _a;
|
|
181
|
-
try {
|
|
182
|
-
let list = data.service.value;
|
|
183
|
-
list = list.filter((item) => {
|
|
184
|
-
var _a2;
|
|
185
|
-
return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && import_status.appointmentTypes.includes(item.extension_type);
|
|
186
|
-
});
|
|
187
|
-
const groupMap = /* @__PURE__ */ new Map();
|
|
188
|
-
list.forEach((item) => {
|
|
189
|
-
var _a2;
|
|
190
|
-
const key = (_a2 = item._extend) == null ? void 0 : _a2.holder_id;
|
|
191
|
-
if (!groupMap.has(key)) {
|
|
192
|
-
groupMap.set(key, []);
|
|
193
|
-
}
|
|
194
|
-
groupMap.get(key).push(item);
|
|
195
|
-
});
|
|
196
|
-
groupMap.forEach((group) => {
|
|
197
|
-
group[0].relation_products = formatDayRelationProducts(data, group[0]);
|
|
198
|
-
});
|
|
199
|
-
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce((acc, group) => acc.concat(group), []);
|
|
200
|
-
return result || [];
|
|
201
|
-
} catch (error) {
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var formatBookings = (data, values) => {
|
|
205
|
-
const isDay = (0, import_utils4.isDayBooking)(data);
|
|
206
|
-
let list = data.service.value;
|
|
207
|
-
if (isDay) {
|
|
208
|
-
list = formatAppointmentProductLists(data);
|
|
209
|
-
}
|
|
210
|
-
let dayParams = {
|
|
211
|
-
relation_products: []
|
|
212
|
-
};
|
|
213
118
|
const eventOtherParams = data.eventOtherParams;
|
|
214
119
|
let bookings = [];
|
|
215
|
-
console.log(list, "wh_result11");
|
|
216
120
|
bookings = list.map((item) => {
|
|
217
|
-
var _a, _b
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const start_date = item._extend.startDate.format("YYYY-MM-DD");
|
|
123
|
+
const end_date = item._extend.endDate.format("YYYY-MM-DD");
|
|
124
|
+
const end_time = item._extend.endDate.format("HH:mm");
|
|
221
125
|
let start_time = item._extend.startDate.format("HH:mm");
|
|
222
126
|
if ((0, import_utils.isNowTime)(item._extend.start_time)) {
|
|
223
127
|
start_time = (0, import_utils.getNowTime)();
|
|
224
128
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
|
|
230
|
-
start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
|
|
231
|
-
end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
|
|
232
|
-
end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
|
|
233
|
-
dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
|
|
234
|
-
dayParams.holder = formatHolders(data, item, values);
|
|
235
|
-
dayParams.duration = (0, import_utils3.getDays)({ _extend: { start_date: startDateTime, end_date: endDateTime } }, "minutes");
|
|
236
|
-
}
|
|
129
|
+
const total = Number(item._extend.total);
|
|
130
|
+
const origin_total = Number(item._extend.origin_total);
|
|
131
|
+
const discount_amount = origin_total - total;
|
|
132
|
+
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
237
133
|
return {
|
|
238
|
-
"product":
|
|
134
|
+
"product": {
|
|
135
|
+
"num": item._extend.quantity,
|
|
136
|
+
"price": item._extend.price,
|
|
137
|
+
"product_id": item.id,
|
|
138
|
+
"discount_amount": discount_amount,
|
|
139
|
+
"product_discount_reason": item._extend.discount_reason || "",
|
|
140
|
+
"is_charge_tax": item.is_charge_tax,
|
|
141
|
+
"note": "",
|
|
142
|
+
"discountway": item._extend.discountway || "num",
|
|
143
|
+
"discount_per": item._extend.discount_per,
|
|
144
|
+
"discount_type": item._extend.discount_type || discount_type,
|
|
145
|
+
"order_detail_id": item._extend.order_detail_id || 0,
|
|
146
|
+
"product_bundle": formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
|
|
147
|
+
"bundle_edit": item._extend.bundle_edit
|
|
148
|
+
},
|
|
239
149
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
240
150
|
"id": item.booking_id || 0,
|
|
241
151
|
"relation_id": item._extend.relation_id || 0,
|
|
@@ -244,36 +154,22 @@ var formatBookings = (data, values) => {
|
|
|
244
154
|
"is_all": false,
|
|
245
155
|
"schedule_id": item._extend.schedule_id || 0,
|
|
246
156
|
"end_time": end_time,
|
|
247
|
-
"sub_type":
|
|
157
|
+
"sub_type": getSubType(item),
|
|
248
158
|
"select_date": start_date,
|
|
249
159
|
"start_time": start_time,
|
|
250
160
|
"end_date": end_date,
|
|
251
161
|
"start_date": start_date,
|
|
252
|
-
"duration":
|
|
162
|
+
"duration": import_utils.flexibleObj.getValue(item._extend.duration),
|
|
253
163
|
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
254
164
|
"resources": formatResource(item),
|
|
255
165
|
"metadata": item._extend.capacity ? {
|
|
256
166
|
capacity: item._extend.capacity
|
|
257
167
|
} : void 0,
|
|
258
|
-
...eventOtherParams || {}
|
|
259
|
-
...dayParams
|
|
168
|
+
...eventOtherParams || {}
|
|
260
169
|
};
|
|
261
170
|
});
|
|
262
171
|
return bookings;
|
|
263
172
|
};
|
|
264
|
-
var formatRelationProducts = (data) => {
|
|
265
|
-
var _a;
|
|
266
|
-
let list = ((_a = data.service) == null ? void 0 : _a.value) || [];
|
|
267
|
-
list = list.filter((item) => {
|
|
268
|
-
var _a2;
|
|
269
|
-
return !((_a2 = item._extend) == null ? void 0 : _a2.holder_id);
|
|
270
|
-
});
|
|
271
|
-
let relationProducts = [];
|
|
272
|
-
relationProducts = list.map((item) => {
|
|
273
|
-
return formatProducts(item);
|
|
274
|
-
});
|
|
275
|
-
return relationProducts;
|
|
276
|
-
};
|
|
277
173
|
var formatHolder = (state, values) => {
|
|
278
174
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
279
175
|
const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
@@ -300,12 +196,9 @@ var formatValues = (state) => {
|
|
|
300
196
|
bookings: [],
|
|
301
197
|
customer_id: 1,
|
|
302
198
|
customer_name: "",
|
|
303
|
-
holder: {}
|
|
304
|
-
relation_products: [],
|
|
305
|
-
metadata: {}
|
|
199
|
+
holder: {}
|
|
306
200
|
};
|
|
307
|
-
|
|
308
|
-
if (!state.bookingId || isDay) {
|
|
201
|
+
if (!state.bookingId) {
|
|
309
202
|
values.shop_note = formatNote(state);
|
|
310
203
|
}
|
|
311
204
|
if (state.bookingId) {
|
|
@@ -321,18 +214,12 @@ var formatValues = (state) => {
|
|
|
321
214
|
...customer
|
|
322
215
|
};
|
|
323
216
|
values.holder = formatHolder(state, values);
|
|
324
|
-
|
|
325
|
-
values.relation_products = formatRelationProducts(state);
|
|
326
|
-
}
|
|
327
|
-
values.bookings = formatBookings(state, values);
|
|
217
|
+
values.bookings = formatBookings(state);
|
|
328
218
|
if (((_c = (_b = values == null ? void 0 : values.bookings) == null ? void 0 : _b[0]) == null ? void 0 : _c.select_date) && !(state == null ? void 0 : state.bookingId)) {
|
|
329
219
|
let startTime = `${(_e = (_d = values == null ? void 0 : values.bookings) == null ? void 0 : _d[0]) == null ? void 0 : _e.start_time}`;
|
|
330
220
|
startTime = `${startTime || "00:00"}:00`;
|
|
331
221
|
values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
|
|
332
222
|
}
|
|
333
|
-
if (isDay) {
|
|
334
|
-
values.metadata.is_multiday_appointment = 1;
|
|
335
|
-
}
|
|
336
223
|
return values;
|
|
337
224
|
};
|
|
338
225
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -49,11 +49,6 @@ var AddServiceVariant = (props) => {
|
|
|
49
49
|
service: { ...stateRef.current.service, ...payload }
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
if (type === "setDate") {
|
|
53
|
-
setGlobalState({
|
|
54
|
-
date: { ...stateRef.current.date, ...payload }
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
52
|
};
|
|
58
53
|
let Cpt = import_addService.default;
|
|
59
54
|
if ((0, import_utils.isBooking4Shop)(
|
|
@@ -19,7 +19,6 @@ interface SelectDrawerProps {
|
|
|
19
19
|
modalOpen: boolean;
|
|
20
20
|
franchiseeLoading?: number;
|
|
21
21
|
showHeader?: boolean;
|
|
22
|
-
showWalkIn?: boolean;
|
|
23
22
|
}
|
|
24
23
|
declare const _default: React.ForwardRefExoticComponent<SelectDrawerProps & React.RefAttributes<unknown>>;
|
|
25
24
|
export default _default;
|
|
@@ -108,16 +108,12 @@ var SelectDrawer = (props, ref) => {
|
|
|
108
108
|
handleAddPet,
|
|
109
109
|
modalOpen,
|
|
110
110
|
franchiseeLoading,
|
|
111
|
-
showHeader
|
|
112
|
-
showWalkIn
|
|
111
|
+
showHeader
|
|
113
112
|
} = props;
|
|
114
113
|
const form = (formData == null ? void 0 : formData[0]) || {};
|
|
115
114
|
const valList = (childrenValue == null ? void 0 : childrenValue[form.id]) || defaultArr;
|
|
116
115
|
const [_value, setValue] = (0, import_react.useState)(valList);
|
|
117
116
|
const clientRef = (0, import_react.useRef)();
|
|
118
|
-
const searchRef = (0, import_react.useRef)();
|
|
119
|
-
const [open, setOpen] = (0, import_react.useState)(false);
|
|
120
|
-
const [search, setSearch] = (0, import_react.useState)("");
|
|
121
117
|
(0, import_react.useEffect)(() => {
|
|
122
118
|
setValue(
|
|
123
119
|
valList.map((item) => ({
|
|
@@ -125,7 +121,10 @@ var SelectDrawer = (props, ref) => {
|
|
|
125
121
|
id: item.id || item.form_record_id
|
|
126
122
|
}))
|
|
127
123
|
);
|
|
128
|
-
}, [valList
|
|
124
|
+
}, [valList]);
|
|
125
|
+
const searchRef = (0, import_react.useRef)();
|
|
126
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
127
|
+
const [search, setSearch] = (0, import_react.useState)("");
|
|
129
128
|
(0, import_react.useEffect)(() => {
|
|
130
129
|
if (!modalOpen) {
|
|
131
130
|
setOpen(false);
|
|
@@ -318,7 +317,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
318
317
|
title: import_utils.locales.getText("pisell2.text.create-new-customer"),
|
|
319
318
|
onClick: handleAddClient
|
|
320
319
|
}
|
|
321
|
-
),
|
|
320
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
322
321
|
ActionItem,
|
|
323
322
|
{
|
|
324
323
|
title: "Walk-In",
|
|
@@ -327,7 +326,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
327
326
|
closeDrawer();
|
|
328
327
|
}
|
|
329
328
|
}
|
|
330
|
-
)
|
|
329
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: !!loading, delay: 500 }, !!options.length ? options.map((item) => {
|
|
331
330
|
var _a;
|
|
332
331
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
333
332
|
"div",
|
|
@@ -47,16 +47,13 @@ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineCon
|
|
|
47
47
|
var import_format = require("../../../forms/format");
|
|
48
48
|
var import_utils2 = require("../../utils");
|
|
49
49
|
var import_utils3 = require("../../../utils");
|
|
50
|
-
var import_utils4 = require("../../service2/utils");
|
|
51
|
-
var import_ChangePetModal = __toESM(require("../../pet/ChangePetModal"));
|
|
52
50
|
var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
53
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H;
|
|
54
52
|
const { globalState, setGlobalState } = props;
|
|
55
53
|
const modalRef = (0, import_react.useRef)();
|
|
56
54
|
const state = globalState;
|
|
57
55
|
const stateRef = (0, import_react.useRef)(state);
|
|
58
56
|
const prevCustomerId = (0, import_react.useRef)(null);
|
|
59
|
-
const changePetRef = (0, import_react.useRef)(null);
|
|
60
57
|
const context = (0, import_useEngineContext.default)();
|
|
61
58
|
const [isHasFormRecord, setIsHasFormRecord] = (0, import_react.useState)(true);
|
|
62
59
|
const isFranchisee = (_d = (_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.businessUtils) == null ? void 0 : _c.getAppByModal) == null ? void 0 : _d.call(_c, "franchisee");
|
|
@@ -111,14 +108,6 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
111
108
|
}
|
|
112
109
|
});
|
|
113
110
|
}
|
|
114
|
-
if (type === "setService") {
|
|
115
|
-
setGlobalState({
|
|
116
|
-
service: {
|
|
117
|
-
...stateRef.current.service,
|
|
118
|
-
...payload
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
111
|
};
|
|
123
112
|
const boardConfig = (0, import_react.useMemo)(() => {
|
|
124
113
|
var _a2, _b2, _c2;
|
|
@@ -139,18 +128,6 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
139
128
|
state == null ? void 0 : state.modalOpen
|
|
140
129
|
]);
|
|
141
130
|
const handleSelectPet = (val) => {
|
|
142
|
-
var _a2, _b2;
|
|
143
|
-
if ((0, import_utils4.isDayBooking)(state)) {
|
|
144
|
-
const { ids, lists } = (0, import_utils4.isOpenDeletePet)(state, val);
|
|
145
|
-
if ((ids == null ? void 0 : ids.length) > 0 && (lists == null ? void 0 : lists.length) > 0) {
|
|
146
|
-
(_b2 = changePetRef.current) == null ? void 0 : _b2.open({
|
|
147
|
-
ids,
|
|
148
|
-
setGlobalState,
|
|
149
|
-
service: ((_a2 = state.service) == null ? void 0 : _a2.value) || [],
|
|
150
|
-
state
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
131
|
setGlobalState({
|
|
155
132
|
pet: {
|
|
156
133
|
...state.pet,
|
|
@@ -282,7 +259,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
282
259
|
}, [isWalkIn, formId, (_q = state.client.value) == null ? void 0 : _q.id, currentPetValue, boardConfig]);
|
|
283
260
|
const petRender = (0, import_react.useMemo)(() => {
|
|
284
261
|
var _a2, _b2, _c2;
|
|
285
|
-
if ((
|
|
262
|
+
if ((state == null ? void 0 : state.disabledEdit) || boardConfig.type !== "form") {
|
|
286
263
|
return null;
|
|
287
264
|
}
|
|
288
265
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !(currentPetValue == null ? void 0 : currentPetValue.length) && !isHasFormRecord && !isWalkIn && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -347,8 +324,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
347
324
|
handleAddPet,
|
|
348
325
|
currentPetValue,
|
|
349
326
|
formId,
|
|
350
|
-
(_x = (_w = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _w.holder) == null ? void 0 : _x.data_range
|
|
351
|
-
(_y = state.service) == null ? void 0 : _y.value
|
|
327
|
+
(_x = (_w = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _w.holder) == null ? void 0 : _x.data_range
|
|
352
328
|
]);
|
|
353
329
|
const handleOpenClient = () => {
|
|
354
330
|
if (!isWalkIn || (state == null ? void 0 : state.disableEventBookingEdit)) {
|
|
@@ -383,11 +359,11 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
383
359
|
import_antd.Avatar,
|
|
384
360
|
{
|
|
385
361
|
className: "pisell-lowcode__booking-client-avatar",
|
|
386
|
-
src: import_utils.image.ali((
|
|
362
|
+
src: import_utils.image.ali((_y = state.client.value) == null ? void 0 : _y.cover, 100),
|
|
387
363
|
size: 64,
|
|
388
364
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
389
365
|
}
|
|
390
|
-
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((
|
|
366
|
+
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_z = state.client.value) == null ? void 0 : _z.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_A = state.client.value) == null ? void 0 : _A.email) : null, ((_B = state.client.value) == null ? void 0 : _B.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.phone) : null), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
391
367
|
import_antd.Dropdown.Button,
|
|
392
368
|
{
|
|
393
369
|
menu: {
|
|
@@ -438,7 +414,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
438
414
|
showHeader: !state.isBookingCreatePage,
|
|
439
415
|
modalOpen: state.modalOpen,
|
|
440
416
|
loading,
|
|
441
|
-
autoFocus: !((
|
|
417
|
+
autoFocus: !((_F = (_E = (_D = context == null ? void 0 : context.appHelper) == null ? void 0 : _D.utils) == null ? void 0 : _E.isTerminal) == null ? void 0 : _F.call(_E)),
|
|
442
418
|
ref: modalRef,
|
|
443
419
|
onClose: handleClose,
|
|
444
420
|
handleSelectClient,
|
|
@@ -448,16 +424,14 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
448
424
|
formData: state.pet.formData,
|
|
449
425
|
searchChange,
|
|
450
426
|
options: renderList,
|
|
451
|
-
holder: (
|
|
452
|
-
client: (
|
|
427
|
+
holder: (_G = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _G.holder,
|
|
428
|
+
client: (_H = state == null ? void 0 : state.client) == null ? void 0 : _H.value,
|
|
453
429
|
loadMore,
|
|
454
430
|
showPet: (boardConfig == null ? void 0 : boardConfig.type) === "form",
|
|
455
431
|
handleAddPet,
|
|
456
|
-
franchiseeLoading
|
|
457
|
-
showWalkIn: !(0, import_utils4.isDayBooking)(state)
|
|
432
|
+
franchiseeLoading
|
|
458
433
|
}
|
|
459
|
-
)
|
|
460
|
-
/* @__PURE__ */ import_react.default.createElement(import_ChangePetModal.default, { ref: changePetRef })
|
|
434
|
+
)
|
|
461
435
|
);
|
|
462
436
|
});
|
|
463
437
|
var vertical_default = VerticalClient;
|
|
@@ -51,16 +51,13 @@ var import_notes = __toESM(require("./notes"));
|
|
|
51
51
|
var import_index = require("./index.less");
|
|
52
52
|
var import_classnames = __toESM(require("classnames"));
|
|
53
53
|
var import_antd = require("antd");
|
|
54
|
-
var import_service2 = require("./service2");
|
|
55
|
-
var import_utils3 = require("./service2/utils");
|
|
56
54
|
var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
|
|
57
55
|
var defaultModules = {
|
|
58
56
|
client: 1,
|
|
59
57
|
date: 1,
|
|
60
58
|
service: 1,
|
|
61
59
|
holder: 1,
|
|
62
|
-
note: 1
|
|
63
|
-
service2: 0
|
|
60
|
+
note: 1
|
|
64
61
|
};
|
|
65
62
|
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
66
63
|
var Info = (0, import_model.Provider)((props) => {
|
|
@@ -124,14 +121,11 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
124
121
|
globalState == null ? void 0 : globalState.renderType
|
|
125
122
|
]);
|
|
126
123
|
const notes = (0, import_react.useMemo)(() => {
|
|
127
|
-
var _a2, _b2
|
|
124
|
+
var _a2, _b2;
|
|
128
125
|
if (!modules.note) {
|
|
129
126
|
return null;
|
|
130
127
|
}
|
|
131
|
-
|
|
132
|
-
return /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote, onChange: addNote });
|
|
133
|
-
}
|
|
134
|
-
return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" || globalState.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_notes.default, null) : null : /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_d2 = (_c2 = modal.state) == null ? void 0 : _c2.notes) == null ? void 0 : _d2.orderNote, onChange: addNote });
|
|
128
|
+
return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" || globalState.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_notes.default, null) : null : /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote, onChange: addNote });
|
|
135
129
|
}, [
|
|
136
130
|
modules.note,
|
|
137
131
|
globalState == null ? void 0 : globalState.bookingId,
|
|
@@ -156,7 +150,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
156
150
|
},
|
|
157
151
|
bodyClassName: (0, import_classnames.default)("booking-info-warp", {
|
|
158
152
|
["create-booking-page-info-wrap"]: isBookingCreatePage,
|
|
159
|
-
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
|
|
153
|
+
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
|
|
160
154
|
})
|
|
161
155
|
},
|
|
162
156
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((_i = modal.state) == null ? void 0 : _i.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -169,7 +163,6 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
169
163
|
style: { paddingTop: 20 }
|
|
170
164
|
},
|
|
171
165
|
modules.service ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service.default, null) : null) : null,
|
|
172
|
-
modules.service2 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service2.Service2Cart, null) : null) : null,
|
|
173
166
|
notes,
|
|
174
167
|
slot ? slot : null
|
|
175
168
|
))
|