@pisell/private-materials 3.0.150-gray → 3.0.150

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 (80) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +1 -1
  3. package/build/lowcode/preview.js +8 -8
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +12 -12
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +12 -12
  8. package/es/components/booking/addons/model.d.ts +1 -2
  9. package/es/components/booking/components/footer/index.js +3 -3
  10. package/es/components/booking/forms/forms.d.ts +0 -1
  11. package/es/components/booking/forms/forms.js +2 -4
  12. package/es/components/booking/forms/model.d.ts +1 -2
  13. package/es/components/booking/forms/single/index.d.ts +1 -1
  14. package/es/components/booking/forms/single/index.js +3 -4
  15. package/es/components/booking/info/index.js +1 -2
  16. package/es/components/booking/info/index.less +0 -9
  17. package/es/components/booking/info/pet/index.js +1 -1
  18. package/es/components/booking/info/service/addService/index.d.ts +2 -8
  19. package/es/components/booking/info/service/addService/index.js +36 -82
  20. package/es/components/booking/info/service/addService/index.less +1 -27
  21. package/es/components/booking/info/service/editService/index.js +9 -7
  22. package/es/components/booking/locales.d.ts +0 -48
  23. package/es/components/booking/locales.js +3 -51
  24. package/es/components/booking/model.d.ts +0 -2
  25. package/es/components/booking/notes/index.d.ts +1 -1
  26. package/es/components/booking/notes/model.d.ts +1 -2
  27. package/es/components/booking/payments/model.d.ts +1 -2
  28. package/es/components/booking/utils.d.ts +1 -1
  29. package/es/components/booking/utils.js +51 -54
  30. package/es/components/eftposPay/index.js +2 -0
  31. package/es/components/eftposPay/tyro/index.js +11 -8
  32. package/es/components/schedules/index.d.ts +1 -1
  33. package/es/components/schedules/model.d.ts +1 -2
  34. package/es/index.d.ts +0 -2
  35. package/es/index.js +1 -3
  36. package/lib/components/booking/addons/model.d.ts +1 -2
  37. package/lib/components/booking/components/footer/index.js +3 -3
  38. package/lib/components/booking/forms/forms.d.ts +0 -1
  39. package/lib/components/booking/forms/forms.js +2 -5
  40. package/lib/components/booking/forms/model.d.ts +1 -2
  41. package/lib/components/booking/forms/single/index.d.ts +1 -1
  42. package/lib/components/booking/forms/single/index.js +2 -4
  43. package/lib/components/booking/info/client/index.js +8 -1
  44. package/lib/components/booking/info/index.js +1 -4
  45. package/lib/components/booking/info/index.less +0 -9
  46. package/lib/components/booking/info/pet/index.js +1 -2
  47. package/lib/components/booking/info/service/addService/index.d.ts +2 -8
  48. package/lib/components/booking/info/service/addService/index.js +29 -67
  49. package/lib/components/booking/info/service/addService/index.less +1 -27
  50. package/lib/components/booking/info/service/editService/index.js +3 -6
  51. package/lib/components/booking/locales.d.ts +0 -48
  52. package/lib/components/booking/locales.js +3 -51
  53. package/lib/components/booking/model.d.ts +0 -2
  54. package/lib/components/booking/notes/index.d.ts +1 -1
  55. package/lib/components/booking/notes/model.d.ts +1 -2
  56. package/lib/components/booking/payments/model.d.ts +1 -2
  57. package/lib/components/booking/utils.d.ts +1 -1
  58. package/lib/components/booking/utils.js +22 -57
  59. package/lib/components/eftposPay/index.js +2 -0
  60. package/lib/components/eftposPay/tyro/index.js +7 -6
  61. package/lib/components/schedules/index.d.ts +1 -1
  62. package/lib/components/schedules/model.d.ts +1 -2
  63. package/lib/index.d.ts +0 -2
  64. package/lib/index.js +0 -6
  65. package/package.json +3 -3
  66. package/es/components/booking/dashboard/index.d.ts +0 -9
  67. package/es/components/booking/dashboard/index.js +0 -241
  68. package/es/components/booking/dashboard/serve.d.ts +0 -1
  69. package/es/components/booking/dashboard/serve.js +0 -27
  70. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
  71. package/es/components/booking/info/addServiceVariant/index.js +0 -33
  72. package/lib/components/booking/dashboard/index.d.ts +0 -9
  73. package/lib/components/booking/dashboard/index.js +0 -224
  74. package/lib/components/booking/dashboard/serve.d.ts +0 -1
  75. package/lib/components/booking/dashboard/serve.js +0 -33
  76. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
  77. package/lib/components/booking/info/addServiceVariant/index.js +0 -58
  78. package/lowcode/booking-dashboard/meta.ts +0 -123
  79. package/lowcode/booking-vertical-add-service/meta.ts +0 -124
  80. package/lowcode/vertical-add-service/meta.ts +0 -71
