@pisell/private-materials 3.0.162-gray → 3.0.162
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- 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 +11 -11
- package/es/components/booking/components/footer/index.js +5 -34
- package/es/components/booking/forms/forms.d.ts +0 -1
- package/es/components/booking/forms/forms.js +2 -4
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +6 -4
- package/es/components/booking/info/client/index.js +1 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
- package/es/components/booking/info/clientVariant/vertical/index.js +5 -6
- package/es/components/booking/info/clientVariant/vertical/index.less +0 -8
- package/es/components/booking/info/index.less +0 -19
- package/es/components/booking/info/main.js +5 -11
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +3 -9
- package/es/components/booking/info/service/addService/index.js +36 -82
- package/es/components/booking/info/service/addService/index.less +1 -27
- package/es/components/booking/info/service/editService/index.js +13 -11
- package/es/components/booking/info/service/index.js +2 -5
- package/es/components/booking/info/service/index.less +0 -18
- package/es/components/booking/info/service/serviceItem/index.d.ts +3 -3
- package/es/components/booking/info/service/serviceItem/index.js +8 -22
- package/es/components/booking/info/service/serviceItem/index.less +0 -8
- package/es/components/booking/info/service/serviceList/index.js +1 -20
- package/es/components/booking/info2/index.js +3 -9
- package/es/components/booking/info2/service/addService/index.d.ts +2 -8
- package/es/components/booking/info2/service/addService/index.js +36 -82
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/info2/service/editService/index.js +4 -11
- package/es/components/booking/info2/service/index.js +2 -5
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -1
- package/es/components/booking/info2/service/serviceItem/index.js +3 -16
- package/es/components/booking/info2/service/serviceList/index.js +1 -20
- package/es/components/booking/info2/utilsByBooking.js +2 -6
- package/es/components/booking/locales.d.ts +0 -60
- package/es/components/booking/locales.js +3 -63
- package/es/components/booking/model.d.ts +0 -2
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +51 -54
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/components/booking/components/footer/index.js +5 -30
- package/lib/components/booking/forms/forms.d.ts +0 -1
- package/lib/components/booking/forms/forms.js +2 -5
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +5 -4
- package/lib/components/booking/info/client/index.js +1 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +76 -88
- package/lib/components/booking/info/clientVariant/vertical/index.less +0 -8
- package/lib/components/booking/info/index.less +0 -19
- package/lib/components/booking/info/main.js +3 -9
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +3 -9
- package/lib/components/booking/info/service/addService/index.js +29 -66
- package/lib/components/booking/info/service/addService/index.less +1 -27
- package/lib/components/booking/info/service/editService/index.js +6 -9
- package/lib/components/booking/info/service/index.js +2 -4
- package/lib/components/booking/info/service/index.less +0 -18
- package/lib/components/booking/info/service/serviceItem/index.d.ts +3 -3
- package/lib/components/booking/info/service/serviceItem/index.js +1 -15
- package/lib/components/booking/info/service/serviceItem/index.less +0 -8
- package/lib/components/booking/info/service/serviceList/index.js +1 -18
- package/lib/components/booking/info2/index.js +2 -8
- package/lib/components/booking/info2/service/addService/index.d.ts +2 -8
- package/lib/components/booking/info2/service/addService/index.js +29 -66
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/info2/service/editService/index.js +1 -7
- package/lib/components/booking/info2/service/index.js +2 -4
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.js +1 -14
- package/lib/components/booking/info2/service/serviceList/index.js +1 -18
- package/lib/components/booking/info2/utilsByBooking.js +1 -5
- package/lib/components/booking/locales.d.ts +0 -60
- package/lib/components/booking/locales.js +3 -63
- package/lib/components/booking/model.d.ts +0 -2
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +22 -57
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +4 -4
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/dashboard/index.js +0 -298
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/dashboard/serve.js +0 -27
- package/es/components/booking/hooks/useClearCart.d.ts +0 -3
- package/es/components/booking/hooks/useClearCart.js +0 -27
- package/es/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
- package/es/components/booking/hooks/useCreateBookingPageHeader.js +0 -21
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/es/components/booking/info/addServiceVariant/index.js +0 -42
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/dashboard/index.js +0 -279
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.js +0 -33
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -3
- package/lib/components/booking/hooks/useClearCart.js +0 -62
- package/lib/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
- package/lib/components/booking/hooks/useCreateBookingPageHeader.js +0 -53
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/info/addServiceVariant/index.js +0 -70
- package/lowcode/booking-dashboard/meta.ts +0 -137
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -517,35 +517,14 @@ var Footer = (props) => {
|
|
|
517
517
|
import_utils.locales.getText("pisell2.text.refund")
|
|
518
518
|
);
|
|
519
519
|
}, []);
|
|
520
|
-
const handleClearAll = () => {
|
|
521
|
-
var _a2;
|
|
522
|
-
(_a2 = state == null ? void 0 : state.clearAllValue) == null ? void 0 : _a2.call(state);
|
|
523
|
-
};
|
|
524
|
-
const clearAllButton = (0, import_react.useMemo)(() => {
|
|
525
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
526
|
-
import_antd2.Button,
|
|
527
|
-
{
|
|
528
|
-
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
529
|
-
type: "default",
|
|
530
|
-
onClick: handleClearAll
|
|
531
|
-
},
|
|
532
|
-
import_utils.locales.getText("pisell2.booking.info.text.clear-all")
|
|
533
|
-
);
|
|
534
|
-
}, []);
|
|
535
520
|
let buttonMap = {
|
|
536
521
|
checkout: checkoutButton,
|
|
537
522
|
save: saveButton,
|
|
538
523
|
complete: completeButton,
|
|
539
524
|
refund: refundButton,
|
|
540
525
|
paymentLink: paymentLinkButton,
|
|
541
|
-
rebook: rebookButton
|
|
542
|
-
clearAll: clearAllButton
|
|
526
|
+
rebook: rebookButton
|
|
543
527
|
};
|
|
544
|
-
const isShowClearAll = (0, import_react.useMemo)(() => {
|
|
545
|
-
if (!state.bookingId) {
|
|
546
|
-
return true;
|
|
547
|
-
}
|
|
548
|
-
}, [state.bookingId]);
|
|
549
528
|
const isCheckout = (0, import_react.useMemo)(() => {
|
|
550
529
|
var _a2, _b2, _c2;
|
|
551
530
|
let list = [
|
|
@@ -592,9 +571,6 @@ var Footer = (props) => {
|
|
|
592
571
|
}
|
|
593
572
|
if (source === "info") {
|
|
594
573
|
let arr = [];
|
|
595
|
-
if (isShowClearAll) {
|
|
596
|
-
arr.push(buttonMap.clearAll);
|
|
597
|
-
}
|
|
598
574
|
if (isCheckout) {
|
|
599
575
|
if (!isTeam) {
|
|
600
576
|
arr.push(buttonMap.checkout);
|
|
@@ -626,8 +602,7 @@ var Footer = (props) => {
|
|
|
626
602
|
loading,
|
|
627
603
|
isCheckout,
|
|
628
604
|
state,
|
|
629
|
-
isTeam
|
|
630
|
-
isShowClearAll
|
|
605
|
+
isTeam
|
|
631
606
|
]);
|
|
632
607
|
const moreButton = (0, import_react.useMemo)(() => {
|
|
633
608
|
let arr = [];
|
|
@@ -647,7 +622,7 @@ var Footer = (props) => {
|
|
|
647
622
|
}
|
|
648
623
|
if (transaction_habit_selection.button_rows == 1) {
|
|
649
624
|
if (state.appointment_status !== "cancelled") {
|
|
650
|
-
if (!state.disabledEdit
|
|
625
|
+
if (!state.disabledEdit) {
|
|
651
626
|
arr.push(actionMap.sale);
|
|
652
627
|
}
|
|
653
628
|
}
|
|
@@ -747,7 +722,7 @@ var Footer = (props) => {
|
|
|
747
722
|
if (!state.bookingDetail) {
|
|
748
723
|
return true;
|
|
749
724
|
}
|
|
750
|
-
if (!((_a2 = state.addons) == null ? void 0 : _a2.load) && state.renderType !== "eventBooking"
|
|
725
|
+
if (!((_a2 = state.addons) == null ? void 0 : _a2.load) && state.renderType !== "eventBooking") {
|
|
751
726
|
return true;
|
|
752
727
|
}
|
|
753
728
|
}
|
|
@@ -861,7 +836,7 @@ var Footer = (props) => {
|
|
|
861
836
|
className: "pisell-lowcode__booking-footer-buttons",
|
|
862
837
|
style: { marginTop: 12 }
|
|
863
838
|
},
|
|
864
|
-
state.appointment_status !== "cancelled"
|
|
839
|
+
state.appointment_status !== "cancelled" ? /* @__PURE__ */ import_react.default.createElement(
|
|
865
840
|
import_antd2.Button,
|
|
866
841
|
{
|
|
867
842
|
onClick: () => handleSale(),
|
|
@@ -53,8 +53,7 @@ var Forms = (0, import_model.Provider)((props) => {
|
|
|
53
53
|
addCallback,
|
|
54
54
|
client,
|
|
55
55
|
loading,
|
|
56
|
-
addButtonProps
|
|
57
|
-
drawerProps
|
|
56
|
+
addButtonProps
|
|
58
57
|
} = props;
|
|
59
58
|
const onAction = (0, import_ahooks.useMemoizedFn)(
|
|
60
59
|
async (formDataConfig, isAdd) => {
|
|
@@ -151,7 +150,6 @@ var Forms = (0, import_model.Provider)((props) => {
|
|
|
151
150
|
onChange: (val) => {
|
|
152
151
|
onValueChange(d, val);
|
|
153
152
|
},
|
|
154
|
-
drawerProps,
|
|
155
153
|
onAdd: () => {
|
|
156
154
|
onAction(d, true);
|
|
157
155
|
},
|
|
@@ -192,8 +190,7 @@ var Forms = (0, import_model.Provider)((props) => {
|
|
|
192
190
|
client == null ? void 0 : client.id,
|
|
193
191
|
addButtonProps,
|
|
194
192
|
customSelectProps,
|
|
195
|
-
optionRender
|
|
196
|
-
drawerProps
|
|
193
|
+
optionRender
|
|
197
194
|
]);
|
|
198
195
|
});
|
|
199
196
|
var forms_default = Forms;
|
|
@@ -7,5 +7,5 @@ import "./index.less";
|
|
|
7
7
|
* @Author: zhiwei.Wang
|
|
8
8
|
* @Date: 2024-01-30 17:06
|
|
9
9
|
*/
|
|
10
|
-
declare const Single: ({ value, onChange, form, mode, optionRender, loading, customSelectProps, onAdd, addButtonProps, modalOpen, watch,
|
|
10
|
+
declare const Single: ({ value, onChange, form, mode, optionRender, loading, customSelectProps, onAdd, addButtonProps, modalOpen, watch, }: any) => React.JSX.Element;
|
|
11
11
|
export default Single;
|
|
@@ -53,8 +53,7 @@ var Single = ({
|
|
|
53
53
|
onAdd,
|
|
54
54
|
addButtonProps,
|
|
55
55
|
modalOpen,
|
|
56
|
-
watch
|
|
57
|
-
drawerProps
|
|
56
|
+
watch
|
|
58
57
|
}) => {
|
|
59
58
|
var _a, _b;
|
|
60
59
|
const [HumanBodySelector] = (0, import_useComponents.default)({
|
|
@@ -114,6 +113,9 @@ var Single = ({
|
|
|
114
113
|
if (queryValueById.includes(field == null ? void 0 : field.filed_type)) {
|
|
115
114
|
return /* @__PURE__ */ import_react.default.createElement(import_RenderValueById.default, { field, value: val });
|
|
116
115
|
}
|
|
116
|
+
if ((field == null ? void 0 : field.filed_type) === "media") {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
117
119
|
return val || "-";
|
|
118
120
|
};
|
|
119
121
|
const renderItem = (0, import_react.useCallback)(
|
|
@@ -178,8 +180,7 @@ var Single = ({
|
|
|
178
180
|
addButtonProps: _addButtonProps,
|
|
179
181
|
drawerProps: {
|
|
180
182
|
title: `${import_utils.locales.getText("pisell2.text.select")} ${((_b = form.form) == null ? void 0 : _b.title) || "-"}`,
|
|
181
|
-
destroyOnClose: true
|
|
182
|
-
...drawerProps || {}
|
|
183
|
+
destroyOnClose: true
|
|
183
184
|
},
|
|
184
185
|
optionRender: _optionRender,
|
|
185
186
|
rowKey: "form_record_id",
|
|
@@ -339,7 +339,7 @@ var Client = () => {
|
|
|
339
339
|
}
|
|
340
340
|
handleOpenClientModal();
|
|
341
341
|
},
|
|
342
|
-
style: state.bookingId ? {} : { marginTop:
|
|
342
|
+
style: state.bookingId ? {} : { marginTop: 16 }
|
|
343
343
|
},
|
|
344
344
|
/* @__PURE__ */ import_react.default.createElement(
|
|
345
345
|
import_antd.Avatar,
|
|
@@ -18,7 +18,6 @@ interface SelectDrawerProps {
|
|
|
18
18
|
handleAddPet: any;
|
|
19
19
|
modalOpen: boolean;
|
|
20
20
|
franchiseeLoading?: number;
|
|
21
|
-
showHeader?: boolean;
|
|
22
21
|
}
|
|
23
22
|
declare const _default: React.ForwardRefExoticComponent<SelectDrawerProps & React.RefAttributes<unknown>>;
|
|
24
23
|
export default _default;
|
|
@@ -107,8 +107,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
107
107
|
showPet,
|
|
108
108
|
handleAddPet,
|
|
109
109
|
modalOpen,
|
|
110
|
-
franchiseeLoading
|
|
111
|
-
showHeader
|
|
110
|
+
franchiseeLoading
|
|
112
111
|
} = props;
|
|
113
112
|
const form = (formData == null ? void 0 : formData[0]) || {};
|
|
114
113
|
const valList = (childrenValue == null ? void 0 : childrenValue[form.id]) || defaultArr;
|
|
@@ -274,8 +273,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
274
273
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
275
274
|
import_drawer.default,
|
|
276
275
|
{
|
|
277
|
-
|
|
278
|
-
title: showHeader && import_utils.locales.getText("pisell2.text.select-customer"),
|
|
276
|
+
title: import_utils.locales.getText("pisell2.text.select-customer"),
|
|
279
277
|
open,
|
|
280
278
|
onClose: closeDrawer,
|
|
281
279
|
header: /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -333,105 +333,93 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
333
333
|
handleOpenClientModal();
|
|
334
334
|
};
|
|
335
335
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
336
|
-
var _a2, _b2;
|
|
337
336
|
return {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
337
|
+
close: () => {
|
|
338
|
+
var _a2;
|
|
339
|
+
(_a2 = modalRef.current) == null ? void 0 : _a2.close();
|
|
340
|
+
}
|
|
341
341
|
};
|
|
342
342
|
});
|
|
343
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
343
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-client-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
344
344
|
"div",
|
|
345
345
|
{
|
|
346
|
-
className: (0, import_classnames.default)("pisell-lowcode__booking-vertical-client
|
|
347
|
-
|
|
348
|
-
})
|
|
346
|
+
className: (0, import_classnames.default)("pisell-lowcode__booking-vertical-client", {
|
|
347
|
+
"pisell-lowcode__booking-vertical-client-walkin": isWalkIn
|
|
348
|
+
}),
|
|
349
|
+
onClick: handleOpenClient
|
|
349
350
|
},
|
|
350
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
351
|
-
|
|
351
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: false, active: true, round: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
352
|
+
import_antd.Avatar,
|
|
352
353
|
{
|
|
353
|
-
className:
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
{
|
|
361
|
-
className: "pisell-lowcode__booking-client-avatar",
|
|
362
|
-
src: import_utils.image.ali((_y = state.client.value) == null ? void 0 : _y.cover, 100),
|
|
363
|
-
size: 64,
|
|
364
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
365
|
-
}
|
|
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(
|
|
367
|
-
import_antd.Dropdown.Button,
|
|
368
|
-
{
|
|
369
|
-
menu: {
|
|
370
|
-
items: menus,
|
|
371
|
-
onClick: menuChange
|
|
372
|
-
},
|
|
373
|
-
placement: "bottomRight",
|
|
374
|
-
onClick: () => handleOpenClientModal()
|
|
375
|
-
},
|
|
376
|
-
import_utils.locales.getText("pisell2.text.variant-client-change")
|
|
377
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
378
|
-
import_antd.Button,
|
|
379
|
-
{
|
|
380
|
-
onClick: (e) => {
|
|
381
|
-
e.stopPropagation();
|
|
382
|
-
handleViewClient();
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
import_utils.locales.getText("pisell2.text.view-profile")
|
|
386
|
-
)))
|
|
387
|
-
),
|
|
388
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
389
|
-
"div",
|
|
354
|
+
className: "pisell-lowcode__booking-client-avatar",
|
|
355
|
+
src: import_utils.image.ali((_y = state.client.value) == null ? void 0 : _y.cover, 100),
|
|
356
|
+
size: 64,
|
|
357
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
358
|
+
}
|
|
359
|
+
), 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(
|
|
360
|
+
import_antd.Dropdown.Button,
|
|
390
361
|
{
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
362
|
+
menu: {
|
|
363
|
+
items: menus,
|
|
364
|
+
onClick: menuChange
|
|
365
|
+
},
|
|
366
|
+
placement: "bottomRight",
|
|
367
|
+
onClick: () => handleOpenClientModal()
|
|
395
368
|
},
|
|
396
|
-
|
|
397
|
-
),
|
|
398
|
-
isShowAddBtn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
369
|
+
import_utils.locales.getText("pisell2.text.variant-client-change")
|
|
370
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
399
371
|
import_antd.Button,
|
|
400
372
|
{
|
|
401
|
-
onClick: () => {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
block: true,
|
|
407
|
-
size: "large"
|
|
373
|
+
onClick: (e) => {
|
|
374
|
+
e.stopPropagation();
|
|
375
|
+
handleViewClient();
|
|
376
|
+
}
|
|
408
377
|
},
|
|
409
|
-
import_utils.locales.getText("pisell2.text.
|
|
410
|
-
))
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
378
|
+
import_utils.locales.getText("pisell2.text.view-profile")
|
|
379
|
+
)))
|
|
380
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
381
|
+
"div",
|
|
382
|
+
{
|
|
383
|
+
className: (0, import_classnames.default)("pisell-lowcode__booking-vertical-pet", {
|
|
384
|
+
"pisell-lowcode__booking-vertical-pet-walkin": isWalkIn
|
|
385
|
+
}),
|
|
386
|
+
onClick: handleOpenClient
|
|
387
|
+
},
|
|
388
|
+
petRender
|
|
389
|
+
), isShowAddBtn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
390
|
+
import_antd.Button,
|
|
391
|
+
{
|
|
392
|
+
onClick: () => {
|
|
393
|
+
const currentClientSearchValue = getCurrentClientSearchValue();
|
|
394
|
+
modalRef.current.setSearch(currentClientSearchValue);
|
|
395
|
+
handleOpenClientModal(currentClientSearchValue);
|
|
396
|
+
},
|
|
397
|
+
block: true,
|
|
398
|
+
size: "large"
|
|
399
|
+
},
|
|
400
|
+
import_utils.locales.getText("pisell2.text.select")
|
|
401
|
+
)), /* @__PURE__ */ import_react.default.createElement(
|
|
402
|
+
import_SelectDrawer.default,
|
|
403
|
+
{
|
|
404
|
+
modalOpen: state.modalOpen,
|
|
405
|
+
loading,
|
|
406
|
+
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)),
|
|
407
|
+
ref: modalRef,
|
|
408
|
+
onClose: handleClose,
|
|
409
|
+
handleSelectClient,
|
|
410
|
+
handleCreateItem,
|
|
411
|
+
childrenValue: state.pet.value,
|
|
412
|
+
handleSelectPet,
|
|
413
|
+
formData: state.pet.formData,
|
|
414
|
+
searchChange,
|
|
415
|
+
options: renderList,
|
|
416
|
+
holder: (_G = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _G.holder,
|
|
417
|
+
client: (_H = state == null ? void 0 : state.client) == null ? void 0 : _H.value,
|
|
418
|
+
loadMore,
|
|
419
|
+
showPet: (boardConfig == null ? void 0 : boardConfig.type) === "form",
|
|
420
|
+
handleAddPet,
|
|
421
|
+
franchiseeLoading
|
|
422
|
+
}
|
|
423
|
+
));
|
|
436
424
|
});
|
|
437
425
|
var vertical_default = VerticalClient;
|
|
@@ -117,11 +117,3 @@
|
|
|
117
117
|
line-height: 24px;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
.create-booking-page-vertical-client-wrap {
|
|
121
|
-
.pisell-lowcode__booking-drawer-title-wrap {
|
|
122
|
-
padding: 16px 16px 0 !important;
|
|
123
|
-
}
|
|
124
|
-
.pisell-lowcode-input-affix-wrapper {
|
|
125
|
-
margin-top: 0 !important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
@@ -15,23 +15,4 @@
|
|
|
15
15
|
// height: 42px;
|
|
16
16
|
// background: #069456;
|
|
17
17
|
// }
|
|
18
|
-
}
|
|
19
|
-
#create-booking-page-info-wrap {
|
|
20
|
-
.pisell-lowcode__booking-tab-pane-footer {
|
|
21
|
-
padding: 12px 16px !important;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.create-booking-page-info-wrap-create {
|
|
25
|
-
background: var(--Success-50, #ECFDF3);
|
|
26
|
-
}
|
|
27
|
-
.create-booking-page-info-wrap {
|
|
28
|
-
position: initial !important;
|
|
29
|
-
padding: 0 16px !important;
|
|
30
|
-
.booking-info-create-new {
|
|
31
|
-
margin-top: 10px;
|
|
32
|
-
color: var(--Base-Black, #000);
|
|
33
|
-
font-size: 24px;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
line-height: 32px;
|
|
36
|
-
}
|
|
37
18
|
}
|
|
@@ -49,9 +49,7 @@ var import_date2 = require("./date");
|
|
|
49
49
|
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
50
50
|
var import_notes = __toESM(require("./notes"));
|
|
51
51
|
var import_index = require("./index.less");
|
|
52
|
-
var import_classnames = __toESM(require("classnames"));
|
|
53
52
|
var import_antd = require("antd");
|
|
54
|
-
var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
|
|
55
53
|
var defaultModules = {
|
|
56
54
|
client: 1,
|
|
57
55
|
date: 1,
|
|
@@ -70,7 +68,6 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
70
68
|
var _a2, _b2, _c2, _d2;
|
|
71
69
|
return ((_d2 = (_c2 = (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.bookingConfig) == null ? void 0 : _b2.config) == null ? void 0 : _c2.basic) == null ? void 0 : _d2.appointment_subject) || {};
|
|
72
70
|
}, [(_d = (_c = (_b = (_a = modal.state) == null ? void 0 : _a.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject]);
|
|
73
|
-
const { createHeader, isBookingCreatePage, isBookingCreatePageCreateMode } = (0, import_useCreateBookingPageHeader.default)(globalState);
|
|
74
71
|
(0, import_react.useEffect)(() => {
|
|
75
72
|
document.body.id = "body";
|
|
76
73
|
if (props.setState) {
|
|
@@ -125,7 +122,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
125
122
|
if (!modules.note) {
|
|
126
123
|
return null;
|
|
127
124
|
}
|
|
128
|
-
return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking"
|
|
125
|
+
return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" ? /* @__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 });
|
|
129
126
|
}, [
|
|
130
127
|
modules.note,
|
|
131
128
|
globalState == null ? void 0 : globalState.bookingId,
|
|
@@ -148,12 +145,9 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
148
145
|
style: {
|
|
149
146
|
height: ((_h = (_g = context == null ? void 0 : context.appHelper) == null ? void 0 : _g.utils) == null ? void 0 : _h.isMobile) ? "100%" : "100vh"
|
|
150
147
|
},
|
|
151
|
-
bodyClassName:
|
|
152
|
-
["create-booking-page-info-wrap"]: isBookingCreatePage,
|
|
153
|
-
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
|
|
154
|
-
})
|
|
148
|
+
bodyClassName: "booking-info-warp"
|
|
155
149
|
},
|
|
156
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" },
|
|
150
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, 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(
|
|
157
151
|
import_antd.Skeleton,
|
|
158
152
|
{
|
|
159
153
|
loading: globalState.loading,
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PisellDrawerProps } from '../../../components/drawer';
|
|
3
2
|
import './index.less';
|
|
4
|
-
|
|
5
|
-
onEdit
|
|
6
|
-
|
|
7
|
-
state?: any;
|
|
8
|
-
drawerProps?: PisellDrawerProps;
|
|
9
|
-
renderMode?: 'current' | 'drawer';
|
|
10
|
-
}
|
|
11
|
-
declare const Info: (props: AddServiceProps) => React.JSX.Element;
|
|
3
|
+
declare const Info: ({ onEdit }: {
|
|
4
|
+
onEdit: any;
|
|
5
|
+
}) => React.JSX.Element;
|
|
12
6
|
export default Info;
|
|
@@ -63,16 +63,13 @@ var shopList = [
|
|
|
63
63
|
6848,
|
|
64
64
|
6305
|
|
65
65
|
];
|
|
66
|
-
var Info = (
|
|
66
|
+
var Info = ({ onEdit }) => {
|
|
67
67
|
var _a, _b, _c, _d;
|
|
68
|
-
const { onEdit, drawerProps, renderMode } = props;
|
|
69
68
|
const [search, setSearch] = (0, import_react.useState)("");
|
|
70
|
-
|
|
69
|
+
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
71
70
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
72
71
|
const searchRef = (0, import_react.useRef)();
|
|
73
72
|
const context = (0, import_useEngineContext.default)();
|
|
74
|
-
state = state || (props == null ? void 0 : props.state);
|
|
75
|
-
dispatch = dispatch || (props == null ? void 0 : props.dispatch);
|
|
76
73
|
import_utils3.request.setRequest(context.appHelper.utils.request);
|
|
77
74
|
const setDefaultService = async (list) => {
|
|
78
75
|
if (state.renderType !== "eventBooking") {
|
|
@@ -123,7 +120,7 @@ var Info = (props) => {
|
|
|
123
120
|
}
|
|
124
121
|
});
|
|
125
122
|
};
|
|
126
|
-
const getServices = async (
|
|
123
|
+
const getServices = async () => {
|
|
127
124
|
var _a2;
|
|
128
125
|
setLoading(true);
|
|
129
126
|
let data = await state.apis.getServices({
|
|
@@ -137,10 +134,8 @@ var Info = (props) => {
|
|
|
137
134
|
with_count: ["bundleGroup", "optionGroup"],
|
|
138
135
|
order_by_string: "sort:desc",
|
|
139
136
|
status: "published",
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
useCache: true
|
|
143
|
-
}
|
|
137
|
+
_config: {
|
|
138
|
+
useCache: true
|
|
144
139
|
}
|
|
145
140
|
});
|
|
146
141
|
setLoading(false);
|
|
@@ -216,9 +211,6 @@ var Info = (props) => {
|
|
|
216
211
|
cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
217
212
|
cacheItem.new = 0;
|
|
218
213
|
}
|
|
219
|
-
if (renderMode === "current") {
|
|
220
|
-
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
|
221
|
-
}
|
|
222
214
|
cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
|
|
223
215
|
if (state.renderType === "eventBooking") {
|
|
224
216
|
cacheItem.autoClose = false;
|
|
@@ -277,24 +269,12 @@ var Info = (props) => {
|
|
|
277
269
|
setSearch("");
|
|
278
270
|
}
|
|
279
271
|
}, [state.service.addModal]);
|
|
280
|
-
const currentDate = (0, import_react.useMemo)(() => {
|
|
281
|
-
return state.date.value.format("YYYY-MM-DD");
|
|
282
|
-
}, [state.date.value]);
|
|
283
|
-
console.log(currentDate, "currentDate");
|
|
284
|
-
(0, import_react.useEffect)(() => {
|
|
285
|
-
if (renderMode === "current") {
|
|
286
|
-
getServices({ schedule_date: currentDate });
|
|
287
|
-
}
|
|
288
|
-
}, [renderMode, currentDate]);
|
|
289
272
|
(0, import_react.useEffect)(() => {
|
|
290
273
|
if (state.renderType === "eventBooking" && state.modalOpen) {
|
|
291
274
|
getServices();
|
|
292
275
|
}
|
|
293
276
|
}, [state.renderType, state.modalOpen]);
|
|
294
277
|
const addButton = (0, import_react.useMemo)(() => {
|
|
295
|
-
if (state.isBookingCreatePage) {
|
|
296
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
|
|
297
|
-
}
|
|
298
278
|
if (state.renderType === "eventBooking") {
|
|
299
279
|
return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
|
|
300
280
|
import_addButton.default,
|
|
@@ -323,50 +303,13 @@ var Info = (props) => {
|
|
|
323
303
|
state.service.value,
|
|
324
304
|
loading
|
|
325
305
|
]);
|
|
326
|
-
const isRenderCurrent = (0, import_react.useMemo)(() => {
|
|
327
|
-
return renderMode === "current";
|
|
328
|
-
}, [renderMode]);
|
|
329
306
|
return (0, import_react.useMemo)(() => {
|
|
330
307
|
var _a2, _b2;
|
|
331
|
-
const header = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
|
|
332
|
-
import_antd.Input,
|
|
333
|
-
{
|
|
334
|
-
ref: searchRef,
|
|
335
|
-
prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
|
|
336
|
-
style: { marginTop: 16, height: 44 },
|
|
337
|
-
placeholder: import_utils4.locales.getText("pisell2.text.search"),
|
|
338
|
-
allowClear: true,
|
|
339
|
-
value: search,
|
|
340
|
-
onChange: (e) => {
|
|
341
|
-
setSearch(e.target.value);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
));
|
|
345
|
-
const content = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
346
|
-
import_TabProduct.default,
|
|
347
|
-
{
|
|
348
|
-
list: renderList,
|
|
349
|
-
amountSymbol: state.amountSymbol,
|
|
350
|
-
onChange: handleSelectProduct,
|
|
351
|
-
scrollDom: isRenderCurrent ? ".pisell-lowcode__booking-vertical-add-service-wrap" : ".booking-server-wrap .pisell-lowcode-drawer-body "
|
|
352
|
-
}
|
|
353
|
-
));
|
|
354
|
-
if (renderMode === "current") {
|
|
355
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
356
|
-
"div",
|
|
357
|
-
{
|
|
358
|
-
className: "pisell-lowcode__booking-vertical-add-service-wrap",
|
|
359
|
-
style: { width: "100%", height: "100%", overflow: "auto" }
|
|
360
|
-
},
|
|
361
|
-
header,
|
|
362
|
-
content
|
|
363
|
-
);
|
|
364
|
-
}
|
|
365
308
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
|
|
366
309
|
import_drawer.default,
|
|
367
310
|
{
|
|
368
311
|
titleNoWrap: true,
|
|
369
|
-
open: state.service.addModal
|
|
312
|
+
open: state.service.addModal,
|
|
370
313
|
title: import_utils4.locales.getText("pisell2.text.select-service"),
|
|
371
314
|
rootClassName: "booking-server-wrap",
|
|
372
315
|
onClose: () => {
|
|
@@ -378,10 +321,30 @@ var Info = (props) => {
|
|
|
378
321
|
}
|
|
379
322
|
});
|
|
380
323
|
},
|
|
381
|
-
header,
|
|
382
|
-
|
|
324
|
+
header: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
|
|
325
|
+
import_antd.Input,
|
|
326
|
+
{
|
|
327
|
+
ref: searchRef,
|
|
328
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
|
|
329
|
+
style: { marginTop: 16, height: 44 },
|
|
330
|
+
placeholder: import_utils4.locales.getText("pisell2.text.search"),
|
|
331
|
+
allowClear: true,
|
|
332
|
+
value: search,
|
|
333
|
+
onChange: (e) => {
|
|
334
|
+
setSearch(e.target.value);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
))
|
|
383
338
|
},
|
|
384
|
-
|
|
339
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
340
|
+
import_TabProduct.default,
|
|
341
|
+
{
|
|
342
|
+
list: renderList,
|
|
343
|
+
amountSymbol: state.amountSymbol,
|
|
344
|
+
onChange: handleSelectProduct,
|
|
345
|
+
scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
|
|
346
|
+
}
|
|
347
|
+
))
|
|
385
348
|
));
|
|
386
349
|
}, [
|
|
387
350
|
(_d = (_c = state.service) == null ? void 0 : _c.cacheItem) == null ? void 0 : _d.autoClose,
|