@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
|
@@ -792,40 +792,14 @@ var Footer = function Footer(props) {
|
|
|
792
792
|
onClick: handleRefund
|
|
793
793
|
}, locales.getText('pisell2.text.refund'));
|
|
794
794
|
}, []);
|
|
795
|
-
var handleClearAll = function handleClearAll() {
|
|
796
|
-
var _state$clearAllValue;
|
|
797
|
-
state === null || state === void 0 ? void 0 : (_state$clearAllValue = state.clearAllValue) === null || _state$clearAllValue === void 0 ? void 0 : _state$clearAllValue.call(state);
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* @title: 清空按钮
|
|
802
|
-
* @description:
|
|
803
|
-
* @return: *
|
|
804
|
-
* @Author: shengjie.zuo
|
|
805
|
-
* @Date: 2024-10-26 10:52:01
|
|
806
|
-
*/
|
|
807
|
-
var clearAllButton = useMemo(function () {
|
|
808
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
809
|
-
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
810
|
-
type: "default",
|
|
811
|
-
onClick: handleClearAll
|
|
812
|
-
}, locales.getText('pisell2.booking.info.text.clear-all'));
|
|
813
|
-
}, []);
|
|
814
795
|
var buttonMap = {
|
|
815
796
|
checkout: checkoutButton,
|
|
816
797
|
save: saveButton,
|
|
817
798
|
complete: completeButton,
|
|
818
799
|
refund: refundButton,
|
|
819
800
|
paymentLink: paymentLinkButton,
|
|
820
|
-
rebook: rebookButton
|
|
821
|
-
clearAll: clearAllButton
|
|
801
|
+
rebook: rebookButton
|
|
822
802
|
};
|
|
823
|
-
var isShowClearAll = useMemo(function () {
|
|
824
|
-
// 目前新建状态时展示清除全部按钮
|
|
825
|
-
if (!state.bookingId) {
|
|
826
|
-
return true;
|
|
827
|
-
}
|
|
828
|
-
}, [state.bookingId]);
|
|
829
803
|
|
|
830
804
|
/**
|
|
831
805
|
* @title: 是否可以checkout
|
|
@@ -891,9 +865,6 @@ var Footer = function Footer(props) {
|
|
|
891
865
|
// info
|
|
892
866
|
if (source === 'info') {
|
|
893
867
|
var _arr3 = [];
|
|
894
|
-
if (isShowClearAll) {
|
|
895
|
-
_arr3.push(buttonMap.clearAll);
|
|
896
|
-
}
|
|
897
868
|
// if (state.bookingId && isShowPaymentLink) {
|
|
898
869
|
// arr.push(buttonMap.paymentLink);
|
|
899
870
|
// }
|
|
@@ -927,7 +898,7 @@ var Footer = function Footer(props) {
|
|
|
927
898
|
return _arr4;
|
|
928
899
|
}
|
|
929
900
|
return [];
|
|
930
|
-
}, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state, isTeam
|
|
901
|
+
}, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state, isTeam]);
|
|
931
902
|
var moreButton = useMemo(function () {
|
|
932
903
|
var arr = [];
|
|
933
904
|
if (!state.bookingId) {
|
|
@@ -949,7 +920,7 @@ var Footer = function Footer(props) {
|
|
|
949
920
|
}
|
|
950
921
|
if (transaction_habit_selection.button_rows == 1) {
|
|
951
922
|
if (state.appointment_status !== 'cancelled') {
|
|
952
|
-
if (!state.disabledEdit
|
|
923
|
+
if (!state.disabledEdit) {
|
|
953
924
|
arr.push(actionMap.sale);
|
|
954
925
|
}
|
|
955
926
|
}
|
|
@@ -1090,7 +1061,7 @@ var Footer = function Footer(props) {
|
|
|
1090
1061
|
if (!state.bookingDetail) {
|
|
1091
1062
|
return true;
|
|
1092
1063
|
}
|
|
1093
|
-
if (!((_state$addons3 = state.addons) !== null && _state$addons3 !== void 0 && _state$addons3.load) && state.renderType !== 'eventBooking'
|
|
1064
|
+
if (!((_state$addons3 = state.addons) !== null && _state$addons3 !== void 0 && _state$addons3.load) && state.renderType !== 'eventBooking') {
|
|
1094
1065
|
return true;
|
|
1095
1066
|
}
|
|
1096
1067
|
}
|
|
@@ -1240,7 +1211,7 @@ var Footer = function Footer(props) {
|
|
|
1240
1211
|
style: {
|
|
1241
1212
|
marginTop: 12
|
|
1242
1213
|
}
|
|
1243
|
-
}, state.appointment_status !== 'cancelled'
|
|
1214
|
+
}, state.appointment_status !== 'cancelled' ? /*#__PURE__*/React.createElement(Button, {
|
|
1244
1215
|
onClick: function onClick() {
|
|
1245
1216
|
return handleSale();
|
|
1246
1217
|
},
|
|
@@ -43,8 +43,7 @@ var Forms = Provider(function (props) {
|
|
|
43
43
|
addCallback = props.addCallback,
|
|
44
44
|
client = props.client,
|
|
45
45
|
loading = props.loading,
|
|
46
|
-
addButtonProps = props.addButtonProps
|
|
47
|
-
drawerProps = props.drawerProps;
|
|
46
|
+
addButtonProps = props.addButtonProps;
|
|
48
47
|
|
|
49
48
|
// 新增数据
|
|
50
49
|
var onAction = useMemoizedFn( /*#__PURE__*/function () {
|
|
@@ -172,7 +171,6 @@ var Forms = Provider(function (props) {
|
|
|
172
171
|
onChange: function onChange(val) {
|
|
173
172
|
onValueChange(d, val);
|
|
174
173
|
},
|
|
175
|
-
drawerProps: drawerProps,
|
|
176
174
|
onAdd: function onAdd() {
|
|
177
175
|
onAction(d, true);
|
|
178
176
|
},
|
|
@@ -196,6 +194,6 @@ var Forms = Provider(function (props) {
|
|
|
196
194
|
optionRender: optionRender
|
|
197
195
|
})));
|
|
198
196
|
}));
|
|
199
|
-
}, [forms, hideTitle, modalOpen, value, loading, client === null || client === void 0 ? void 0 : client.id, addButtonProps, customSelectProps, optionRender
|
|
197
|
+
}, [forms, hideTitle, modalOpen, value, loading, client === null || client === void 0 ? void 0 : client.id, addButtonProps, customSelectProps, optionRender]);
|
|
200
198
|
});
|
|
201
199
|
export 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;
|
|
@@ -41,8 +41,7 @@ var Single = function Single(_ref) {
|
|
|
41
41
|
onAdd = _ref.onAdd,
|
|
42
42
|
addButtonProps = _ref.addButtonProps,
|
|
43
43
|
modalOpen = _ref.modalOpen,
|
|
44
|
-
watch = _ref.watch
|
|
45
|
-
drawerProps = _ref.drawerProps;
|
|
44
|
+
watch = _ref.watch;
|
|
46
45
|
// const primaryField = useMemo(() => {
|
|
47
46
|
// return field.field[0]?.key || "";
|
|
48
47
|
// }, [field]);
|
|
@@ -131,6 +130,9 @@ var Single = function Single(_ref) {
|
|
|
131
130
|
value: val
|
|
132
131
|
});
|
|
133
132
|
}
|
|
133
|
+
if ((field === null || field === void 0 ? void 0 : field.filed_type) === "media") {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
134
136
|
return val || "-";
|
|
135
137
|
};
|
|
136
138
|
|
|
@@ -235,10 +237,10 @@ var Single = function Single(_ref) {
|
|
|
235
237
|
},
|
|
236
238
|
name: ((_form$form3 = form.form) === null || _form$form3 === void 0 ? void 0 : _form$form3.title) || "-",
|
|
237
239
|
addButtonProps: _addButtonProps,
|
|
238
|
-
drawerProps:
|
|
240
|
+
drawerProps: {
|
|
239
241
|
title: "".concat(locales.getText("pisell2.text.select"), " ").concat(((_form$form4 = form.form) === null || _form$form4 === void 0 ? void 0 : _form$form4.title) || "-"),
|
|
240
242
|
destroyOnClose: true
|
|
241
|
-
},
|
|
243
|
+
},
|
|
242
244
|
optionRender: _optionRender,
|
|
243
245
|
rowKey: "form_record_id"
|
|
244
246
|
}, customSelectProps || {})));
|
|
@@ -448,7 +448,7 @@ var Client = function Client() {
|
|
|
448
448
|
handleOpenClientModal();
|
|
449
449
|
},
|
|
450
450
|
style: state.bookingId ? {} : {
|
|
451
|
-
marginTop:
|
|
451
|
+
marginTop: 16
|
|
452
452
|
}
|
|
453
453
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
454
454
|
className: "pisell-lowcode__booking-client-list-item-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;
|
|
@@ -98,8 +98,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
98
98
|
showPet = props.showPet,
|
|
99
99
|
handleAddPet = props.handleAddPet,
|
|
100
100
|
modalOpen = props.modalOpen,
|
|
101
|
-
franchiseeLoading = props.franchiseeLoading
|
|
102
|
-
showHeader = props.showHeader;
|
|
101
|
+
franchiseeLoading = props.franchiseeLoading;
|
|
103
102
|
var form = (formData === null || formData === void 0 ? void 0 : formData[0]) || {};
|
|
104
103
|
var valList = (childrenValue === null || childrenValue === void 0 ? void 0 : childrenValue[form.id]) || defaultArr;
|
|
105
104
|
var _useState = useState(valList),
|
|
@@ -310,8 +309,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
310
309
|
};
|
|
311
310
|
}();
|
|
312
311
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
313
|
-
|
|
314
|
-
title: showHeader && locales.getText("pisell2.text.select-customer"),
|
|
312
|
+
title: locales.getText('pisell2.text.select-customer'),
|
|
315
313
|
open: open,
|
|
316
314
|
onClose: closeDrawer,
|
|
317
315
|
header: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -299,15 +299,15 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
299
299
|
handleOpenClientModal();
|
|
300
300
|
};
|
|
301
301
|
useImperativeHandle(ref, function () {
|
|
302
|
-
var _modalRef$current, _modalRef$current2;
|
|
303
302
|
return {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
close: function close() {
|
|
304
|
+
var _modalRef$current;
|
|
305
|
+
(_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.close();
|
|
306
|
+
}
|
|
307
307
|
};
|
|
308
308
|
});
|
|
309
309
|
return /*#__PURE__*/React.createElement("div", {
|
|
310
|
-
className:
|
|
310
|
+
className: "pisell-lowcode__booking-vertical-client-wrap"
|
|
311
311
|
}, /*#__PURE__*/React.createElement("div", {
|
|
312
312
|
className: classNames('pisell-lowcode__booking-vertical-client', {
|
|
313
313
|
'pisell-lowcode__booking-vertical-client-walkin': isWalkIn
|
|
@@ -368,7 +368,6 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
368
368
|
block: true,
|
|
369
369
|
size: "large"
|
|
370
370
|
}, locales.getText('pisell2.text.select'))), /*#__PURE__*/React.createElement(SelectDrawer, {
|
|
371
|
-
showHeader: !state.isBookingCreatePage,
|
|
372
371
|
modalOpen: state.modalOpen,
|
|
373
372
|
loading: loading,
|
|
374
373
|
autoFocus: !(context !== null && context !== void 0 && (_context$appHelper2 = context.appHelper) !== null && _context$appHelper2 !== void 0 && (_context$appHelper2$u = _context$appHelper2.utils) !== null && _context$appHelper2$u !== void 0 && (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) !== null && _context$appHelper2$u2 !== void 0 && _context$appHelper2$u2.call(_context$appHelper2$u)),
|
|
@@ -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
|
}
|
|
@@ -21,9 +21,7 @@ import { updateServiceDate } from "./date";
|
|
|
21
21
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
22
22
|
import Notes from "./notes";
|
|
23
23
|
import "./index.less";
|
|
24
|
-
import
|
|
25
|
-
import { Skeleton } from 'antd';
|
|
26
|
-
import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
|
|
24
|
+
import { Skeleton } from "antd";
|
|
27
25
|
var defaultModules = {
|
|
28
26
|
client: 1,
|
|
29
27
|
date: 1,
|
|
@@ -33,7 +31,7 @@ var defaultModules = {
|
|
|
33
31
|
};
|
|
34
32
|
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
35
33
|
var Info = Provider(function (props) {
|
|
36
|
-
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u,
|
|
34
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
|
|
37
35
|
// return <Payments {...props} />;
|
|
38
36
|
var style = props.style,
|
|
39
37
|
globalState = props.globalState,
|
|
@@ -47,10 +45,6 @@ var Info = Provider(function (props) {
|
|
|
47
45
|
var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
|
|
48
46
|
return ((_modal$state = modal.state) === null || _modal$state === void 0 ? void 0 : (_modal$state$bookingC = _modal$state.bookingConfig) === null || _modal$state$bookingC === void 0 ? void 0 : (_modal$state$bookingC2 = _modal$state$bookingC.config) === null || _modal$state$bookingC2 === void 0 ? void 0 : (_modal$state$bookingC3 = _modal$state$bookingC2.basic) === null || _modal$state$bookingC3 === void 0 ? void 0 : _modal$state$bookingC3.appointment_subject) || {};
|
|
49
47
|
}, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 ? void 0 : (_modal$state2$booking = _modal$state2.bookingConfig) === null || _modal$state2$booking === void 0 ? void 0 : (_modal$state2$booking2 = _modal$state2$booking.config) === null || _modal$state2$booking2 === void 0 ? void 0 : (_modal$state2$booking3 = _modal$state2$booking2.basic) === null || _modal$state2$booking3 === void 0 ? void 0 : _modal$state2$booking3.appointment_subject]);
|
|
50
|
-
var _useCreateBookingPage = useCreateBookingPageHeader(globalState),
|
|
51
|
-
createHeader = _useCreateBookingPage.createHeader,
|
|
52
|
-
isBookingCreatePage = _useCreateBookingPage.isBookingCreatePage,
|
|
53
|
-
isBookingCreatePageCreateMode = _useCreateBookingPage.isBookingCreatePageCreateMode;
|
|
54
48
|
useEffect(function () {
|
|
55
49
|
document.body.id = 'body';
|
|
56
50
|
// 注入函数到页面的state内
|
|
@@ -109,7 +103,7 @@ var Info = Provider(function (props) {
|
|
|
109
103
|
if (!modules.note) {
|
|
110
104
|
return null;
|
|
111
105
|
}
|
|
112
|
-
return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking'
|
|
106
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
|
|
113
107
|
value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
|
|
114
108
|
onChange: addNote
|
|
115
109
|
});
|
|
@@ -124,9 +118,9 @@ var Info = Provider(function (props) {
|
|
|
124
118
|
})
|
|
125
119
|
}, _defineProperty(_React$createElement, "style", {
|
|
126
120
|
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
|
|
127
|
-
}), _defineProperty(_React$createElement, "bodyClassName",
|
|
121
|
+
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
128
122
|
className: "booking-info"
|
|
129
|
-
},
|
|
123
|
+
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
130
124
|
loading: globalState.loading,
|
|
131
125
|
round: true,
|
|
132
126
|
active: true,
|
|
@@ -527,6 +527,6 @@ var Pet = function Pet(props) {
|
|
|
527
527
|
}()
|
|
528
528
|
}, addButtonProps)
|
|
529
529
|
})));
|
|
530
|
-
}, [valueLoading, hideTitle, state.pet.value, state.pet.formData, state.action, state.modalOpen, state.pet.value, (_state$client11 = state.client) === null || _state$client11 === void 0 ? void 0 : _state$client11.value, loading, state.disabledEdit, state.isTerminal, state.disableEventBookingEdit, params.search, loadMore, addButtonProps
|
|
530
|
+
}, [valueLoading, hideTitle, state.pet.value, state.pet.formData, state.action, state.modalOpen, state.pet.value, (_state$client11 = state.client) === null || _state$client11 === void 0 ? void 0 : _state$client11.value, loading, state.disabledEdit, state.isTerminal, state.disableEventBookingEdit, params.search, loadMore, addButtonProps]);
|
|
531
531
|
};
|
|
532
532
|
export default Pet;
|
|
@@ -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;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -34,11 +33,9 @@ import { formatProductListByCategory, getProductTotalPrice, request } from "../.
|
|
|
34
33
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
35
34
|
import { useMemoizedFn, useUpdateEffect } from 'ahooks';
|
|
36
35
|
var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
|
|
37
|
-
var Info = function Info(
|
|
36
|
+
var Info = function Info(_ref) {
|
|
38
37
|
var _state$service3, _state$service6, _state$service8, _state$service8$cache;
|
|
39
|
-
var onEdit =
|
|
40
|
-
drawerProps = props.drawerProps,
|
|
41
|
-
renderMode = props.renderMode;
|
|
38
|
+
var onEdit = _ref.onEdit;
|
|
42
39
|
var _useState = useState(''),
|
|
43
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
41
|
search = _useState2[0],
|
|
@@ -52,8 +49,6 @@ var Info = function Info(props) {
|
|
|
52
49
|
setLoading = _useState4[1];
|
|
53
50
|
var searchRef = useRef();
|
|
54
51
|
var context = useEngineContext();
|
|
55
|
-
state = state || (props === null || props === void 0 ? void 0 : props.state);
|
|
56
|
-
dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
|
|
57
52
|
request.setRequest(context.appHelper.utils.request);
|
|
58
53
|
|
|
59
54
|
/**
|
|
@@ -65,7 +60,7 @@ var Info = function Info(props) {
|
|
|
65
60
|
* @Date: 2024-05-14 13:55
|
|
66
61
|
*/
|
|
67
62
|
var setDefaultService = /*#__PURE__*/function () {
|
|
68
|
-
var
|
|
63
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(list) {
|
|
69
64
|
var _list, product, detail, isBundleOrCombination, _item;
|
|
70
65
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
71
66
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -145,11 +140,11 @@ var Info = function Info(props) {
|
|
|
145
140
|
}, _callee);
|
|
146
141
|
}));
|
|
147
142
|
return function setDefaultService(_x2) {
|
|
148
|
-
return
|
|
143
|
+
return _ref2.apply(this, arguments);
|
|
149
144
|
};
|
|
150
145
|
}();
|
|
151
146
|
var getServices = /*#__PURE__*/function () {
|
|
152
|
-
var
|
|
147
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
153
148
|
var _state$eventOtherPara;
|
|
154
149
|
var data;
|
|
155
150
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -157,7 +152,7 @@ var Info = function Info(props) {
|
|
|
157
152
|
case 0:
|
|
158
153
|
setLoading(true);
|
|
159
154
|
_context2.next = 3;
|
|
160
|
-
return state.apis.getServices(
|
|
155
|
+
return state.apis.getServices({
|
|
161
156
|
skip: 1,
|
|
162
157
|
num: 500,
|
|
163
158
|
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket'],
|
|
@@ -167,14 +162,11 @@ var Info = function Info(props) {
|
|
|
167
162
|
with_schedule: 1,
|
|
168
163
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
169
164
|
order_by_string: 'sort:desc',
|
|
170
|
-
status: 'published'
|
|
171
|
-
}, state.isBookingCreatePage ? {
|
|
172
|
-
schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
|
|
173
|
-
} : {
|
|
165
|
+
status: 'published',
|
|
174
166
|
_config: {
|
|
175
167
|
useCache: true
|
|
176
168
|
}
|
|
177
|
-
})
|
|
169
|
+
});
|
|
178
170
|
case 3:
|
|
179
171
|
data = _context2.sent;
|
|
180
172
|
setLoading(false);
|
|
@@ -195,8 +187,8 @@ var Info = function Info(props) {
|
|
|
195
187
|
}
|
|
196
188
|
}, _callee2);
|
|
197
189
|
}));
|
|
198
|
-
return function getServices(
|
|
199
|
-
return
|
|
190
|
+
return function getServices() {
|
|
191
|
+
return _ref3.apply(this, arguments);
|
|
200
192
|
};
|
|
201
193
|
}();
|
|
202
194
|
var handleSelectService = function handleSelectService() {
|
|
@@ -265,11 +257,6 @@ var Info = function Info(props) {
|
|
|
265
257
|
cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
|
|
266
258
|
cacheItem.new = 0;
|
|
267
259
|
}
|
|
268
|
-
// 渲染到当前位置模式时,默认无资源 时间默认取顶部设置的时间
|
|
269
|
-
if (renderMode === 'current') {
|
|
270
|
-
// cacheItem._extend.resource = 0;
|
|
271
|
-
cacheItem.currentDefaultTime = state.date.value.format('HH:mm');
|
|
272
|
-
}
|
|
273
260
|
cacheItem._extend = getProductExtend({
|
|
274
261
|
cacheItem: cacheItem,
|
|
275
262
|
state: state
|
|
@@ -331,30 +318,12 @@ var Info = function Info(props) {
|
|
|
331
318
|
setSearch('');
|
|
332
319
|
}
|
|
333
320
|
}, [state.service.addModal]);
|
|
334
|
-
var currentDate = useMemo(function () {
|
|
335
|
-
return state.date.value.format('YYYY-MM-DD');
|
|
336
|
-
}, [state.date.value]);
|
|
337
|
-
console.log(currentDate, 'currentDate');
|
|
338
|
-
useEffect(function () {
|
|
339
|
-
if (renderMode === 'current') {
|
|
340
|
-
getServices({
|
|
341
|
-
schedule_date: currentDate
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
}, [renderMode, currentDate]);
|
|
345
321
|
useEffect(function () {
|
|
346
322
|
if (state.renderType === 'eventBooking' && state.modalOpen) {
|
|
347
323
|
getServices();
|
|
348
324
|
}
|
|
349
325
|
}, [state.renderType, state.modalOpen]);
|
|
350
326
|
var addButton = useMemo(function () {
|
|
351
|
-
if (state.isBookingCreatePage) {
|
|
352
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
353
|
-
style: {
|
|
354
|
-
height: 20
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
327
|
if (state.renderType === 'eventBooking') {
|
|
359
328
|
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
360
329
|
style: {
|
|
@@ -379,52 +348,15 @@ var Info = function Info(props) {
|
|
|
379
348
|
}
|
|
380
349
|
});
|
|
381
350
|
}, [state.renderType, showAddButton, isService, state.service.value, loading]);
|
|
382
|
-
var isRenderCurrent = useMemo(function () {
|
|
383
|
-
return renderMode === 'current';
|
|
384
|
-
}, [renderMode]);
|
|
385
351
|
return useMemo(function () {
|
|
386
352
|
var _state$service7, _state$service7$cache;
|
|
387
|
-
var header = /*#__PURE__*/React.createElement("div", {
|
|
388
|
-
className: 'pisell-lowcode__booking-service-header'
|
|
389
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
390
|
-
ref: searchRef,
|
|
391
|
-
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
392
|
-
style: {
|
|
393
|
-
marginTop: 16,
|
|
394
|
-
height: 44
|
|
395
|
-
},
|
|
396
|
-
placeholder: locales.getText('pisell2.text.search'),
|
|
397
|
-
allowClear: true,
|
|
398
|
-
value: search,
|
|
399
|
-
onChange: function onChange(e) {
|
|
400
|
-
setSearch(e.target.value);
|
|
401
|
-
}
|
|
402
|
-
}));
|
|
403
|
-
var content = /*#__PURE__*/React.createElement("div", {
|
|
404
|
-
className: 'pisell-lowcode__booking-service-body'
|
|
405
|
-
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
406
|
-
list: renderList,
|
|
407
|
-
amountSymbol: state.amountSymbol,
|
|
408
|
-
onChange: handleSelectProduct,
|
|
409
|
-
scrollDom: isRenderCurrent ? '.pisell-lowcode__booking-vertical-add-service-wrap' : '.booking-server-wrap .pisell-lowcode-drawer-body '
|
|
410
|
-
}));
|
|
411
|
-
if (renderMode === 'current') {
|
|
412
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
413
|
-
className: "pisell-lowcode__booking-vertical-add-service-wrap",
|
|
414
|
-
style: {
|
|
415
|
-
width: '100%',
|
|
416
|
-
height: '100%',
|
|
417
|
-
overflow: 'auto'
|
|
418
|
-
}
|
|
419
|
-
}, header, content);
|
|
420
|
-
}
|
|
421
353
|
return /*#__PURE__*/React.createElement(React.Fragment, null, ((_state$service7 = state.service) === null || _state$service7 === void 0 ? void 0 : (_state$service7$cache = _state$service7.cacheItem) === null || _state$service7$cache === void 0 ? void 0 : _state$service7$cache.autoClose) && /*#__PURE__*/React.createElement(Skeleton, {
|
|
422
354
|
loading: true,
|
|
423
355
|
active: true,
|
|
424
356
|
round: true
|
|
425
|
-
}), addButton, /*#__PURE__*/React.createElement(Drawer,
|
|
357
|
+
}), addButton, /*#__PURE__*/React.createElement(Drawer, {
|
|
426
358
|
titleNoWrap: true,
|
|
427
|
-
open: state.service.addModal
|
|
359
|
+
open: state.service.addModal,
|
|
428
360
|
title: locales.getText('pisell2.text.select-service'),
|
|
429
361
|
rootClassName: "booking-server-wrap",
|
|
430
362
|
onClose: function onClose() {
|
|
@@ -436,8 +368,30 @@ var Info = function Info(props) {
|
|
|
436
368
|
}
|
|
437
369
|
});
|
|
438
370
|
},
|
|
439
|
-
header:
|
|
440
|
-
|
|
371
|
+
header: /*#__PURE__*/React.createElement("div", {
|
|
372
|
+
className: "pisell-lowcode__booking-service-header"
|
|
373
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
374
|
+
ref: searchRef,
|
|
375
|
+
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
376
|
+
style: {
|
|
377
|
+
marginTop: 16,
|
|
378
|
+
height: 44
|
|
379
|
+
},
|
|
380
|
+
placeholder: locales.getText('pisell2.text.search'),
|
|
381
|
+
allowClear: true,
|
|
382
|
+
value: search,
|
|
383
|
+
onChange: function onChange(e) {
|
|
384
|
+
setSearch(e.target.value);
|
|
385
|
+
}
|
|
386
|
+
}))
|
|
387
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
388
|
+
className: "pisell-lowcode__booking-service-body"
|
|
389
|
+
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
390
|
+
list: renderList,
|
|
391
|
+
amountSymbol: state.amountSymbol,
|
|
392
|
+
onChange: handleSelectProduct,
|
|
393
|
+
scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
|
|
394
|
+
}))));
|
|
441
395
|
}, [(_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : (_state$service8$cache = _state$service8.cacheItem) === null || _state$service8$cache === void 0 ? void 0 : _state$service8$cache.autoClose, addButton, state.service.addModal, locales, search, renderList, state.amountSymbol]);
|
|
442
396
|
};
|
|
443
397
|
export default Info;
|
|
@@ -3,33 +3,7 @@
|
|
|
3
3
|
// border-bottom: 1px solid var(--gray-300, #D0D5DD);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
.pisell-lowcode__booking-service-body {
|
|
7
8
|
background: var(--gray-50, #F9FAFB);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.pisell-lowcode__booking-vertical-add-service-wrap {
|
|
11
|
-
&::-webkit-scrollbar {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
.pisell-lowcode__booking-service-header {
|
|
15
|
-
background-color: #fff;
|
|
16
|
-
top: 0;
|
|
17
|
-
position: sticky;
|
|
18
|
-
z-index: 2;
|
|
19
|
-
padding: 16px !important;
|
|
20
|
-
margin: 0;
|
|
21
|
-
.pisell-lowcode-input-affix-wrapper {
|
|
22
|
-
margin: 0 !important;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
.booking-category-list {
|
|
26
|
-
padding: 0 16px !important;
|
|
27
|
-
}
|
|
28
|
-
.pisell-lowcode__booking-service-body {
|
|
29
|
-
.booking-tab-product {
|
|
30
|
-
.booking-tabs-wrap {
|
|
31
|
-
top: 76px !important;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
9
|
}
|