@@ -1,12 +1,6 @@
1
1
  import React from 'react';
2
- import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
- interface AddServiceProps {
3
+ declare const Info: ({ onEdit }: {
5
4
  onEdit: any;
6
- dispatch?: any;
7
- state?: any;
8
- drawerProps?: PisellDrawerProps;
9
- renderMode?: 'current' | 'drawer';
10
- }
11
- declare const Info: (props: AddServiceProps) => React.JSX.Element;
5
+ }) => React.JSX.Element;
12
6
  export default Info;
@@ -63,16 +63,13 @@ var shopList = [
63
63
  6848,
64
64
  6305
65
65
  ];
66
- var Info = (props) => {
66
+ var Info = ({ onEdit }) => {
67
67
  var _a, _b, _c, _d;
68
- const { onEdit, drawerProps, renderMode } = props;
69
68
  const [search, setSearch] = (0, import_react.useState)("");
70
- let { state, dispatch } = (0, import_react.useContext)(import_model.Context);
69
+ const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
71
70
  const [loading, setLoading] = (0, import_react.useState)(false);
72
71
  const searchRef = (0, import_react.useRef)();
73
72
  const context = (0, import_useEngineContext.default)();
74
- state = state || (props == null ? void 0 : props.state);
75
- dispatch = dispatch || (props == null ? void 0 : props.dispatch);
76
73
  import_utils3.request.setRequest(context.appHelper.utils.request);
77
74
  const setDefaultService = async (list) => {
78
75
  if (state.renderType !== "eventBooking") {
@@ -123,7 +120,7 @@ var Info = (props) => {
123
120
  }
124
121
  });
125
122
  };
126
- const getServices = async (params) => {
123
+ const getServices = async () => {
127
124
  var _a2;
128
125
  setLoading(true);
129
126
  let data = await state.apis.getServices({
@@ -137,10 +134,8 @@ var Info = (props) => {
137
134
  with_count: ["bundleGroup", "optionGroup"],
138
135
  order_by_string: "sort:desc",
139
136
  status: "published",
140
- ...state.isBookingCreatePage ? { schedule_date: params == null ? void 0 : params.schedule_date } : {
141
- _config: {
142
- useCache: true
143
- }
137
+ _config: {
138
+ useCache: true
144
139
  }
145
140
  });
146
141
  setLoading(false);
@@ -216,10 +211,6 @@ var Info = (props) => {
216
211
  cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
217
212
  cacheItem.new = 0;
218
213
  }
219
- if (renderMode === "current") {
220
- cacheItem._extend.resource = 0;
221
- cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
222
- }
223
214
  cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
224
215
  if (state.renderType === "eventBooking") {
225
216
  cacheItem.autoClose = false;
@@ -277,24 +268,12 @@ var Info = (props) => {
277
268
  setSearch("");
278
269
  }
279
270
  }, [state.service.addModal]);
280
- const currentDate = (0, import_react.useMemo)(() => {
281
- return state.date.value.format("YYYY-MM-DD");
282
- }, [state.date.value]);
283
- console.log(currentDate, "currentDate");
284
- (0, import_react.useEffect)(() => {
285
- if (renderMode === "current") {
286
- getServices({ schedule_date: currentDate });
287
- }
288
- }, [renderMode, currentDate]);
289
271
  (0, import_react.useEffect)(() => {
290
272
  if (state.renderType === "eventBooking" && state.modalOpen) {
291
273
  getServices();
292
274
  }
293
275
  }, [state.renderType, state.modalOpen]);
294
276
  const addButton = (0, import_react.useMemo)(() => {
295
- if (state.isBookingCreatePage) {
296
- return /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
297
- }
298
277
  if (state.renderType === "eventBooking") {
299
278
  return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
300
279
  import_addButton.default,
@@ -323,49 +302,12 @@ var Info = (props) => {
323
302
  state.service.value,
324
303
  loading
325
304
  ]);
326
- const isRenderCurrent = (0, import_react.useMemo)(() => {
327
- return renderMode === "current";
328
- }, [renderMode]);
329
305
  return (0, import_react.useMemo)(() => {
330
306
  var _a2, _b2;
331
- const header = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
332
- import_antd.Input,
333
- {
334
- ref: searchRef,
335
- prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
336
- style: { marginTop: 16, height: 44 },
337
- placeholder: import_utils4.locales.getText("pisell2.text.search"),
338
- allowClear: true,
339
- value: search,
340
- onChange: (e) => {
341
- setSearch(e.target.value);
342
- }
343
- }
344
- ));
345
- const content = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
346
- import_TabProduct.default,
347
- {
348
- list: renderList,
349
- amountSymbol: state.amountSymbol,
350
- onChange: handleSelectProduct,
351
- scrollDom: isRenderCurrent ? ".pisell-lowcode__booking-vertical-add-service-wrap" : ".booking-server-wrap .pisell-lowcode-drawer-body "
352
- }
353
- ));
354
- if (renderMode === "current") {
355
- return /* @__PURE__ */ import_react.default.createElement(
356
- "div",
357
- {
358
- className: "pisell-lowcode__booking-vertical-add-service-wrap",
359
- style: { width: "100%", height: "100%", overflow: "auto" }
360
- },
361
- header,
362
- content
363
- );
364
- }
365
307
  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(
366
308
  import_drawer.default,
367
309
  {
368
- open: state.service.addModal && !state.isBookingCreatePage,
310
+ open: state.service.addModal,
369
311
  title: import_utils4.locales.getText("pisell2.text.select-service"),
370
312
  rootClassName: "booking-server-wrap",
371
313
  onClose: () => {
@@ -377,10 +319,30 @@ var Info = (props) => {
377
319
  }
378
320
  });
379
321
  },
380
- header,
381
- ...drawerProps || {}
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
+ ))
382
336
  },
383
- content
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
+ ))
384
346
  ));
