@pisell/private-materials 3.0.26 → 3.0.28
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 +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/index.js +2 -0
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/customSelect/index.js +2 -1
- package/es/components/booking/components/tabPane/index.less +1 -0
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/index.js +8 -5
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/model.d.ts +2 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/index.js +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/locales.d.ts +3 -0
- package/es/components/schedules/locales.js +6 -3
- package/es/components/schedules/model.d.ts +2 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +91 -3
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.less +20 -0
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/customSelect/index.js +2 -1
- package/lib/components/booking/components/tabPane/index.less +1 -0
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/index.js +7 -2
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/model.d.ts +2 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/index.js +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/locales.d.ts +3 -0
- package/lib/components/schedules/locales.js +6 -3
- package/lib/components/schedules/model.d.ts +2 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +64 -3
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.less +20 -0
- package/package.json +3 -3
|
@@ -159,6 +159,8 @@ var Addons = Provider(function (props) {
|
|
|
159
159
|
init();
|
|
160
160
|
}
|
|
161
161
|
}, [state.bookingDetail]);
|
|
162
|
+
|
|
163
|
+
// 这里暂时不用了, 用页面上的 refreshBookingDetail 统一更新
|
|
162
164
|
useEffect(function () {
|
|
163
165
|
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
164
166
|
var _interaction$utils;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -391,7 +391,8 @@ var CustomSelect = function CustomSelect(props, ref) {
|
|
|
391
391
|
}),
|
|
392
392
|
onClick: function onClick() {
|
|
393
393
|
handleSelectItem(item);
|
|
394
|
-
}
|
|
394
|
+
},
|
|
395
|
+
id: item[rowKey]
|
|
395
396
|
}, item.loading ? /*#__PURE__*/React.createElement(Skeleton, {
|
|
396
397
|
active: true,
|
|
397
398
|
round: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -18,6 +18,7 @@ import localeTexts from "../locales";
|
|
|
18
18
|
import { locales } from "@pisell/utils";
|
|
19
19
|
import { findNextDuration, flexibleObj, formatResource, getErrorList, sliceDayIntoFiveMinutes } from "../utils";
|
|
20
20
|
import { updateServiceDate } from "./date";
|
|
21
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
21
22
|
import Notes from "./notes";
|
|
22
23
|
import "./index.less";
|
|
23
24
|
var defaultModules = {
|
|
@@ -29,7 +30,7 @@ var defaultModules = {
|
|
|
29
30
|
};
|
|
30
31
|
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
31
32
|
var Info = Provider(function (props) {
|
|
32
|
-
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _modal$state5;
|
|
33
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper, _context$appHelper$ut, _modal$state5, _React$createElement;
|
|
33
34
|
// return <Payments {...props} />;
|
|
34
35
|
var style = props.style,
|
|
35
36
|
globalState = props.globalState,
|
|
@@ -37,6 +38,7 @@ var Info = Provider(function (props) {
|
|
|
37
38
|
modules = _props$modules === void 0 ? defaultModules : _props$modules,
|
|
38
39
|
slot = props.slot;
|
|
39
40
|
var modal = useContext(Context);
|
|
41
|
+
var context = useEngineContext();
|
|
40
42
|
var params = useMemo(function () {
|
|
41
43
|
var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
|
|
42
44
|
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) || {};
|
|
@@ -93,16 +95,17 @@ var Info = Provider(function (props) {
|
|
|
93
95
|
onChange: addNote
|
|
94
96
|
});
|
|
95
97
|
}, [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]);
|
|
96
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, {
|
|
98
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
|
|
97
99
|
style: style,
|
|
98
100
|
header: header,
|
|
99
101
|
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
100
102
|
state: modal.state,
|
|
101
103
|
dispatch: modal.dispatch,
|
|
102
104
|
source: "info"
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
})
|
|
106
|
+
}, _defineProperty(_React$createElement, "style", {
|
|
107
|
+
height: context !== null && context !== void 0 && (_context$appHelper = context.appHelper) !== null && _context$appHelper !== void 0 && (_context$appHelper$ut = _context$appHelper.utils) !== null && _context$appHelper$ut !== void 0 && _context$appHelper$ut.isMobile ? "100%" : "100vh"
|
|
108
|
+
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
106
109
|
className: "booking-info"
|
|
107
110
|
}, 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);
|
|
108
111
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -86,7 +87,7 @@ export declare const walkInData: {
|
|
|
86
87
|
id: number;
|
|
87
88
|
nickname: string;
|
|
88
89
|
};
|
|
89
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
90
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
90
91
|
state: FormState;
|
|
91
92
|
} & {
|
|
92
93
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -94,7 +94,7 @@ var Payments = Provider(function (props) {
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
}, [state.bookingDetail
|
|
97
|
+
}, [state.bookingDetail]);
|
|
98
98
|
var getRefundInfo = /*#__PURE__*/function () {
|
|
99
99
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
100
100
|
var res;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'pisell2.text.products.unsaved-back': string;
|
|
26
26
|
'pisell2.text.products.unsaved-yes': string;
|
|
27
27
|
'pisell2.text.products.max-participants-error': string;
|
|
28
|
+
'pisell2.text.schedules.create-new-schedule': string;
|
|
28
29
|
};
|
|
29
30
|
'zh-CN': {
|
|
30
31
|
'pisell2.text.schedules.all-day': string;
|
|
@@ -52,6 +53,7 @@ declare const _default: {
|
|
|
52
53
|
'pisell2.text.products.unsaved-back': string;
|
|
53
54
|
'pisell2.text.products.unsaved-yes': string;
|
|
54
55
|
'pisell2.text.products.max-participants-error': string;
|
|
56
|
+
'pisell2.text.schedules.create-new-schedule': string;
|
|
55
57
|
};
|
|
56
58
|
'zh-HK': {
|
|
57
59
|
'pisell2.text.schedules.all-day': string;
|
|
@@ -79,6 +81,7 @@ declare const _default: {
|
|
|
79
81
|
'pisell2.text.products.unsaved-back': string;
|
|
80
82
|
'pisell2.text.products.unsaved-yes': string;
|
|
81
83
|
'pisell2.text.products.max-participants-error': string;
|
|
84
|
+
'pisell2.text.schedules.create-new-schedule': string;
|
|
82
85
|
};
|
|
83
86
|
};
|
|
84
87
|
export default _default;
|
|
@@ -24,7 +24,8 @@ export default {
|
|
|
24
24
|
'pisell2.text.products.unsaved-content': "Navigating away without saving will discard your changes. Are you sure you want to proceed?",
|
|
25
25
|
'pisell2.text.products.unsaved-back': "Go back",
|
|
26
26
|
'pisell2.text.products.unsaved-yes': "Yes, discard",
|
|
27
|
-
'pisell2.text.products.max-participants-error': "Please set max participants"
|
|
27
|
+
'pisell2.text.products.max-participants-error': "Please set max participants",
|
|
28
|
+
'pisell2.text.schedules.create-new-schedule': "Create new schedule"
|
|
28
29
|
},
|
|
29
30
|
'zh-CN': {
|
|
30
31
|
'pisell2.text.schedules.all-day': "全天",
|
|
@@ -51,7 +52,8 @@ export default {
|
|
|
51
52
|
'pisell2.text.products.unsaved-content': "若不保存即离开,您所做的修改将会丢失。确定要继续吗?",
|
|
52
53
|
'pisell2.text.products.unsaved-back': "返回",
|
|
53
54
|
'pisell2.text.products.unsaved-yes': "是的,退出",
|
|
54
|
-
'pisell2.text.products.max-participants-error': "请设置最大参与人数"
|
|
55
|
+
'pisell2.text.products.max-participants-error': "请设置最大参与人数",
|
|
56
|
+
'pisell2.text.schedules.create-new-schedule': "创建新日程"
|
|
55
57
|
},
|
|
56
58
|
'zh-HK': {
|
|
57
59
|
'pisell2.text.schedules.all-day': "全天",
|
|
@@ -78,6 +80,7 @@ export default {
|
|
|
78
80
|
'pisell2.text.products.unsaved-content': "若不保即離開,您做的修改將會丟失。確定要繼續嗎?",
|
|
79
81
|
'pisell2.text.products.unsaved-back': "返回",
|
|
80
82
|
'pisell2.text.products.unsaved-yes': "是的,退出",
|
|
81
|
-
'pisell2.text.products.max-participants-error': "請設置最大參與人數"
|
|
83
|
+
'pisell2.text.products.max-participants-error': "請設置最大參與人數",
|
|
84
|
+
'pisell2.text.schedules.create-new-schedule': "創建新日程"
|
|
82
85
|
}
|
|
83
86
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,7 +69,7 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
72
73
|
state: FormState;
|
|
73
74
|
} & {
|
|
74
75
|
dispatch: (params: {
|
|
@@ -1,9 +1,19 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2
6
|
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
7
|
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
8
|
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
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
10
|
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); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
17
|
import { locales } from "@pisell/utils";
|
|
8
18
|
import { useRequest } from "ahooks";
|
|
9
19
|
import { Button } from "antd";
|
|
@@ -11,6 +21,8 @@ import React, { useContext, useRef } from "react";
|
|
|
11
21
|
import CustomSelect from "../../../../../../booking/components/customSelect";
|
|
12
22
|
import { Context } from "../../../../../model";
|
|
13
23
|
import { getSchedules } from "../../../../serve";
|
|
24
|
+
import useComponents from "../../../../../../../hooks/useComponents";
|
|
25
|
+
import useEngineContext from "../../../../../../../hooks/useEngineContext";
|
|
14
26
|
import "./index.less";
|
|
15
27
|
var AddSchedules = function AddSchedules(_ref) {
|
|
16
28
|
var _state$schedules;
|
|
@@ -21,12 +33,69 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
21
33
|
var modalRef = useRef(null);
|
|
22
34
|
var _useContext = useContext(Context),
|
|
23
35
|
state = _useContext.state;
|
|
36
|
+
var _useEngineContext = useEngineContext(),
|
|
37
|
+
appHelper = _useEngineContext.appHelper;
|
|
38
|
+
var createSchedules = useRef();
|
|
39
|
+
var AllCreateScheduleRef = useRef(null);
|
|
40
|
+
var _useComponents = useComponents({
|
|
41
|
+
components: ["ScheduleCreateType", "AllCreateSchedule"]
|
|
42
|
+
}),
|
|
43
|
+
_useComponents2 = _slicedToArray(_useComponents, 2),
|
|
44
|
+
ScheduleCreateType = _useComponents2[0],
|
|
45
|
+
AllCreateSchedule = _useComponents2[1];
|
|
24
46
|
var _getScheduleList = useRequest(getSchedules, {
|
|
25
47
|
manual: true,
|
|
26
48
|
onSuccess: function onSuccess(res) {}
|
|
27
49
|
});
|
|
28
50
|
var onFinish = function onFinish(e) {
|
|
29
|
-
|
|
51
|
+
var _getScheduleList$data;
|
|
52
|
+
var idMap = (_getScheduleList === null || _getScheduleList === void 0 ? void 0 : (_getScheduleList$data = _getScheduleList.data) === null || _getScheduleList$data === void 0 ? void 0 : _getScheduleList$data.reduce(function (p, c) {
|
|
53
|
+
return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
|
|
54
|
+
}, {})) || {};
|
|
55
|
+
onChange(e.map(function (item) {
|
|
56
|
+
return idMap[item.id];
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
var handleCreateSchedule = function handleCreateSchedule() {
|
|
60
|
+
var _createSchedules$curr, _createSchedules$curr2;
|
|
61
|
+
(_createSchedules$curr = createSchedules.current) === null || _createSchedules$curr === void 0 ? void 0 : (_createSchedules$curr2 = _createSchedules$curr.open) === null || _createSchedules$curr2 === void 0 ? void 0 : _createSchedules$curr2.call(_createSchedules$curr, {
|
|
62
|
+
getContainer: undefined
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var handleAddSchedule = function handleAddSchedule(data) {
|
|
66
|
+
_getScheduleList.mutate(function (oldData) {
|
|
67
|
+
return [data].concat(_toConsumableArray(oldData || []));
|
|
68
|
+
});
|
|
69
|
+
modalRef.current.setValue(function (v) {
|
|
70
|
+
return [].concat(_toConsumableArray(v), [data]);
|
|
71
|
+
});
|
|
72
|
+
setTimeout(function () {
|
|
73
|
+
var _document$getElementB, _document$getElementB2;
|
|
74
|
+
(_document$getElementB = document.getElementById(data.id)) === null || _document$getElementB === void 0 ? void 0 : (_document$getElementB2 = _document$getElementB.scrollIntoView) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.call(_document$getElementB, {
|
|
75
|
+
block: "center",
|
|
76
|
+
behavior: "smooth"
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
var handleEdit = function handleEdit(e, id) {
|
|
81
|
+
var _AllCreateScheduleRef, _AllCreateScheduleRef2;
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
(_AllCreateScheduleRef = AllCreateScheduleRef.current) === null || _AllCreateScheduleRef === void 0 ? void 0 : (_AllCreateScheduleRef2 = _AllCreateScheduleRef.open) === null || _AllCreateScheduleRef2 === void 0 ? void 0 : _AllCreateScheduleRef2.call(_AllCreateScheduleRef, {
|
|
84
|
+
id: id
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
var handleChangeResData = function handleChangeResData(data) {
|
|
88
|
+
_getScheduleList.mutate(function (oldData) {
|
|
89
|
+
return (oldData || []).map(function (item) {
|
|
90
|
+
if (item.id === data.id) {
|
|
91
|
+
var _appHelper$utils;
|
|
92
|
+
return _objectSpread(_objectSpread({}, data), {}, {
|
|
93
|
+
name: (appHelper === null || appHelper === void 0 ? void 0 : (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.translationShop(data.name)) || data.name
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return item;
|
|
97
|
+
});
|
|
98
|
+
});
|
|
30
99
|
};
|
|
31
100
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
32
101
|
ghost: true,
|
|
@@ -46,9 +115,11 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
46
115
|
ref: modalRef,
|
|
47
116
|
rowKey: "id",
|
|
48
117
|
options: isSelf ? _getScheduleList.data || [] : (state === null || state === void 0 ? void 0 : (_state$schedules = state.schedules) === null || _state$schedules === void 0 ? void 0 : _state$schedules.list) || [],
|
|
118
|
+
createItemText: locales.getText('pisell2.text.schedules.create-new-schedule'),
|
|
49
119
|
loading: _getScheduleList.loading,
|
|
50
120
|
value: value,
|
|
51
121
|
onValueChange: onFinish,
|
|
122
|
+
handleCreateItem: handleCreateSchedule,
|
|
52
123
|
isPreview: false,
|
|
53
124
|
drawerProps: _objectSpread({
|
|
54
125
|
title: locales.getText("pisell2.text.schedules.assign-schedule"),
|
|
@@ -67,12 +138,23 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
67
138
|
} : {}),
|
|
68
139
|
mode: "multiple",
|
|
69
140
|
optionRender: function optionRender(item) {
|
|
70
|
-
return /*#__PURE__*/React.createElement(
|
|
141
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
className: "pisell-lowcode__add-schedule-list-item"
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
className: "pisell-lowcode__add-schedule-list-item-content"
|
|
145
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
71
146
|
className: "pisell-lowcode__add-schedule-list-item-color",
|
|
72
147
|
style: {
|
|
73
148
|
backgroundColor: item.color
|
|
74
149
|
}
|
|
75
|
-
}), item.name)
|
|
150
|
+
}), item.name), /*#__PURE__*/React.createElement("div", {
|
|
151
|
+
className: "pisell-lowcode__add-schedule-list-item-action-wrap"
|
|
152
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
className: "pisell-lowcode__add-schedule-list-item-action-edit",
|
|
154
|
+
onClick: function onClick(e) {
|
|
155
|
+
return handleEdit(e, item.id);
|
|
156
|
+
}
|
|
157
|
+
}, locales.getText("pisell2.text.edit"))));
|
|
76
158
|
}
|
|
77
159
|
// onVirtualListScroll={onScroll}
|
|
78
160
|
// loadMore={loadMore}
|
|
@@ -80,6 +162,12 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
80
162
|
filterItem: function filterItem(d, search) {
|
|
81
163
|
return d.name.toLowerCase().indexOf(search.toLowerCase()) !== -1;
|
|
82
164
|
}
|
|
165
|
+
}), ScheduleCreateType && /*#__PURE__*/React.createElement(ScheduleCreateType, {
|
|
166
|
+
ref: createSchedules,
|
|
167
|
+
onChange: handleAddSchedule
|
|
168
|
+
}), AllCreateSchedule && /*#__PURE__*/React.createElement(AllCreateSchedule, {
|
|
169
|
+
ref: AllCreateScheduleRef,
|
|
170
|
+
onChange: handleChangeResData
|
|
83
171
|
}));
|
|
84
172
|
};
|
|
85
173
|
export default AddSchedules;
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
.pisell-lowcode__add-schedule-list-item {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex: 1;
|
|
4
|
+
.pisell-lowcode__add-schedule-list-item-content {
|
|
5
|
+
flex: 1;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.pisell-lowcode__add-schedule-list-item-action-wrap {
|
|
10
|
+
.pisell-lowcode__add-schedule-list-item-action-edit {
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 48px;
|
|
13
|
+
padding: 0px 16px;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
border-radius: 30px;
|
|
17
|
+
border: 1px solid var(--Gray-true-300, #D5D5D5);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
1
21
|
.pisell-lowcode__add-schedule-list-item-color {
|
|
2
22
|
width: 12px;
|
|
3
23
|
height: 12px;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -46,6 +46,7 @@ var import_locales = __toESM(require("../locales"));
|
|
|
46
46
|
var import_utils = require("@pisell/utils");
|
|
47
47
|
var import_utils2 = require("../utils");
|
|
48
48
|
var import_date2 = require("./date");
|
|
49
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
49
50
|
var import_notes = __toESM(require("./notes"));
|
|
50
51
|
var import_index = require("./index.less");
|
|
51
52
|
var defaultModules = {
|
|
@@ -57,9 +58,10 @@ var defaultModules = {
|
|
|
57
58
|
};
|
|
58
59
|
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
59
60
|
var Info = (0, import_model.Provider)((props) => {
|
|
60
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
61
62
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
62
63
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
64
|
+
const context = (0, import_useEngineContext.default)();
|
|
63
65
|
const params = (0, import_react.useMemo)(() => {
|
|
64
66
|
var _a2, _b2, _c2, _d2;
|
|
65
67
|
return ((_d2 = (_c2 = (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.bookingConfig) == null ? void 0 : _b2.config) == null ? void 0 : _c2.basic) == null ? void 0 : _d2.appointment_subject) || {};
|
|
@@ -133,9 +135,12 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
133
135
|
source: "info"
|
|
134
136
|
}
|
|
135
137
|
),
|
|
138
|
+
style: {
|
|
139
|
+
height: ((_h = (_g = context == null ? void 0 : context.appHelper) == null ? void 0 : _g.utils) == null ? void 0 : _h.isMobile) ? "100%" : "100vh"
|
|
140
|
+
},
|
|
136
141
|
bodyClassName: "booking-info-warp"
|
|
137
142
|
},
|
|
138
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((
|
|
143
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((_i = modal.state) == null ? void 0 : _i.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, modules.service ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service.default, null) : null) : null, notes, slot ? slot : null)
|
|
139
144
|
) : null);
|
|
140
145
|
});
|
|
141
146
|
var info_default = Info;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -86,7 +87,7 @@ export declare const walkInData: {
|
|
|
86
87
|
id: number;
|
|
87
88
|
nickname: string;
|
|
88
89
|
};
|
|
89
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
90
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
90
91
|
state: FormState;
|
|
91
92
|
} & {
|
|
92
93
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|