@pisell/private-materials 6.2.25 → 6.2.26

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 (212) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
  8. package/es/components/booking/components/customSelect/index.js +1 -0
  9. package/es/components/booking/hooks/useClearCart.js +11 -8
  10. package/es/components/booking/info/client/index.js +3 -2
  11. package/es/components/booking/info/hooks/useInfoHolder.js +13 -14
  12. package/es/components/booking/info/service/Lists.js +37 -27
  13. package/es/components/booking/info/service/editService/constants.d.ts +1 -0
  14. package/es/components/booking/info/service/editService/constants.js +3 -0
  15. package/es/components/booking/info/service/editService/index.js +15 -10
  16. package/es/components/booking/info/service2/utils.d.ts +1 -1
  17. package/es/components/booking/info/service2/utils.js +20 -21
  18. package/es/components/booking/info2/index.js +1 -0
  19. package/es/components/booking/info2/service/addService/utils.js +6 -3
  20. package/es/components/booking/info2/service/addTimeModal/index.js +3 -0
  21. package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
  22. package/es/components/booking/info2/service/editService/index.js +265 -170
  23. package/es/components/booking/info2/service/index.js +22 -19
  24. package/es/components/booking/materiels/duration/index.js +9 -2
  25. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  26. package/es/components/shoppingCart/components/Cart/Product.js +51 -47
  27. package/es/components/shoppingCart/components/Cart/index.js +21 -18
  28. package/es/components/ticketBooking/components/addServiceVariant/addService.js +171 -151
  29. package/es/components/ticketBooking/components/timeBar/index.js +77 -73
  30. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  31. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
  32. package/lib/components/booking/components/customSelect/index.js +1 -0
  33. package/lib/components/booking/hooks/useClearCart.js +16 -13
  34. package/lib/components/booking/info/client/index.js +5 -4
  35. package/lib/components/booking/info/hooks/useInfoHolder.js +12 -13
  36. package/lib/components/booking/info/service/Lists.js +36 -24
  37. package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
  38. package/lib/components/booking/info/service/editService/constants.js +31 -0
  39. package/lib/components/booking/info/service/editService/index.js +7 -1
  40. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  41. package/lib/components/booking/info/service2/utils.js +17 -17
  42. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  43. package/lib/components/booking/info2/service/addTimeModal/index.js +3 -0
  44. package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
  45. package/lib/components/booking/info2/service/editService/index.js +138 -74
  46. package/lib/components/booking/info2/service/index.js +14 -10
  47. package/lib/components/booking/materiels/duration/index.js +7 -2
  48. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  49. package/lib/components/shoppingCart/components/Cart/Product.js +32 -28
  50. package/lib/components/shoppingCart/components/Cart/index.js +18 -15
  51. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +140 -122
  52. package/lib/components/ticketBooking/components/timeBar/index.js +98 -94
  53. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  54. package/package.json +3 -3
  55. package/es/components/Sales/Cart/index.d.ts +0 -53
  56. package/es/components/booking/addons/index.d.ts +0 -17
  57. package/es/components/booking/components/actionButtons/index.d.ts +0 -29
  58. package/es/components/booking/components/clearCartModal/index.d.ts +0 -10
  59. package/es/components/booking/components/customiseItemModal/index.d.ts +0 -28
  60. package/es/components/booking/components/tabPane/index.d.ts +0 -4
  61. package/es/components/booking/components/voucher/index.d.ts +0 -3
  62. package/es/components/booking/dashboard/index.d.ts +0 -20
  63. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -3
  64. package/es/components/booking/info2/cartClientCard/index.d.ts +0 -6
  65. package/es/components/booking/info2/cartClientCard/locales.d.ts +0 -21
  66. package/es/components/booking/info2/cartClientCard/types.d.ts +0 -13
  67. package/es/components/booking/info2/cartClientCard/utils.d.ts +0 -3
  68. package/es/components/booking/info2/service/editNormalService/index.d.ts +0 -3
  69. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -3
  70. package/es/components/booking/locales.d.ts +0 -903
  71. package/es/components/booking/notes/addNote/index.d.ts +0 -3
  72. package/es/components/shoppingCart/type.d.ts +0 -49
  73. package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +0 -8
  74. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +0 -7
  75. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +0 -12
  76. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +0 -6
  77. package/es/components/ticketBooking/components/bookingDataPanel/constants.d.ts +0 -22
  78. package/es/components/ticketBooking/components/bookingDataPanel/index.d.ts +0 -9
  79. package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +0 -14
  80. package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
  81. package/es/components/ticketBooking/components/floatButtons/index.d.ts +0 -11
  82. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
  83. package/es/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
  84. package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
  85. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -12
  86. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +0 -2
  87. package/es/components/ticketBooking/locales.d.ts +0 -177
  88. package/es/components/ticketBooking/serve.d.ts +0 -287
  89. package/es/hooks/useToast.d.ts +0 -2
  90. package/es/hooks/useTranslationOriginal.d.ts +0 -1
  91. package/es/index.d.ts +0 -51
  92. package/es/plus/clientCard/index.d.ts +0 -7
  93. package/es/plus/clientCard/line/index.d.ts +0 -9
  94. package/es/plus/clientCard/locales.d.ts +0 -18
  95. package/es/plus/clientCard/types.d.ts +0 -126
  96. package/es/plus/clientCard/utils.d.ts +0 -8
  97. package/es/plus/clientName/index.d.ts +0 -5
  98. package/es/plus/clientName/type.d.ts +0 -13
  99. package/es/plus/clientName/utils.d.ts +0 -2
  100. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -2
  101. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -2
  102. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -2
  103. package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +0 -2
  104. package/es/plus/clinetSearch/Add/index.d.ts +0 -18
  105. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +0 -5
  106. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +0 -2
  107. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +0 -46
  108. package/es/plus/clinetSearch/index.d.ts +0 -18
  109. package/es/plus/clinetSearch/locales.d.ts +0 -102
  110. package/es/plus/clinetSearch/serve.d.ts +0 -1
  111. package/es/plus/clinetSearch/types.d.ts +0 -49
  112. package/es/plus/noteModal/AddTempModal.d.ts +0 -7
  113. package/es/plus/noteModal/index.d.ts +0 -4
  114. package/es/plus/noteModal/locales.d.ts +0 -33
  115. package/es/plus/noteModal/types.d.ts +0 -17
  116. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +0 -5
  117. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +0 -9
  118. package/es/pro/comprehensiveSearch/index.d.ts +0 -9
  119. package/es/pro/comprehensiveSearch/locales.d.ts +0 -18
  120. package/es/pro/comprehensiveSearch/types.d.ts +0 -31
  121. package/es/pro/numberKeyboard/index.d.ts +0 -28
  122. package/es/pro/numberKeyboard/locales.d.ts +0 -12
  123. package/es/pro/pisellNumberSelector/example.d.ts +0 -3
  124. package/es/pro/pisellNumberSelector/index.d.ts +0 -26
  125. package/es/pro/pisellPhoneKeyboard/index.d.ts +0 -12
  126. package/es/pro/pisellPhoneKeyboard/locales.d.ts +0 -12
  127. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +0 -5
  128. package/es/pro/pisellPriceKeyboardModal/index.d.ts +0 -2
  129. package/es/pro/pisellPriceKeyboardModal/types.d.ts +0 -25
  130. package/es/pro/pisellPriceRadio/index.d.ts +0 -26
  131. package/es/pro/skuDetailModal/index.d.ts +0 -5
  132. package/es/pro/skuDetailModal/locales.d.ts +0 -48
  133. package/es/pro/skuDetailModal/types.d.ts +0 -347
  134. package/lib/components/Sales/Cart/index.d.ts +0 -53
  135. package/lib/components/booking/addons/index.d.ts +0 -17
  136. package/lib/components/booking/components/actionButtons/index.d.ts +0 -29
  137. package/lib/components/booking/components/clearCartModal/index.d.ts +0 -10
  138. package/lib/components/booking/components/customiseItemModal/index.d.ts +0 -28
  139. package/lib/components/booking/components/tabPane/index.d.ts +0 -4
  140. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  141. package/lib/components/booking/dashboard/index.d.ts +0 -20
  142. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -3
  143. package/lib/components/booking/info2/cartClientCard/index.d.ts +0 -6
  144. package/lib/components/booking/info2/cartClientCard/locales.d.ts +0 -21
  145. package/lib/components/booking/info2/cartClientCard/types.d.ts +0 -13
  146. package/lib/components/booking/info2/cartClientCard/utils.d.ts +0 -3
  147. package/lib/components/booking/info2/service/editNormalService/index.d.ts +0 -3
  148. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -3
  149. package/lib/components/booking/locales.d.ts +0 -903
  150. package/lib/components/booking/notes/addNote/index.d.ts +0 -3
  151. package/lib/components/shoppingCart/type.d.ts +0 -49
  152. package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +0 -8
  153. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +0 -7
  154. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +0 -12
  155. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +0 -6
  156. package/lib/components/ticketBooking/components/bookingDataPanel/constants.d.ts +0 -22
  157. package/lib/components/ticketBooking/components/bookingDataPanel/index.d.ts +0 -9
  158. package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +0 -14
  159. package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
  160. package/lib/components/ticketBooking/components/floatButtons/index.d.ts +0 -11
  161. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
  162. package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
  163. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
  164. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -12
  165. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +0 -2
  166. package/lib/components/ticketBooking/locales.d.ts +0 -177
  167. package/lib/components/ticketBooking/serve.d.ts +0 -287
  168. package/lib/hooks/useToast.d.ts +0 -2
  169. package/lib/hooks/useTranslationOriginal.d.ts +0 -1
  170. package/lib/index.d.ts +0 -51
  171. package/lib/plus/clientCard/index.d.ts +0 -7
  172. package/lib/plus/clientCard/line/index.d.ts +0 -9
  173. package/lib/plus/clientCard/locales.d.ts +0 -18
  174. package/lib/plus/clientCard/types.d.ts +0 -126
  175. package/lib/plus/clientCard/utils.d.ts +0 -8
  176. package/lib/plus/clientName/index.d.ts +0 -5
  177. package/lib/plus/clientName/type.d.ts +0 -13
  178. package/lib/plus/clientName/utils.d.ts +0 -2
  179. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -2
  180. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -2
  181. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -2
  182. package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +0 -2
  183. package/lib/plus/clinetSearch/Add/index.d.ts +0 -18
  184. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +0 -5
  185. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +0 -2
  186. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +0 -46
  187. package/lib/plus/clinetSearch/index.d.ts +0 -18
  188. package/lib/plus/clinetSearch/locales.d.ts +0 -102
  189. package/lib/plus/clinetSearch/serve.d.ts +0 -1
  190. package/lib/plus/clinetSearch/types.d.ts +0 -49
  191. package/lib/plus/noteModal/AddTempModal.d.ts +0 -7
  192. package/lib/plus/noteModal/index.d.ts +0 -4
  193. package/lib/plus/noteModal/locales.d.ts +0 -33
  194. package/lib/plus/noteModal/types.d.ts +0 -17
  195. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +0 -5
  196. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +0 -9
  197. package/lib/pro/comprehensiveSearch/index.d.ts +0 -9
  198. package/lib/pro/comprehensiveSearch/locales.d.ts +0 -18
  199. package/lib/pro/comprehensiveSearch/types.d.ts +0 -31
  200. package/lib/pro/numberKeyboard/index.d.ts +0 -28
  201. package/lib/pro/numberKeyboard/locales.d.ts +0 -12
  202. package/lib/pro/pisellNumberSelector/example.d.ts +0 -3
  203. package/lib/pro/pisellNumberSelector/index.d.ts +0 -26
  204. package/lib/pro/pisellPhoneKeyboard/index.d.ts +0 -12
  205. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +0 -12
  206. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +0 -5
  207. package/lib/pro/pisellPriceKeyboardModal/index.d.ts +0 -2
  208. package/lib/pro/pisellPriceKeyboardModal/types.d.ts +0 -25
  209. package/lib/pro/pisellPriceRadio/index.d.ts +0 -26
  210. package/lib/pro/skuDetailModal/index.d.ts +0 -5
  211. package/lib/pro/skuDetailModal/locales.d.ts +0 -48
  212. package/lib/pro/skuDetailModal/types.d.ts +0 -347
