@pisell/private-materials 3.0.151 → 3.0.152-gray

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.
Files changed (79) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +12 -12
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +12 -12
  11. package/es/components/booking/addons/model.d.ts +2 -1
  12. package/es/components/booking/components/footer/index.js +3 -3
  13. package/es/components/booking/dashboard/index.d.ts +10 -0
  14. package/es/components/booking/dashboard/index.js +242 -0
  15. package/es/components/booking/dashboard/serve.d.ts +1 -0
  16. package/es/components/booking/dashboard/serve.js +27 -0
  17. package/es/components/booking/forms/forms.d.ts +1 -0
  18. package/es/components/booking/forms/forms.js +4 -2
  19. package/es/components/booking/forms/model.d.ts +2 -1
  20. package/es/components/booking/forms/single/index.d.ts +1 -1
  21. package/es/components/booking/forms/single/index.js +4 -3
  22. package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
  23. package/es/components/booking/info/addServiceVariant/index.js +33 -0
  24. package/es/components/booking/info/index.js +2 -1
  25. package/es/components/booking/info/index.less +9 -0
  26. package/es/components/booking/info/pet/index.js +1 -1
  27. package/es/components/booking/info/service/addService/index.d.ts +8 -2
  28. package/es/components/booking/info/service/addService/index.js +82 -36
  29. package/es/components/booking/info/service/addService/index.less +27 -1
  30. package/es/components/booking/info/service/editService/index.js +11 -13
  31. package/es/components/booking/locales.d.ts +48 -0
  32. package/es/components/booking/locales.js +51 -3
  33. package/es/components/booking/model.d.ts +2 -0
  34. package/es/components/booking/notes/index.d.ts +1 -1
  35. package/es/components/booking/notes/model.d.ts +2 -1
  36. package/es/components/booking/payments/model.d.ts +2 -1
  37. package/es/components/booking/utils.d.ts +1 -1
  38. package/es/components/booking/utils.js +54 -51
  39. package/es/components/schedules/index.d.ts +1 -1
  40. package/es/components/schedules/model.d.ts +2 -1
  41. package/es/index.d.ts +2 -0
  42. package/es/index.js +3 -1
  43. package/lib/components/booking/addons/model.d.ts +2 -1
  44. package/lib/components/booking/components/footer/index.js +3 -3
  45. package/lib/components/booking/dashboard/index.d.ts +10 -0
  46. package/lib/components/booking/dashboard/index.js +225 -0
  47. package/lib/components/booking/dashboard/serve.d.ts +1 -0
  48. package/lib/components/booking/dashboard/serve.js +33 -0
  49. package/lib/components/booking/forms/forms.d.ts +1 -0
  50. package/lib/components/booking/forms/forms.js +5 -2
  51. package/lib/components/booking/forms/model.d.ts +2 -1
  52. package/lib/components/booking/forms/single/index.d.ts +1 -1
  53. package/lib/components/booking/forms/single/index.js +4 -2
  54. package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
  55. package/lib/components/booking/info/addServiceVariant/index.js +58 -0
  56. package/lib/components/booking/info/client/index.js +1 -8
  57. package/lib/components/booking/info/index.js +4 -1
  58. package/lib/components/booking/info/index.less +9 -0
  59. package/lib/components/booking/info/pet/index.js +2 -1
  60. package/lib/components/booking/info/service/addService/index.d.ts +8 -2
  61. package/lib/components/booking/info/service/addService/index.js +66 -29
  62. package/lib/components/booking/info/service/addService/index.less +27 -1
  63. package/lib/components/booking/info/service/editService/index.js +9 -6
  64. package/lib/components/booking/locales.d.ts +48 -0
  65. package/lib/components/booking/locales.js +51 -3
  66. package/lib/components/booking/model.d.ts +2 -0
  67. package/lib/components/booking/notes/index.d.ts +1 -1
  68. package/lib/components/booking/notes/model.d.ts +2 -1
  69. package/lib/components/booking/payments/model.d.ts +2 -1
  70. package/lib/components/booking/utils.d.ts +1 -1
  71. package/lib/components/booking/utils.js +57 -22
  72. package/lib/components/schedules/index.d.ts +1 -1
  73. package/lib/components/schedules/model.d.ts +2 -1
  74. package/lib/index.d.ts +2 -0
  75. package/lib/index.js +6 -0
  76. package/lowcode/booking-dashboard/meta.ts +130 -0
  77. package/lowcode/booking-vertical-add-service/meta.ts +124 -0
  78. package/lowcode/vertical-add-service/meta.ts +71 -0
  79. package/package.json +3 -3
