@pisell/private-materials 3.0.194 → 3.0.196

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 (189) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +1 -1
  3. package/build/lowcode/preview.js +142 -150
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +10 -10
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +11 -11
  8. package/es/components/booking/components/customSelect/index.d.ts +1 -0
  9. package/es/components/booking/components/customSelect/index.js +6 -2
  10. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
  11. package/es/components/booking/components/footer/AppointmentProductModal/index.js +37 -0
  12. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  13. package/es/components/booking/components/footer/amount.js +45 -22
  14. package/es/components/booking/components/footer/index.js +84 -40
  15. package/es/components/booking/components/footer/utils.js +218 -32
  16. package/es/components/booking/info/addServiceVariant/index.js +8 -1
  17. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +14 -13
  19. package/es/components/booking/info/clientVariant/vertical/index.js +33 -4
  20. package/es/components/booking/info/dateRange/index.d.ts +5 -0
  21. package/es/components/booking/info/dateRange/index.js +98 -0
  22. package/es/components/booking/info/dateRange/index.less +21 -0
  23. package/es/components/booking/info/main.js +20 -8
  24. package/es/components/booking/info/model.js +3 -0
  25. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
  26. package/es/components/booking/info/pet/ChangePetModal/index.js +118 -0
  27. package/es/components/booking/info/pet/ChangePetModal/index.less +4 -0
  28. package/es/components/booking/info/pet/index.js +54 -5
  29. package/es/components/booking/info/service/addService/index.js +127 -20
  30. package/es/components/booking/info/service/addService/index.less +13 -3
  31. package/es/components/booking/info/service/addService/utils.d.ts +11 -2
  32. package/es/components/booking/info/service/addService/utils.js +49 -24
  33. package/es/components/booking/info/service/editService/index.js +232 -41
  34. package/es/components/booking/info/service/editService/index.less +18 -13
  35. package/es/components/booking/info/service2/Lists.d.ts +3 -0
  36. package/es/components/booking/info/service2/Lists.js +158 -0
  37. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
  38. package/es/components/booking/info/service2/hooks/useSelectPet.js +54 -0
  39. package/es/components/booking/info/service2/index.d.ts +3 -0
  40. package/es/components/booking/info/service2/index.js +58 -0
  41. package/es/components/booking/info/service2/status.d.ts +31 -0
  42. package/es/components/booking/info/service2/status.js +78 -0
  43. package/es/components/booking/info/service2/utils.d.ts +145 -0
  44. package/es/components/booking/info/service2/utils.js +436 -0
  45. package/es/components/booking/info/utils.d.ts +9 -0
  46. package/es/components/booking/info/utils.js +13 -0
  47. package/es/components/booking/locales.d.ts +60 -0
  48. package/es/components/booking/locales.js +75 -3
  49. package/es/components/booking/materiels/holder/index.d.ts +7 -0
  50. package/es/components/booking/materiels/holder/index.js +51 -0
  51. package/es/components/booking/model.d.ts +4 -1
  52. package/es/components/booking/model.js +4 -2
  53. package/es/components/booking/utils.d.ts +12 -3
  54. package/es/components/booking/utils.js +126 -22
  55. package/es/components/eftpos/form/index.js +6 -12
  56. package/es/components/eftpos/group/index.d.ts +2 -1
  57. package/es/components/eftpos/group/index.js +2 -1
  58. package/es/components/eftpos/index.js +2 -2
  59. package/es/components/eftposPay/tyro/index.js +17 -40
  60. package/es/components/shoppingCart/Provider.d.ts +3 -0
  61. package/es/components/shoppingCart/Provider.js +86 -0
  62. package/es/components/shoppingCart/components/Cart/Product.d.ts +4 -0
  63. package/es/components/shoppingCart/components/Cart/Product.js +96 -0
  64. package/es/components/shoppingCart/components/Cart/index.d.ts +4 -0
  65. package/es/components/shoppingCart/components/Cart/index.js +72 -0
  66. package/es/components/shoppingCart/components/Cart/index.less +68 -0
  67. package/es/components/shoppingCart/components/Empty/index.d.ts +4 -0
  68. package/es/components/shoppingCart/components/Empty/index.js +14 -0
  69. package/es/components/shoppingCart/components/Empty/index.less +19 -0
  70. package/es/components/shoppingCart/components/Render/index.d.ts +4 -0
  71. package/es/components/shoppingCart/components/Render/index.js +68 -0
  72. package/es/components/shoppingCart/components/Render/index.less +2 -0
  73. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
  74. package/es/components/shoppingCart/components/SelectHolderModal/index.js +124 -0
  75. package/es/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
  76. package/es/components/shoppingCart/hooks/useAddService.d.ts +3 -0
  77. package/es/components/shoppingCart/hooks/useAddService.js +23 -0
  78. package/es/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
  79. package/es/components/shoppingCart/hooks/useClearCart.js +54 -0
  80. package/es/components/shoppingCart/hooks/useContext.d.ts +1 -0
  81. package/es/components/shoppingCart/hooks/useContext.js +5 -0
  82. package/es/components/shoppingCart/index.d.ts +4 -0
  83. package/es/components/shoppingCart/index.js +24 -0
  84. package/es/components/shoppingCart/locales.d.ts +33 -0
  85. package/es/components/shoppingCart/locales.js +38 -0
  86. package/es/components/shoppingCart/mock.d.ts +40 -0
  87. package/es/components/shoppingCart/mock.js +40 -0
  88. package/es/components/shoppingCart/status.d.ts +2 -0
  89. package/es/components/shoppingCart/status.js +22 -0
  90. package/es/components/shoppingCart/type.d.ts +39 -0
  91. package/es/components/shoppingCart/type.js +1 -0
  92. package/es/components/shoppingCart/utils.d.ts +63 -0
  93. package/es/components/shoppingCart/utils.js +119 -0
  94. package/es/index.d.ts +1 -0
  95. package/es/index.js +2 -1
  96. package/lib/components/booking/components/customSelect/index.d.ts +1 -0
  97. package/lib/components/booking/components/customSelect/index.js +6 -2
  98. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
  99. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +59 -0
  100. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  101. package/lib/components/booking/components/footer/amount.js +26 -8
  102. package/lib/components/booking/components/footer/index.js +25 -4
  103. package/lib/components/booking/components/footer/utils.js +144 -31
  104. package/lib/components/booking/info/addServiceVariant/index.js +5 -0
  105. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  106. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +8 -7
  107. package/lib/components/booking/info/clientVariant/vertical/index.js +36 -10
  108. package/lib/components/booking/info/dateRange/index.d.ts +5 -0
  109. package/lib/components/booking/info/dateRange/index.js +111 -0
  110. package/lib/components/booking/info/dateRange/index.less +21 -0
  111. package/lib/components/booking/info/main.js +11 -4
  112. package/lib/components/booking/info/model.js +3 -0
  113. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
  114. package/lib/components/booking/info/pet/ChangePetModal/index.js +110 -0
  115. package/lib/components/booking/info/pet/ChangePetModal/index.less +4 -0
  116. package/lib/components/booking/info/pet/index.js +61 -25
  117. package/lib/components/booking/info/service/addService/index.js +95 -28
  118. package/lib/components/booking/info/service/addService/index.less +13 -3
  119. package/lib/components/booking/info/service/addService/utils.d.ts +11 -2
  120. package/lib/components/booking/info/service/addService/utils.js +31 -10
  121. package/lib/components/booking/info/service/editService/index.js +271 -122
  122. package/lib/components/booking/info/service/editService/index.less +18 -13
  123. package/lib/components/booking/info/service2/Lists.d.ts +3 -0
  124. package/lib/components/booking/info/service2/Lists.js +113 -0
  125. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
  126. package/lib/components/booking/info/service2/hooks/useSelectPet.js +50 -0
  127. package/lib/components/booking/info/service2/index.d.ts +3 -0
  128. package/lib/components/booking/info/service2/index.js +75 -0
  129. package/lib/components/booking/info/service2/status.d.ts +31 -0
  130. package/lib/components/booking/info/service2/status.js +81 -0
  131. package/lib/components/booking/info/service2/utils.d.ts +145 -0
  132. package/lib/components/booking/info/service2/utils.js +320 -0
  133. package/lib/components/booking/info/utils.d.ts +9 -0
  134. package/lib/components/booking/info/utils.js +6 -0
  135. package/lib/components/booking/locales.d.ts +60 -0
  136. package/lib/components/booking/locales.js +63 -3
  137. package/lib/components/booking/materiels/holder/index.d.ts +7 -0
  138. package/lib/components/booking/materiels/holder/index.js +65 -0
  139. package/lib/components/booking/model.d.ts +4 -1
  140. package/lib/components/booking/model.js +4 -2
  141. package/lib/components/booking/utils.d.ts +12 -3
  142. package/lib/components/booking/utils.js +79 -15
  143. package/lib/components/eftpos/form/index.js +6 -12
  144. package/lib/components/eftpos/group/index.d.ts +2 -1
  145. package/lib/components/eftpos/group/index.js +1 -0
  146. package/lib/components/eftpos/index.js +2 -2
  147. package/lib/components/eftposPay/tyro/index.js +5 -26
  148. package/lib/components/shoppingCart/Provider.d.ts +3 -0
  149. package/lib/components/shoppingCart/Provider.js +110 -0
  150. package/lib/components/shoppingCart/components/Cart/Product.d.ts +4 -0
  151. package/lib/components/shoppingCart/components/Cart/Product.js +89 -0
  152. package/lib/components/shoppingCart/components/Cart/index.d.ts +4 -0
  153. package/lib/components/shoppingCart/components/Cart/index.js +77 -0
  154. package/lib/components/shoppingCart/components/Cart/index.less +68 -0
  155. package/lib/components/shoppingCart/components/Empty/index.d.ts +4 -0
  156. package/lib/components/shoppingCart/components/Empty/index.js +43 -0
  157. package/lib/components/shoppingCart/components/Empty/index.less +19 -0
  158. package/lib/components/shoppingCart/components/Render/index.d.ts +4 -0
  159. package/lib/components/shoppingCart/components/Render/index.js +79 -0
  160. package/lib/components/shoppingCart/components/Render/index.less +2 -0
  161. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
  162. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +116 -0
  163. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
  164. package/lib/components/shoppingCart/hooks/useAddService.d.ts +3 -0
  165. package/lib/components/shoppingCart/hooks/useAddService.js +55 -0
  166. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
  167. package/lib/components/shoppingCart/hooks/useClearCart.js +71 -0
  168. package/lib/components/shoppingCart/hooks/useContext.d.ts +1 -0
  169. package/lib/components/shoppingCart/hooks/useContext.js +31 -0
  170. package/lib/components/shoppingCart/index.d.ts +4 -0
  171. package/lib/components/shoppingCart/index.js +60 -0
  172. package/lib/components/shoppingCart/locales.d.ts +33 -0
  173. package/lib/components/shoppingCart/locales.js +56 -0
  174. package/lib/components/shoppingCart/mock.d.ts +40 -0
  175. package/lib/components/shoppingCart/mock.js +76 -0
  176. package/lib/components/shoppingCart/status.d.ts +2 -0
  177. package/lib/components/shoppingCart/status.js +60 -0
  178. package/lib/components/shoppingCart/type.d.ts +39 -0
  179. package/lib/components/shoppingCart/type.js +17 -0
  180. package/lib/components/shoppingCart/utils.d.ts +63 -0
  181. package/lib/components/shoppingCart/utils.js +92 -0
  182. package/lib/index.d.ts +1 -0
  183. package/lib/index.js +3 -0
  184. package/lowcode/shopping-cart/meta.ts +98 -0
  185. package/package.json +4 -4
  186. package/es/components/eftpos/receipt/index.d.ts +0 -24
  187. package/es/components/eftpos/receipt/index.js +0 -96
  188. package/lib/components/eftpos/receipt/index.d.ts +0 -24
  189. package/lib/components/eftpos/receipt/index.js +0 -88
