@pisell/private-materials 3.0.151 → 3.0.152

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 (136) 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 +142 -142
  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/components/footer/index.js +48 -33
  12. package/es/components/booking/components/footer/utils.js +35 -4
  13. package/es/components/booking/index.js +1 -1
  14. package/es/components/booking/info/index.d.ts +4 -12
  15. package/es/components/booking/info/index.js +12 -122
  16. package/es/components/booking/info/main.d.ts +12 -0
  17. package/es/components/booking/info/main.js +124 -0
  18. package/es/components/booking/info/model.js +0 -1
  19. package/es/components/booking/info/service/addTimeModal/index.js +4 -4
  20. package/es/components/booking/info/utils.d.ts +1 -0
  21. package/es/components/booking/info/utils.js +7 -0
  22. package/es/components/booking/info2/index.d.ts +12 -0
  23. package/es/components/booking/info2/index.js +216 -0
  24. package/es/components/booking/info2/serve.d.ts +6 -0
  25. package/es/components/booking/info2/serve.js +79 -0
  26. package/es/components/booking/info2/service/actions/index.d.ts +6 -0
  27. package/es/components/booking/info2/service/actions/index.js +86 -0
  28. package/es/components/booking/info2/service/addService/index.d.ts +6 -0
  29. package/es/components/booking/info2/service/addService/index.js +404 -0
  30. package/es/components/booking/info2/service/addService/mock.d.ts +214 -0
  31. package/es/components/booking/info2/service/addService/mock.js +332 -0
  32. package/es/components/booking/info2/service/addService/utils.d.ts +71 -0
  33. package/es/components/booking/info2/service/addService/utils.js +510 -0
  34. package/es/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
  35. package/es/components/booking/info2/service/addTimeModal/index.js +681 -0
  36. package/es/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
  37. package/es/components/booking/info2/service/addTimeModal/serve.js +73 -0
  38. package/es/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
  39. package/es/components/booking/info2/service/addTimeModal/utils.js +176 -0
  40. package/es/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
  41. package/es/components/booking/info2/service/editService/Capacity/index.js +121 -0
  42. package/es/components/booking/info2/service/editService/Capacity/index.less +1 -0
  43. package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
  44. package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +28 -0
  45. package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
  46. package/es/components/booking/info2/service/editService/Resources/index.js +233 -0
  47. package/es/components/booking/info2/service/editService/Resources/index.less +21 -0
  48. package/es/components/booking/info2/service/editService/index.d.ts +7 -0
  49. package/es/components/booking/info2/service/editService/index.js +617 -0
  50. package/es/components/booking/info2/service/editService/index.less +99 -0
  51. package/es/components/booking/info2/service/editService/utils.d.ts +11 -0
  52. package/es/components/booking/info2/service/editService/utils.js +37 -0
  53. package/es/components/booking/info2/service/index.d.ts +4 -0
  54. package/es/components/booking/info2/service/index.js +55 -0
  55. package/es/components/booking/info2/service/serviceItem/index.d.ts +4 -0
  56. package/es/components/booking/info2/service/serviceItem/index.js +176 -0
  57. package/es/components/booking/info2/service/serviceItem/index.less +125 -0
  58. package/es/components/booking/info2/service/serviceList/index.d.ts +6 -0
  59. package/es/components/booking/info2/service/serviceList/index.js +106 -0
  60. package/es/components/booking/info2/service/serviceList/index.less +0 -0
  61. package/es/components/booking/info2/utilsByBooking.d.ts +34 -0
  62. package/es/components/booking/info2/utilsByBooking.js +349 -0
  63. package/es/components/booking/locales.d.ts +3 -0
  64. package/es/components/booking/locales.js +12 -3
  65. package/es/components/booking/materiels/resources/index.d.ts +2 -2
  66. package/es/components/booking/materiels/resources/index.js +11 -11
  67. package/es/components/booking/mock.d.ts +1 -0
  68. package/es/components/booking/mock.js +66 -0
  69. package/es/components/booking/notes/index.d.ts +1 -1
  70. package/es/components/index.d.ts +1 -1
  71. package/es/components/index.js +1 -1
  72. package/es/index.d.ts +1 -1
  73. package/es/index.js +1 -1
  74. package/lib/components/booking/components/footer/index.js +28 -5
  75. package/lib/components/booking/components/footer/utils.js +29 -4
  76. package/lib/components/booking/index.js +2 -2
  77. package/lib/components/booking/info/index.d.ts +4 -12
  78. package/lib/components/booking/info/index.js +14 -115
  79. package/lib/components/booking/info/main.d.ts +12 -0
  80. package/lib/components/booking/info/main.js +152 -0
  81. package/lib/components/booking/info/service/addTimeModal/index.js +1 -0
  82. package/lib/components/booking/info/utils.d.ts +1 -0
  83. package/lib/components/booking/info/utils.js +9 -0
  84. package/lib/components/booking/info2/index.d.ts +12 -0
  85. package/lib/components/booking/info2/index.js +202 -0
  86. package/lib/components/booking/info2/serve.d.ts +6 -0
  87. package/lib/components/booking/info2/serve.js +53 -0
  88. package/lib/components/booking/info2/service/actions/index.d.ts +6 -0
  89. package/lib/components/booking/info2/service/actions/index.js +102 -0
  90. package/lib/components/booking/info2/service/addService/index.d.ts +6 -0
  91. package/lib/components/booking/info2/service/addService/index.js +356 -0
  92. package/lib/components/booking/info2/service/addService/mock.d.ts +214 -0
  93. package/lib/components/booking/info2/service/addService/mock.js +398 -0
  94. package/lib/components/booking/info2/service/addService/utils.d.ts +71 -0
  95. package/lib/components/booking/info2/service/addService/utils.js +377 -0
  96. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
  97. package/lib/components/booking/info2/service/addTimeModal/index.js +558 -0
  98. package/lib/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
  99. package/lib/components/booking/info2/service/addTimeModal/serve.js +45 -0
  100. package/lib/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
  101. package/lib/components/booking/info2/service/addTimeModal/utils.js +157 -0
  102. package/lib/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
  103. package/lib/components/booking/info2/service/editService/Capacity/index.js +97 -0
  104. package/lib/components/booking/info2/service/editService/Capacity/index.less +1 -0
  105. package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
  106. package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +54 -0
  107. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
  108. package/lib/components/booking/info2/service/editService/Resources/index.js +212 -0
  109. package/lib/components/booking/info2/service/editService/Resources/index.less +21 -0
  110. package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
  111. package/lib/components/booking/info2/service/editService/index.js +483 -0
  112. package/lib/components/booking/info2/service/editService/index.less +99 -0
  113. package/lib/components/booking/info2/service/editService/utils.d.ts +11 -0
  114. package/lib/components/booking/info2/service/editService/utils.js +0 -0
  115. package/lib/components/booking/info2/service/index.d.ts +4 -0
  116. package/lib/components/booking/info2/service/index.js +75 -0
  117. package/lib/components/booking/info2/service/serviceItem/index.d.ts +4 -0
  118. package/lib/components/booking/info2/service/serviceItem/index.js +184 -0
  119. package/lib/components/booking/info2/service/serviceItem/index.less +125 -0
  120. package/lib/components/booking/info2/service/serviceList/index.d.ts +6 -0
  121. package/lib/components/booking/info2/service/serviceList/index.js +130 -0
  122. package/lib/components/booking/info2/service/serviceList/index.less +0 -0
  123. package/lib/components/booking/info2/utilsByBooking.d.ts +34 -0
  124. package/lib/components/booking/info2/utilsByBooking.js +257 -0
  125. package/lib/components/booking/locales.d.ts +3 -0
  126. package/lib/components/booking/locales.js +6 -3
  127. package/lib/components/booking/materiels/resources/index.d.ts +2 -2
  128. package/lib/components/booking/mock.d.ts +1 -0
  129. package/lib/components/booking/mock.js +67 -2
  130. package/lib/components/booking/notes/index.d.ts +1 -1
  131. package/lib/components/eftposPay/tyro/index.js +3 -1
  132. package/lib/components/index.d.ts +1 -1
  133. package/lib/components/index.js +1 -1
  134. package/lib/index.d.ts +1 -1
  135. package/lib/index.js +1 -1
  136. package/package.json +3 -3