@@ -0,0 +1,33 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/booking/dashboard/serve.ts
20
+ var serve_exports = {};
21
+ __export(serve_exports, {
22
+ getBookingList: () => getBookingList
23
+ });
24
+ module.exports = __toCommonJS(serve_exports);
25
+ var import_utils = require("../utils");
26
+ var getBookingList = async (params) => {
27
+ let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params);
28
+ return data;
29
+ };
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ getBookingList
33
+ });
@@ -12,6 +12,7 @@ export interface InfoProps {
12
12
  client: any;
13
13
  loading?: boolean;
14
14
  addButtonProps?: any;
15
+ drawerProps?: any;
15
16
  }
16
17
  /**
17
18
  * @title: 表单模块
@@ -53,7 +53,8 @@ var Forms = (0, import_model.Provider)((props) => {
53
53
  addCallback,
54
54
  client,
55
55
  loading,
56
- addButtonProps
56
+ addButtonProps,
57
+ drawerProps
57
58
  } = props;
58
59
  const onAction = (0, import_ahooks.useMemoizedFn)(
59
60
  async (formDataConfig, isAdd) => {
@@ -150,6 +151,7 @@ var Forms = (0, import_model.Provider)((props) => {
150
151
  onChange: (val) => {
151
152
  onValueChange(d, val);
152
153
  },
154
+ drawerProps,
153
155
  onAdd: () => {
154
156
  onAction(d, true);
155
157
  },
@@ -190,7 +192,8 @@ var Forms = (0, import_model.Provider)((props) => {
190
192
  client == null ? void 0 : client.id,
191
193
  addButtonProps,
192
194
  customSelectProps,
193
- optionRender
195
+ optionRender,
196
+ drawerProps
194
197
  ]);
195
198
  });
196
199
  var forms_default = Forms;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -7,5 +7,5 @@ import "./index.less";
7
7
  * @Author: zhiwei.Wang
8
8
  * @Date: 2024-01-30 17:06
9
9
  */
10
- declare const Single: ({ value, onChange, form, mode, optionRender, loading, customSelectProps, onAdd, addButtonProps, modalOpen, watch, }: any) => React.JSX.Element;
10
+ declare const Single: ({ value, onChange, form, mode, optionRender, loading, customSelectProps, onAdd, addButtonProps, modalOpen, watch, drawerProps, }: any) => React.JSX.Element;
11
11
  export default Single;