@@ -0,0 +1,21 @@
1
+ .pisell-lowcode__booking-service-header-date-range {
2
+ flex: 1.1;
3
+ margin-top: 16px;
4
+
5
+ .pisell-date-range-picker > div > div {
6
+ height: 44px !important;
7
+ cursor: pointer !important;
8
+ input {
9
+ cursor: pointer;
10
+ }
11
+ }
12
+
13
+ .anticon-calendar {
14
+ font-size: 20px;
15
+ color: #667085;
16
+ }
17
+ }
18
+
19
+ .pisell-lowcode__booking-service-header-date-range-terminal {
20
+ margin-top: 0;
21
+ }
@@ -23,17 +23,20 @@ import Notes from "./notes";
23
23
  import "./index.less";
24
24
  import classNames from 'classnames';
25
25
  import { Skeleton } from 'antd';
26
+ import { Service2Cart } from "./service2";
27
+ import { isDayBooking, isTerminalDayBooking } from "./service2/utils";
26
28
  import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
27
29
  var defaultModules = {
28
30
  client: 1,
29
31
  date: 1,
30
32
  service: 1,
31
33
  holder: 1,
32
- note: 1
34
+ note: 1,
35
+ service2: 0
33
36
  };
34
37
  locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
35
38
  var Info = Provider(function (props) {
36
- var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _classNames, _modal$state5, _React$createElement;
39
+ var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state5, _modal$state5$notes, _context$appHelper4, _context$appHelper4$u, _classNames, _modal$state6, _React$createElement;
37
40
  // return <Payments {...props} />;
38
41
  var style = props.style,
39
42
  globalState = props.globalState,
@@ -105,15 +108,24 @@ var Info = Provider(function (props) {
105
108
  });
106
109
  }, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
107
110
  var notes = useMemo(function () {
108
- var _modal$state3, _modal$state3$notes;
111
+ var _modal$state4, _modal$state4$notes;
109
112
  if (!modules.note) {
110
113
  return null;
111
114
  }
115
+
116
+ // 跨日预约一直显示备注
117
+ if (isDayBooking(globalState)) {
118
+ var _modal$state3, _modal$state3$notes;
119
+ return /*#__PURE__*/React.createElement(AddNote, {
120
+ 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,
121
+ onChange: addNote
122
+ });
123
+ }
112
124
  return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' || globalState.isBookingCreatePage ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
113
- 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,
125
+ value: (_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,
114
126
  onChange: addNote
115
127
  });
116
- }, [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]);
128
+ }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state5 = modal.state) === null || _modal$state5 === void 0 ? void 0 : (_modal$state5$notes = _modal$state5.notes) === null || _modal$state5$notes === void 0 ? void 0 : _modal$state5$notes.orderNote]);
117
129
  return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