@@ -31,7 +31,8 @@ import "./index.less";
31
31
  import useEngineContext from "../../../../hooks/useEngineContext";
32
32
  import { DownOutlined } from '@ant-design/icons';
33
33
  import { eventBookingCheck } from "./serve";
34
-
34
+ import { createBookings, editBookings } from "../../info2/serve";
35
+ import { isBooking4Shop } from "../../info/utils";
35
36
  /**
36
37
  * @title: 底部
37
38
  * @description:
@@ -238,7 +239,7 @@ var Footer = function Footer(props) {
238
239
  key: 'booking_checkout',
239
240
  data: {
240
241
  order_id: order_id,
241
- callbackType: "pisell2"
242
+ callbackType: 'pisell2'
242
243
  }
243
244
  }));
244
245
  case 2:
@@ -339,6 +340,19 @@ var Footer = function Footer(props) {
339
340
  return _ref3.apply(this, arguments);
340
341
  };
341
342
  }();
343
+ var getApis = function getApis() {
344
+ var _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _context$appHelper$ut6;
345
+ if (isBooking4Shop((_context$appHelper$ut2 = context.appHelper.utils.store) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getState) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.call(_context$appHelper$ut2)) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.global) === null || _context$appHelper$ut5 === void 0 ? void 0 : (_context$appHelper$ut6 = _context$appHelper$ut5.globalConfig) === null || _context$appHelper$ut6 === void 0 ? void 0 : _context$appHelper$ut6.id, state.renderType)) {
346
+ return {
347
+ editBooking: editBookings,
348
+ createBooking: createBookings
349
+ };
350
+ }
351
+ return {
352
+ editBooking: state.apis.editBooking,
353
+ createBooking: state.apis.createBooking
354
+ };
355
+ };
342
356
 
343
357
  /**
344
358
  * @title: 保存info
@@ -350,7 +364,7 @@ var Footer = function Footer(props) {
350
364
  */
