@pisell/private-materials 3.0.42 → 3.0.44

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 (43) 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 +3 -3
  7. package/build/lowcode/render/default/view.js +6 -6
  8. package/build/lowcode/view.js +4 -4
  9. package/es/components/booking/addons/index.js +9 -1
  10. package/es/components/booking/components/TabProduct/productItem/index.js +11 -3
  11. package/es/components/booking/components/customSelect/index.d.ts +1 -0
  12. package/es/components/booking/components/customSelect/index.js +12 -3
  13. package/es/components/booking/forms/index.js +19 -12
  14. package/es/components/booking/info/client/index.js +3 -0
  15. package/es/components/booking/info/index.js +13 -5
  16. package/es/components/booking/info/notes/index.d.ts +1 -1
  17. package/es/components/booking/info/notes/index.js +5 -4
  18. package/es/components/booking/info/pet/index.js +16 -34
  19. package/es/components/booking/info/service/addService/index.js +89 -21
  20. package/es/components/booking/info/service/editService/index.js +28 -18
  21. package/es/components/booking/locales.d.ts +3 -0
  22. package/es/components/booking/locales.js +9 -6
  23. package/es/components/booking/model.d.ts +4 -2
  24. package/es/components/booking/notes/index.js +10 -8
  25. package/es/components/booking/utils.js +3 -3
  26. package/lib/components/booking/addons/index.js +8 -0
  27. package/lib/components/booking/components/TabProduct/productItem/index.js +7 -1
  28. package/lib/components/booking/components/customSelect/index.d.ts +1 -0
  29. package/lib/components/booking/components/customSelect/index.js +11 -2
  30. package/lib/components/booking/forms/index.js +10 -4
  31. package/lib/components/booking/info/client/index.js +3 -0
  32. package/lib/components/booking/info/index.js +4 -2
  33. package/lib/components/booking/info/notes/index.d.ts +1 -1
  34. package/lib/components/booking/info/notes/index.js +2 -1
  35. package/lib/components/booking/info/pet/index.js +10 -9
  36. package/lib/components/booking/info/service/addService/index.js +35 -9
  37. package/lib/components/booking/info/service/editService/index.js +20 -8
  38. package/lib/components/booking/locales.d.ts +3 -0
  39. package/lib/components/booking/locales.js +9 -6
  40. package/lib/components/booking/model.d.ts +4 -2
  41. package/lib/components/booking/notes/index.js +3 -2
  42. package/lib/components/booking/utils.js +3 -3
  43. package/package.json +3 -3
@@ -42,6 +42,7 @@ var import_customSelect = __toESM(require("../../components/customSelect"));
42
42
  var import_index = require("./index.less");
43
43
  var import_utils = require("@pisell/utils");
44
44
  var import_utils2 = require("../../utils");
45
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
45
46
  var Info = () => {
46
47
  var _a, _b, _c, _d, _e, _f;
47
48
  const modalRef = (0, import_react.useRef)();
@@ -54,6 +55,7 @@ var Info = () => {
54
55
  total: 0,
55
56
  search: ""
56
57
  });