@@ -53,7 +53,8 @@ var Single = ({
53
53
  onAdd,
54
54
  addButtonProps,
55
55
  modalOpen,
56
- watch
56
+ watch,
57
+ drawerProps
57
58
  }) => {
58
59
  var _a, _b;
59
60
  const [HumanBodySelector] = (0, import_useComponents.default)({
@@ -177,7 +178,8 @@ var Single = ({
177
178
  addButtonProps: _addButtonProps,
178
179
  drawerProps: {
179
180
  title: `${import_utils.locales.getText("pisell2.text.select")} ${((_b = form.form) == null ? void 0 : _b.title) || "-"}`,
180
- destroyOnClose: true
181
+ destroyOnClose: true,
182
+ ...drawerProps || {}
181
183
  },
182
184
  optionRender: _optionRender,
183
185
  rowKey: "form_record_id",
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface AddServiceVariantProps {
3
+ globalState: any;
4
+ setGlobalState: any;
5
+ }
6
+ declare const AddServiceVariant: (props: AddServiceVariantProps) => React.JSX.Element;
7
+ export default AddServiceVariant;
@@ -0,0 +1,58 @@
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/booking/info/addServiceVariant/index.tsx
30
+ var addServiceVariant_exports = {};
31
+ __export(addServiceVariant_exports, {
32
+ default: () => addServiceVariant_default
33
+ });
34
+ module.exports = __toCommonJS(addServiceVariant_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_addService = __toESM(require("../service/addService"));
37
+ var AddServiceVariant = (props) => {
38
+ const { globalState, setGlobalState } = props;
39
+ const stateRef = (0, import_react.useRef)(globalState);
40
+ stateRef.current = globalState;
41
+ const dispatch = ({ type, payload }) => {
42
+ if (type === "setService") {
43
+ setGlobalState({
44
+ service: { ...stateRef.current.service, ...payload }
45
+ });
46
+ }
47
+ };
48
+ return /* @__PURE__ */ import_react.default.createElement(
49
+ import_addService.default,
50
+ {
51
+ renderMode: "current",
52
+ dispatch,
53
+ state: globalState,
54
+ drawerProps: { open: true, getContainer: false }
55
+ }
56
+ );
57
+ };
58
+ var addServiceVariant_default = AddServiceVariant;
@@ -309,14 +309,7 @@ var Client = () => {
309
309
  }
310
310
  }
311
311
  );
312
- }, [
313
- state,
314
- renderList,
315
- loading,
316
- franchiseeLoading,
317
- params.search,
318
- loadMore
319
- ]);
312
+ }, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
320
313
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
321
314
  "div",
322
315
  {
@@ -49,6 +49,7 @@ var import_date2 = require("./date");
49
49
  var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
50
50
  var import_notes = __toESM(require("./notes"));
51
51
  var import_index = require("./index.less");
52
+ var import_classnames = __toESM(require("classnames"));
52
53
  var defaultModules = {
53
54
  client: 1,
54
55
  date: 1,
@@ -144,7 +145,9 @@ var Info = (0, import_model.Provider)((props) => {
144
145
  style: {
145
146
  height: ((_h = (_g = context == null ? void 0 : context.appHelper) == null ? void 0 : _g.utils) == null ? void 0 : _h.isMobile) ? "100%" : "100vh"
146
147
  },
147
- bodyClassName: "booking-info-warp"
148
+ bodyClassName: (0, import_classnames.default)("booking-info-warp", {
149
+ ["create-booking-page-info-wrap"]: modal.state.isBookingCreatePage
150
+ })
148
151
  },
149
152
  /* @__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)
150
153
  ) : null);
@@ -15,4 +15,13 @@
15
15
  // height: 42px;
16
16
  // background: #069456;
17
17
  // }
18
+ }
19
+ #create-booking-page-info-wrap {
20
+ .pisell-lowcode__booking-tab-pane-footer {
21
+ padding: 12px 16px !important;
22
+ }
23
+ }
24
+ .create-booking-page-info-wrap {
25
+ position: initial !important;
26
+ padding: 0 16px !important;
18
27
  }
@@ -410,7 +410,8 @@ var Pet = (props) => {
410
410
  state.disableEventBookingEdit,
411
411
  params.search,
412
412
  loadMore,
413
- addButtonProps
413
+ addButtonProps,
414
+ state.isBookingCreatePage
414
415
  ]);
415
416
  };
416
417
  var pet_default = Pet;
@@ -1,6 +1,12 @@
1
1
  import React from 'react';
2
+ import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import './index.less';
3
- declare const Info: ({ onEdit }: {
4
+ interface AddServiceProps {
4
5
  onEdit: any;
5
- }) => React.JSX.Element;
6
+ dispatch?: any;
7
+ state?: any;
8
+ drawerProps?: PisellDrawerProps;
9
+ renderMode?: 'current' | 'drawer';
10
+ }
11
+ declare const Info: (props: AddServiceProps) => React.JSX.Element;
6
12
  export default Info;
@@ -63,13 +63,16 @@ var shopList = [
63
63
  6848,
64
64
  6305
65
65
  ];
66
- var Info = ({ onEdit }) => {
66
+ var Info = (props) => {
67
67
  var _a, _b, _c, _d;
68
+ const { onEdit, drawerProps, renderMode } = props;
68
69
  const [search, setSearch] = (0, import_react.useState)("");
69
- const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
70
+ let { state, dispatch } = (0, import_react.useContext)(import_model.Context);
70
71
  const [loading, setLoading] = (0, import_react.useState)(false);
71
72
  const searchRef = (0, import_react.useRef)();
72
73
  const context = (0, import_useEngineContext.default)();
74
+ state = state || (props == null ? void 0 : props.state);
75
+ dispatch = dispatch || (props == null ? void 0 : props.dispatch);
73
76
  import_utils3.request.setRequest(context.appHelper.utils.request);
74
77
  const setDefaultService = async (list) => {
75
78
  if (state.renderType !== "eventBooking") {
@@ -120,7 +123,7 @@ var Info = ({ onEdit }) => {
120
123
  }
121
124
  });
122
125
  };
123
- const getServices = async () => {
126
+ const getServices = async (params) => {
124
127
  var _a2;
125
128
  setLoading(true);
126
129
  let data = await state.apis.getServices({
@@ -134,8 +137,10 @@ var Info = ({ onEdit }) => {
134
137
  with_count: ["bundleGroup", "optionGroup"],
135
138
  order_by_string: "sort:desc",
136
139
  status: "published",
137
- _config: {
138
- useCache: true
140
+ ...state.isBookingCreatePage ? { schedule_date: params == null ? void 0 : params.schedule_date } : {
141
+ _config: {
142
+ useCache: true
143
+ }
139
144
  }
140
145
  });
141
146
  setLoading(false);
@@ -211,6 +216,9 @@ var Info = ({ onEdit }) => {
211
216
  cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
212
217
  cacheItem.new = 0;
213
218
  }
219
+ if (renderMode === "current") {
220
+ cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
221
+ }
214
222
  cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
215
223
  if (state.renderType === "eventBooking") {
216
224
  cacheItem.autoClose = false;
@@ -268,12 +276,24 @@ var Info = ({ onEdit }) => {
268
276
  setSearch("");
269
277
  }
270
278
  }, [state.service.addModal]);
279
+ const currentDate = (0, import_react.useMemo)(() => {
280
+ return state.date.value.format("YYYY-MM-DD");
281
+ }, [state.date.value]);
282
+ console.log(currentDate, "currentDate");
283
+ (0, import_react.useEffect)(() => {
284
+ if (renderMode === "current") {
285
+ getServices({ schedule_date: currentDate });
286
+ }
287
+ }, [renderMode, currentDate]);
271
288
  (0, import_react.useEffect)(() => {
272
289
  if (state.renderType === "eventBooking" && state.modalOpen) {
273
290
  getServices();
274
291
  }
275
292
  }, [state.renderType, state.modalOpen]);
276
293
  const addButton = (0, import_react.useMemo)(() => {
294
+ if (state.isBookingCreatePage) {
295
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
296
+ }
277
297
  if (state.renderType === "eventBooking") {
278
298
  return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
279
299
  import_addButton.default,
@@ -302,12 +322,49 @@ var Info = ({ onEdit }) => {
302
322
  state.service.value,
303
323
  loading
304
324
  ]);
325
+ const isRenderCurrent = (0, import_react.useMemo)(() => {
326
+ return renderMode === "current";
327
+ }, [renderMode]);
305
328
  return (0, import_react.useMemo)(() => {
306
329
  var _a2, _b2;
330
+ const header = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
331
+ import_antd.Input,
332
+ {
333
+ ref: searchRef,
334
+ prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
335
+ style: { marginTop: 16, height: 44 },
336
+ placeholder: import_utils4.locales.getText("pisell2.text.search"),
337
+ allowClear: true,
338
+ value: search,
339
+ onChange: (e) => {
340
+ setSearch(e.target.value);
341
+ }
342
+ }
343
+ ));
344
+ const content = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
345
+ import_TabProduct.default,
346
+ {
347
+ list: renderList,
348
+ amountSymbol: state.amountSymbol,
349
+ onChange: handleSelectProduct,
350
+ scrollDom: isRenderCurrent ? ".pisell-lowcode__booking-vertical-add-service-wrap" : ".booking-server-wrap .pisell-lowcode-drawer-body "
351
+ }
352
+ ));
353
+ if (renderMode === "current") {
354
+ return /* @__PURE__ */ import_react.default.createElement(
355
+ "div",
356
+ {
357
+ className: "pisell-lowcode__booking-vertical-add-service-wrap",
358
+ style: { width: "100%", height: "100%", overflow: "auto" }
359
+ },
360
+ header,
361
+ content
362
+ );
363
+ }
307
364
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
308
365
  import_drawer.default,
309
366
  {
310
- open: state.service.addModal,
367
+ open: state.service.addModal && !state.isBookingCreatePage,
311
368
  title: import_utils4.locales.getText("pisell2.text.select-service"),
312
369
  rootClassName: "booking-server-wrap",
313
370
  onClose: () => {
@@ -319,30 +376,10 @@ var Info = ({ onEdit }) => {
319
376
  }
320
377
  });
321
378
  },
322
- header: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
323
- import_antd.Input,
324
- {
325
- ref: searchRef,
326
- prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
327
- style: { marginTop: 16, height: 44 },
328
- placeholder: import_utils4.locales.getText("pisell2.text.search"),
329
- allowClear: true,
330
- value: search,
331
- onChange: (e) => {
332
- setSearch(e.target.value);
333
- }
334
- }
335
- ))
379
+ header,
380
+ ...drawerProps || {}
336
381
  },