351
365
  var handleSave = /*#__PURE__*/function () {
352
366
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref4) {
353
- var type, _ref4$messageShow, messageShow, _setLoading, editApi, createApi, saveOtherValue, _state$onSave, callbackData, values, api, _yield$eventBookingCh, data, confirmed;
367
+ var type, _ref4$messageShow, messageShow, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, callbackData, values, api, _yield$eventBookingCh, data, confirmed;
354
368
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
355
369
  while (1) switch (_context4.prev = _context4.next) {
356
370
  case 0:
@@ -358,43 +372,44 @@ var Footer = function Footer(props) {
358
372
  // 区分loading, 是点击的checkout 还是save
359
373
  _setLoading = type === 'checkout' ? setCheckoutLoading : setLoading;
360
374
  _setLoading(true);
361
- editApi = state.renderType === 'eventBooking' ? state.apis.editEventBooking : state.apis.editBooking;
362
- createApi = state.renderType === 'eventBooking' ? state.apis.createEventBooking : state.apis.createBooking;
375
+ _getApis = getApis(), createBooking = _getApis.createBooking, editBooking = _getApis.editBooking;
376
+ editApi = state.renderType === 'eventBooking' ? state.apis.editEventBooking : editBooking;
377
+ createApi = state.renderType === 'eventBooking' ? state.apis.createEventBooking : createBooking;
363
378
  saveOtherValue = {};
364
379
  if (!(type === 'save')) {
365
- _context4.next = 13;
380
+ _context4.next = 14;
366
381
  break;
367
382
  }
368
- _context4.next = 9;
383
+ _context4.next = 10;
369
384
  return state === null || state === void 0 ? void 0 : (_state$onSave = state.onSave) === null || _state$onSave === void 0 ? void 0 : _state$onSave.call(state, state.client);
370
- case 9:
385
+ case 10:
371
386
  _context4.t0 = _context4.sent;
372
387
  if (_context4.t0) {
373
- _context4.next = 12;
388
+ _context4.next = 13;
374
389
  break;
375
390
  }
376
391
  _context4.t0 = {};
377
- case 12:
378
- saveOtherValue = _context4.t0;
379
392
  case 13:
380
- _context4.prev = 13;
393
+ saveOtherValue = _context4.t0;
394
+ case 14:
395
+ _context4.prev = 14;
381
396
  callbackData = null; // 格式化提交的参数
382
397
  values = formatValues(_objectSpread(_objectSpread({}, state), saveOtherValue)); // 区分是新增还是编辑
383
398
  api = state.bookingId ? editApi : createApi; // 活动预约新建时校验重复
384
399
  if (!(!state.bookingId && state.renderType === 'eventBooking')) {
385
- _context4.next = 29;
400
+ _context4.next = 30;
386
401
  break;
387
402
  }
388
- _context4.next = 20;
403
+ _context4.next = 21;
389
404
  return eventBookingCheck(values);
390
- case 20:
405
+ case 21:
391
406
  _yield$eventBookingCh = _context4.sent;
392
407
  data = _yield$eventBookingCh.data;
393
408
  if (!data.list.length) {
394
- _context4.next = 29;
409
+ _context4.next = 30;
395
410
  break;
396
411
  }
397
- _context4.next = 25;
412
+ _context4.next = 26;
398
413
  return modal.confirm({
399
414
  icon: null,
400
415
  title: locales.getText('page.event.booking.text.duplicate-enrollment'),
@@ -406,53 +421,53 @@ var Footer = function Footer(props) {
406
421
  width: 480,
407
422
  okText: locales.getText('page.event.booking.text.duplicate-enrollment-confirm')
408
423
  });
409
- case 25:
424
+ case 26:
410
425
  confirmed = _context4.sent;
411
426
  if (confirmed) {
412
- _context4.next = 29;
427
+ _context4.next = 30;
413
428
  break;
414
429
  }
415
430
  _setLoading(false);
416
431
  return _context4.abrupt("return");
417
- case 29:
432
+ case 30:
418
433
  if (!addonsEdit) {
419
- _context4.next = 32;
434
+ _context4.next = 33;
420
435
  break;
421
436
  }
422
- _context4.next = 32;
437
+ _context4.next = 33;
423
438
  return handleSaveAddons();
424
- case 32:
439
+ case 33:
425
440
  if (!infoEdit) {
426
- _context4.next = 37;
441
+ _context4.next = 38;
427
442
  break;
428
443
  }
429
- _context4.next = 35;
430
- return api(values);
431
- case 35:
444
+ _context4.next = 36;
445
+ return api(values, state.bookingId);
446
+ case 36:
432
447
  callbackData = _context4.sent;
433
448
  if (messageShow) {
434
449
  message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
435
450
  }
436
- case 37:
451
+ case 38:
437
452
  // 回调关闭弹窗
438
453
  state === null || state === void 0 ? void 0 : state.callback(callbackData);
439
454
  _setLoading(false);
440
455
 
441
456
  // return数据 checkout时需要
442
457
  return _context4.abrupt("return", callbackData || values);
443
- case 42:
444
- _context4.prev = 42;
445
- _context4.t1 = _context4["catch"](13);
458
+ case 43:
459
+ _context4.prev = 43;
460
+ _context4.t1 = _context4["catch"](14);
446
461
  console.log(_context4.t1);
447
462
  if ((_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.code) === 70101) {
448
463
  message.error(_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.message);
449
464
  }
450
465
  _setLoading(false);
451
- case 47:
466
+ case 48:
452
467
  case "end":
453
468
  return _context4.stop();
454
469
  }
455
- }, _callee4, null, [[13, 42]]);
470
+ }, _callee4, null, [[14, 43]]);
456
471
  }));