@@ -4,44 +4,45 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React from 'react';
7
+ import React, { useMemo } from 'react';
8
8
  import { LeftOutlined, RightOutlined } from '@ant-design/icons';
9
9
  import { DatePicker, SelectTime } from '@pisell/materials';
10
+ import { useMemoizedFn } from "ahooks";
10
11
  import { Button } from 'antd';
11
12
  import classNames from 'classnames';
12
13
  import { locales } from '@pisell/utils';
13
14
  import "./index.less";
14
15
  var TimeBar = function TimeBar(props) {
15
- var _state$modalState4, _state$modalState5;
16
+ var _state$modalState6;
16
17
  var state = props.globalState,
17
18
  setGlobalState = props.setGlobalState,
18
19
  locale = props.locale,
19
20
  onCreateClick = props.onCreateClick;
20
- var _onClickNext = function _onClickNext() {
21
+ var _onClickNext = useMemoizedFn(function () {
21
22
  var _state$modalState, _props$onDateChange, _props$setIntervalTim;
22
23
  var currentTime = (_state$modalState = state.modalState) === null || _state$modalState === void 0 || (_state$modalState = _state$modalState.date) === null || _state$modalState === void 0 ? void 0 : _state$modalState.value;
23
24
  var newTime = currentTime['add'](1, 'day');
24
25
  (_props$onDateChange = props.onDateChange) === null || _props$onDateChange === void 0 || _props$onDateChange.call(props, newTime, newTime.format('YYYY-MM-DD HH:mm:ss'));
25
26
  (_props$setIntervalTim = props.setIntervalTime) === null || _props$setIntervalTim === void 0 || _props$setIntervalTim.call(props, false);
26
- };
27
- var _onClickPre = function _onClickPre() {
27
+ });
28
+ var _onClickPre = useMemoizedFn(function () {
28
29
  var _state$modalState2, _props$onDateChange2, _props$setIntervalTim2;
29
30
  var currentTime = (_state$modalState2 = state.modalState) === null || _state$modalState2 === void 0 || (_state$modalState2 = _state$modalState2.date) === null || _state$modalState2 === void 0 ? void 0 : _state$modalState2.value;
30
31
  var newTime = currentTime['subtract'](1, 'day');
31
32
  (_props$onDateChange2 = props.onDateChange) === null || _props$onDateChange2 === void 0 || _props$onDateChange2.call(props, newTime, newTime.format('YYYY-MM-DD HH:mm:ss'));
32
33
  (_props$setIntervalTim2 = props.setIntervalTime) === null || _props$setIntervalTim2 === void 0 || _props$setIntervalTim2.call(props, false);
33
- };
34
- var _onClickToday = function _onClickToday() {
34
+ });
35
+ var _onClickToday = useMemoizedFn(function () {
35
36
  var _props$setIntervalTim3;
36
37
  (_props$setIntervalTim3 = props.setIntervalTime) === null || _props$setIntervalTim3 === void 0 || _props$setIntervalTim3.call(props, true);
37
- };
38
- var _onClickNow = function _onClickNow() {
38
+ });
39
+ var _onClickNow = useMemoizedFn(function () {
39
40
  var _props$setIntervalTim4;
40
41
  (_props$setIntervalTim4 = props.setIntervalTime) === null || _props$setIntervalTim4 === void 0 || _props$setIntervalTim4.call(props, true);
41
- };
42
+ });
42
43
 
43
44
  // 时间选择变更事件
44
- var _onDateTimeChange = function _onDateTimeChange(timeString) {
45
+ var _onDateTimeChange = useMemoizedFn(function (timeString) {
45
46
  var _state$modalState3, _props$onDateTimeChan, _props$setIntervalTim5;
46
47
  var currentTime = (_state$modalState3 = state.modalState) === null || _state$modalState3 === void 0 || (_state$modalState3 = _state$modalState3.date) === null || _state$modalState3 === void 0 ? void 0 : _state$modalState3.value;
47
48
  var _timeString$split$map = timeString.split(':').map(Number),
@@ -54,69 +55,72 @@ var TimeBar = function TimeBar(props) {
54
55
  isTimeChange: true
55
56
  });
56
57
  (_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props, false);
57
- };
58
- return /*#__PURE__*/React.createElement("div", {
59
- className: "pisell-ticket-booking-time-bar"
60
- }, /*#__PURE__*/React.createElement(Button, {
61
- icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
62
- onClick: _onClickPre,
63
- size: "large"
64
- }), /*#__PURE__*/React.createElement(Button, {
65
- onClick: _onClickToday,
66
- size: "large",
67
- style: state.intervalSetTime ? {
68
- background: '#000',
69
- color: '#fff'
70
- } : undefined
71
- }, locales.getText('pisell2.ticket-booking.today')), /*#__PURE__*/React.createElement("div", {
72
- className: classNames({
73
- 'booking-page-date-picker-select': state.isDateChange
74
- }),
75
- style: {
76
- width: 200,
77
- flexShrink: 0
78
- }
79
- }, /*#__PURE__*/React.createElement(DatePicker, {
80
- inputReadOnly: true,
81
- value: state === null || state === void 0 || (_state$modalState4 = state.modalState) === null || _state$modalState4 === void 0 || (_state$modalState4 = _state$modalState4.date) === null || _state$modalState4 === void 0 ? void 0 : _state$modalState4.value,
82
- format: locale === 'en' ? 'dddd, DD MMM YYYY' : 'YYYY年MM月DD日',
83
- onChange: props === null || props === void 0 ? void 0 : props.onDateChange,
84
- size: "large",
85
- style: {
86
- width: '100%'
87
- }
88
- })), /*#__PURE__*/React.createElement(Button, {
89
- icon: /*#__PURE__*/React.createElement(RightOutlined, null),
90
- onClick: _onClickNext,
91
- size: "large"
92
- }), /*#__PURE__*/React.createElement("div", {
93
- className: classNames({
94
- 'booking-page-date-picker-select': state.isTimeChange
95
- })
96
- }, /*#__PURE__*/React.createElement(SelectTime, {
97
- value: state === null || state === void 0 || (_state$modalState5 = state.modalState) === null || _state$modalState5 === void 0 || (_state$modalState5 = _state$modalState5.date) === null || _state$modalState5 === void 0 ? void 0 : _state$modalState5.value.format('HH:mm'),
98
- onChange: _onDateTimeChange,
99
- popoverProps: {
58
+ });
59
+ return useMemo(function () {
60
+ var _state$modalState4, _state$modalState5;
61
+ return /*#__PURE__*/React.createElement("div", {
62
+ className: "pisell-ticket-booking-time-bar"
63
+ }, /*#__PURE__*/React.createElement(Button, {
64
+ icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
65
+ onClick: _onClickPre,
66
+ size: "large"
67
+ }), /*#__PURE__*/React.createElement(Button, {
68
+ onClick: _onClickToday,
69
+ size: "large",
70
+ style: state.intervalSetTime ? {
71
+ background: '#000',
72
+ color: '#fff'
73
+ } : undefined
74
+ }, locales.getText('pisell2.ticket-booking.today')), /*#__PURE__*/React.createElement("div", {
75
+ className: classNames({
76
+ 'booking-page-date-picker-select': state.isDateChange
77
+ }),
100
78
  style: {
101
- zoom: 0.8
79
+ width: 200,
80
+ flexShrink: 0
102
81
  }
103
- },
104
- timePickerProps: {},
105
- timeProps: {},
106
- slice: 5
107
- })), !state.bookingId && /*#__PURE__*/React.createElement(Button, {
108
- onClick: _onClickNow,
109
- size: "large",
110
- style: state.intervalSetTime ? {
111
- background: '#000',
112
- color: '#fff'
113
- } : undefined
114
- }, locales.getText('pisell2.ticket-booking.now')), !!state.bookingId && /*#__PURE__*/React.createElement(Button, {
115
- onClick: function onClick() {
116
- onCreateClick();
117
- },
118
- size: "large",
119
- type: "primary"
120
- }, locales.getText('pisell2.ticket-booking.create-new')));
82
+ }, /*#__PURE__*/React.createElement(DatePicker, {
83
+ inputReadOnly: true,
84
+ value: state === null || state === void 0 || (_state$modalState4 = state.modalState) === null || _state$modalState4 === void 0 || (_state$modalState4 = _state$modalState4.date) === null || _state$modalState4 === void 0 ? void 0 : _state$modalState4.value,
85
+ format: locale === 'en' ? 'dddd, DD MMM YYYY' : 'YYYY年MM月DD日',
86
+ onChange: props === null || props === void 0 ? void 0 : props.onDateChange,
87
+ size: "large",
88
+ style: {
89
+ width: '100%'
90
+ }
91
+ })), /*#__PURE__*/React.createElement(Button, {
92
+ icon: /*#__PURE__*/React.createElement(RightOutlined, null),
93
+ onClick: _onClickNext,
94
+ size: "large"
95
+ }), /*#__PURE__*/React.createElement("div", {
96
+ className: classNames({
97
+ 'booking-page-date-picker-select': state.isTimeChange
98
+ })
99
+ }, /*#__PURE__*/React.createElement(SelectTime, {
100
+ value: state === null || state === void 0 || (_state$modalState5 = state.modalState) === null || _state$modalState5 === void 0 || (_state$modalState5 = _state$modalState5.date) === null || _state$modalState5 === void 0 ? void 0 : _state$modalState5.value.format('HH:mm'),
101
+ onChange: _onDateTimeChange,
102
+ popoverProps: {
103
+ style: {
104
+ zoom: 0.8
105
+ }
106
+ },
107
+ timePickerProps: {},
108
+ timeProps: {},
109
+ slice: 5
110
+ })), !state.bookingId && /*#__PURE__*/React.createElement(Button, {
111
+ onClick: _onClickNow,
112
+ size: "large",
113
+ style: state.intervalSetTime ? {
114
+ background: '#000',
115
+ color: '#fff'
116
+ } : undefined
117
+ }, locales.getText('pisell2.ticket-booking.now')), !!state.bookingId && /*#__PURE__*/React.createElement(Button, {
118
+ onClick: function onClick() {
119
+ onCreateClick();
120
+ },
121
+ size: "large",
122
+ type: "primary"
123
+ }, locales.getText('pisell2.ticket-booking.create-new')));
124
+ }, [(_state$modalState6 = state.modalState) === null || _state$modalState6 === void 0 || (_state$modalState6 = _state$modalState6.date) === null || _state$modalState6 === void 0 ? void 0 : _state$modalState6.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale, state.bookingId]);
121
125
  };