337
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
338
- import_TabProduct.default,
339
- {
340
- list: renderList,
341
- amountSymbol: state.amountSymbol,
342
- onChange: handleSelectProduct,
343
- scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
344
- }
345
- ))
382
+ content
346
383
  ));
347
384
  }, [
348
385
  (_d = (_c = state.service) == null ? void 0 : _c.cacheItem) == null ? void 0 : _d.autoClose,
@@ -3,7 +3,33 @@
3
3
  // border-bottom: 1px solid var(--gray-300, #D0D5DD);
4
4
  }
5
5
 
6
-
7
6
  .pisell-lowcode__booking-service-body {
8
7
  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
+ }
9
35
  }
@@ -117,7 +117,7 @@ var Info = (_, ref) => {
117
117
  } catch (err) {
118
118
  }
119
119
  }, [useDuration, flexibleOption]);
120
- const getResources = async (cacheItem) => {
120
+ const getResources = async (cacheItem, open) => {
121
121
  console.log("getResources2");
122
122
  try {
123
123
  let _list = state.service.resourcesOrigin || [];
@@ -142,7 +142,7 @@ var Info = (_, ref) => {
142
142
  }, 200);
143
143
  } else {
144
144
  setTimeout(() => {
145
- if (selectOpen === void 0) {
145
+ if (selectOpen === void 0 || open) {
146
146
  setSelectOpen(true);
147
147
  }
148
148
  }, 500);
@@ -265,12 +265,12 @@ var Info = (_, ref) => {
265
265
  }
266
266
  });
267
267
  });