385
347
  }, [
386
348
  (_d = (_c = state.service) == null ? void 0 : _c.cacheItem) == null ? void 0 : _d.autoClose,
@@ -3,33 +3,7 @@
3
3
  // border-bottom: 1px solid var(--gray-300, #D0D5DD);
4
4
  }
5
5
 
6
+
6
7
  .pisell-lowcode__booking-service-body {
7
8
  background: var(--gray-50, #F9FAFB);
8
- }
9
-
10
- .pisell-lowcode__booking-vertical-add-service-wrap {
11
- &::-webkit-scrollbar {
12
- display: none !important;
13
- }
14
- .pisell-lowcode__booking-service-header {
15
- background-color: #fff;
16
- top: 0;
17
- position: sticky;
18
- z-index: 2;
19
- padding: 16px !important;
20
- margin: 0;
21
- .pisell-lowcode-input-affix-wrapper {
22
- margin: 0 !important;
23
- }
24
- }
25
- .booking-category-list {
26
- padding: 0 16px !important;
27
- }
28
- .pisell-lowcode__booking-service-body {
29
- .booking-tab-product {
30
- .booking-tabs-wrap {
31
- top: 76px !important;
32
- }
33
- }
34
- }
35
9
  }
@@ -270,7 +270,7 @@ var Info = (_, ref) => {
270
270
  let values = cacheItem._extend;
271
271
  form.setFieldsValue(values);
272
272
  if (state.renderType !== "eventBooking") {
273
- getResources(cacheItem);
273
+ getResources(_cacheItem);
274
274
  }
275
275
  });