118
130
  style: style,
119
131
  header: header,
@@ -124,9 +136,9 @@ var Info = Provider(function (props) {
124
136
  })
125
137
  }, _defineProperty(_React$createElement, "style", {
126
138
  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'
127
- }), _defineProperty(_React$createElement, "bodyClassName", classNames('booking-info-warp', (_classNames = {}, _defineProperty(_classNames, 'create-booking-page-info-wrap', isBookingCreatePage), _defineProperty(_classNames, 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode), _classNames))), _React$createElement), /*#__PURE__*/React.createElement("div", {
139
+ }), _defineProperty(_React$createElement, "bodyClassName", classNames('booking-info-warp', (_classNames = {}, _defineProperty(_classNames, 'create-booking-page-info-wrap', isBookingCreatePage), _defineProperty(_classNames, 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode && !isTerminalDayBooking(modal.state)), _classNames))), _React$createElement), /*#__PURE__*/React.createElement("div", {
128
140
  className: "booking-info"
129
- }, createHeader, 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, /*#__PURE__*/React.createElement(Skeleton, {
141
+ }, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state6 = modal.state) !== null && _modal$state6 !== void 0 && _modal$state6.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, /*#__PURE__*/React.createElement(Skeleton, {
130
142
  loading: globalState.loading,
131
143
  round: true,
132
144
  active: true,
@@ -134,6 +146,6 @@ var Info = Provider(function (props) {
134
146
  style: {
135
147
  paddingTop: 20
136
148
  }
137
- }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null))) : null);
149
+ }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, modules.service2 ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service2Cart, null) : null) : null, notes, slot ? slot : null))) : null);
138
150
  });
