@pisell/private-materials 3.0.152-gray → 3.0.153
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 +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/index.js +51 -36
- package/es/components/booking/components/footer/utils.js +35 -4
- package/es/components/booking/forms/forms.d.ts +0 -1
- package/es/components/booking/forms/forms.js +2 -4
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +3 -4
- package/es/components/booking/index.js +1 -1
- package/es/components/booking/info/index.d.ts +4 -12
- package/es/components/booking/info/index.js +12 -123
- package/es/components/booking/info/index.less +0 -9
- package/es/components/booking/info/main.d.ts +12 -0
- package/es/components/booking/info/main.js +124 -0
- package/es/components/booking/info/model.js +0 -1
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +2 -8
- 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/addTimeModal/index.js +4 -4
- package/es/components/booking/info/service/editService/index.js +13 -11
- package/es/components/booking/info/utils.d.ts +1 -0
- package/es/components/booking/info/utils.js +7 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/{dashboard → info2}/index.js +196 -222
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/serve.js +79 -0
- package/es/components/booking/info2/service/actions/index.d.ts +6 -0
- package/es/components/booking/info2/service/actions/index.js +86 -0
- package/es/components/booking/info2/service/addService/index.d.ts +6 -0
- package/es/components/booking/info2/service/addService/index.js +403 -0
- package/es/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/es/components/booking/info2/service/addService/mock.js +332 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/es/components/booking/info2/service/addService/utils.js +510 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +681 -0
- package/es/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/es/components/booking/{dashboard → info2/service/addTimeModal}/serve.js +51 -5
- package/es/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/es/components/booking/info2/service/addTimeModal/utils.js +176 -0
- package/es/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Capacity/index.js +121 -0
- package/es/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +28 -0
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +233 -0
- package/es/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/es/components/booking/info2/service/editService/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/index.js +617 -0
- package/es/components/booking/info2/service/editService/index.less +99 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/es/components/booking/{info/addServiceVariant/index.js → info2/service/editService/utils.js} +30 -26
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/service/index.js +55 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/es/components/booking/info2/service/serviceItem/index.js +176 -0
- package/es/components/booking/info2/service/serviceItem/index.less +125 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/es/components/booking/info2/service/serviceList/index.js +106 -0
- package/es/components/booking/info2/service/serviceList/index.less +0 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/es/components/booking/info2/utilsByBooking.js +349 -0
- package/es/components/booking/locales.d.ts +3 -48
- package/es/components/booking/locales.js +9 -48
- package/es/components/booking/materiels/resources/index.d.ts +2 -2
- package/es/components/booking/materiels/resources/index.js +11 -11
- package/es/components/booking/mock.d.ts +1 -0
- package/es/components/booking/mock.js +66 -0
- package/es/components/booking/model.d.ts +0 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +51 -54
- package/es/components/index.d.ts +1 -1
- package/es/components/index.js +1 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/index.d.ts +1 -3
- package/es/index.js +2 -4
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/index.js +31 -8
- package/lib/components/booking/components/footer/utils.js +29 -4
- package/lib/components/booking/forms/forms.d.ts +0 -1
- package/lib/components/booking/forms/forms.js +2 -5
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +2 -4
- package/lib/components/booking/index.js +2 -2
- package/lib/components/booking/info/client/index.js +8 -1
- package/lib/components/booking/info/index.d.ts +4 -12
- package/lib/components/booking/info/index.js +14 -118
- package/lib/components/booking/info/index.less +0 -9
- package/lib/components/booking/info/main.d.ts +12 -0
- package/lib/components/booking/info/main.js +152 -0
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +2 -8
- 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/addTimeModal/index.js +1 -0
- package/lib/components/booking/info/service/editService/index.js +6 -9
- package/lib/components/booking/info/utils.d.ts +1 -0
- package/lib/components/booking/info/utils.js +9 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/index.js +202 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/{dashboard → info2}/serve.js +25 -5
- package/lib/components/booking/info2/service/actions/index.d.ts +6 -0
- package/lib/components/booking/info2/service/actions/index.js +102 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/index.js +355 -0
- package/lib/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/lib/components/booking/info2/service/addService/mock.js +398 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/lib/components/booking/info2/service/addService/utils.js +377 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +558 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.js +45 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.js +157 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.js +97 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +54 -0
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +212 -0
- package/lib/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/index.js +483 -0
- package/lib/components/booking/info2/service/editService/index.less +99 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/lib/components/booking/info2/service/editService/utils.js +0 -0
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/service/index.js +75 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/lib/components/booking/info2/service/serviceItem/index.js +184 -0
- package/lib/components/booking/info2/service/serviceItem/index.less +125 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/lib/components/booking/info2/service/serviceList/index.js +130 -0
- package/lib/components/booking/info2/service/serviceList/index.less +0 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/lib/components/booking/info2/utilsByBooking.js +257 -0
- package/lib/components/booking/locales.d.ts +3 -48
- package/lib/components/booking/locales.js +3 -48
- package/lib/components/booking/materiels/resources/index.d.ts +2 -2
- package/lib/components/booking/mock.d.ts +1 -0
- package/lib/components/booking/mock.js +67 -2
- package/lib/components/booking/model.d.ts +0 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +22 -57
- package/lib/components/eftposPay/tyro/index.js +3 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -7
- package/package.json +3 -3
- package/es/components/booking/dashboard/index.d.ts +0 -10
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/dashboard/index.d.ts +0 -10
- package/lib/components/booking/dashboard/index.js +0 -225
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/info/addServiceVariant/index.js +0 -58
- package/lowcode/booking-dashboard/meta.ts +0 -130
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -0,0 +1,124 @@
|
|
|
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 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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import React, { useContext, useEffect, useMemo } from 'react';
|
|
8
|
+
import { Provider, Context } from "./model";
|
|
9
|
+
import Client from "./client";
|
|
10
|
+
import Service from "./service";
|
|
11
|
+
import Pet from "./pet";
|
|
12
|
+
import DateCom from "./date";
|
|
13
|
+
import Footer from "../components/footer";
|
|
14
|
+
import TabPane from "../components/tabPane";
|
|
15
|
+
import AddNote from "../notes/addNote";
|
|
16
|
+
import Header from "./header";
|
|
17
|
+
import localeTexts from "../locales";
|
|
18
|
+
import { locales } from '@pisell/utils';
|
|
19
|
+
import { findNextDuration, flexibleObj, formatResource, getErrorList, sliceDayIntoFiveMinutes, request } from "../utils";
|
|
20
|
+
import { updateServiceDate } from "./date";
|
|
21
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
22
|
+
import Notes from "./notes";
|
|
23
|
+
import "./index.less";
|
|
24
|
+
var defaultModules = {
|
|
25
|
+
client: 1,
|
|
26
|
+
date: 1,
|
|
27
|
+
service: 1,
|
|
28
|
+
holder: 1,
|
|
29
|
+
note: 1
|
|
30
|
+
};
|
|
31
|
+
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
32
|
+
var Info = Provider(function (props) {
|
|
33
|
+
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;
|
|
34
|
+
// return <Payments {...props} />;
|
|
35
|
+
var style = props.style,
|
|
36
|
+
globalState = props.globalState,
|
|
37
|
+
_props$modules = props.modules,
|
|
38
|
+
modules = _props$modules === void 0 ? defaultModules : _props$modules,
|
|
39
|
+
slot = props.slot;
|
|
40
|
+
var modal = useContext(Context);
|
|
41
|
+
var context = useEngineContext();
|
|
42
|
+
request.setRequest(context.appHelper.utils.request);
|
|
43
|
+
var params = useMemo(function () {
|
|
44
|
+
var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
|
|
45
|
+
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) || {};
|
|
46
|
+
}, [(_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]);
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
document.body.id = 'body';
|
|
49
|
+
// 注入函数到页面的state内
|
|
50
|
+
if (props.setState) {
|
|
51
|
+
props.setState({
|
|
52
|
+
bookingFunctions: {
|
|
53
|
+
formatResource: formatResource,
|
|
54
|
+
getErrorList: getErrorList,
|
|
55
|
+
sliceDayIntoFiveMinutes: sliceDayIntoFiveMinutes,
|
|
56
|
+
findNextDuration: findNextDuration,
|
|
57
|
+
flexibleObj: flexibleObj,
|
|
58
|
+
updateServiceDate: updateServiceDate
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}, []);
|
|
63
|
+
useEffect(function () {
|
|
64
|
+
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
|
|
65
|
+
var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, 'franchisee');
|
|
66
|
+
modal.dispatch({
|
|
67
|
+
type: 'setState',
|
|
68
|
+
payload: _objectSpread(_objectSpread({
|
|
69
|
+
setGlobalState: props.setGlobalState
|
|
70
|
+
}, globalState), {}, {
|
|
71
|
+
isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
|
|
72
|
+
isFranchisee: isFranchisee,
|
|
73
|
+
timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
}, [JSON.stringify(globalState)]);
|
|
77
|
+
var addNote = function addNote(e) {
|
|
78
|
+
modal.dispatch({
|
|
79
|
+
type: 'setNotes',
|
|
80
|
+
payload: {
|
|
81
|
+
orderNote: e,
|
|
82
|
+
edit: true
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
var header = useMemo(function () {
|
|
87
|
+
if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === 'eventBooking') {
|
|
88
|
+
return locales.getText('pisell2.text.enroll.detail');
|
|
89
|
+
}
|
|
90
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
|
|
91
|
+
state: modal.state,
|
|
92
|
+
dispatch: modal.dispatch
|
|
93
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "",
|
|
95
|
+
style: {
|
|
96
|
+
height: 0
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
|
|
100
|
+
var notes = useMemo(function () {
|
|
101
|
+
var _modal$state3, _modal$state3$notes;
|
|
102
|
+
if (!modules.note) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
|
|
106
|
+
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,
|
|
107
|
+
onChange: addNote
|
|
108
|
+
});
|
|
109
|
+
}, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
|
|
110
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
|
|
111
|
+
style: style,
|
|
112
|
+
header: header,
|
|
113
|
+
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
114
|
+
state: modal.state,
|
|
115
|
+
dispatch: modal.dispatch,
|
|
116
|
+
source: "info"
|
|
117
|
+
})
|
|
118
|
+
}, _defineProperty(_React$createElement, "style", {
|
|
119
|
+
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'
|
|
120
|
+
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: "booking-info"
|
|
122
|
+
}, 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, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
|
|
123
|
+
});
|
|
124
|
+
export default Info;
|
|
@@ -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
|
-
|
|
3
|
+
declare const Info: ({ onEdit }: {
|
|
5
4
|
onEdit: any;
|
|
6
|
-
|
|
7
|
-
state?: any;
|
|
8
|
-
drawerProps?: PisellDrawerProps;
|
|
9
|
-
renderMode?: 'current' | 'drawer';
|
|
10
|
-
}
|
|
11
|
-
declare const Info: (props: AddServiceProps) => React.JSX.Element;
|
|
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$service5, _state$service7, _state$service7$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
|
|
@@ -330,30 +317,12 @@ var Info = function Info(props) {
|
|
|
330
317
|
setSearch('');
|
|
331
318
|
}
|
|
332
319
|
}, [state.service.addModal]);
|
|
333
|
-
var currentDate = useMemo(function () {
|
|
334
|
-
return state.date.value.format('YYYY-MM-DD');
|
|
335
|
-
}, [state.date.value]);
|
|
336
|
-
console.log(currentDate, 'currentDate');
|
|
337
|
-
useEffect(function () {
|
|
338
|
-
if (renderMode === 'current') {
|
|
339
|
-
getServices({
|
|
340
|
-
schedule_date: currentDate
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}, [renderMode, currentDate]);
|
|
344
320
|
useEffect(function () {
|
|
345
321
|
if (state.renderType === 'eventBooking' && state.modalOpen) {
|
|
346
322
|
getServices();
|
|
347
323
|
}
|
|
348
324
|
}, [state.renderType, state.modalOpen]);
|
|
349
325
|
var addButton = useMemo(function () {
|
|
350
|
-
if (state.isBookingCreatePage) {
|
|
351
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
352
|
-
style: {
|
|
353
|
-
height: 20
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
326
|
if (state.renderType === 'eventBooking') {
|
|
358
327
|
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
359
328
|
style: {
|
|
@@ -378,51 +347,14 @@ var Info = function Info(props) {
|
|
|
378
347
|
}
|
|
379
348
|
});
|
|
380
349
|
}, [state.renderType, showAddButton, isService, state.service.value, loading]);
|
|
381
|
-
var isRenderCurrent = useMemo(function () {
|
|
382
|
-
return renderMode === 'current';
|
|
383
|
-
}, [renderMode]);
|
|
384
350
|
return useMemo(function () {
|
|
385
351
|
var _state$service6, _state$service6$cache;
|
|
386
|
-
var header = /*#__PURE__*/React.createElement("div", {
|
|
387
|
-
className: 'pisell-lowcode__booking-service-header'
|
|
388
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
389
|
-
ref: searchRef,
|
|
390
|
-
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
391
|
-
style: {
|
|
392
|
-
marginTop: 16,
|
|
393
|
-
height: 44
|
|
394
|
-
},
|
|
395
|
-
placeholder: locales.getText('pisell2.text.search'),
|
|
396
|
-
allowClear: true,
|
|
397
|
-
value: search,
|
|
398
|
-
onChange: function onChange(e) {
|
|
399
|
-
setSearch(e.target.value);
|
|
400
|
-
}
|
|
401
|
-
}));
|
|
402
|
-
var content = /*#__PURE__*/React.createElement("div", {
|
|
403
|
-
className: 'pisell-lowcode__booking-service-body'
|
|
404
|
-
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
405
|
-
list: renderList,
|
|
406
|
-
amountSymbol: state.amountSymbol,
|
|
407
|
-
onChange: handleSelectProduct,
|
|
408
|
-
scrollDom: isRenderCurrent ? '.pisell-lowcode__booking-vertical-add-service-wrap' : '.booking-server-wrap .pisell-lowcode-drawer-body '
|
|
409
|
-
}));
|
|
410
|
-
if (renderMode === 'current') {
|
|
411
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
412
|
-
className: "pisell-lowcode__booking-vertical-add-service-wrap",
|
|
413
|
-
style: {
|
|
414
|
-
width: '100%',
|
|
415
|
-
height: '100%',
|
|
416
|
-
overflow: 'auto'
|
|
417
|
-
}
|
|
418
|
-
}, header, content);
|
|
419
|
-
}
|
|
420
352
|
return /*#__PURE__*/React.createElement(React.Fragment, null, ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : (_state$service6$cache = _state$service6.cacheItem) === null || _state$service6$cache === void 0 ? void 0 : _state$service6$cache.autoClose) && /*#__PURE__*/React.createElement(Skeleton, {
|
|
421
353
|
loading: true,
|
|
422
354
|
active: true,
|
|
423
355
|
round: true
|
|
424
|
-
}), addButton, /*#__PURE__*/React.createElement(Drawer,
|
|
425
|
-
open: state.service.addModal
|
|
356
|
+
}), addButton, /*#__PURE__*/React.createElement(Drawer, {
|
|
357
|
+
open: state.service.addModal,
|
|
426
358
|
title: locales.getText('pisell2.text.select-service'),
|
|
427
359
|
rootClassName: "booking-server-wrap",
|
|
428
360
|
onClose: function onClose() {
|
|
@@ -434,8 +366,30 @@ var Info = function Info(props) {
|
|
|
434
366
|
}
|
|
435
367
|
});
|
|
436
368
|
},
|
|
437
|
-
header:
|
|
438
|
-
|
|
369
|
+
header: /*#__PURE__*/React.createElement("div", {
|
|
370
|
+
className: "pisell-lowcode__booking-service-header"
|
|
371
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
372
|
+
ref: searchRef,
|
|
373
|
+
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
374
|
+
style: {
|
|
375
|
+
marginTop: 16,
|
|
376
|
+
height: 44
|
|
377
|
+
},
|
|
378
|
+
placeholder: locales.getText('pisell2.text.search'),
|
|
379
|
+
allowClear: true,
|
|
380
|
+
value: search,
|
|
381
|
+
onChange: function onChange(e) {
|
|
382
|
+
setSearch(e.target.value);
|
|
383
|
+
}
|
|
384
|
+
}))
|
|
385
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
386
|
+
className: "pisell-lowcode__booking-service-body"
|
|
387
|
+
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
388
|
+
list: renderList,
|
|
389
|
+
amountSymbol: state.amountSymbol,
|
|
390
|
+
onChange: handleSelectProduct,
|
|
391
|
+
scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
|
|
392
|
+
}))));
|
|
439
393
|
}, [(_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, addButton, state.service.addModal, locales, search, renderList, state.amountSymbol]);
|
|
440
394
|
};
|
|
441
395
|
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
|
}
|
|
@@ -248,15 +248,15 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
248
248
|
while (1) switch (_context.prev = _context.next) {
|
|
249
249
|
case 0:
|
|
250
250
|
_context.next = 2;
|
|
251
|
-
return getAddTimeProducts({
|
|
251
|
+
return getAddTimeProducts(_defineProperty({
|
|
252
252
|
skip: 1,
|
|
253
253
|
num: 500,
|
|
254
254
|
open_quotation: 1,
|
|
255
|
+
status: 'published',
|
|
255
256
|
schedule_date: state.date.value.format('YYYY-MM-DD'),
|
|
256
257
|
customer_id: isWalkIn((_state$client = state.client) === null || _state$client === void 0 ? void 0 : (_state$client$value = _state$client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id) ? undefined : (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : (_state$client2$value = _state$client2.value) === null || _state$client2$value === void 0 ? void 0 : _state$client2$value.id,
|
|
257
|
-
extension_type: ['product_add_time']
|
|
258
|
-
|
|
259
|
-
}, {
|
|
258
|
+
extension_type: ['product_add_time']
|
|
259
|
+
}, "status", 'published'), {
|
|
260
260
|
useCache: true
|
|
261
261
|
});
|
|
262
262
|
case 2:
|
|
@@ -155,7 +155,7 @@ var Info = function Info(_, ref) {
|
|
|
155
155
|
* @Date: 2024-01-09 13:38
|
|
156
156
|
*/
|
|
157
157
|
var getResources = /*#__PURE__*/function () {
|
|
158
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cacheItem
|
|
158
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cacheItem) {
|
|
159
159
|
var _list, _cacheItem, autoClose;
|
|
160
160
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
161
161
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -189,7 +189,7 @@ var Info = function Info(_, ref) {
|
|
|
189
189
|
}, 200);
|
|
190
190
|
} else {
|
|
191
191
|
setTimeout(function () {
|
|
192
|
-
if (selectOpen === undefined
|
|
192
|
+
if (selectOpen === undefined) {
|
|
193
193
|
setSelectOpen(true);
|
|
194
194
|
}
|
|
195
195
|
}, 500);
|
|
@@ -206,7 +206,7 @@ var Info = function Info(_, ref) {
|
|
|
206
206
|
}
|
|
207
207
|
}, _callee, null, [[1, 11]]);
|
|
208
208
|
}));
|
|
209
|
-
return function getResources(_x2
|
|
209
|
+
return function getResources(_x2) {
|
|
210
210
|
return _ref.apply(this, arguments);
|
|
211
211
|
};
|
|
212
212
|
}();
|
|
@@ -401,13 +401,13 @@ var Info = function Info(_, ref) {
|
|
|
401
401
|
}
|
|
402
402
|
});
|
|
403
403
|
});
|
|
404
|
-
var setEditData = useMemoizedFn(function (_cacheItem
|
|
404
|
+
var setEditData = useMemoizedFn(function (_cacheItem) {
|
|
405
405
|
var cacheItem = _cacheItem || state.service.cacheItem;
|
|
406
406
|
var values = cacheItem._extend;
|
|
407
407
|
form.setFieldsValue(values);
|
|
408
408
|
if (state.renderType !== 'eventBooking') {
|
|
409
409
|
// 获取资源列表
|
|
410
|
-
getResources(
|
|
410
|
+
getResources(_cacheItem);
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
|
|
@@ -456,11 +456,13 @@ var Info = function Info(_, ref) {
|
|
|
456
456
|
}
|
|
457
457
|
}, [useStartTime, useDuration, state.renderType, state.service.resourcesOrigin, (_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.autoClose]);
|
|
458
458
|
useEffect(function () {
|
|
459
|
-
//
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
459
|
+
// if (!state.service.editModal) {
|
|
460
|
+
// setTimeout(() => {
|
|
461
|
+
// setSelectOpen(undefined);
|
|
462
|
+
// form.resetFields();
|
|
463
|
+
// }, 200);
|
|
464
|
+
// }
|
|
465
|
+
}, [state.service.editModal]);
|
|
464
466
|
|
|
465
467
|
/**
|
|
466
468
|
* @title: 资源 时间 发生变化时, 重新计算错误信息
|
|
@@ -700,7 +702,7 @@ var Info = function Info(_, ref) {
|
|
|
700
702
|
className: "current-service-info-name"
|
|
701
703
|
}, ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : (_state$service6$cache = _state$service6.cacheItem) === null || _state$service6$cache === void 0 ? void 0 : (_state$service6$cache2 = _state$service6$cache._extend) === null || _state$service6$cache2 === void 0 ? void 0 : _state$service6$cache2.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
|
|
702
704
|
onClick: handleEdit
|
|
703
|
-
}, locales.getText('pisell2.text.edit')),
|
|
705
|
+
}, locales.getText('pisell2.text.edit')), /*#__PURE__*/React.createElement(Button, {
|
|
704
706
|
onClick: handleChange
|
|
705
707
|
}, locales.getText('pisell2.text.change'))), /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
706
708
|
style: {
|
|
@@ -21,3 +21,4 @@ export declare const isInterval: (time1: number, time2: number, interval?: numbe
|
|
|
21
21
|
* @Date: 2024-08-13 19:36
|
|
22
22
|
*/
|
|
23
23
|
export declare const formatServiceListByTime: (list: any[]) => any[];
|
|
24
|
+
export declare const isBooking4Shop: (shopId: number, renderType?: string) => boolean;
|
|
@@ -83,4 +83,11 @@ export var formatServiceListByTime = function formatServiceListByTime(list) {
|
|
|
83
83
|
} catch (err) {
|
|
84
84
|
return list;
|
|
85
85
|
}
|
|
86
|
+
};
|
|
87
|
+
export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
88
|
+
if (renderType === 'eventBooking') {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
var booking4Shops = [1350, 1401, 3013, 7154];
|
|
92
|
+
return booking4Shops.includes(shopId);
|
|
86
93
|
};
|