276
276
  const isReason = (0, import_react.useMemo)(() => {
@@ -297,10 +297,7 @@ var Info = (_, ref) => {
297
297
  (_f = state.service.cacheItem) == null ? void 0 : _f.autoClose
298
298
  ]);
299
299
  (0, import_react.useEffect)(() => {
300
- if (state.isBookingCreatePage && state.service.editModal) {
301
- setEditData();
302
- }
303
- }, [state.service.editModal, state.isBookingCreatePage]);
300
+ }, [state.service.editModal]);
304
301
  (0, import_react.useEffect)(() => {
305
302
  getErrorMsg();
306
303
  }, [useResource, useStartTime, useDuration]);
@@ -436,7 +433,7 @@ var Info = (_, ref) => {
436
433
  });
437
434
  }
438
435
  },
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(
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(
440
437
  import_collapsibleList.default,
441
438
  {
442
439
  style: { marginTop: bundles.length ? "8px" : 0 },
@@ -194,22 +194,6 @@ 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;
213
197
  };
214
198
  'zh-CN': {
215
199
  'pisell2.text.refunded-amount': string;
@@ -406,22 +390,6 @@ declare const _default: {
406
390
  'page.booking.text.please-choose-an-option': string;
407
391
  'page.booking.text.please-choose-an-option-1': string;
408
392
  '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;
425
393
  };
426
394
  'zh-HK': {
427
395
  'pisell2.text.refunded-amount': string;
@@ -618,22 +586,6 @@ declare const _default: {
618
586
  'page.booking.text.please-choose-an-option': string;
619
587
  'page.booking.text.please-choose-an-option-1': string;
620
588
  '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;
637
589
  };
638
590
  };
639
591
  export default _default;
@@ -249,23 +249,7 @@ 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)",
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"
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)"
269
253
  },