122
126
  export default TimeBar;
@@ -40,7 +40,7 @@ declare type ScanData = {
40
40
  };
41
41
  };
42
42
  export declare const formatScanCustomer: (data: ScanData) => {
43
- searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
43
+ searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
44
44
  data: any;
45
45
  scanCode: string;
46
46
  } | null;
@@ -83,7 +83,7 @@ var DepositModal = (props) => {
83
83
  closable: true,
84
84
  bodyStyle: { padding: "24px", minHeight: "300px" },
85
85
  destroyOnClose: true,
86
- title: (item == null ? void 0 : item.title) || (policy == null ? void 0 : policy.title) || "协议",
86
+ title: (item == null ? void 0 : item.title) || (policy == null ? void 0 : policy.title) || void 0,
87
87
  onCancel,
88
88
  mobileModalHeight: "auto",
89
89
  className: "policy-modal-wrap",
@@ -78,6 +78,7 @@ var CustomSelect = (props, ref) => {
78
78
  handleOpenModal: propsHandleOpenModal,
79
79
  handleDayChange
80
80
  } = props;
81
+ console.log("custom select");
81
82
  const searchRef = (0, import_react.useRef)();
82
83
  const [_value, set_value] = (0, import_react.useState)([]);
83
84
  const [search, setSearch] = (0, import_react.useState)("");
@@ -37,7 +37,7 @@ var import_classnames = __toESM(require("classnames"));
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
39
  var useClearCart = (state, dispatch) => {
40
- var _a, _b, _c, _d;
40
+ var _a, _b;
41
41
  const handleClear = () => {
42
42
  dispatch({
43
43
  type: "setService",
@@ -46,17 +46,20 @@ var useClearCart = (state, dispatch) => {
46
46
  }
47
47
  });
48
48
  };
49
- return !!((_b = (_a = state.service) == null ? void 0 : _a.value) == null ? void 0 : _b.length) && !state.channelDisabledEdit && /* @__PURE__ */ import_react.default.createElement(
50
- "span",
51
- {
52
- className: (0, import_classnames.default)("pisell-lowcode__booking-service-clear-btn", {
53
- ["pisell-lowcode__booking-service-clear-btn-disabled"]: !((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length)
54
- }),
55
- onClick: handleClear
56
- },
57
- /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }),
58
- " ",
59
- /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
60
- );
49
+ return (0, import_react.useMemo)(() => {
50
+ var _a2, _b2, _c, _d;
51
+ return !!((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) && !state.channelDisabledEdit && /* @__PURE__ */ import_react.default.createElement(
52
+ "span",
53
+ {
54
+ className: (0, import_classnames.default)("pisell-lowcode__booking-service-clear-btn", {
55
+ ["pisell-lowcode__booking-service-clear-btn-disabled"]: !((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length)
56
+ }),
57
+ onClick: handleClear
58
+ },
59
+ /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }),
60
+ " ",
61
+ /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
62
+ );
63
+ }, [(_b = (_a = state.service) == null ? void 0 : _a.value) == null ? void 0 : _b.length, state.channelDisabledEdit]);
61
64
  };