58
+ const context = (0, import_useEngineContext.default)();
57
59
  const menus = (0, import_react.useMemo)(() => {
58
60
  let list = [
59
61
  { key: "view", label: import_utils.locales.getText("pisell2.text.view-profile") },
@@ -267,6 +269,7 @@ var Info = () => {
267
269
  ), /* @__PURE__ */ import_react.default.createElement(
268
270
  import_customSelect.default,
269
271
  {
272
+ autoFocus: !state.isTerminal,
270
273
  modalOpen: state.modalOpen,
271
274
  ref: modalRef,
272
275
  rowKey: "id",
@@ -82,11 +82,13 @@ var Info = (0, import_model.Provider)((props) => {
82
82
  }
83
83
  }, []);
84
84
  (0, import_react.useEffect)(() => {
85
+ var _a2, _b2, _c2;
85
86
  modal.dispatch({
86
87
  type: "setState",
87
88
  payload: {
88
89
  setGlobalState: props.setGlobalState,
89
- ...globalState
90
+ ...globalState,
91
+ isTerminal: (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.isTerminal) == null ? void 0 : _c2.call(_b2)
90
92
  }
91
93
  });
92
94
  }, [globalState]);
@@ -103,7 +105,7 @@ var Info = (0, import_model.Provider)((props) => {
103
105
  if ((globalState == null ? void 0 : globalState.renderType) === "eventBooking") {
104
106
  return import_utils.locales.getText("pisell2.text.enroll");
105
107
  }
106
- return (globalState == null ? void 0 : globalState.bookingId) ? /* @__PURE__ */ import_react.default.createElement(import_header.default, { state: modal.state, dispatch: modal.dispatch }) : import_utils.locales.getText("pisell2.text.new-appointment");
108
+ return (globalState == null ? void 0 : globalState.bookingId) ? /* @__PURE__ */ import_react.default.createElement(import_header.default, { state: modal.state, dispatch: modal.dispatch }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { height: 20 } });
107
109
  }, [
108
110
  globalState == null ? void 0 : globalState.bookingId,
109
111
  modal.state,
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  declare const Notes: () => React.JSX.Element;
3
3
  export default Notes;
@@ -52,7 +52,7 @@ var Notes = () => {
52
52
  ];
53
53
  }, [(_b = (_a = modal.state) == null ? void 0 : _a.notes) == null ? void 0 : _b.orderNote]);
54
54
  const noteChange = ({ note, status, noteType }) => {
55
- var _a2;
55
+ var _a2, _b2, _c2;
56
56
  if (noteType === "internal") {
57
57
  let _list = [...(_a2 = modal.state) == null ? void 0 : _a2.notes.internalNotes];
58
58
  if (status == "add") {
@@ -75,6 +75,7 @@ var Notes = () => {
75
75
  internalNotes: _list
76
76
  }
77
77
  });
78
+ (_c2 = (_b2 = modal.state) == null ? void 0 : _b2.refreshData) == null ? void 0 : _c2.call(_b2, {});
78
79
  return;
79
80
  }
80
81
  if (noteType === "order") {
@@ -41,15 +41,18 @@ var import_utils = require("@pisell/utils");
41
41
  var import_forms = __toESM(require("../../forms/forms"));
42
42
  var import_format = require("../../forms/format");
43
43
  var import_utils2 = require("../../utils");
44
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
44
45
  var Pet = () => {
45
- var _a, _b, _c, _d, _e, _f, _g;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h;
46
47
  const [loading, setLoading] = (0, import_react.useState)(false);
47
48
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
48
49
  const [valueLoading, setValueLoading] = (0, import_react.useState)(false);
50
+ const context = (0, import_useEngineContext.default)();
51
+ const { isTerminal } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
49
52
  const params = (0, import_react.useMemo)(() => {
50
53
  var _a2, _b2, _c2;
51
54
  return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
52
- }, [(_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject]);
55
+ }, [(_d = (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject]);
53
56
  const petForm = (0, import_react.useMemo)(() => {
54
57
  return (state.pet.formData || [])[0];
55
58
  }, [state.pet.formData]);
@@ -76,10 +79,7 @@ var Pet = () => {
76
79
  formData: [
77
80
  {
78
81
  ...formData,
79
- // ...formData.form,
80
- // form_id: formData.form.id,
81
82
  options: _list
82
- // type: formData.type,
83
83
  }
84
84
  ],
85
85
  pets: _list
@@ -204,7 +204,7 @@ var Pet = () => {
204
204
  type: "setPet",
205
205
  payload: { value: changeFormValuesData }
206
206
  });
207
- }, [(_d = state.client.value) == null ? void 0 : _d.id]);
207
+ }, [(_e = state.client.value) == null ? void 0 : _e.id]);
208
208
  (0, import_react.useEffect)(() => {
209
209
  if (state.bookingId) {
210
210
  if (!state.bookingDetail) {
@@ -219,7 +219,7 @@ var Pet = () => {
219
219
  state.bookingDetail,
220
220
  params.form_id,
221
221
  params.type,
222
- (_f = (_e = state.client) == null ? void 0 : _e.value) == null ? void 0 : _f.id
222
+ (_g = (_f = state.client) == null ? void 0 : _f.value) == null ? void 0 : _g.id
223
223
  ]);
224
224
  const addCallback = () => {
225
225
  var _a2, _b2;
@@ -242,12 +242,13 @@ var Pet = () => {
242
242
  modalOpen: state.modalOpen,
243
243
  value: state.pet.value,
244
244
  onChange: onValueChange,
245
- client: (_g = state.client) == null ? void 0 : _g.value,
245
+ client: (_h = state.client) == null ? void 0 : _h.value,
246
246
  customSelectProps: {
247
247
  loading,
248
248
  handleViewItem,
249
249
  virtualListHeight: window.innerHeight - 213 - 57 - 16,
250
- disabled: state.disabledEdit
250
+ disabled: state.disabledEdit,
251
+ autoFocus: !state.isTerminal
251
252
  },
252
253
  optionRender: (item) => {
253
254
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -45,11 +45,19 @@ var import_serve = require("../serve");
45
45
  var import_utils = require("../../utils");
46
46
  var import_utils2 = require("../../../utils");
47
47
  var import_utils3 = require("@pisell/utils");
48
+ var shopList = [2886, 4422, 5538];
49
+ var getCacheResourceId = () => {
50
+ const serviceParams = (0, import_utils2.getCacheParams)();
51
+ let resId = Number(serviceParams == null ? void 0 : serviceParams.resource_id);
52
+ console.log("resIdresIdresId", resId);
53
+ return resId;
54
+ };
48
55
  var Info = () => {
49
- var _a;
56
+ var _a, _b, _c;
50
57
  const [search, setSearch] = (0, import_react.useState)("");
51
58
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
52
59
  const [loading, setLoading] = (0, import_react.useState)(false);
60
+ const searchRef = (0, import_react.useRef)();
53
61
  const context = (0, import_useEngineContext.default)();
54
62
  import_utils2.request.setRequest(context.appHelper.utils.request);
55
63
  const setDefaultService = async (list) => {
@@ -101,6 +109,11 @@ var Info = () => {
101
109
  }
102
110
  });
103
111
  };
112
+ const autoAddProduct = async (cacheItem) => {
113
+ let resId = getCacheResourceId();
114
+ let _cacheItem = { ...cacheItem };
115
+ (0, import_utils2.deleteCacheParams)();
116
+ };
104
117
  const getServices = async () => {
105
118
  var _a2;
106
119
  setLoading(true);
@@ -109,10 +122,6 @@ var Info = () => {
109
122
  num: 500,
110
123
  extension_type: state.renderType === "eventBooking" ? void 0 : ["product_appointment", "appointment_ticket"],
111
124
  with: ["category"],
112
- // include_formula: "no",
113
- // include_bundle: "no",
114
- // include_option: "no",
115
- // include_variant: "no",
116
125
  ids: state.renderType === "eventBooking" ? (_a2 = state.eventOtherParams) == null ? void 0 : _a2.productIds : void 0,
117
126
  open_quotation: 1,
118
127
  with_schedule: 1,
@@ -139,6 +148,12 @@ var Info = () => {
139
148
  addModal: true
140
149
  }
141
150
  });
151
+ if (!state.isTerminal) {
152
+ setTimeout(() => {
153
+ var _a2, _b2;
154
+ (_b2 = (_a2 = searchRef.current) == null ? void 0 : _a2.focus) == null ? void 0 : _b2.call(_a2);
155
+ }, 100);
156
+ }
142
157
  };
143
158
  const handleSelectProduct = (item, type) => {
144
159
  const isEject = type === "detail" || item.bundle_group_count > 0;
@@ -180,11 +195,14 @@ var Info = () => {
180
195
  cacheItem.new = 0;
181
196
  }
182
197
  console.log("_total", cacheItem);
198
+ let resId = getCacheResourceId();
199
+ cacheItem.autoClose = !!resId;
183
200
  dispatch({
184
201
  type: "setService",
185
202
  payload: {
186
203
  editModal: true,
187
- cacheItem
204
+ cacheItem,
205
+ addModal: !cacheItem.autoClose
188
206
  }
189
207
  });
190
208
  }
@@ -205,9 +223,16 @@ var Info = () => {
205
223
  return state.service.value.length > 0;
206
224
  }, [state.service.value]);
207
225
  (0, import_react.useEffect)(() => {
208
- if (state.modalOpen) {
226
+ var _a2, _b2, _c2, _d, _e;
227
+ if (shopList.includes(
228
+ (_e = (_d = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d.globalConfig) == null ? void 0 : _e.id
229
+ )) {
230
+ return;
231
+ }
232
+ if (state.modalOpen && !state.bookingId) {
233
+ handleSelectService();
209
234
  }
210
- }, [state.modalOpen]);
235
+ }, [state.modalOpen, state.bookingId]);
211
236
  const showAddButton = (0, import_react.useMemo)(() => {
212
237
  return !state.disabledEdit && !state.channelDisabledEdit;
213
238
  }, [state.disabledEdit, state.channelDisabledEdit]);
@@ -240,7 +265,7 @@ var Info = () => {
240
265
  state.service.value,
241
266
  loading
242
267
  ]);
243
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, addButton, /* @__PURE__ */ import_react.default.createElement(
268
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = (_b = state.service) == null ? void 0 : _b.cacheItem) == null ? void 0 : _c.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
244
269
  import_drawer.default,
245
270
  {
246
271
  open: state.service.addModal,
@@ -257,6 +282,7 @@ var Info = () => {
257
282
  header: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
258
283
  import_antd.Input,
259
284
  {
285
+ ref: searchRef,
260
286
  prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
261
287
  style: { marginTop: 16, height: 44 },
262
288
  placeholder: import_utils3.locales.getText("pisell2.text.search"),
@@ -49,7 +49,7 @@ var import_utils3 = require("../../../utils");
49
49
  var import_like = __toESM(require("../like"));
50
50
  var import_mock = require("../../../mock");
51
51
  var Info = () => {
52
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
52
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
53
53
  const [form] = import_antd.Form.useForm();
54
54
  const useTotal = import_antd.Form.useWatch("total", form);
55
55
  const useLikeStatus = import_antd.Form.useWatch("like_status", form);
@@ -187,7 +187,7 @@ var Info = () => {
187
187
  }
188
188
  } else {
189
189
  let _useResource = 0;
190
- if (_list.length === 2) {
190
+ if (_list.length === 2 && useResource !== 0) {
191
191
  _useResource = _list[1].form_record_id;
192
192
  }
193
193
  form.setFieldsValue({
@@ -200,6 +200,12 @@ var Info = () => {
200
200
  resources: _list
201
201
  }
202
202
  });
203
+ setTimeout(() => {
204
+ var _a2;
205
+ if (((_a2 = state.service.cacheItem) == null ? void 0 : _a2.autoClose) || _list.length === 1 && useResource === 0) {
206
+ form.submit();
207
+ }
208
+ }, 200);
203
209
  } catch (err) {
204
210
  }
205
211
  setResourceLoading(false);
@@ -269,7 +275,11 @@ var Info = () => {
269
275
  const onFinish = (values) => {
270
276
  var _a2;
271
277
  let _list = [...state.service.value];
272
- let _item = { ...state.service.cacheItem, errorList };
278
+ let _item = {
279
+ ...state.service.cacheItem,
280
+ autoClose: false,
281
+ errorList
282
+ };
273
283
  let _extend = {
274
284
  ..._item._extend,
275
285
  ...values
@@ -306,7 +316,8 @@ var Info = () => {
306
316
  const setEditData = (0, import_ahooks.useMemoizedFn)(() => {
307
317
  if (state.service.editModal) {
308
318
  let cacheItem = state.service.cacheItem;
309
- form.setFieldsValue((0, import_utils3.getServerItemExtend)(state, cacheItem, timeObj));
319
+ let values = (0, import_utils3.getServerItemExtend)(state, cacheItem, timeObj);
320
+ form.setFieldsValue(values);
310
321
  if (state.renderType !== "eventBooking") {
311
322
  getResources();
312
323
  }
@@ -357,7 +368,8 @@ var Info = () => {
357
368
  import_drawer.default,
358
369
  {
359
370
  zIndex: 1e3,
360
- open: state.service.editModal,
371
+ forceRender: true,
372
+ open: state.service.editModal && !((_j = state.service.cacheItem) == null ? void 0 : _j.autoClose),
361
373
  title: import_utils.locales.getText("pisell2.text.edit-service"),
362
374
  onClose: () => {
363
375
  dispatch({
@@ -386,7 +398,7 @@ var Info = () => {
386
398
  });
387
399
  }
388
400
  },
389
- /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_l = (_k = (_j = state.service) == null ? void 0 : _j.cacheItem) == null ? void 0 : _k._extend) == null ? void 0 : _l.product_name) || "-"),
401
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.product_name) || "-"),
390
402
  /* @__PURE__ */ import_react.default.createElement(
391
403
  import_collapsibleList.default,
392
404
  {
@@ -411,8 +423,8 @@ var Info = () => {
411
423
  precision: 2,
412
424
  style: { width: "100%" },
413
425
  min: 0,
414
- max: ((_n = (_m = state.service.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.origin_total) || 0,
415
- placeholder: ((_p = (_o = state.service.cacheItem) == null ? void 0 : _o._extend) == null ? void 0 : _p.origin_total) || "0"
426
+ max: ((_o = (_n = state.service.cacheItem) == null ? void 0 : _n._extend) == null ? void 0 : _o.origin_total) || 0,
427
+ placeholder: ((_q = (_p = state.service.cacheItem) == null ? void 0 : _p._extend) == null ? void 0 : _q.origin_total) || "0"
416
428
  }
417
429
  )
418
430
  )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
@@ -141,6 +141,7 @@ declare const _default: {
141
141
  'pisell2.text.deposit-delete-message-title': string;
142
142
  'pisell2.text.deposit-delete-message': string;
143
143
  'pisell2.text.deposit-paid': string;
144
+ "pisell2.text.stock": string;
144
145
  };
145
146
  'zh-CN': {
146
147
  'pisell2.text.refunded-amount': string;
@@ -284,6 +285,7 @@ declare const _default: {
284
285
  'pisell2.text.deposit-delete-message-title': string;
285
286
  'pisell2.text.deposit-delete-message': string;
286
287
  'pisell2.text.deposit-paid': string;
288
+ "pisell2.text.stock": string;
287
289
  };
288
290
  'zh-HK': {
289
291
  'pisell2.text.refunded-amount': string;
@@ -427,6 +429,7 @@ declare const _default: {
427
429
  'pisell2.text.deposit-delete-message-title': string;
428
430
  'pisell2.text.deposit-delete-message': string;
429
431
  'pisell2.text.deposit-paid': string;
432
+ "pisell2.text.stock": string;
430
433
  };
431
434
  };
432
435
  export default _default;
@@ -25,7 +25,7 @@ module.exports = __toCommonJS(locales_exports);
25
25
  var locales_default = {
26
26
  "en": {
27
27
  "pisell2.text.select-addons": "Select addons",
28
- "pisell2.text.addons": "Addons",
28
+ "pisell2.text.addons": "Sales",
29
29
  "pisell2.text.search": "Search",
30
30
  "pisell2.text.view": "View",
31
31
  "pisell2.text.edit": "Edit",
@@ -173,7 +173,8 @@ var locales_default = {
173
173
  "pisell2.text.deposit-delete": "Delete deposit",
174
174
  "pisell2.text.deposit-delete-message-title": "Prompt",
175
175
  "pisell2.text.deposit-delete-message": "It cannot be restored after deletion. Please confirm the operation.",
176
- "pisell2.text.deposit-paid": "Deposit paid"
176
+ "pisell2.text.deposit-paid": "Deposit paid",
177
+ "pisell2.text.stock": "Stock"
177
178
  },
178
179
  "zh-CN": {
179
180
  "pisell2.text.refunded-amount": "已退金额",
@@ -181,7 +182,7 @@ var locales_default = {
181
182
  "pisell2.text.amount-paid-on-order": "订单已付金额",
182
183
  "pisell2.text.please-select-the-customer-first": "请先选择客户",
183
184
  "pisell2.text.change": "更改",
184
- "pisell2.text.addons": "附加商品",
185
+ "pisell2.text.addons": "销售",
185
186
  "pisell2.text.select-addons": "选择附加商品",
186
187
  "pisell2.text.search": "搜索",
187
188
  "pisell2.text.view": "查看",
@@ -330,7 +331,8 @@ var locales_default = {
330
331
  "pisell2.text.deposit-delete": "删除定金",
331
332
  "pisell2.text.deposit-delete-message-title": "提示",
332
333
  "pisell2.text.deposit-delete-message": "删除后不可恢复,请确认操作",
333
- "pisell2.text.deposit-paid": "已付定金"
334
+ "pisell2.text.deposit-paid": "已付定金",
335
+ "pisell2.text.stock": "库存"
334
336
  },
335
337
  "zh-HK": {
336
338
  "pisell2.text.refunded-amount": "已退金額",
@@ -338,7 +340,7 @@ var locales_default = {
338
340
  "pisell2.text.amount-paid-on-order": "訂單已付金額",
339
341
  "pisell2.text.please-select-the-customer-first": "請先選擇客戶",
340
342
  "pisell2.text.change": "更改",
341
- "pisell2.text.addons": "附加商品",
343
+ "pisell2.text.addons": "销售",
342
344
  "pisell2.text.select-addons": "選擇附加商品",
343
345
  "pisell2.text.search": "搜索",
344
346
  "pisell2.text.view": "查看",
@@ -487,6 +489,7 @@ var locales_default = {
487
489
  "pisell2.text.deposit-delete": "刪除定金",
488
490
  "pisell2.text.deposit-delete-message-title": "提示",
489
491
  "pisell2.text.deposit-delete-message": "刪除後不可恢復,請確認操作",
490
- "pisell2.text.deposit-paid": "已付定金"
492
+ "pisell2.text.deposit-paid": "已付定金",
493
+ "pisell2.text.stock": "庫存"
491
494
  }
492
495
  };
@@ -70,11 +70,13 @@ export interface FormState {
70
70
  bookingId: string | number;
71
71
  bookingDetail: any;
72
72
  channelDisabledEdit: boolean;
73
- renderType?: 'eventBooking';
73
+ renderType?: "eventBooking";
74
+ modalOpen?: boolean;
75
+ isTerminal?: boolean;
74
76
  eventOtherParams?: {
75
77
  relation_id: number;
76
78
  number: number;
77
- registration_type: 'single' | 'all' | 'extra_include';
79
+ registration_type: "single" | "all" | "extra_include";
78
80
  start_date: string;
79
81
  start_time: string;
80
82
  end_date: string;
@@ -78,9 +78,10 @@ var Notes = (0, import_model.Provider)((props) => {
78
78
  });
79
79
  }, [globalState]);
80
80
  const noteChange = ({ note, status, noteType }) => {
81
- var _a2;
81
+ var _a2, _b2, _c2;
82
+ (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.refreshData) == null ? void 0 : _b2.call(_a2, {});
82
83
  if (noteType === "internal") {
83
- let _list = [...(_a2 = modal.state) == null ? void 0 : _a2.notes.internalNotes];
84
+ let _list = [...(_c2 = modal.state) == null ? void 0 : _c2.notes.internalNotes];
84
85
  if (status == "add") {
85
86
  _list.push(note);
86
87
  }
@@ -431,9 +431,9 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
431
431
  if (str) {
432
432
  findNextSliceProps.date = (0, import_dayjs.default)(str).format("HH:mm");
433
433
  }
434
- let resourceId = serviceParams.resource_id;
435
- if (resourceId) {
436
- _extend.resource = Number(resourceId);
434
+ let resourceId = Number(serviceParams.resource_id);
435
+ if (resourceId || resourceId === 0) {
436
+ _extend.resource = resourceId;
437
437
  }
438
438
  }
439
439
  console.log("_extend", findNextSliceProps);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.42",
3
+ "version": "3.0.44",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,8 +59,8 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "@pisell/utils": "1.0.24",
62
- "@pisell/date-picker": "1.0.69",
63
- "@pisell/icon": "0.0.8"
62
+ "@pisell/icon": "0.0.8",
63
+ "@pisell/date-picker": "1.0.69"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^18.0.0",