270
254
  "zh-CN": {
271
255
  "pisell2.text.refunded-amount": "已退金额",
@@ -487,23 +471,7 @@ var locales_default = {
487
471
  "page.booking.text.paid.msg": (x) => `关联订单${x === "paid" ? "已付款" : "部分付款"}。`,
488
472
  "page.booking.text.please-choose-an-option": "请选择:",
489
473
  "page.booking.text.please-choose-an-option-1": "退款:取消预约,同时处理退款。",
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": "提示:今日已检票并离场的游客总人数"
474
+ "page.booking.text.please-choose-an-option-2": "仅取消:仅取消预约,但不进行退款处理。(您仍然可以在取消后再进行退款操作)"
507
475
  },
508
476
  "zh-HK": {
509
477
  "pisell2.text.refunded-amount": "已退金額",
@@ -725,22 +693,6 @@ var locales_default = {
725
693
  "page.booking.text.paid.msg": (x) => `關聯訂單${x === "paid" ? "已付款" : "部分付款"}。`,
726
694
  "page.booking.text.please-choose-an-option": "請選擇:",
727
695
  "page.booking.text.please-choose-an-option-1": "退款:取消預約,同時處理退款。",
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": "提示:今日已檢票並離場的遊客總人數"
696
+ "page.booking.text.please-choose-an-option-2": "僅取消:僅取消預約,但不進行退款處理。(您仍然可以在取消後再進行退款操作)"
745
697
  }
746
698
  };
@@ -92,8 +92,6 @@ export interface FormState {
92
92
  disableEventBookingEdit?: boolean;
93
93
  /** 关闭自动打开选择服务弹窗 */
94
94
  closeAutoOpenService?: boolean;
95
- /** 是否terminal创建booking页面 */
96
- isBookingCreatePage?: boolean;
97
95
  }
98
96
  export declare const walkInData: {
99
97
  id: number;
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: (props: any) => JSX.Element;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -62,7 +62,7 @@ export declare const getServeStartTime: (start_time: string) => string;
62
62
  * @Date: 2024-04-26 14:04
63
63
  */
64
64
  export declare const getServiceTime: (item: any, currentDate: any) => string;
65
- export declare const findNextSlice: ({ timeSlices, index, date, }: {
65
+ export declare const findNextSlice: ({ timeSlices, index, date }: {
66
66
  timeSlices: any[];
67
67
  index?: number | undefined;
68
68
  date?: string | undefined;
@@ -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: [...categoryObject[categoryItem.id].products, productItem]
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
- 1,
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
- (0, import_dayjs.default)(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time)
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
- label: import_utils.locales.getText("pisell2.text.no-product-added"),
379
- type: "products"
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
- if (cacheItem.currentDefaultTime) {
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 = {
@@ -241,6 +241,8 @@ var eftposPay_default = (props) => {
241
241
  onChangeParams: props.onChangeParams,
242
242
  action,
243
243
  source: props.source,
244
+ tyroUrl: props.tyroUrl,
245
+ tyroVersion: props.tyroVersion,
244
246
  device_number: (_f = props == null ? void 0 : props.params) == null ? void 0 : _f.device_number
245
247
  }
246
248
  ));
@@ -197,10 +197,8 @@ var tyro_default = ({
197
197
  const receiptCallbackImpl = ({ signatureRequired, merchantReceipt }) => {
198
198
  console.log("商家小票 客户端是否打印小票 = ", signatureRequired);
199
199
  console.log("商家小票 小票内容 = \n", merchantReceipt);
200
- if (signatureRequired) {
201
- const receipt = [merchantReceipt].filter((item) => typeof item === "string").filter(Boolean);
202
- onChange("print", receipt);
203
- }
200
+ const receipt = [merchantReceipt].filter((item) => typeof item === "string").filter(Boolean);
201
+ onChange("print", receipt);
204
202
  merchantReceiptRef.current = { signatureRequired, merchantReceipt };
205
203
  };
206
204
  const statusMessageCallbackImpl = (message) => {
@@ -308,7 +306,7 @@ var tyro_default = ({
308
306
  card_reader_id: (_a = deviceRef.current) == null ? void 0 : _a.id,
309
307
  card_reader_type: eftpos,
310
308
  amount: requestParams.current.amount,
311
- action: modeRef.current,
309
+ action: modeRef.current === import_const.ModeEnum.FullPay ? import_const.ModeEnum.Pay : modeRef.current,
312
310
  status: response.result === "APPROVED" ? "succeed" : "failed",
313
311
  request: requestParams.current,
314
312
  response: { ...response, merchantReceipt: merchantReceiptRef.current },
@@ -382,7 +380,8 @@ var tyro_default = ({
382
380
  failCustom: {
383
381
  isPosNetworkError: false,
384
382
  status: "fail",
385
- fail: import_utils.locales.getText("page.eftpos-pay.text.transaction.fail"),
383
+ fail: response.result,
384
+ //locales.getText('page.eftpos-pay.text.transaction.fail'),
386
385
  warn: null,
387
386
  title: import_utils.locales.getText("page.eftpos-pay.text.failed")(
388
387
  modeRef.current
@@ -398,7 +397,9 @@ var tyro_default = ({
398
397
  if (load && TyroRef.current) {
399
398
  const IClient = TyroRef.current.IClient;
400
399
  if (IClient) {
400
+ console.log("apiKey = ", apiKey, "posProductData = ", posProductData);
401
401
  const iclient = new IClient(apiKey, posProductData);
402
+ console.log(iclient.posProductData);
402
403
  iClientRef.current = iclient;
403
404
  if (isCancelRef.current) {
404
405
  return;