@pisell/private-materials 3.0.157-gray → 3.0.158
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 +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/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/index.js +3 -3
- 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/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 -9
- 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/editService/index.js +13 -11
- package/es/components/booking/info2/utilsByBooking.js +4 -11
- package/es/components/booking/locales.d.ts +0 -48
- package/es/components/booking/locales.js +3 -51
- 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/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/components/schedules/resources/add/index.js +9 -9
- package/es/components/schedules/resources/edit/index.d.ts +4 -0
- package/es/components/schedules/resources/edit/index.js +116 -0
- package/es/components/schedules/resources/edit/index.less +19 -0
- package/es/components/schedules/resources/index.d.ts +2 -2
- package/es/components/schedules/resources/index.js +24 -16
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/index.js +3 -3
- 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/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 -9
- 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/editService/index.js +6 -9
- package/lib/components/booking/info2/utilsByBooking.js +4 -11
- package/lib/components/booking/locales.d.ts +0 -48
- package/lib/components/booking/locales.js +3 -51
- 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/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/components/schedules/resources/add/index.js +7 -7
- package/lib/components/schedules/resources/edit/index.d.ts +4 -0
- package/lib/components/schedules/resources/edit/index.js +132 -0
- package/lib/components/schedules/resources/edit/index.less +19 -0
- package/lib/components/schedules/resources/index.d.ts +2 -2
- package/lib/components/schedules/resources/index.js +7 -4
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +3 -3
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/dashboard/index.js +0 -253
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/dashboard/serve.js +0 -27
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/es/components/booking/info/addServiceVariant/index.js +0 -33
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/dashboard/index.js +0 -251
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.js +0 -33
- 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 -137
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -112,9 +112,7 @@ var sliceDayIntoFiveMinutes = (config, locale) => {
|
|
|
112
112
|
value: durationValue
|
|
113
113
|
});
|
|
114
114
|
} else {
|
|
115
|
-
const durationLabel = `${durationValue} ${import_utils.locales.getText(
|
|
116
|
-
"pisell2.text.min"
|
|
117
|
-
)}`;
|
|
115
|
+
const durationLabel = `${durationValue} ${import_utils.locales.getText("pisell2.text.min")}`;
|
|
118
116
|
durationSlicesBasedOnTime.push({
|
|
119
117
|
label: durationLabel,
|
|
120
118
|
value: durationValue
|
|
@@ -137,9 +135,7 @@ var getServeStartTime = (start_time) => {
|
|
|
137
135
|
return start_time;
|
|
138
136
|
};
|
|
139
137
|
var getServiceTime = (item, currentDate) => {
|
|
140
|
-
const startDate = (0, import_dayjs.default)(
|
|
141
|
-
currentDate.format("YYYY-MM-DD") + " " + getServeStartTime(item._extend.start_time)
|
|
142
|
-
);
|
|
138
|
+
const startDate = (0, import_dayjs.default)(currentDate.format("YYYY-MM-DD") + " " + getServeStartTime(item._extend.start_time));
|
|
143
139
|
const startTime = startDate.format("HH:mm");
|
|
144
140
|
const endTime = startDate.add(flexibleObj.getValue(item._extend.duration), "minute").format("HH:mm");
|
|
145
141
|
const duration = getDiscountTime(flexibleObj.getValue(item._extend.duration));
|
|
@@ -187,7 +183,10 @@ var formatProductListByCategory = (list, filterItem) => {
|
|
|
187
183
|
}
|
|
188
184
|
categoryObject[categoryItem.id] = {
|
|
189
185
|
...categoryItem,
|
|
190
|
-
products: [
|
|
186
|
+
products: [
|
|
187
|
+
...categoryObject[categoryItem.id].products,
|
|
188
|
+
productItem
|
|
189
|
+
]
|
|
191
190
|
};
|
|
192
191
|
}
|
|
193
192
|
} else {
|
|
@@ -209,9 +208,7 @@ var formatProductListByCategory = (list, filterItem) => {
|
|
|
209
208
|
return Object.values(categoryObject).sort((a, b) => b.sort - a.sort);
|
|
210
209
|
};
|
|
211
210
|
var getResourceTimeIsUsable = (item, cacheItem) => {
|
|
212
|
-
const startDate = (0, import_dayjs.default)(
|
|
213
|
-
cacheItem._extend.start_date.format("YYYY-MM-DD") + " " + getServeStartTime(cacheItem._extend.start_time)
|
|
214
|
-
);
|
|
211
|
+
const startDate = (0, import_dayjs.default)(cacheItem._extend.start_date.format("YYYY-MM-DD") + " " + getServeStartTime(cacheItem._extend.start_time));
|
|
215
212
|
const isFlexible = flexibleObj.isFlexible(cacheItem._extend.duration);
|
|
216
213
|
let isMaxLimitRange = false;
|
|
217
214
|
let isDateRange = false;
|
|
@@ -221,22 +218,13 @@ var getResourceTimeIsUsable = (item, cacheItem) => {
|
|
|
221
218
|
} else {
|
|
222
219
|
isMaxLimitRange = "unknown";
|
|
223
220
|
}
|
|
224
|
-
const timeStartDate = (0, import_dayjs.default)(time.start_date + " " + time.start_time).subtract(
|
|
225
|
-
|
|
226
|
-
"second"
|
|
227
|
-
);
|
|
228
|
-
const timeEndDate = (0, import_dayjs.default)(time.end_date + " " + time.end_time).add(
|
|
229
|
-
1,
|
|
230
|
-
"second"
|
|
231
|
-
);
|
|
221
|
+
const timeStartDate = (0, import_dayjs.default)(time.start_date + " " + time.start_time).subtract(1, "second");
|
|
222
|
+
const timeEndDate = (0, import_dayjs.default)(time.end_date + " " + time.end_time).add(1, "second");
|
|
232
223
|
let bol;
|
|
233
224
|
if (isFlexible) {
|
|
234
225
|
bol = startDate.isAfter(timeStartDate) && startDate.isBefore(timeEndDate);
|
|
235
226
|
} else {
|
|
236
|
-
let endDate = startDate.add(
|
|
237
|
-
flexibleObj.getValue(cacheItem._extend.duration),
|
|
238
|
-
"minute"
|
|
239
|
-
);
|
|
227
|
+
let endDate = startDate.add(flexibleObj.getValue(cacheItem._extend.duration), "minute");
|
|
240
228
|
bol = startDate.isAfter(timeStartDate) && endDate.isBefore(timeEndDate);
|
|
241
229
|
}
|
|
242
230
|
if (bol) {
|
|
@@ -341,9 +329,7 @@ var flexibleObj = {
|
|
|
341
329
|
};
|
|
342
330
|
var getEndDate = (startDate, duration, endDate) => {
|
|
343
331
|
if (duration === "flexible") {
|
|
344
|
-
let openingDate = (0, import_dayjs.default)(
|
|
345
|
-
startDate.format("YYYY-MM-DD") + " " + getShopOpeningHours()
|
|
346
|
-
);
|
|
332
|
+
let openingDate = (0, import_dayjs.default)(startDate.format("YYYY-MM-DD") + " " + getShopOpeningHours());
|
|
347
333
|
if ((0, import_dayjs.default)(startDate).isAfter(openingDate)) {
|
|
348
334
|
openingDate = openingDate.add(1, "day");
|
|
349
335
|
}
|
|
@@ -358,13 +344,8 @@ var getEndDate = (startDate, duration, endDate) => {
|
|
|
358
344
|
return startDate.add(duration, "minute");
|
|
359
345
|
};
|
|
360
346
|
var getServiceTimes = (service) => {
|
|
361
|
-
const startDate = (0, import_dayjs.default)(
|
|
362
|
-
|
|
363
|
-
);
|
|
364
|
-
const endDate = startDate.add(
|
|
365
|
-
flexibleObj.getValue(service._extend.duration),
|
|
366
|
-
"minute"
|
|
367
|
-
);
|
|
347
|
+
const startDate = (0, import_dayjs.default)((0, import_dayjs.default)(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time));
|
|
348
|
+
const endDate = startDate.add(flexibleObj.getValue(service._extend.duration), "minute");
|
|
368
349
|
return {
|
|
369
350
|
startDate,
|
|
370
351
|
endDate
|
|
@@ -373,12 +354,10 @@ var getServiceTimes = (service) => {
|
|
|
373
354
|
var getErrorList = (resource, cacheItem) => {
|
|
374
355
|
var _a, _b, _c;
|
|
375
356
|
if (!(cacheItem == null ? void 0 : cacheItem.id)) {
|
|
376
|
-
return [
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
];
|
|
357
|
+
return [{
|
|
358
|
+
label: import_utils.locales.getText("pisell2.text.no-product-added"),
|
|
359
|
+
type: "products"
|
|
360
|
+
}];
|
|
382
361
|
}
|
|
383
362
|
if (!resource || !resource._extend || !cacheItem) {
|
|
384
363
|
return [];
|
|
@@ -387,10 +366,7 @@ var getErrorList = (resource, cacheItem) => {
|
|
|
387
366
|
if (!resource.usable) {
|
|
388
367
|
if (!((_a = resource == null ? void 0 : resource._extend) == null ? void 0 : _a.usableProduct)) {
|
|
389
368
|
list.push({
|
|
390
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-1")(
|
|
391
|
-
resource.labelText,
|
|
392
|
-
cacheItem == null ? void 0 : cacheItem.title
|
|
393
|
-
),
|
|
369
|
+
label: import_utils.locales.getText("pisell1.text.resource-error-message-1")(resource.labelText, cacheItem == null ? void 0 : cacheItem.title),
|
|
394
370
|
type: "product"
|
|
395
371
|
});
|
|
396
372
|
}
|
|
@@ -402,21 +378,13 @@ var getErrorList = (resource, cacheItem) => {
|
|
|
402
378
|
}
|
|
403
379
|
if (!((_b = resource._extend) == null ? void 0 : _b.usableTime)) {
|
|
404
380
|
list.push({
|
|
405
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-2")(
|
|
406
|
-
resource.labelText,
|
|
407
|
-
startText,
|
|
408
|
-
endText
|
|
409
|
-
),
|
|
381
|
+
label: import_utils.locales.getText("pisell1.text.resource-error-message-2")(resource.labelText, startText, endText),
|
|
410
382
|
type: "time"
|
|
411
383
|
});
|
|
412
384
|
} else {
|
|
413
385
|
if (!((_c = resource._extend) == null ? void 0 : _c.usableTime._extend.isMaxLimitRange)) {
|
|
414
386
|
list.push({
|
|
415
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-3")(
|
|
416
|
-
resource.labelText,
|
|
417
|
-
startText,
|
|
418
|
-
endText
|
|
419
|
-
),
|
|
387
|
+
label: import_utils.locales.getText("pisell1.text.resource-error-message-3")(resource.labelText, startText, endText),
|
|
420
388
|
type: "limit"
|
|
421
389
|
});
|
|
422
390
|
}
|
|
@@ -486,14 +454,11 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
|
486
454
|
_extend.resource = resourceId;
|
|
487
455
|
}
|
|
488
456
|
}
|
|
457
|
+
console.log("_extend", findNextSliceProps);
|
|
489
458
|
if (findNextSliceProps.date && findNextSliceProps.date !== "00:00") {
|
|
490
459
|
_extend.start_time = findNextSlice(findNextSliceProps);
|
|
491
460
|
} else {
|
|
492
|
-
|
|
493
|
-
_extend.start_time = cacheItem.currentDefaultTime;
|
|
494
|
-
} else {
|
|
495
|
-
_extend.start_time = (0, import_dayjs.default)().format("HH:mm");
|
|
496
|
-
}
|
|
461
|
+
_extend.start_time = (0, import_dayjs.default)().format("HH:mm");
|
|
497
462
|
}
|
|
498
463
|
}
|
|
499
464
|
_extend = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,7 +68,7 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
71
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
73
72
|
state: FormState;
|
|
74
73
|
} & {
|
|
75
74
|
dispatch: (params: {
|
|
@@ -36,9 +36,9 @@ var import_antd = require("antd");
|
|
|
36
36
|
var import_react = require("react");
|
|
37
37
|
var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
|
|
38
38
|
var ResourcesAdd = ({ onSuccess }, refs) => {
|
|
39
|
-
const
|
|
40
|
-
const [
|
|
41
|
-
components: ["
|
|
39
|
+
const formDataNewRef = (0, import_react.useRef)();
|
|
40
|
+
const [FormDataNew] = (0, import_useComponents.default)({
|
|
41
|
+
components: ["FormDataNew"]
|
|
42
42
|
});
|
|
43
43
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
44
44
|
const [formId, setFormId] = (0, import_react.useState)(0);
|
|
@@ -58,7 +58,7 @@ var ResourcesAdd = ({ onSuccess }, refs) => {
|
|
|
58
58
|
});
|
|
59
59
|
const onSubmit = () => {
|
|
60
60
|
var _a;
|
|
61
|
-
(_a =
|
|
61
|
+
(_a = formDataNewRef.current) == null ? void 0 : _a.submit();
|
|
62
62
|
};
|
|
63
63
|
return /* @__PURE__ */ React.createElement(
|
|
64
64
|
import_antd.Modal,
|
|
@@ -69,11 +69,11 @@ var ResourcesAdd = ({ onSuccess }, refs) => {
|
|
|
69
69
|
onOk: onSubmit,
|
|
70
70
|
destroyOnClose: true
|
|
71
71
|
},
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
FormDataNew && /* @__PURE__ */ React.createElement(
|
|
73
|
+
FormDataNew,
|
|
74
74
|
{
|
|
75
75
|
formId,
|
|
76
|
-
ref:
|
|
76
|
+
ref: formDataNewRef,
|
|
77
77
|
formChange: (isSuccess, params) => {
|
|
78
78
|
if (isSuccess) {
|
|
79
79
|
onSuccess == null ? void 0 : onSuccess(params);
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/schedules/resources/edit/index.tsx
|
|
30
|
+
var edit_exports = {};
|
|
31
|
+
__export(edit_exports, {
|
|
32
|
+
default: () => edit_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(edit_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_drawer = __toESM(require("../../../booking/components/drawer"));
|
|
38
|
+
var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var filterList = [
|
|
42
|
+
"schedule",
|
|
43
|
+
"max_participants",
|
|
44
|
+
"partyroom_package",
|
|
45
|
+
"products",
|
|
46
|
+
"capacity"
|
|
47
|
+
];
|
|
48
|
+
var ResourcesDetail = ({ onSuccess }, refs) => {
|
|
49
|
+
const formDataEditRef = (0, import_react.useRef)();
|
|
50
|
+
const [FormDataEdit] = (0, import_useComponents.default)({
|
|
51
|
+
components: ["FormDataEdit"]
|
|
52
|
+
});
|
|
53
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
54
|
+
const [currentResource, setCurrentResource] = (0, import_react.useState)({});
|
|
55
|
+
const [formId, setFormId] = (0, import_react.useState)(0);
|
|
56
|
+
const [formRecordId, setFormRecordId] = (0, import_react.useState)(0);
|
|
57
|
+
const onClose = () => {
|
|
58
|
+
setOpen(false);
|
|
59
|
+
};
|
|
60
|
+
const onOpen = () => {
|
|
61
|
+
setOpen(true);
|
|
62
|
+
};
|
|
63
|
+
(0, import_react.useImperativeHandle)(refs, () => {
|
|
64
|
+
return {
|
|
65
|
+
open: (item) => {
|
|
66
|
+
onOpen();
|
|
67
|
+
setCurrentResource(item);
|
|
68
|
+
setFormId(item.form_id);
|
|
69
|
+
setFormRecordId(item.id);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
const onSubmit = () => {
|
|
74
|
+
var _a;
|
|
75
|
+
console.log("formDataEditRef", formDataEditRef);
|
|
76
|
+
(_a = formDataEditRef.current) == null ? void 0 : _a.submit();
|
|
77
|
+
};
|
|
78
|
+
(0, import_react.useEffect)(() => {
|
|
79
|
+
console.log("formDataEditRef?.current", formDataEditRef == null ? void 0 : formDataEditRef.current);
|
|
80
|
+
}, [formDataEditRef == null ? void 0 : formDataEditRef.current]);
|
|
81
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
82
|
+
import_drawer.default,
|
|
83
|
+
{
|
|
84
|
+
width: "100%",
|
|
85
|
+
placement: "right",
|
|
86
|
+
open,
|
|
87
|
+
getContainer: document.querySelector(
|
|
88
|
+
".pisell-lowcode__schedules-component-resources"
|
|
89
|
+
) || document.body,
|
|
90
|
+
titleNoWrap: true,
|
|
91
|
+
headerStyle: {
|
|
92
|
+
display: "none"
|
|
93
|
+
},
|
|
94
|
+
onClose: () => {
|
|
95
|
+
onClose(false);
|
|
96
|
+
},
|
|
97
|
+
bodyStyle: {
|
|
98
|
+
padding: 0
|
|
99
|
+
},
|
|
100
|
+
title: currentResource == null ? void 0 : currentResource.title,
|
|
101
|
+
rootStyle: { position: "absolute" },
|
|
102
|
+
contentWrapperStyle: { boxShadow: "none" },
|
|
103
|
+
destroyOnClose: true
|
|
104
|
+
},
|
|
105
|
+
FormDataEdit && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
FormDataEdit,
|
|
107
|
+
{
|
|
108
|
+
formId,
|
|
109
|
+
formRecordId,
|
|
110
|
+
filterList,
|
|
111
|
+
onReady: (ref) => {
|
|
112
|
+
formDataEditRef.current = ref;
|
|
113
|
+
},
|
|
114
|
+
formChange: (isSuccess, params) => {
|
|
115
|
+
if (isSuccess) {
|
|
116
|
+
onSuccess == null ? void 0 : onSuccess(params);
|
|
117
|
+
onClose();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__schedules-component-resources-detail-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
122
|
+
import_antd.Button,
|
|
123
|
+
{
|
|
124
|
+
className: "footer-btn",
|
|
125
|
+
type: "primary",
|
|
126
|
+
onClick: onSubmit
|
|
127
|
+
},
|
|
128
|
+
import_utils.locales.getText("pisell2.text.schedules.save")
|
|
129
|
+
)))
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
var edit_default = (0, import_react.forwardRef)(ResourcesDetail);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.pisell-lowcode__schedules-component-resources-detail-footer {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
position: absolute;
|
|
6
|
+
padding: 8px 16px;
|
|
7
|
+
border-top: 1px solid rgba(22, 44, 88, 0.09);
|
|
8
|
+
bottom: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
left: 0;
|
|
11
|
+
background-color: #ffffff;
|
|
12
|
+
z-index: 999;
|
|
13
|
+
.footer-btn {
|
|
14
|
+
flex: 1;
|
|
15
|
+
&.cancel-btn {
|
|
16
|
+
margin-right: 12px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -39,6 +39,7 @@ var import_CurrentDay = __toESM(require("../components/CurrentDay"));
|
|
|
39
39
|
var import_Search = __toESM(require("../components/Search"));
|
|
40
40
|
var import_model = require("../model");
|
|
41
41
|
var import_add = __toESM(require("./add"));
|
|
42
|
+
var import_edit = __toESM(require("./edit"));
|
|
42
43
|
var import_detail = __toESM(require("./detail"));
|
|
43
44
|
var import_index = require("./index.less");
|
|
44
45
|
var import_list = __toESM(require("./list"));
|
|
@@ -49,6 +50,7 @@ var Resources = () => {
|
|
|
49
50
|
const { currentSelectDayDetail, resources, tabKey } = state;
|
|
50
51
|
const cacheResource = resources == null ? void 0 : resources.cacheResource;
|
|
51
52
|
const resourcesAddRef = (0, import_react.useRef)();
|
|
53
|
+
const resourcesEditRef = (0, import_react.useRef)();
|
|
52
54
|
const resourcesDetailRef = (0, import_react.useRef)();
|
|
53
55
|
const [seachText, setSearchText] = (0, import_react.useState)("");
|
|
54
56
|
const [activeKey, setActiveKey] = (0, import_react.useState)([]);
|
|
@@ -98,7 +100,7 @@ var Resources = () => {
|
|
|
98
100
|
(0, import_react.useEffect)(() => {
|
|
99
101
|
var _a, _b;
|
|
100
102
|
if (cacheResource) {
|
|
101
|
-
(_b = (_a =
|
|
103
|
+
(_b = (_a = resourcesEditRef.current) == null ? void 0 : _a.open) == null ? void 0 : _b.call(_a, cacheResource);
|
|
102
104
|
setTimeout(() => {
|
|
103
105
|
var _a2;
|
|
104
106
|
const el = document.getElementById(`${cacheResource.id}`);
|
|
@@ -137,7 +139,8 @@ var Resources = () => {
|
|
|
137
139
|
list: resources2.map((resource) => {
|
|
138
140
|
return {
|
|
139
141
|
id: resource.id,
|
|
140
|
-
title: resource.title
|
|
142
|
+
title: resource.title,
|
|
143
|
+
form_id: item.id
|
|
141
144
|
};
|
|
142
145
|
}),
|
|
143
146
|
addClick: () => {
|
|
@@ -146,7 +149,7 @@ var Resources = () => {
|
|
|
146
149
|
},
|
|
147
150
|
itemClick: (resource) => {
|
|
148
151
|
var _a, _b;
|
|
149
|
-
(_b = (_a =
|
|
152
|
+
(_b = (_a = resourcesEditRef.current) == null ? void 0 : _a.open) == null ? void 0 : _b.call(_a, resource);
|
|
150
153
|
}
|
|
151
154
|
}
|
|
152
155
|
)
|
|
@@ -193,7 +196,7 @@ var Resources = () => {
|
|
|
193
196
|
)
|
|
194
197
|
}
|
|
195
198
|
)
|
|
196
|
-
))), /* @__PURE__ */ import_react.default.createElement(import_add.default, { ref: resourcesAddRef, onSuccess: init }), /* @__PURE__ */ import_react.default.createElement(
|
|
199
|
+
))), /* @__PURE__ */ import_react.default.createElement(import_add.default, { ref: resourcesAddRef, onSuccess: init }), /* @__PURE__ */ import_react.default.createElement(import_edit.default, { ref: resourcesEditRef, onSuccess: init }), /* @__PURE__ */ import_react.default.createElement(
|
|
197
200
|
import_detail.default,
|
|
198
201
|
{
|
|
199
202
|
tabKey,
|
package/lib/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export { default as BookingStartTime } from './components/booking/materiels/star
|
|
|
12
12
|
export { default as BookingDuration } from './components/booking/materiels/duration';
|
|
13
13
|
export { default as BookingContacts } from './components/booking/materiels/contacts';
|
|
14
14
|
export { VerticalClient } from './components/booking/info/clientVariant';
|
|
15
|
-
export { default as VerticalAddService } from './components/booking/info/addServiceVariant';
|
|
16
15
|
export { default as ProductExtension } from './components/productExtension';
|
|
17
16
|
export { default as BookingDeposit } from './components/booking/deposit';
|
|
18
17
|
export { default as RuleSetting } from './components/ruleSetting';
|
|
@@ -20,4 +19,3 @@ export { default as TaxSelect } from './components/taxSelect';
|
|
|
20
19
|
export { default as ToCPay } from './components/pay/toC';
|
|
21
20
|
export { default as Eftpos } from './components/eftpos';
|
|
22
21
|
export { default as EftposPay } from './components/eftposPay';
|
|
23
|
-
export { default as BookingDashboard } from './components/booking/dashboard';
|
package/lib/index.js
CHANGED
|
@@ -32,7 +32,6 @@ __export(src_exports, {
|
|
|
32
32
|
Booking: () => import_booking.default,
|
|
33
33
|
BookingAddons: () => import_addons.default,
|
|
34
34
|
BookingContacts: () => import_contacts.default,
|
|
35
|
-
BookingDashboard: () => import_dashboard.default,
|
|
36
35
|
BookingDeposit: () => import_deposit.default,
|
|
37
36
|
BookingDuration: () => import_duration.default,
|
|
38
37
|
BookingForms: () => import_forms.default,
|
|
@@ -49,7 +48,6 @@ __export(src_exports, {
|
|
|
49
48
|
Schedules: () => import_schedules.default,
|
|
50
49
|
TaxSelect: () => import_taxSelect.default,
|
|
51
50
|
ToCPay: () => import_toC.default,
|
|
52
|
-
VerticalAddService: () => import_addServiceVariant.default,
|
|
53
51
|
VerticalClient: () => import_clientVariant.VerticalClient
|
|
54
52
|
});
|
|
55
53
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -69,7 +67,6 @@ var import_startTime = __toESM(require("./components/booking/materiels/startTime
|
|
|
69
67
|
var import_duration = __toESM(require("./components/booking/materiels/duration"));
|
|
70
68
|
var import_contacts = __toESM(require("./components/booking/materiels/contacts"));
|
|
71
69
|
var import_clientVariant = require("./components/booking/info/clientVariant");
|
|
72
|
-
var import_addServiceVariant = __toESM(require("./components/booking/info/addServiceVariant"));
|
|
73
70
|
var import_productExtension = __toESM(require("./components/productExtension"));
|
|
74
71
|
var import_deposit = __toESM(require("./components/booking/deposit"));
|
|
75
72
|
var import_ruleSetting = __toESM(require("./components/ruleSetting"));
|
|
@@ -77,7 +74,6 @@ var import_taxSelect = __toESM(require("./components/taxSelect"));
|
|
|
77
74
|
var import_toC = __toESM(require("./components/pay/toC"));
|
|
78
75
|
var import_eftpos = __toESM(require("./components/eftpos"));
|
|
79
76
|
var import_eftposPay = __toESM(require("./components/eftposPay"));
|
|
80
|
-
var import_dashboard = __toESM(require("./components/booking/dashboard"));
|
|
81
77
|
import_dayjs.default.extend(import_weekday.default);
|
|
82
78
|
import_dayjs.default.extend(import_localeData.default);
|
|
83
79
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -85,7 +81,6 @@ import_dayjs.default.extend(import_localeData.default);
|
|
|
85
81
|
Booking,
|
|
86
82
|
BookingAddons,
|
|
87
83
|
BookingContacts,
|
|
88
|
-
BookingDashboard,
|
|
89
84
|
BookingDeposit,
|
|
90
85
|
BookingDuration,
|
|
91
86
|
BookingForms,
|
|
@@ -102,6 +97,5 @@ import_dayjs.default.extend(import_localeData.default);
|
|
|
102
97
|
Schedules,
|
|
103
98
|
TaxSelect,
|
|
104
99
|
ToCPay,
|
|
105
|
-
VerticalAddService,
|
|
106
100
|
VerticalClient
|
|
107
101
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.158",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
+
"@pisell/materials": "3.0.48",
|
|
62
63
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/date-picker": "1.0.100",
|
|
64
64
|
"@pisell/icon": "0.0.11",
|
|
65
|
-
"@pisell/
|
|
65
|
+
"@pisell/date-picker": "1.0.100"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface BookingDashboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
backgroundColors?: string[];
|
|
4
|
-
labelColor?: string;
|
|
5
|
-
valueColor?: string;
|
|
6
|
-
otherParams?: Record<string, any>;
|
|
7
|
-
refreshKey?: string;
|
|
8
|
-
onDataChange?: (data: {
|
|
9
|
-
groupsOnSiteNow: string | number;
|
|
10
|
-
peopleOnSiteNow: string | number;
|
|
11
|
-
totalVisitorsToday: string | number;
|
|
12
|
-
ongoing: string | number;
|
|
13
|
-
upcoming: string | number;
|
|
14
|
-
overdue: string | number;
|
|
15
|
-
completed: string | number;
|
|
16
|
-
departed: string | number;
|
|
17
|
-
}, dataList: string[]) => void;
|
|
18
|
-
}
|
|
19
|
-
declare const BookingDashboard: (props: BookingDashboardProps) => React.JSX.Element;
|
|
20
|
-
export default BookingDashboard;
|