457
472
  return function handleSave(_x3) {
458
473
  return _ref5.apply(this, arguments);
@@ -6,6 +6,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  import { flexibleObj, isNowTime, getNowTime } from "../../utils";
8
8
  import { isWalkIn } from "../../utils";
9
+ import { getSumCapacity } from "../../info2/utilsByBooking";
9
10
  var formatNote = function formatNote(data) {
10
11
  var _data$notes;
11
12
  return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || "";
@@ -91,6 +92,30 @@ var formatRelationDetails = function formatRelationDetails(list) {
91
92
  };
92
93
  });
93
94
  };
95
+ var formatResource = function formatResource(service) {
96
+ if (!service._extend.resource) {
97
+ return undefined;
98
+ }
99
+ try {
100
+ return Object.values(service._extend.resource).reduce(function (pre, cur) {
101
+ pre = pre.concat(cur.map(function (d) {
102
+ return {
103
+ form_id: d.form_id,
104
+ relation_type: d.relation_type || 'form',
105
+ relation_id: d.relation_id || 0,
106
+ capacity: getSumCapacity({
107
+ cacheItem: service
108
+ }),
109
+ like_status: d.like_status,
110
+ metadata: d.metadata
111
+ };
112
+ }));
113
+ return pre;
114
+ }, []);
115
+ } catch (err) {
116
+ return undefined;
117
+ }
118
+ };
94
119
 