268
- const setEditData = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
268
+ const setEditData = (0, import_ahooks.useMemoizedFn)((_cacheItem, open) => {
269
269
  let cacheItem = _cacheItem || state.service.cacheItem;
270
270
  let values = cacheItem._extend;
271
271
  form.setFieldsValue(values);
272
272
  if (state.renderType !== "eventBooking") {
273
- getResources(_cacheItem);
273
+ getResources(cacheItem, open);
274
274
  }
275
275
  });
276
276
  const isReason = (0, import_react.useMemo)(() => {
@@ -297,7 +297,10 @@ var Info = (_, ref) => {
297
297
  (_f = state.service.cacheItem) == null ? void 0 : _f.autoClose
298
298
  ]);
299
299
  (0, import_react.useEffect)(() => {
300
- }, [state.service.editModal]);
300
+ if (state.isBookingCreatePage && state.service.editModal) {
301
+ setEditData(null, true);
302
+ }
303
+ }, [state.service.editModal, state.isBookingCreatePage]);
301
304
  (0, import_react.useEffect)(() => {
302
305
  getErrorMsg();
303
306
  }, [useResource, useStartTime, useDuration]);
@@ -433,7 +436,7 @@ var Info = (_, ref) => {
433
436
  });
434
437
  }
435
438
  },