62
65
  var useClearCart_default = useClearCart;
@@ -48,7 +48,7 @@ var import_utils3 = require("../clientVariant/utils");
48
48
  var import_useGetHolderList = __toESM(require("../hooks/useGetHolderList"));
49
49
  var isLoadClient = false;
50
50
  var Client = () => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
52
52
  const modalRef = (0, import_react.useRef)();
53
53
  const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
54
54
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -298,6 +298,7 @@ var Client = () => {
298
298
  )) : null;
299
299
  }, [loadLoading, params, state.client.clients.length]);
300
300
  const customSelect = (0, import_react.useMemo)(() => {
301
+ console.log("render customSelect");
301
302
  return /* @__PURE__ */ import_react.default.createElement(
302
303
  import_customSelect.default,
303
304
  {
@@ -340,7 +341,7 @@ var Client = () => {
340
341
  }
341
342
  }
342
343
  );
343
- }, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
344
+ }, [state.isTerminal, state.modalOpen, (_b = state.client) == null ? void 0 : _b.value, state.drawerMask, renderList, loading, franchiseeLoading, params.search, loadMore]);
344
345
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
345
346
  "div",
346
347
  {
@@ -357,11 +358,11 @@ var Client = () => {
357
358
  import_antd.Avatar,
358
359
  {
359
360
  className: "pisell-lowcode__booking-client-list-item-avatar",
360
- src: import_utils.image.ali((_b = state.client.value) == null ? void 0 : _b.cover, 100),
361
+ src: import_utils.image.ali((_c = state.client.value) == null ? void 0 : _c.cover, 100),
361
362
  icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
362
363
  }
363
364
  ),
364
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = state.client.value) == null ? void 0 : _c.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_d = state.client.value) == null ? void 0 : _d.email) : null, ((_e = state.client.value) == null ? void 0 : _e.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_f = state.client.value) == null ? void 0 : _f.phone) : null, !!((_h = (_g = state.client.value) == null ? void 0 : _g.waiver_form) == null ? void 0 : _h.length) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-waiver", title: (0, import_utils3.getWaiverTitle)((_i = state.client.value) == null ? void 0 : _i.waiver_form) }, (_l = (_k = (_j = state.client.value) == null ? void 0 : _j.waiver_form) == null ? void 0 : _k.map) == null ? void 0 : _l.call(_k, (item) => {
365
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_d = state.client.value) == null ? void 0 : _d.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_e = state.client.value) == null ? void 0 : _e.email) : null, ((_f = state.client.value) == null ? void 0 : _f.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_g = state.client.value) == null ? void 0 : _g.phone) : null, !!((_i = (_h = state.client.value) == null ? void 0 : _h.waiver_form) == null ? void 0 : _i.length) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-waiver", title: (0, import_utils3.getWaiverTitle)((_j = state.client.value) == null ? void 0 : _j.waiver_form) }, (_m = (_l = (_k = state.client.value) == null ? void 0 : _k.waiver_form) == null ? void 0 : _l.map) == null ? void 0 : _m.call(_l, (item) => {
365
366
  return /* @__PURE__ */ import_react.default.createElement("span", null, item.form_title, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-client-waiver-colon" }, ":"), item.is_filled ? /* @__PURE__ */ import_react.default.createElement(
366
367
  "span",
367
368
  {
@@ -32,6 +32,7 @@ __export(useInfoHolder_exports, {
32
32
  default: () => useInfoHolder_default
33
33
  });
34
34
  module.exports = __toCommonJS(useInfoHolder_exports);
35
+ var import_ahooks = require("ahooks");
35
36
  var import_react = require("react");
36
37
  var import_useHolderConfig = __toESM(require("./useHolderConfig"));
37
38
  var import_utils = require("../utils");
@@ -58,24 +59,22 @@ var useInfoHolder = (state, dispatch) => {
58
59
  const showAddTimeModal = (0, import_react.useMemo)(() => {
59
60
  return (0, import_utils.isOpenAddTime)(state);
60
61
  }, [state, appointment_card.quick_time]);
61
- const handleEdit = (cacheItem, type) => {
62
- setTimeout(() => {
63
- var _a2, _b2, _c2;
64
- const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(cacheItem);
65
- if (isNoSpecAndPackage) {
66
- (_a2 = editNormalServiceRef.current) == null ? void 0 : _a2.init(cacheItem);
67
- } else {
68
- (_c2 = (_b2 = detailRef.current) == null ? void 0 : _b2.init) == null ? void 0 : _c2.call(_b2, cacheItem, false, type === "edit_product");
69
- }
70
- }, 100);
71
- };
62
+ const handleEdit = (0, import_ahooks.useMemoizedFn)((cacheItem, type) => {
63
+ var _a2, _b2, _c2;
64
+ const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(cacheItem);
65
+ if (isNoSpecAndPackage) {
66
+ (_a2 = editNormalServiceRef.current) == null ? void 0 : _a2.init(cacheItem);
67
+ } else {
68
+ (_c2 = (_b2 = detailRef.current) == null ? void 0 : _b2.init) == null ? void 0 : _c2.call(_b2, cacheItem, false, type === "edit_product");
69
+ }
70
+ });
72
71
  const dispatchService = (type, payload) => {
73
72
  dispatch({
74
73
  type,
75
74
  payload: { ...payload }
76
75
  });
77
76
  };
78
- const handleAction = (dataSource) => {
77
+ const handleAction = (0, import_ahooks.useMemoizedFn)((dataSource) => {
79
78
  const cacheItem = (0, import_utils2.getProductExtend)({
80
79
  cacheItem: { ...dataSource._origin, new: 0 },
81
80
  state
@@ -87,7 +86,7 @@ var useInfoHolder = (state, dispatch) => {
87
86
  cacheItem
88
87
  }
89
88
  });
90
- };
89
+ });
91
90
  return {
92
91
  detailRef,
93
92
  handleEdit,
@@ -48,10 +48,12 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
48
48
  const { handleAddHolder } = (0, import_useAddHolder.default)(state, dispatch);
49
49
  const handleChange = (0, import_ahooks.useMemoizedFn)(
50
50
  (currentItem, type, other) => {
51
+ console.time("handleChange");
52
+ console.log(window.pp1 = performance.now(), "打开商品");
51
53
  if (state.disabledEdit || state.disableEventBookingEdit) {
52
54
  return;
53
55
  }
54
- let products = (0, import_utils.updateServices)(state, currentItem, type, other, {
56
+ let products2 = (0, import_utils.updateServices)(state, currentItem, type, other, {
55
57
  handleAddHolder
56
58
  });
57
59
  if (type === "view" || type === "edit_product") {
@@ -64,11 +66,11 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
64
66
  });
65
67
  }
66
68
  onChange({ editModal: true, cacheItem });
67
- return onEdit == null ? void 0 : onEdit({ ...product, new: 0 }, type);
69
+ return onEdit == null ? void 0 : onEdit(cacheItem, type);
68
70
  }
69
71
  const params = {
70
72
  editModal: false,
71
- value: products,
73
+ value: products2,
72
74
  edit: true,
73
75
  cacheItem: null
74
76
  };
@@ -98,27 +100,37 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
98
100
  state.isBookingCreatePage,
99
101
  state.bookingConfig
100
102
  ]);
101
- return /* @__PURE__ */ import_react.default.createElement(import_Provider.CartContext.Provider, { value: { state } }, /* @__PURE__ */ import_react.default.createElement(
102
- import_shoppingCart.default,
103
- {
104
- scenario: state.isBookingTicket2 ? "booking2" : void 0,
105
- isParallelResource,
106
- onAction,
107
- onChange: handleChange,
108
- isOpenGroup: false,
109
- isHideClearCart: true,
110
- onAddProduct: () => onChange({ addModal: true }),
111
- productParams: {
112
- ...productParams,
113
- products: (0, import_utils.formatProducts)(
114
- ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || [],
115
- state,
116
- false,
117
- true,
118
- isParallelResource
119
- )
103
+ const products = (0, import_react.useMemo)(() => {
104
+ var _a2;
105
+ console.time("products");
106
+ const p = (0, import_utils.formatProducts)(
107
+ ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) || [],
108
+ state,
109
+ false,
110
+ true,
111
+ isParallelResource
112
+ );
113
+ console.timeEnd("products");
114
+ return p;
115
+ }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value, state]);
116
+ return (0, import_react.useMemo)(() => {
117
+ console.log("render List");
118
+ return /* @__PURE__ */ import_react.default.createElement(import_Provider.CartContext.Provider, { value: { state } }, /* @__PURE__ */ import_react.default.createElement(
119
+ import_shoppingCart.default,
120
+ {
121
+ scenario: state.isBookingTicket2 ? "booking2" : void 0,
122
+ isParallelResource,
123
+ onAction,
124
+ onChange: handleChange,
125
+ isOpenGroup: false,
126
+ isHideClearCart: true,
127
+ onAddProduct: () => onChange({ addModal: true }),
128
+ productParams: {
129
+ ...productParams,
130
+ products
131
+ }
120
132
  }
121
- }
122
- ));
133
+ ));
134
+ }, [products, state, productParams]);
123
135
  };
124
136
  var Lists_default = Lists;
@@ -0,0 +1 @@
1
+ export declare const getIsPartyRoomResourceShop: (id: number) => boolean;
@@ -0,0 +1,31 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/booking/info/service/editService/constants.ts
20
+ var constants_exports = {};
21
+ __export(constants_exports, {
22
+ getIsPartyRoomResourceShop: () => getIsPartyRoomResourceShop
23
+ });
24
+ module.exports = __toCommonJS(constants_exports);
25
+ var getIsPartyRoomResourceShop = (id) => {
26
+ return [2155, 9].includes(id);
27
+ };
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ getIsPartyRoomResourceShop
31
+ });
@@ -57,10 +57,13 @@ var import_like = __toESM(require("../like"));
57
57
  var import_utils7 = require("../../utils");