95
120
  /**
96
121
  * @title: 预约商品信息
@@ -135,11 +160,11 @@ var formatBookings = function formatBookings(data) {
135
160
  },
136
161
  "relation_products": formatRelationDetails(item._extend.relation_details),
137
162
  'id': item.booking_id || 0,
138
- "relation_id": item._extend.relation_id,
163
+ "relation_id": item._extend.relation_id || 0,
139
164
  "like_status": item._extend.like_status || 'common',
140
- "relation_type": item._extend.relation_type,
165
+ "relation_type": item._extend.relation_type || '',
141
166
  "is_all": false,
142
- "schedule_id": item._extend.schedule_id,
167
+ "schedule_id": item._extend.schedule_id || 0,
143
168
  "end_time": end_time,
144
169
  "sub_type": getSubType(item),
145
170
  "select_date": start_date,
@@ -147,7 +172,13 @@ var formatBookings = function formatBookings(data) {
147
172
  "end_date": end_date,
148
173
  "start_date": start_date,
149
174
  "duration": flexibleObj.getValue(item._extend.duration),
150
- "number": item._extend.number || 1
175
+ "number": item._extend.capacity ? getSumCapacity({
176
+ cacheItem: item
177
+ }) : 1,
178
+ "resources": formatResource(item),
179
+ "metadata": item._extend.capacity ? {
180
+ capacity: item._extend.capacity
181
+ } : undefined
151
182
  }, eventOtherParams || {});
152
183
  });
153
184
  return bookings;
@@ -6,7 +6,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  import React, { useEffect, useContext } from 'react';
8
8
  import { Provider, Context } from "./model";
9
- import Info from "./info";
9
+ import Info from "./info/main";
10
10
  import Notes from "./notes";
11
11
  import Addons from "./addons";
12
12
  import Forms from "./forms";
@@ -1,12 +1,4 @@
1
- import "./index.less";
2
- export interface InfoProps {
3
- style: any;
4
- globalState: any;
5
- callback: any;
6
- setGlobalState: any;
7
- modules: any;
8
- slot: any;
9
- setState: any;
10
- }
11
- declare const Info: any;
12
- export default Info;
1
+ import React from 'react';
2
+ import { InfoProps } from './main';
3
+ declare const APP: (props: InfoProps) => React.JSX.Element;
4
+ export default APP;
@@ -1,124 +1,14 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import React, { useContext, useEffect, useMemo } from "react";
8
- import { Provider, Context } from "./model";
9
- import Client from "./client";
10
- import Service from "./service";
11
- import Pet from "./pet";
12
- import DateCom from "./date";
13
- import Footer from "../components/footer";
14
- import TabPane from "../components/tabPane";
15
- import AddNote from "../notes/addNote";
16
- import Header from "./header";
17
- import localeTexts from "../locales";
18
- import { locales } from "@pisell/utils";
19
- import { findNextDuration, flexibleObj, formatResource, getErrorList, sliceDayIntoFiveMinutes, request } from "../utils";
20
- import { updateServiceDate } from "./date";
1
+ import React from 'react';
2
+ import Info2 from "../info2";
3
+ import Info1 from "./main";
21
4
  import useEngineContext from "../../../hooks/useEngineContext";
22
- import Notes from "./notes";
23
- import "./index.less";
24
- var defaultModules = {
25
- client: 1,
26
- date: 1,
27
- service: 1,
28
- holder: 1,
29
- note: 1
30
- };
31
- locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
32
- var Info = Provider(function (props) {
33
- var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
34
- // return <Payments {...props} />;
35
- var style = props.style,
36
- globalState = props.globalState,
37
- _props$modules = props.modules,
38
- modules = _props$modules === void 0 ? defaultModules : _props$modules,
39
- slot = props.slot;
40
- var modal = useContext(Context);
5
+ import { isBooking4Shop } from "./utils";
6
+ var APP = function APP(props) {
7
+ var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _props$globalState;
41
8
  var context = useEngineContext();
42
- request.setRequest(context.appHelper.utils.request);
43
- var params = useMemo(function () {
44
- var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
45
- return ((_modal$state = modal.state) === null || _modal$state === void 0 ? void 0 : (_modal$state$bookingC = _modal$state.bookingConfig) === null || _modal$state$bookingC === void 0 ? void 0 : (_modal$state$bookingC2 = _modal$state$bookingC.config) === null || _modal$state$bookingC2 === void 0 ? void 0 : (_modal$state$bookingC3 = _modal$state$bookingC2.basic) === null || _modal$state$bookingC3 === void 0 ? void 0 : _modal$state$bookingC3.appointment_subject) || {};
46
- }, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 ? void 0 : (_modal$state2$booking = _modal$state2.bookingConfig) === null || _modal$state2$booking === void 0 ? void 0 : (_modal$state2$booking2 = _modal$state2$booking.config) === null || _modal$state2$booking2 === void 0 ? void 0 : (_modal$state2$booking3 = _modal$state2$booking2.basic) === null || _modal$state2$booking3 === void 0 ? void 0 : _modal$state2$booking3.appointment_subject]);
47
- useEffect(function () {
48
- document.body.id = "body";
49
- // 注入函数到页面的state内
50
- if (props.setState) {
51
- props.setState({
52
- bookingFunctions: {
53
- formatResource: formatResource,
54
- getErrorList: getErrorList,
55
- sliceDayIntoFiveMinutes: sliceDayIntoFiveMinutes,
56
- findNextDuration: findNextDuration,
57
- flexibleObj: flexibleObj,
58
- updateServiceDate: updateServiceDate
59
- }
60
- });
61
- }
62
- }, []);
63
- useEffect(function () {
64
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
65
- var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
66
- modal.dispatch({
67
- type: "setState",
68
- payload: _objectSpread(_objectSpread({
69
- setGlobalState: props.setGlobalState
70
- }, globalState), {}, {
71
- isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
72
- isFranchisee: isFranchisee,
73
- timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
74
- })
75
- });
76
- }, [JSON.stringify(globalState)]);
77
- var addNote = function addNote(e) {
78
- modal.dispatch({
79
- type: "setNotes",
80
- payload: {
81
- orderNote: e,
82
- edit: true
83
- }
84
- });
85
- };
86
- var header = useMemo(function () {
87
- if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === "eventBooking") {
88
- return locales.getText("pisell2.text.enroll.detail");
89
- }
90
- return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
91
- state: modal.state,
92
- dispatch: modal.dispatch
93
- }) : /*#__PURE__*/React.createElement("div", {
94
- className: "",
95
- style: {
96
- height: 0
97
- }
98
- });
99
- }, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
100
- var notes = useMemo(function () {
101
- var _modal$state3, _modal$state3$notes;
102
- if (!modules.note) {
103
- return null;
104
- }
105
- return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === "eventBooking" ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
106
- value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
107
- onChange: addNote
108
- });
109
- }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
110
- return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
111
- style: style,
112
- header: header,
113
- footer: /*#__PURE__*/React.createElement(Footer, {
114
- state: modal.state,
115
- dispatch: modal.dispatch,
116
- source: "info"
117
- })
118
- }, _defineProperty(_React$createElement, "style", {
119
- height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? "100%" : "100vh"
120
- }), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
121
- className: "booking-info"
122
- }, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === "form" ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
123
- });
124
- export default Info;
9
+ if (isBooking4Shop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.global) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id, props === null || props === void 0 ? void 0 : (_props$globalState = props.globalState) === null || _props$globalState === void 0 ? void 0 : _props$globalState.renderType)) {
10
+ return /*#__PURE__*/React.createElement(Info2, props);
11
+ }
12
+ return /*#__PURE__*/React.createElement(Info1, props);
13
+ };
14
+ export default APP;
@@ -0,0 +1,12 @@
1
+ import './index.less';
2
+ export interface InfoProps {
3
+ style: any;
4
+ globalState: any;
5
+ callback: any;
6
+ setGlobalState: any;
7
+ modules: any;
8
+ slot: any;
9
+ setState: any;
10
+ }
11
+ declare const Info: any;
12
+ export default Info;
@@ -0,0 +1,124 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ import React, { useContext, useEffect, useMemo } from 'react';
8
+ import { Provider, Context } from "./model";
9
+ import Client from "./client";
10
+ import Service from "./service";
11
+ import Pet from "./pet";
12
+ import DateCom from "./date";
13
+ import Footer from "../components/footer";
14
+ import TabPane from "../components/tabPane";
15
+ import AddNote from "../notes/addNote";
16
+ import Header from "./header";
17
+ import localeTexts from "../locales";
18
+ import { locales } from '@pisell/utils';
19
+ import { findNextDuration, flexibleObj, formatResource, getErrorList, sliceDayIntoFiveMinutes, request } from "../utils";
20
+ import { updateServiceDate } from "./date";
21
+ import useEngineContext from "../../../hooks/useEngineContext";
22
+ import Notes from "./notes";
23
+ import "./index.less";
24
+ var defaultModules = {
25
+ client: 1,
26
+ date: 1,
27
+ service: 1,
28
+ holder: 1,
29
+ note: 1
30
+ };
31
+ locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
32
+ var Info = Provider(function (props) {
33
+ var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
34
+ // return <Payments {...props} />;
35
+ var style = props.style,
36
+ globalState = props.globalState,
37
+ _props$modules = props.modules,
38
+ modules = _props$modules === void 0 ? defaultModules : _props$modules,
39
+ slot = props.slot;
40
+ var modal = useContext(Context);
41
+ var context = useEngineContext();
42
+ request.setRequest(context.appHelper.utils.request);
43
+ var params = useMemo(function () {
44
+ var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
45
+ return ((_modal$state = modal.state) === null || _modal$state === void 0 ? void 0 : (_modal$state$bookingC = _modal$state.bookingConfig) === null || _modal$state$bookingC === void 0 ? void 0 : (_modal$state$bookingC2 = _modal$state$bookingC.config) === null || _modal$state$bookingC2 === void 0 ? void 0 : (_modal$state$bookingC3 = _modal$state$bookingC2.basic) === null || _modal$state$bookingC3 === void 0 ? void 0 : _modal$state$bookingC3.appointment_subject) || {};
46
+ }, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 ? void 0 : (_modal$state2$booking = _modal$state2.bookingConfig) === null || _modal$state2$booking === void 0 ? void 0 : (_modal$state2$booking2 = _modal$state2$booking.config) === null || _modal$state2$booking2 === void 0 ? void 0 : (_modal$state2$booking3 = _modal$state2$booking2.basic) === null || _modal$state2$booking3 === void 0 ? void 0 : _modal$state2$booking3.appointment_subject]);
47
+ useEffect(function () {
48
+ document.body.id = 'body';
49
+ // 注入函数到页面的state内
50
+ if (props.setState) {
51
+ props.setState({
52
+ bookingFunctions: {
53
+ formatResource: formatResource,
54
+ getErrorList: getErrorList,
55
+ sliceDayIntoFiveMinutes: sliceDayIntoFiveMinutes,
56
+ findNextDuration: findNextDuration,
57
+ flexibleObj: flexibleObj,
58
+ updateServiceDate: updateServiceDate
59
+ }
60
+ });
61
+ }
62
+ }, []);
63
+ useEffect(function () {
64
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
65
+ var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, 'franchisee');
66
+ modal.dispatch({
67
+ type: 'setState',
68
+ payload: _objectSpread(_objectSpread({
69
+ setGlobalState: props.setGlobalState
70
+ }, globalState), {}, {
71
+ isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
72
+ isFranchisee: isFranchisee,
73
+ timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
74
+ })
75
+ });
76
+ }, [JSON.stringify(globalState)]);
77
+ var addNote = function addNote(e) {
78
+ modal.dispatch({
79
+ type: 'setNotes',
80
+ payload: {
81
+ orderNote: e,
82
+ edit: true
83
+ }
84
+ });
85
+ };
86
+ var header = useMemo(function () {
87
+ if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === 'eventBooking') {
88
+ return locales.getText('pisell2.text.enroll.detail');
89
+ }
90
+ return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
91
+ state: modal.state,
92
+ dispatch: modal.dispatch
93
+ }) : /*#__PURE__*/React.createElement("div", {
94
+ className: "",
95
+ style: {
96
+ height: 0
97
+ }
98
+ });
99
+ }, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
100
+ var notes = useMemo(function () {
101
+ var _modal$state3, _modal$state3$notes;
102
+ if (!modules.note) {
103
+ return null;
104
+ }
105
+ return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
106
+ value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
107
+ onChange: addNote
108
+ });
109
+ }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
110
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
111
+ style: style,
112
+ header: header,
113
+ footer: /*#__PURE__*/React.createElement(Footer, {
114
+ state: modal.state,
115
+ dispatch: modal.dispatch,
116
+ source: "info"
117
+ })
118
+ }, _defineProperty(_React$createElement, "style", {
119
+ height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
120
+ }), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
121
+ className: "booking-info"
122
+ }, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
123
+ });
124
+ export default Info;
@@ -23,7 +23,6 @@ var _miniRedux = miniRedux({
23
23
  },
24
24
  setService: function setService(state, payload) {
25
25
  var obj = {};
26
-
27
26
  // 拦截, 如果服务列表里 有两个相近时间的服务, 删除最后一个
28
27
  if (payload.value) {
29
28
  obj.value = formatServiceListByTime(payload.value);
@@ -248,15 +248,15 @@ var AddTimeModal = function AddTimeModal() {
248
248
  while (1) switch (_context.prev = _context.next) {
249
249
  case 0:
250
250
  _context.next = 2;
251
- return getAddTimeProducts({
251
+ return getAddTimeProducts(_defineProperty({
252
252
  skip: 1,
253
253
  num: 500,
254
254
  open_quotation: 1,
255
+ status: 'published',
255
256
  schedule_date: state.date.value.format('YYYY-MM-DD'),
256
257
  customer_id: isWalkIn((_state$client = state.client) === null || _state$client === void 0 ? void 0 : (_state$client$value = _state$client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id) ? undefined : (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : (_state$client2$value = _state$client2.value) === null || _state$client2$value === void 0 ? void 0 : _state$client2$value.id,
257
- extension_type: ['product_add_time'],
258
- status: 'published'
259
- }, {
258
+ extension_type: ['product_add_time']
259
+ }, "status", 'published'), {
260
260
  useCache: true
261
261
  });
262
262
  case 2:
@@ -21,3 +21,4 @@ export declare const isInterval: (time1: number, time2: number, interval?: numbe
21
21
  * @Date: 2024-08-13 19:36
22
22
  */
23
23
  export declare const formatServiceListByTime: (list: any[]) => any[];
24
+ export declare const isBooking4Shop: (shopId: number, renderType?: string) => boolean;
@@ -83,4 +83,11 @@ export var formatServiceListByTime = function formatServiceListByTime(list) {
83
83
  } catch (err) {
84
84
  return list;
85
85
  }
86
+ };
87
+ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
88
+ if (renderType === 'eventBooking') {
89
+ return false;
90
+ }
91
+ var booking4Shops = [1350, 1401, 3013, 7154];
92
+ return booking4Shops.includes(shopId);
86
93
  };
@@ -0,0 +1,12 @@
1
+ import '../info/index.less';
2
+ export interface InfoProps {
3
+ style: any;
4
+ globalState: any;
5
+ callback: any;
6
+ setGlobalState: any;
7
+ modules: any;
8
+ slot: any;
9
+ setState: any;
10
+ }
11
+ declare const Info: any;
12
+ export default Info;