436
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_d2 = (_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend) == null ? void 0 : _d2.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
439
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_d2 = (_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend) == null ? void 0 : _d2.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
437
440
  import_collapsibleList.default,
438
441
  {
439
442
  style: { marginTop: bundles.length ? "8px" : 0 },
@@ -194,6 +194,22 @@ declare const _default: {
194
194
  'page.booking.text.please-choose-an-option': string;
195
195
  'page.booking.text.please-choose-an-option-1': string;
196
196
  'page.booking.text.please-choose-an-option-2': string;
197
+ 'pisell2.booking.dashboard.groups-on-site-now': string;
198
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': string;
199
+ 'pisell2.booking.dashboard.people-on-site-now': string;
200
+ 'pisell2.booking.dashboard.people-on-site-now-tip': string;
201
+ 'pisell2.booking.dashboard.total-visitors-today': string;
202
+ 'pisell2.booking.dashboard.total-visitors-today-tip': string;
203
+ 'pisell2.booking.dashboard.ongoing-visitors': string;
204
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': string;
205
+ 'pisell2.booking.dashboard.upcoming-visitors': string;
206
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': string;
207
+ 'pisell2.booking.dashboard.overdue-visitors': string;
208
+ 'pisell2.booking.dashboard.overdue-visitors-tip': string;
209
+ 'pisell2.booking.dashboard.completed-visitors': string;
210
+ 'pisell2.booking.dashboard.completed-visitors-tip': string;
211
+ 'pisell2.booking.dashboard.departed-visitors': string;
212
+ 'pisell2.booking.dashboard.departed-visitors-tip': string;
197
213
  };
198
214
  'zh-CN': {
199
215
  'pisell2.text.refunded-amount': string;
@@ -390,6 +406,22 @@ declare const _default: {
390
406
  'page.booking.text.please-choose-an-option': string;
391
407
  'page.booking.text.please-choose-an-option-1': string;
392
408
  'page.booking.text.please-choose-an-option-2': string;
409
+ 'pisell2.booking.dashboard.groups-on-site-now': string;
410
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': string;
411
+ 'pisell2.booking.dashboard.people-on-site-now': string;
412
+ 'pisell2.booking.dashboard.people-on-site-now-tip': string;
413
+ 'pisell2.booking.dashboard.total-visitors-today': string;
414
+ 'pisell2.booking.dashboard.total-visitors-today-tip': string;
415
+ 'pisell2.booking.dashboard.ongoing-visitors': string;
416
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': string;
417
+ 'pisell2.booking.dashboard.upcoming-visitors': string;
418
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': string;
419
+ 'pisell2.booking.dashboard.overdue-visitors': string;
420
+ 'pisell2.booking.dashboard.overdue-visitors-tip': string;
421
+ 'pisell2.booking.dashboard.completed-visitors': string;
422
+ 'pisell2.booking.dashboard.completed-visitors-tip': string;
423
+ 'pisell2.booking.dashboard.departed-visitors': string;
424
+ 'pisell2.booking.dashboard.departed-visitors-tip': string;
393
425
  };
394
426
  'zh-HK': {
395
427
  'pisell2.text.refunded-amount': string;
@@ -586,6 +618,22 @@ declare const _default: {
586
618
  'page.booking.text.please-choose-an-option': string;
587
619
  'page.booking.text.please-choose-an-option-1': string;
588
620
  'page.booking.text.please-choose-an-option-2': string;
621
+ 'pisell2.booking.dashboard.groups-on-site-now': string;
622
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': string;
623
+ 'pisell2.booking.dashboard.people-on-site-now': string;
624
+ 'pisell2.booking.dashboard.people-on-site-now-tip': string;
625
+ 'pisell2.booking.dashboard.total-visitors-today': string;
626
+ 'pisell2.booking.dashboard.total-visitors-today-tip': string;
627
+ 'pisell2.booking.dashboard.ongoing-visitors': string;
628
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': string;
629
+ 'pisell2.booking.dashboard.upcoming-visitors': string;
630
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': string;
631
+ 'pisell2.booking.dashboard.overdue-visitors': string;
632
+ 'pisell2.booking.dashboard.overdue-visitors-tip': string;
633
+ 'pisell2.booking.dashboard.completed-visitors': string;
634
+ 'pisell2.booking.dashboard.completed-visitors-tip': string;
635
+ 'pisell2.booking.dashboard.departed-visitors': string;
636
+ 'pisell2.booking.dashboard.departed-visitors-tip': string;
589
637
  };
590
638
  };
591
639
  export default _default;
@@ -249,7 +249,23 @@ var locales_default = {
249
249
  "page.booking.text.paid.msg": (x) => `The related order is ${x === "paid" ? "paid" : "partially paid"}.`,
250
250
  "page.booking.text.please-choose-an-option": "Please choose an option:",
251
251
  "page.booking.text.please-choose-an-option-1": "Refund: Cancel the appointment and process a refund.",
252
- "page.booking.text.please-choose-an-option-2": "Cancel only: Cancel the appointment without processing a refund. (You can still process a refund after cancellation if needed)"
252
+ "page.booking.text.please-choose-an-option-2": "Cancel only: Cancel the appointment without processing a refund. (You can still process a refund after cancellation if needed)",
253
+ "pisell2.booking.dashboard.groups-on-site-now": "Groups on-site now",
254
+ "pisell2.booking.dashboard.groups-on-site-now-tip": "Tip: Total number of groups who have checked in and are currently on-site",
255
+ "pisell2.booking.dashboard.people-on-site-now": "People on-site now",
256
+ "pisell2.booking.dashboard.people-on-site-now-tip": "Tip: Total number of people who have checked in and are currently on-site",
257
+ "pisell2.booking.dashboard.total-visitors-today": "Total visitors today",
258
+ "pisell2.booking.dashboard.total-visitors-today-tip": "Tip: Total number of visitors today, regardless of check-in status",
259
+ "pisell2.booking.dashboard.ongoing-visitors": "Ongoing visitors",
260
+ "pisell2.booking.dashboard.ongoing-visitors-tip": "Tip: Total number of visitors who have passed the start time, regardless of check-in status",
261
+ "pisell2.booking.dashboard.upcoming-visitors": "Upcoming visitors",
262
+ "pisell2.booking.dashboard.upcoming-visitors-tip": "Tip: Total number of visitors expected to arrive in the near future",
263
+ "pisell2.booking.dashboard.overdue-visitors": "Overdue visitors",
264
+ "pisell2.booking.dashboard.overdue-visitors-tip": "Tip: Total number of visitors whose playtime has expired but have not yet left the venue",
265
+ "pisell2.booking.dashboard.completed-visitors": "Completed visitors",
266
+ "pisell2.booking.dashboard.completed-visitors-tip": "Tip: Total number of visitors whose playtime has ended, regardless of whether they have left the venue",
267
+ "pisell2.booking.dashboard.departed-visitors": "Departed visitors",
268
+ "pisell2.booking.dashboard.departed-visitors-tip": "Tip: Total number of visitors who checked in and have left the venue today"
253
269
  },
254
270
  "zh-CN": {
255
271
  "pisell2.text.refunded-amount": "已退金额",
@@ -471,7 +487,23 @@ var locales_default = {
471
487
  "page.booking.text.paid.msg": (x) => `关联订单${x === "paid" ? "已付款" : "部分付款"}。`,
472
488
  "page.booking.text.please-choose-an-option": "请选择:",
473
489
  "page.booking.text.please-choose-an-option-1": "退款:取消预约,同时处理退款。",
474
- "page.booking.text.please-choose-an-option-2": "仅取消:仅取消预约,但不进行退款处理。(您仍然可以在取消后再进行退款操作)"
490
+ "page.booking.text.please-choose-an-option-2": "仅取消:仅取消预约,但不进行退款处理。(您仍然可以在取消后再进行退款操作)",
491
+ "pisell2.booking.dashboard.groups-on-site-now": "当前在场团体",
492
+ "pisell2.booking.dashboard.groups-on-site-now-tip": "提示:已检票并在场内的团体总数",
493
+ "pisell2.booking.dashboard.people-on-site-now": "当前在场人数",
494
+ "pisell2.booking.dashboard.people-on-site-now-tip": "提示:已检票并在场内的总人数",
495
+ "pisell2.booking.dashboard.total-visitors-today": "今日游客总数",
496
+ "pisell2.booking.dashboard.total-visitors-today-tip": "提示:今日的游客总人数,无论是否检票入场",
497
+ "pisell2.booking.dashboard.ongoing-visitors": "进行中的游客",
498
+ "pisell2.booking.dashboard.ongoing-visitors-tip": "提示:已过开始时间的游客总数,无论是否检票",
499
+ "pisell2.booking.dashboard.upcoming-visitors": "即将到达的游客",
500
+ "pisell2.booking.dashboard.upcoming-visitors-tip": "提示:预计将在未来到场的游客总人数",
501
+ "pisell2.booking.dashboard.overdue-visitors": "超时的游客",
502
+ "pisell2.booking.dashboard.overdue-visitors-tip": "提示:游玩时间已过,但尚未离场的游客总人数",
503
+ "pisell2.booking.dashboard.completed-visitors": "已完成的游客",
504
+ "pisell2.booking.dashboard.completed-visitors-tip": "提示:游玩时长已结束的游客总人数,无论是否离场",
505
+ "pisell2.booking.dashboard.departed-visitors": "已离场的游客",
506
+ "pisell2.booking.dashboard.departed-visitors-tip": "提示:今日已检票并离场的游客总人数"
475
507
  },
476
508
  "zh-HK": {
477
509
  "pisell2.text.refunded-amount": "已退金額",
@@ -693,6 +725,22 @@ var locales_default = {
693
725
  "page.booking.text.paid.msg": (x) => `關聯訂單${x === "paid" ? "已付款" : "部分付款"}。`,
694
726
  "page.booking.text.please-choose-an-option": "請選擇:",
695
727
  "page.booking.text.please-choose-an-option-1": "退款:取消預約,同時處理退款。",
696
- "page.booking.text.please-choose-an-option-2": "僅取消:僅取消預約,但不進行退款處理。(您仍然可以在取消後再進行退款操作)"
728
+ "page.booking.text.please-choose-an-option-2": "僅取消:僅取消預約,但不進行退款處理。(您仍然可以在取消後再進行退款操作)",
729
+ "pisell2.booking.dashboard.groups-on-site-now": "當前在場團體",
730
+ "pisell2.booking.dashboard.groups-on-site-now-tip": "提示:已檢票並在場內的團體總數",
731
+ "pisell2.booking.dashboard.people-on-site-now": "當前在場人數",
732
+ "pisell2.booking.dashboard.people-on-site-now-tip": "提示:已檢票並在場內的總人數",
733
+ "pisell2.booking.dashboard.total-visitors-today": "今日遊客總數",
734
+ "pisell2.booking.dashboard.total-visitors-today-tip": "提示:今日的遊客總人數,無論是否檢票入場",
735
+ "pisell2.booking.dashboard.ongoing-visitors": "進行中的遊客",
736
+ "pisell2.booking.dashboard.ongoing-visitors-tip": "提示:已過開始時間的遊客總數,無論是否檢票",
737
+ "pisell2.booking.dashboard.upcoming-visitors": "即將到達的遊客",
738
+ "pisell2.booking.dashboard.upcoming-visitors-tip": "提示:預計將在未來到場的遊客總人數",
739
+ "pisell2.booking.dashboard.overdue-visitors": "超時的遊客",
740
+ "pisell2.booking.dashboard.overdue-visitors-tip": "提示:遊玩時間已過,但尚未離場的遊客總人數",
741
+ "pisell2.booking.dashboard.completed-visitors": "已完成的遊客",
742
+ "pisell2.booking.dashboard.completed-visitors-tip": "提示:遊玩時長已結束的遊客總人數,無論是否離場",
743
+ "pisell2.booking.dashboard.departed-visitors": "已離場的遊客",
744
+ "pisell2.booking.dashboard.departed-visitors-tip": "提示:今日已檢票並離場的遊客總人數"
697
745
  }
698
746
  };