139
151
  export default Info;
@@ -64,6 +64,9 @@ var _miniRedux = miniRedux({
64
64
  _val.disabledEdit = false;
65
65
  }
66
66
  state.setGlobalState(_val);
67
+ },
68
+ setActiveCartId: function setActiveCartId(state, payload) {
69
+ state.setGlobalState(payload);
67
70
  }
68
71
  },
69
72
  reducers: {
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
+ export default _default;
@@ -0,0 +1,118 @@
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
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+ 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; }
15
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ import React, { useState, forwardRef, useImperativeHandle } from 'react';
18
+ import { locales } from '@pisell/utils';
19
+ import { PisellModal } from '@pisell/materials';
20
+ import { appointmentTypes } from "../../service2/status";
21
+ import "./index.less";
22
+ var ChangePetModal = function ChangePetModal(props, ref) {
23
+ var _useState = useState(false),
24
+ _useState2 = _slicedToArray(_useState, 2),
25
+ open = _useState2[0],
26
+ setOpen = _useState2[1];
27
+ var _useState3 = useState({}),
28
+ _useState4 = _slicedToArray(_useState3, 2),
29
+ params = _useState4[0],
30
+ setParams = _useState4[1];
31
+ useImperativeHandle(ref, function () {
32
+ return {
33
+ open: function open(e) {
34
+ setParams(e);
35
+ setOpen(true);
36
+ }
37
+ };
38
+ });
39
+
40
+ /**
41
+ * @title: 确认之后的操作
42
+ * @description:
43
+ * @param {string} type
44
+ * @return {*}
45
+ * @Author: WangHan
46
+ * @Date: 2024-12-12 22:56
47
+ */
48
+ var handleProduct = function handleProduct(type) {
49
+ var ids = params.ids,
50
+ service = params.service,
51
+ dispatch = params.dispatch,
52
+ setGlobalState = params.setGlobalState,
53
+ state = params.state;
54
+ var _service = _toConsumableArray(service || []);
55
+ if (type === 'ok') {
56
+ var _service2;
57
+ // 将商品放在open items中
58
+ _service = (_service2 = _service) === null || _service2 === void 0 ? void 0 : _service2.map(function (item) {
59
+ if (ids !== null && ids !== void 0 && ids.includes(item._extend.holder_id)) {
60
+ return _objectSpread(_objectSpread({}, item), {}, {
61
+ _extend: _objectSpread(_objectSpread({}, item._extend || {}), {}, {
62
+ holder_id: 0
63
+ })
64
+ });
65
+ }
66
+ return item;
67
+ });
68
+
69
+ // 预约商品不能放在open items中, 所以过滤掉 holder_id为0 并且是预约商品的数据
70
+ _service = _service.filter(function (item) {
71
+ var _item$_extend;
72
+ return !((item === null || item === void 0 ? void 0 : (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.holder_id) === 0 && appointmentTypes.includes(item.extension_type));
73
+ });
74
+ } else {
75
+ // 将商品数据清空
76
+ _service = _service.filter(function (item) {
77
+ return !ids.includes(item._extend.holder_id);
78
+ });
79
+ }
80
+
81
+ // 更新服务商品列表
82
+ if (dispatch) {
83
+ dispatch({
84
+ type: 'setService',
85
+ payload: {
86
+ value: _toConsumableArray(_service),
87
+ edit: true
88
+ }
89
+ });
90
+ } else {
91
+ setGlobalState({
92
+ service: _objectSpread(_objectSpread({}, state.service), {}, {
93
+ edit: true,
94
+ value: _toConsumableArray(_service)
95
+ })
96
+ });
97
+ }
98
+ setOpen(false);
99
+ };
100
+ return /*#__PURE__*/React.createElement(PisellModal.Information, {
101
+ open: open,
102
+ width: 432,
103
+ title: locales.getText('pisell2.text.change.pet.title'),
104
+ describe: /*#__PURE__*/React.createElement("div", {
105
+ className: "pisell2-change-pet-modal-content"
106
+ }, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.text.change.pet.content')), /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.text.change.pet.content1'))),
107
+ cancelText: locales.getText('pisell2.text.change.pet.cancel'),
108
+ okText: locales.getText('pisell2.text.change.pet.confirm'),
109
+ closable: true,
110
+ onOk: function onOk() {
111
+ return handleProduct('ok');
112
+ },
113
+ onCancel: function onCancel() {
114
+ return handleProduct('cancel');
115
+ }
116
+ });
117
+ };
118
+ export default /*#__PURE__*/forwardRef(ChangePetModal);
@@ -0,0 +1,4 @@
1
+ .pisell2-change-pet-modal-content {
2
+ display: flex;
3
+ flex-direction: column;
4
+ }
@@ -18,7 +18,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
18
18
  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; }