58
58
  var import_serviceManager = require("../serviceManager");
59
59
  var import_EditTabs = __toESM(require("./EditTabs"));
60
+ var import_constants = require("./constants");
61
+ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
60
62
  var submitLock = false;
61
63
  var Info = (_, ref) => {
62
64
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
63
65
  const [form] = import_antd.Form.useForm();
66
+ const context = (0, import_useEngineContext.default)();
64
67
  const useTotal = import_antd.Form.useWatch("total", form);
65
68
  const useLikeStatus = import_antd.Form.useWatch("like_status", form);
66
69
  const useResource = import_antd.Form.useWatch("resource", form);
@@ -354,6 +357,7 @@ var Info = (_, ref) => {
354
357
  });
355
358
  }, [(_q = (_p = (_o = state.service) == null ? void 0 : _o.cacheItem) == null ? void 0 : _p._extend) == null ? void 0 : _q.multi_day]);
356
359
  const getResourcesData = async () => {
360
+ var _a2, _b2, _c2, _d2, _e2;
357
361
  setResourceLoading(true);
358
362
  try {
359
363
  let params = {};
@@ -373,10 +377,12 @@ var Info = (_, ref) => {
373
377
  } else {
374
378
  params.with_date_times = state.date.value.format("YYYY-MM-DD");
375
379
  }
380
+ const isPartyRoomResourceShop = (0, import_constants.getIsPartyRoomResourceShop)((_e2 = (_d2 = (_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 : _d2.globalConfig) == null ? void 0 : _e2.id);
381
+ const codes = isPartyRoomResourceShop ? ["resources", "therapist", "table", "party_room"] : ["resources", "therapist", "table"];
376
382
  let data = await state.apis.getResources({
377
383
  skip: 1,
378
384
  num: 1e3,
379
- codes: ["resources", "therapist", "table"],
385
+ codes,
380
386
  _config: { abort: true },
381
387
  ...params
382
388
  });
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
248
248
  * @Author: WangHan
249
249
  * @Date: 2024-12-24 11:32
250
250
  */
251
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
251
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -590,25 +590,25 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
590
590
  _origin: item
591
591
  };
592
592
  };
593
- lists.forEach((item) => {
594
- var _a;
595
- if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
596
- normalList.push(formItem(item));
597
- } else {
598
- groupList.push(item);
599
- }
600
- });
601
- let groups = groupList.reduce((prev, item) => {
602
- var _a;
603
- const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
604
- if (!prev[groupId]) {
605
- prev[groupId] = [];
606
- }
607
- prev[groupId].push(item);
608
- return prev;
609
- }, {});
610
593
  console.log(normalList, "normalList");
611
594
  if (isRenderGroup) {
595
+ lists.forEach((item) => {
596
+ var _a;
597
+ if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
598
+ normalList.push(formItem(item));
599
+ } else {
600
+ groupList.push(item);
601
+ }
602
+ });
603
+ let groups = groupList.reduce((prev, item) => {
604
+ var _a;
605
+ const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
606
+ if (!prev[groupId]) {
607
+ prev[groupId] = [];
608
+ }
609
+ prev[groupId].push(item);
610
+ return prev;
611
+ }, {});
612
612
  return Object.values(groups).map((d) => formItem((0, import_utils3.concatBookings)(d))).concat(normalList);
613
613
  } else {
614
614
  return lists == null ? void 0 : lists.map((item) => formItem(item));
@@ -142,7 +142,8 @@ var getTimeObj = ({
142
142
  cacheItem,
143
143
  useStartTime,
144
144
  currentResource,
145
- state,
145
+ // 没有使用该参数
146
+ // state,
146
147
  durationProps
147
148
  });
148
149
  let obj = (0, import_utils.sliceDayIntoFiveMinutes)(
@@ -242,7 +243,8 @@ var setDefaultResource = ({ cacheItem, resources }) => {
242
243
  }
243
244
  const defaultResource = defaultOriginalResource.map((d) => {
244
245
  return {
245
- ...d,
246
+ // ...d,
247
+ children: d.children,
246
248
  relation_type: d.relation_type,
247
249
  form_id: item.form_id,
248
250
  relation_id: d.id,
@@ -65,6 +65,7 @@ var AddTimeModal = () => {
65
65
  const [number, setNumber] = (0, import_react.useState)(1);
66
66
  const originServices = (0, import_react.useRef)([]);
67
67
  const [renderList, setRenderList] = (0, import_react.useState)([]);
68
+ console.log(renderList, "renderListrenderList");
68
69
  const context = (0, import_useEngineContext.default)();
69
70
  const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
70
71
  const statusMap = {
@@ -126,6 +127,7 @@ var AddTimeModal = () => {
126
127
  }
127
128
  return arr.filter(Boolean);
128
129
  }, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
130
+ console.log(currentResource, "currentResource");
129
131
  const getTimeUsableStatus = (time) => {
130
132
  var _a2, _b2;
131
133
  if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
@@ -206,6 +208,7 @@ var AddTimeModal = () => {
206
208
  setLoading("list");
207
209
  const newList = await _getAddTimeProducts();
208
210
  let list = newList.map((d) => {
211
+ debugger;
209
212
  let isUsable = (0, import_utils2.isUsableProduct)(d.add_time, state.service.cacheItem);
210
213
  return {
211
214
  ...d,
@@ -168,9 +168,11 @@ var Resources = ({
168
168
  const getIsAutoAllocation = (id) => {
169
169
  return (0, import_utils2.getAutoAllocationStorage)(id);
170
170
  };
171
+ console.log("resourcesss");
171
172
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
172
173
  var _a2;
173
174
  const cur = _value[item.form_id];
175
+ console.log(cur, "curcur");
174
176
  const errors = (cur || []).reduce((pre, d) => {
175
177
  return pre.concat((d == null ? void 0 : d.errors) || []);
176
178
  }, []);