19
19
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
- import React, { useContext, useEffect, useMemo, useState } from 'react';
21
+ import React, { useContext, useEffect, useMemo, useState, useRef } from 'react';
22
22
  import User01 from '@pisell/icon/es/User01';
23
23
  import { Context } from "../model";
24
24
  import { Avatar, Skeleton, Button } from 'antd';
@@ -28,7 +28,9 @@ import FormsCom from "../../forms/forms";
28
28
  import { changeFormValues, sortFormValues } from "../../forms/format";
29
29
  import { isWalkIn } from "../../utils";
30
30
  import useEngineContext from "../../../../hooks/useEngineContext";
31
- import { useMemoizedFn } from "ahooks";
31
+ import { useMemoizedFn } from 'ahooks';
32
+ import { isDayBooking } from "../../info/service2/utils";
33
+ import ChangePetModal from "./ChangePetModal";
32
34
  var defaultParams = {
33
35
  skip: 1,
34
36
  num: 20,
@@ -64,6 +66,7 @@ var Pet = function Pet(props) {
64
66
  _useState8 = _slicedToArray(_useState7, 2),
65
67
  params = _useState8[0],
66
68
  setParams = _useState8[1];
69
+ var changePetRef = useRef(null);
67
70
  state = state || (props === null || props === void 0 ? void 0 : props.state);
68
71
  dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
69
72
  // board设置, 获取预约主体
@@ -298,10 +301,19 @@ var Pet = function Pet(props) {
298
301
  var cur = _toConsumableArray(state.pet.value[petForm.form_id] || []);
299
302
  var options = ((_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : (_state$pet3$formData = _state$pet3.formData) === null || _state$pet3$formData === void 0 ? void 0 : (_state$pet3$formData$ = _state$pet3$formData[0]) === null || _state$pet3$formData$ === void 0 ? void 0 : _state$pet3$formData$.options) || [];
300
303
  if (res.type === 'delete') {
304
+ var isDay = isDayBooking(state);
305
+
306
+ // 跨日预约在不能编辑情况下不能删除
307
+ if (isDay && state.disabledEdit) return cur;
301
308
  cur = cur.filter(function (d) {
302
309
  return d.form_record_id !== item.form_record_id;
303
310
  });
304
311
  _addCallback();
312
+
313
+ // 跨日预约移除的时候则删除商品数据
314
+ if (isDay) {
315
+ handleDayChange(item);
316
+ }
305
317
  } else {
306
318
  var obj = {
307
319
  customer: item === null || item === void 0 ? void 0 : item.customer,
@@ -476,6 +488,41 @@ var Pet = function Pet(props) {
476
488
  }
477
489
  }, locales.getText('pisell2.text.load-more'))) : null;
478
490
  }, [loadLoading, params, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : (_state$pet9$formData$ = _state$pet9$formData[0]) === null || _state$pet9$formData$ === void 0 ? void 0 : (_state$pet9$formData$2 = _state$pet9$formData$.options) === null || _state$pet9$formData$2 === void 0 ? void 0 : _state$pet9$formData$2.length]);
491
+ var handleDayChange = function handleDayChange(e) {
492
+ var _state$service$value;
493
+ var id = e === null || e === void 0 ? void 0 : e.form_record_id;
494
+ var service = (_state$service$value = state.service.value) === null || _state$service$value === void 0 ? void 0 : _state$service$value.filter(function (item) {
495
+ return item._extend.holder_id === id;
496
+ });
497
+
498
+ // 有form_id 并且购物车下有商品数据
499
+ if (id && service !== null && service !== void 0 && service.length) {
500
+ var _state$service;
501
+ changePetRef === null || changePetRef === void 0 ? void 0 : changePetRef.current.open({
502
+ ids: [id],
503
+ dispatch: dispatch,
504
+ service: ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || []
505
+ });
506
+ }
507
+ };
508
+
509
+ /**
510
+ * @title: 跨日预约其他自定义方法
511
+ * @description:
512
+ * @param {*} useMemo
513
+ * @return {*}
514
+ * @Author: WangHan
515
+ * @Date: 2024-12-12 22:30
516
+ */
517
+ var dayCustomSelect = useMemo(function () {
518
+ var isDay = isDayBooking(state);
519
+ if (isDay) {
520
+ return {
521
+ handleDayChange: handleDayChange
522
+ };
523
+ }
524
+ return {};
525
+ }, [state.renderType, state.service.value]);
479
526
  return useMemo(function () {
480
527
  var _state$client11;
481
528
  return /*#__PURE__*/React.createElement("div", {
@@ -502,7 +549,7 @@ var Pet = function Pet(props) {
502
549
  value: state.pet.value,
503
550
  onChange: onValueChange,
504
551
  client: (_state$client11 = state.client) === null || _state$client11 === void 0 ? void 0 : _state$client11.value,
505
- customSelectProps: {
552
+ customSelectProps: _objectSpread({
506
553
  loading: loading,
507
554
  handleViewItem: handleViewItem,
508
555
  virtualListHeight: window.innerHeight - 213 - 57 - 16,
@@ -520,7 +567,7 @@ var Pet = function Pet(props) {
520
567
  },
521
568
  handleOpenModal: handleOpenModal,
522
569
  previewItemTitleRender: previewItemTitleRender
523
- },
570
+ }, dayCustomSelect),
524
571
  optionRender: function optionRender(item) {
525
572
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
526
573
  className: "pisell-lowcode__booking-pet-list-item-avatar",
@@ -578,7 +625,9 @@ var Pet = function Pet(props) {
578
625
  return addCallback;
579
626
  }()
580
627
  }, addButtonProps)
581
- })));
628
+ })), /*#__PURE__*/React.createElement(ChangePetModal, {
629
+ ref: changePetRef
630
+ }));
582
631
  }, [valueLoading, hideTitle, state.pet.value, state.pet.formData, state.action, state.modalOpen, state.pet.value, (_state$client12 = state.client) === null || _state$client12 === void 0 ? void 0 : _state$client12.value, loading, state.disabledEdit, state.isTerminal, state.disableEventBookingEdit, params.search, loadMore, addButtonProps, state.isBookingCreatePage]);
583
632
  };
584
633
  export default Pet;
@@ -24,18 +24,22 @@ import Drawer from "../../../components/drawer";
24
24
  import TabProduct from "../../../components/TabProduct";
25
25
  import { Context } from "../../model";
26
26
  import AddButton from "../../../components/addButton";
27
- import { Input, Skeleton } from 'antd';
27
+ import { Input, Skeleton, Row, Col } from 'antd';
28
28
  import "./index.less";
29
29
  import useEngineContext from "../../../../../hooks/useEngineContext";
30
30
  import { getProductDetail } from "../serve";
31
31
  import { getIsBundleOrCombination } from "../../utils";
32
+ import DateRange from "../../dateRange";
32
33
  import { getProductExtend } from "./utils";
33
34
  import { formatProductListByCategory, getProductTotalPrice, request } from "../../../utils";
35
+ import { isDayBooking, isAppointment, getDayProducts, holderId } from "../../service2/utils";
36
+ import { inputDateCol, appointmentTypes } from "../../service2/status";
34
37
  import { locales, getUniqueId } from '@pisell/utils';
35
38
  import { useMemoizedFn, useUpdateEffect } from 'ahooks';
39
+ import debounce from 'lodash/debounce';
36
40
  var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
37
41
  var Info = function Info(props) {
38
- var _state$service3, _state$service6, _state$service8, _state$service8$cache;
42
+ var _state$service3, _state2, _state$service6, _state$service8, _state$service8$cache, _state3;
39
43
  var onEdit = props.onEdit,
40
44
  drawerProps = props.drawerProps,
41
45
  renderMode = props.renderMode;
@@ -51,11 +55,60 @@ var Info = function Info(props) {
51
55
  loading = _useState4[0],
52
56
  setLoading = _useState4[1];
53
57
  var searchRef = useRef();
58
+ // 头部高度
59
+ var headerRef = useRef(null);
60
+ var _useState5 = useState(0),
61
+ _useState6 = _slicedToArray(_useState5, 2),
62
+ headerHeight = _useState6[0],
63
+ setHeaderHeight = _useState6[1];
54
64
  var context = useEngineContext();
55
65
  state = state || (props === null || props === void 0 ? void 0 : props.state);
56
66
  dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
57
67
  request.setRequest(context.appHelper.utils.request);
58
68
 
69
+ /**
70
+ * @title: 是否是跨日预约
71
+ * @description:
72
+ * @param {*} useMemo
73
+ * @return {*}
74
+ * @Author: WangHan
75
+ * @Date: 2024-12-09 15:46
76
+ */
77
+ var isDay = useMemo(function () {
78
+ return isDayBooking(state);
79
+ }, [state.renderType]);
80
+
81
+ /**
82
+ * @title: 监听元素高度变化的函数
83
+ * @description:
84
+ * @return {*}
85
+ * @Author: WangHan
86
+ * @Date: 2024-12-10 17:13
87
+ */
88
+ var handleResize = function handleResize() {
89
+ if (headerRef !== null && headerRef !== void 0 && headerRef.current) {
90
+ var _headerRef$current;
91
+ setHeaderHeight((_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.offsetHeight);
92
+ }
93
+ };
94
+
95
+ // 使用防抖的监听函数
96
+ var debouncedHandleResize = debounce(handleResize, 100);
97
+ useEffect(function () {
98
+ if (isDay && state.isTerminalDayBookingPage) {
99
+ // 初始化时设置一次高度
100
+ handleResize();
101
+
102
+ // 添加窗口大小变化的监听器
103
+ window.addEventListener('resize', debouncedHandleResize);
104
+ }
105
+
106
+ // 清理函数
107
+ return function () {
108
+ window.removeEventListener('resize', debouncedHandleResize);
109
+ };
110
+ }, [debouncedHandleResize]);
111
+
59
112
  /**
60
113
  * @title: 如果商品只有一个, 则自动设置默认商品
61
114
  * @description:
@@ -120,7 +173,7 @@ var Info = function Info(props) {
120
173
  _extend: {
121
174
  start_date: state.date.value,
122
175
  startDate: state.date.value,
123
- endDate: state.date.value,
176
+ endDate: isDay ? state.date.end_date : state.date.value,
124
177
  start_time: '00:00:00',
125
178
  duration: 10,
126
179
  quantity: 1,
@@ -151,7 +204,7 @@ var Info = function Info(props) {
151
204
  var getServices = /*#__PURE__*/function () {
152
205
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
153
206
  var _state$eventOtherPara, _state$eventOtherPara2, _state$eventOtherPara3;
154
- var data;
207
+ var dayParams, data, lists, _state, id;
155
208
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
156
209
  while (1) switch (_context2.prev = _context2.next) {
157
210
  case 0:
@@ -170,8 +223,12 @@ var Info = function Info(props) {
170
223
  setLoading(false);
171
224
  return _context2.abrupt("return");
172
225
  case 5:
173
- _context2.next = 7;
174
- return state.apis.getServices(_objectSpread({
226
+ dayParams = {}; // 跨日预约
227
+ if (isDay) {
228
+ dayParams.extension_type = ['normal', 'product_appointment'];
229
+ }
230
+ _context2.next = 9;
231
+ return state.apis.getServices(_objectSpread(_objectSpread({
175
232
  skip: 1,
176
233
  num: 500,
177
234
  extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket'],
@@ -188,22 +245,27 @@ var Info = function Info(props) {
188
245
  _config: {
189
246
  useCache: true
190
247
  }
191
- }));
192
- case 7:
248
+ }), dayParams));
249
+ case 9:
193
250
  data = _context2.sent;
194
251
  setLoading(false);
252
+ lists = (data === null || data === void 0 ? void 0 : data.list) || []; // 跨日预约过滤商品列表
253
+ if (isDay) {
254
+ id = holderId(state);
255
+ lists = getDayProducts(id, lists, (_state = state) === null || _state === void 0 ? void 0 : _state.isTerminalDayBookingPage);
256
+ }
195
257
 
196
258
  // 只有自动获取列表的时候才设置商品, 手动点击添加按钮的时候不设置
197
259
  if (!state.service.addModal) {
198
- setDefaultService(data === null || data === void 0 ? void 0 : data.list);
260
+ setDefaultService(lists);
199
261
  }
200
262
  dispatch({
201
263
  type: 'setService',
202
264
  payload: {
203
- services: (data === null || data === void 0 ? void 0 : data.list) || []
265
+ services: lists
204
266
  }
205
267
  });
206
- case 11:
268
+ case 15:
207
269
  case "end":
208
270
  return _context2.stop();
209
271
  }
@@ -268,6 +330,13 @@ var Info = function Info(props) {
268
330
  },
269
331
  new: 1
270
332
  });
333
+
334
+ // 跨日预约
335
+ if (isDay) {
336
+ cacheItem._extend.holder_id = holderId(state);
337
+ cacheItem._extend.end_date = state.date.end_date;
338
+ cacheItem._extend.sub_type = 'days';
339
+ }
271
340
  var _total = getProductTotalPrice(cacheItem);
272
341
  // 用于折扣 可修改
273
342
  cacheItem._extend.total = _total;
@@ -288,7 +357,11 @@ var Info = function Info(props) {
288
357
  cacheItem: cacheItem,
289
358
  state: state
290
359
  });
291
- if (state.renderType === 'eventBooking') {
360
+
361
+ // 普通商品
362
+ if (isDay && !isAppointment(item, state)) {
363
+ cacheItem.autoClose = !_isEdit;
364
+ } else if (state.renderType === 'eventBooking') {
292
365
  cacheItem.autoClose = false;
293
366
  } else {
294
367
  var _state$service;
@@ -310,13 +383,23 @@ var Info = function Info(props) {
310
383
  var renderList = useMemo(function () {
311
384
  var _state$service2;
312
385
  var _list = ((_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.services) || [];
386
+
387
+ // 跨日预约
388
+ if (isDay) {
389
+ // 公共购物车下过滤掉预约商品
390
+ if (!holderId(state)) {
391
+ _list = _list.filter(function (item) {
392
+ return !appointmentTypes.includes(item.extension_type);
393
+ });
394
+ }
395
+ }
313
396
  var isIncludes = function isIncludes(str) {
314
397
  return str.toLowerCase().indexOf(search.toLowerCase()) !== -1;
315
398
  };
316
399
  return formatProductListByCategory(_list, search ? function (item) {
317
400
  return isIncludes(item.title);
318
401
  } : undefined);
319
- }, [search, (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.services]);
402
+ }, [search, (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.services, (_state2 = state) === null || _state2 === void 0 ? void 0 : _state2.activeCartId]);
320
403
  console.log('state.service.renderList', renderList);
321
404
  var isService = useMemo(function () {
322
405
  var _state$service4, _state$service4$value;
@@ -362,6 +445,10 @@ var Info = function Info(props) {
362
445
  }
363
446
  }, [state.renderType, state.modalOpen]);
364
447
  var addButton = useMemo(function () {
448
+ // 跨日预约不显示添加服务按钮
449
+ if (isDay) {
450
+ return;
451
+ }
365
452
  if (state.isBookingCreatePage) {
366
453
  return /*#__PURE__*/React.createElement("div", {
367
454
  style: {
@@ -396,11 +483,31 @@ var Info = function Info(props) {
396
483
  var isRenderCurrent = useMemo(function () {
397
484
  return renderMode === 'current';
398
485
  }, [renderMode]);
486
+
487
+ /**
488
+ * @title: 日期宽度
489
+ * @description:
490
+ * @param {*} useMemo
491
+ * @return {*}
492
+ * @Author: WangHan
493
+ * @Date: 2024-12-09 15:46
494
+ */
495
+ var colSpan = useMemo(function () {
496
+ var isTerminal = state.isTerminalDayBookingPage;
497
+ var showDate = !!(isDay && holderId(state));
498
+ return inputDateCol(showDate, isTerminal);
499
+ }, [state.isTerminalDayBookingPage, isDay, holderId(state)]);
399
500
  return useMemo(function () {
400
501
  var _state$service7, _state$service7$cache;
401
502
  var header = /*#__PURE__*/React.createElement("div", {
402
- className: 'pisell-lowcode__booking-service-header'
403
- }, /*#__PURE__*/React.createElement(Input, {
503
+ className: 'pisell-lowcode__booking-service-header',
504
+ ref: headerRef
505
+ }, /*#__PURE__*/React.createElement(Row, {
506
+ gutter: [16, 16]
507
+ }, isDay && holderId(state) ? /*#__PURE__*/React.createElement(Col, colSpan.date, /*#__PURE__*/React.createElement(DateRange, {
508
+ state: state,
509
+ dispatch: dispatch
510
+ })) : null, /*#__PURE__*/React.createElement(Col, colSpan.input, /*#__PURE__*/React.createElement(Input, {
404
511
  ref: searchRef,
405
512
  prefix: /*#__PURE__*/React.createElement(SearchLg, null),
406
513
  style: {
@@ -413,9 +520,9 @@ var Info = function Info(props) {
413
520
  onChange: function onChange(e) {
414
521
  setSearch(e.target.value);
415
522
  }
416
- }));
523
+ }))));
417
524
  var content = /*#__PURE__*/React.createElement("div", {
418
- className: 'pisell-lowcode__booking-service-body'
525
+ className: isDay && headerHeight > 76 ? 'pisell-lowcode__booking-service-date-body' : 'pisell-lowcode__booking-service-body'
419
526
  }, /*#__PURE__*/React.createElement(TabProduct, {
420
527
  list: renderList,
421
528
  amountSymbol: state.amountSymbol,
@@ -438,8 +545,8 @@ var Info = function Info(props) {
438
545
  round: true
439
546
  }), addButton, /*#__PURE__*/React.createElement(Drawer, _extends({
440
547
  titleNoWrap: true,
441
- open: state.service.addModal && !state.isBookingCreatePage,
442
- title: locales.getText('pisell2.text.select-service'),
548
+ open: state.service.addModal && !state.isBookingCreatePage && !state.isTerminalDayBookingPage,
549
+ title: isDay ? locales.getText('pisell2.text.select.items') : locales.getText('pisell2.text.select-service'),
443
550
  rootClassName: "booking-server-wrap",
444
551
  onClose: function onClose() {
445
552
  dispatch({
@@ -452,6 +559,6 @@ var Info = function Info(props) {
452
559
  },
453
560
  header: header
454
561
  }, drawerProps || {}), content));
455
- }, [(_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : (_state$service8$cache = _state$service8.cacheItem) === null || _state$service8$cache === void 0 ? void 0 : _state$service8$cache.autoClose, addButton, state.service.addModal, locales, search, renderList, state.amountSymbol]);
562
+ }, [(_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : (_state$service8$cache = _state$service8.cacheItem) === null || _state$service8$cache === void 0 ? void 0 : _state$service8$cache.autoClose, addButton, state.service.addModal, locales, search, renderList, state.amountSymbol, state.renderType, (_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.activeCartId, headerHeight, holderId(state)]);
456
563
  };
457
564
  export default Info;