@pisell/private-materials 3.0.197 → 3.0.199

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 (198) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/components/customSelect/index.d.ts +0 -1
  12. package/es/components/booking/components/customSelect/index.js +2 -6
  13. package/es/components/booking/components/footer/amount.js +22 -45
  14. package/es/components/booking/components/footer/index.js +40 -84
  15. package/es/components/booking/components/footer/utils.js +32 -218
  16. package/es/components/booking/info/addServiceVariant/index.js +1 -8
  17. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
  19. package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
  20. package/es/components/booking/info/main.js +8 -20
  21. package/es/components/booking/info/model.js +0 -3
  22. package/es/components/booking/info/pet/index.js +5 -54
  23. package/es/components/booking/info/service/addService/index.js +20 -127
  24. package/es/components/booking/info/service/addService/index.less +3 -13
  25. package/es/components/booking/info/service/addService/utils.d.ts +2 -11
  26. package/es/components/booking/info/service/addService/utils.js +24 -49
  27. package/es/components/booking/info/service/editService/index.js +41 -232
  28. package/es/components/booking/info/service/editService/index.less +13 -18
  29. package/es/components/booking/info/utils.d.ts +0 -9
  30. package/es/components/booking/info/utils.js +0 -13
  31. package/es/components/booking/locales.d.ts +0 -60
  32. package/es/components/booking/locales.js +3 -75
  33. package/es/components/booking/model.d.ts +1 -4
  34. package/es/components/booking/model.js +2 -4
  35. package/es/components/booking/utils.d.ts +3 -12
  36. package/es/components/booking/utils.js +22 -126
  37. package/es/components/eftpos/form/index.js +12 -6
  38. package/es/components/eftpos/group/index.d.ts +1 -2
  39. package/es/components/eftpos/group/index.js +1 -2
  40. package/es/components/eftpos/index.js +2 -2
  41. package/es/components/eftpos/receipt/index.d.ts +24 -0
  42. package/es/components/eftpos/receipt/index.js +96 -0
  43. package/es/components/eftposPay/helper.d.ts +1 -0
  44. package/es/components/eftposPay/helper.js +14 -0
  45. package/es/components/eftposPay/hooks.d.ts +1 -1
  46. package/es/components/eftposPay/tyro/index.js +51 -20
  47. package/es/index.d.ts +0 -1
  48. package/es/index.js +1 -2
  49. package/lib/components/booking/components/customSelect/index.d.ts +0 -1
  50. package/lib/components/booking/components/customSelect/index.js +2 -6
  51. package/lib/components/booking/components/footer/amount.js +8 -26
  52. package/lib/components/booking/components/footer/index.js +4 -25
  53. package/lib/components/booking/components/footer/utils.js +31 -144
  54. package/lib/components/booking/info/addServiceVariant/index.js +0 -5
  55. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  56. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
  57. package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
  58. package/lib/components/booking/info/main.js +4 -11
  59. package/lib/components/booking/info/model.js +0 -3
  60. package/lib/components/booking/info/pet/index.js +25 -61
  61. package/lib/components/booking/info/service/addService/index.js +28 -95
  62. package/lib/components/booking/info/service/addService/index.less +3 -13
  63. package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
  64. package/lib/components/booking/info/service/addService/utils.js +10 -31
  65. package/lib/components/booking/info/service/editService/index.js +122 -271
  66. package/lib/components/booking/info/service/editService/index.less +13 -18
  67. package/lib/components/booking/info/utils.d.ts +0 -9
  68. package/lib/components/booking/info/utils.js +0 -6
  69. package/lib/components/booking/locales.d.ts +0 -60
  70. package/lib/components/booking/locales.js +3 -63
  71. package/lib/components/booking/model.d.ts +1 -4
  72. package/lib/components/booking/model.js +2 -4
  73. package/lib/components/booking/utils.d.ts +3 -12
  74. package/lib/components/booking/utils.js +15 -79
  75. package/lib/components/eftpos/form/index.js +12 -6
  76. package/lib/components/eftpos/group/index.d.ts +1 -2
  77. package/lib/components/eftpos/group/index.js +0 -1
  78. package/lib/components/eftpos/index.js +2 -2
  79. package/lib/components/eftpos/receipt/index.d.ts +24 -0
  80. package/lib/components/eftpos/receipt/index.js +88 -0
  81. package/lib/components/eftposPay/helper.d.ts +1 -0
  82. package/lib/components/eftposPay/helper.js +21 -0
  83. package/lib/components/eftposPay/hooks.d.ts +1 -1
  84. package/lib/components/eftposPay/tyro/index.js +36 -7
  85. package/lib/index.d.ts +0 -1
  86. package/lib/index.js +0 -3
  87. package/package.json +3 -3
  88. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  89. package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -37
  90. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  91. package/es/components/booking/info/dateRange/index.d.ts +0 -5
  92. package/es/components/booking/info/dateRange/index.js +0 -98
  93. package/es/components/booking/info/dateRange/index.less +0 -21
  94. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  95. package/es/components/booking/info/pet/ChangePetModal/index.js +0 -118
  96. package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
  97. package/es/components/booking/info/service2/Lists.d.ts +0 -3
  98. package/es/components/booking/info/service2/Lists.js +0 -158
  99. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  100. package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
  101. package/es/components/booking/info/service2/index.d.ts +0 -3
  102. package/es/components/booking/info/service2/index.js +0 -58
  103. package/es/components/booking/info/service2/status.d.ts +0 -31
  104. package/es/components/booking/info/service2/status.js +0 -78
  105. package/es/components/booking/info/service2/utils.d.ts +0 -145
  106. package/es/components/booking/info/service2/utils.js +0 -436
  107. package/es/components/booking/materiels/holder/index.d.ts +0 -7
  108. package/es/components/booking/materiels/holder/index.js +0 -51
  109. package/es/components/shoppingCart/Provider.d.ts +0 -3
  110. package/es/components/shoppingCart/Provider.js +0 -86
  111. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  112. package/es/components/shoppingCart/components/Cart/Product.js +0 -96
  113. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
  114. package/es/components/shoppingCart/components/Cart/index.js +0 -72
  115. package/es/components/shoppingCart/components/Cart/index.less +0 -68
  116. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
  117. package/es/components/shoppingCart/components/Empty/index.js +0 -14
  118. package/es/components/shoppingCart/components/Empty/index.less +0 -19
  119. package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
  120. package/es/components/shoppingCart/components/Render/index.js +0 -68
  121. package/es/components/shoppingCart/components/Render/index.less +0 -2
  122. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  123. package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
  124. package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  125. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  126. package/es/components/shoppingCart/hooks/useAddService.js +0 -23
  127. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  128. package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
  129. package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
  130. package/es/components/shoppingCart/hooks/useContext.js +0 -5
  131. package/es/components/shoppingCart/index.d.ts +0 -4
  132. package/es/components/shoppingCart/index.js +0 -24
  133. package/es/components/shoppingCart/locales.d.ts +0 -33
  134. package/es/components/shoppingCart/locales.js +0 -38
  135. package/es/components/shoppingCart/mock.d.ts +0 -40
  136. package/es/components/shoppingCart/mock.js +0 -40
  137. package/es/components/shoppingCart/status.d.ts +0 -2
  138. package/es/components/shoppingCart/status.js +0 -22
  139. package/es/components/shoppingCart/type.d.ts +0 -39
  140. package/es/components/shoppingCart/type.js +0 -1
  141. package/es/components/shoppingCart/utils.d.ts +0 -63
  142. package/es/components/shoppingCart/utils.js +0 -119
  143. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  144. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -59
  145. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  146. package/lib/components/booking/info/dateRange/index.d.ts +0 -5
  147. package/lib/components/booking/info/dateRange/index.js +0 -111
  148. package/lib/components/booking/info/dateRange/index.less +0 -21
  149. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  150. package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -110
  151. package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
  152. package/lib/components/booking/info/service2/Lists.d.ts +0 -3
  153. package/lib/components/booking/info/service2/Lists.js +0 -113
  154. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  155. package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
  156. package/lib/components/booking/info/service2/index.d.ts +0 -3
  157. package/lib/components/booking/info/service2/index.js +0 -75
  158. package/lib/components/booking/info/service2/status.d.ts +0 -31
  159. package/lib/components/booking/info/service2/status.js +0 -81
  160. package/lib/components/booking/info/service2/utils.d.ts +0 -145
  161. package/lib/components/booking/info/service2/utils.js +0 -320
  162. package/lib/components/booking/materiels/holder/index.d.ts +0 -7
  163. package/lib/components/booking/materiels/holder/index.js +0 -65
  164. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  165. package/lib/components/shoppingCart/Provider.js +0 -110
  166. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  167. package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
  168. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
  169. package/lib/components/shoppingCart/components/Cart/index.js +0 -77
  170. package/lib/components/shoppingCart/components/Cart/index.less +0 -68
  171. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
  172. package/lib/components/shoppingCart/components/Empty/index.js +0 -43
  173. package/lib/components/shoppingCart/components/Empty/index.less +0 -19
  174. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
  175. package/lib/components/shoppingCart/components/Render/index.js +0 -79
  176. package/lib/components/shoppingCart/components/Render/index.less +0 -2
  177. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  178. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
  179. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  180. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  181. package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
  182. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  183. package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
  184. package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
  185. package/lib/components/shoppingCart/hooks/useContext.js +0 -31
  186. package/lib/components/shoppingCart/index.d.ts +0 -4
  187. package/lib/components/shoppingCart/index.js +0 -60
  188. package/lib/components/shoppingCart/locales.d.ts +0 -33
  189. package/lib/components/shoppingCart/locales.js +0 -56
  190. package/lib/components/shoppingCart/mock.d.ts +0 -40
  191. package/lib/components/shoppingCart/mock.js +0 -76
  192. package/lib/components/shoppingCart/status.d.ts +0 -2
  193. package/lib/components/shoppingCart/status.js +0 -60
  194. package/lib/components/shoppingCart/type.d.ts +0 -39
  195. package/lib/components/shoppingCart/type.js +0 -17
  196. package/lib/components/shoppingCart/utils.d.ts +0 -63
  197. package/lib/components/shoppingCart/utils.js +0 -92
  198. package/lowcode/shopping-cart/meta.ts +0 -98
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // src/components/booking/components/footer/utils.ts
@@ -34,13 +24,9 @@ __export(utils_exports, {
34
24
  formatValues: () => formatValues
35
25
  });
36
26
  module.exports = __toCommonJS(utils_exports);
37
- var import_dayjs = __toESM(require("dayjs"));
38
27
  var import_utils = require("../../utils");
39
28
  var import_utils2 = require("../../utils");
40
29
  var import_utilsByBooking = require("../../info2/utilsByBooking");
41
- var import_utils3 = require("../../utils");
42
- var import_status = require("../../info/service2/status");
43
- var import_utils4 = require("../../info/service2/utils");
44
30
  var formatNote = (data) => {
45
31
  var _a;
46
32
  return ((_a = data.notes) == null ? void 0 : _a.orderNote) || "";
@@ -91,7 +77,7 @@ var formatProductBundle = (bundle) => {
91
77
  var getSubType = (item) => {
92
78
  var _a;
93
79
  const _type = (_a = item.duration) == null ? void 0 : _a.type;
94
- if (_type) {
80
+ if (_type && _type !== "days") {
95
81
  return _type;
96
82
  }
97
83
  return "minutes";
@@ -127,115 +113,39 @@ var formatResource = (service) => {
127
113
  return void 0;
128
114
  }
129
115
  };
130
- var formatHolders = (state, item, values) => {
131
- var _a, _b, _c, _d, _e;
132
- const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
133
- let obj = {
134
- customer_id: values.customer_id,
135
- form_id,
136
- form_record: [((_e = item._extend) == null ? void 0 : _e.holder_id) || 0]
137
- };
138
- if (state.isFranchisee) {
139
- obj.is_source_shop = 1;
140
- }
141
- return obj;
142
- };
143
- var formatProducts = (item) => {
144
- var _a, _b;
145
- const total = Number(item._extend.total);
146
- const origin_total = Number(item._extend.origin_total);
147
- const discount_amount = origin_total - total;
148
- const discount_type = discount_amount < 0 ? "change_price" : "discount";
149
- return {
150
- "num": item._extend.quantity,
151
- "price": item._extend.price,
152
- "product_id": (item == null ? void 0 : item.product_id) || item.id,
153
- "discount_amount": discount_amount,
154
- "product_discount_reason": item._extend.discount_reason || "",
155
- "is_charge_tax": item.is_charge_tax,
156
- "note": (item == null ? void 0 : item.note) || "",
157
- "discountway": item._extend.discountway || "num",
158
- "discount_per": item._extend.discount_per,
159
- "discount_type": item._extend.discount_type || discount_type,
160
- "order_detail_id": item._extend.order_detail_id || 0,
161
- "product_bundle": formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
162
- "bundle_edit": item._extend.bundle_edit
163
- };
164
- };
165
- var formatDayRelationProducts = (data, booking_item) => {
116
+ var formatBookings = (data) => {
166
117
  const list = data.service.value;
167
- let relation_products = list == null ? void 0 : list.filter((item) => {
168
- var _a;
169
- const holderId = (_a = item._extend) == null ? void 0 : _a.holder_id;
170
- const bookingHolderId = booking_item._extend.holder_id;
171
- const isAppointment = import_status.appointmentTypes.includes(item.extension_type);
172
- return holderId && holderId === bookingHolderId && !isAppointment;
173
- });
174
- relation_products = relation_products.map((item) => {
175
- return formatProducts(item);
176
- });
177
- return relation_products || [];
178
- };
179
- var formatAppointmentProductLists = (data) => {
180
- var _a;
181
- try {
182
- let list = data.service.value;
183
- list = list.filter((item) => {
184
- var _a2;
185
- return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && import_status.appointmentTypes.includes(item.extension_type);
186
- });
187
- const groupMap = /* @__PURE__ */ new Map();
188
- list.forEach((item) => {
189
- var _a2;
190
- const key = (_a2 = item._extend) == null ? void 0 : _a2.holder_id;
191
- if (!groupMap.has(key)) {
192
- groupMap.set(key, []);
193
- }
194
- groupMap.get(key).push(item);
195
- });
196
- groupMap.forEach((group) => {
197
- group[0].relation_products = formatDayRelationProducts(data, group[0]);
198
- });
199
- const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce((acc, group) => acc.concat(group), []);
200
- return result || [];
201
- } catch (error) {
202
- }
203
- };
204
- var formatBookings = (data, values) => {
205
- const isDay = (0, import_utils4.isDayBooking)(data);
206
- let list = data.service.value;
207
- if (isDay) {
208
- list = formatAppointmentProductLists(data);
209
- }
210
- let dayParams = {
211
- relation_products: []
212
- };
213
118
  const eventOtherParams = data.eventOtherParams;
214
119
  let bookings = [];
215
- console.log(list, "wh_result11");
216
120
  bookings = list.map((item) => {
217
- var _a, _b, _c, _d;
218
- let start_date = item._extend.startDate.format("YYYY-MM-DD");
219
- let end_date = item._extend.endDate.format("YYYY-MM-DD");
220
- let end_time = item._extend.endDate.format("HH:mm");
121
+ var _a, _b;
122
+ const start_date = item._extend.startDate.format("YYYY-MM-DD");
123
+ const end_date = item._extend.endDate.format("YYYY-MM-DD");
124
+ const end_time = item._extend.endDate.format("HH:mm");
221
125
  let start_time = item._extend.startDate.format("HH:mm");
222
126
  if ((0, import_utils.isNowTime)(item._extend.start_time)) {
223
127
  start_time = (0, import_utils.getNowTime)();
224
128
  }
225
- if (isDay) {
226
- const startDate = ((_a = item._extend) == null ? void 0 : _a.startDate) || ((_b = item._extend) == null ? void 0 : _b.start_date);
227
- const endDate = ((_c = item._extend) == null ? void 0 : _c.endDate) || ((_d = item._extend) == null ? void 0 : _d.end_date);
228
- const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({ startDate, endDate });
229
- start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
230
- start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
231
- end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
232
- end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
233
- dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
234
- dayParams.holder = formatHolders(data, item, values);
235
- dayParams.duration = (0, import_utils3.getDays)({ _extend: { start_date: startDateTime, end_date: endDateTime } }, "minutes");
236
- }
129
+ const total = Number(item._extend.total);
130
+ const origin_total = Number(item._extend.origin_total);
131
+ const discount_amount = origin_total - total;
132
+ const discount_type = discount_amount < 0 ? "change_price" : "discount";
237
133
  return {
238
- "product": formatProducts(item),
134
+ "product": {
135
+ "num": item._extend.quantity,
136
+ "price": item._extend.price,
137
+ "product_id": item.id,
138
+ "discount_amount": discount_amount,
139
+ "product_discount_reason": item._extend.discount_reason || "",
140
+ "is_charge_tax": item.is_charge_tax,
141
+ "note": "",
142
+ "discountway": item._extend.discountway || "num",
143
+ "discount_per": item._extend.discount_per,
144
+ "discount_type": item._extend.discount_type || discount_type,
145
+ "order_detail_id": item._extend.order_detail_id || 0,
146
+ "product_bundle": formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
147
+ "bundle_edit": item._extend.bundle_edit
148
+ },
239
149
  "relation_products": formatRelationDetails(item._extend.relation_details),
240
150
  "id": item.booking_id || 0,
241
151
  "relation_id": item._extend.relation_id || 0,
@@ -244,36 +154,22 @@ var formatBookings = (data, values) => {
244
154
  "is_all": false,
245
155
  "schedule_id": item._extend.schedule_id || 0,
246
156
  "end_time": end_time,
247
- "sub_type": isDay ? "days" : getSubType(item),
157
+ "sub_type": getSubType(item),
248
158
  "select_date": start_date,
249
159
  "start_time": start_time,
250
160
  "end_date": end_date,
251
161
  "start_date": start_date,
252
- "duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
162
+ "duration": import_utils.flexibleObj.getValue(item._extend.duration),
253
163
  "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
254
164
  "resources": formatResource(item),
255
165
  "metadata": item._extend.capacity ? {
256
166
  capacity: item._extend.capacity
257
167
  } : void 0,
258
- ...eventOtherParams || {},
259
- ...dayParams
168
+ ...eventOtherParams || {}
260
169
  };
261
170
  });
262
171
  return bookings;
263
172
  };
264
- var formatRelationProducts = (data) => {
265
- var _a;
266
- let list = ((_a = data.service) == null ? void 0 : _a.value) || [];
267
- list = list.filter((item) => {
268
- var _a2;
269
- return !((_a2 = item._extend) == null ? void 0 : _a2.holder_id);
270
- });
271
- let relationProducts = [];
272
- relationProducts = list.map((item) => {
273
- return formatProducts(item);
274
- });
275
- return relationProducts;
276
- };
277
173
  var formatHolder = (state, values) => {
278
174
  var _a, _b, _c, _d, _e, _f, _g, _h;
279
175
  const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
@@ -300,12 +196,9 @@ var formatValues = (state) => {
300
196
  bookings: [],
301
197
  customer_id: 1,
302
198
  customer_name: "",
303
- holder: {},
304
- relation_products: [],
305
- metadata: {}
199
+ holder: {}
306
200
  };
307
- const isDay = (0, import_utils4.isDayBooking)(state);
308
- if (!state.bookingId || isDay) {
201
+ if (!state.bookingId) {
309
202
  values.shop_note = formatNote(state);
310
203
  }
311
204
  if (state.bookingId) {
@@ -321,18 +214,12 @@ var formatValues = (state) => {
321
214
  ...customer
322
215
  };
323
216
  values.holder = formatHolder(state, values);
324
- if (isDay) {
325
- values.relation_products = formatRelationProducts(state);
326
- }
327
- values.bookings = formatBookings(state, values);
217
+ values.bookings = formatBookings(state);
328
218
  if (((_c = (_b = values == null ? void 0 : values.bookings) == null ? void 0 : _b[0]) == null ? void 0 : _c.select_date) && !(state == null ? void 0 : state.bookingId)) {
329
219
  let startTime = `${(_e = (_d = values == null ? void 0 : values.bookings) == null ? void 0 : _d[0]) == null ? void 0 : _e.start_time}`;
330
220
  startTime = `${startTime || "00:00"}:00`;
331
221
  values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
332
222
  }
333
- if (isDay) {
334
- values.metadata.is_multiday_appointment = 1;
335
- }
336
223
  return values;
337
224
  };
338
225
  // Annotate the CommonJS export names for ESM import in node:
@@ -49,11 +49,6 @@ var AddServiceVariant = (props) => {
49
49
  service: { ...stateRef.current.service, ...payload }
50
50
  });
51
51
  }
52
- if (type === "setDate") {
53
- setGlobalState({
54
- date: { ...stateRef.current.date, ...payload }
55
- });
56
- }
57
52
  };
58
53
  let Cpt = import_addService.default;
59
54
  if ((0, import_utils.isBooking4Shop)(
@@ -19,7 +19,6 @@ interface SelectDrawerProps {
19
19
  modalOpen: boolean;
20
20
  franchiseeLoading?: number;
21
21
  showHeader?: boolean;
22
- showWalkIn?: boolean;
23
22
  }
24
23
  declare const _default: React.ForwardRefExoticComponent<SelectDrawerProps & React.RefAttributes<unknown>>;
25
24
  export default _default;
@@ -108,16 +108,12 @@ var SelectDrawer = (props, ref) => {
108
108
  handleAddPet,
109
109
  modalOpen,
110
110
  franchiseeLoading,
111
- showHeader,
112
- showWalkIn
111
+ showHeader
113
112
  } = props;
114
113
  const form = (formData == null ? void 0 : formData[0]) || {};
115
114
  const valList = (childrenValue == null ? void 0 : childrenValue[form.id]) || defaultArr;
116
115
  const [_value, setValue] = (0, import_react.useState)(valList);
117
116
  const clientRef = (0, import_react.useRef)();
118
- const searchRef = (0, import_react.useRef)();
119
- const [open, setOpen] = (0, import_react.useState)(false);
120
- const [search, setSearch] = (0, import_react.useState)("");
121
117
  (0, import_react.useEffect)(() => {
122
118
  setValue(
123
119
  valList.map((item) => ({
@@ -125,7 +121,10 @@ var SelectDrawer = (props, ref) => {
125
121
  id: item.id || item.form_record_id
126
122
  }))
127
123
  );
128
- }, [valList, open]);
124
+ }, [valList]);
125
+ const searchRef = (0, import_react.useRef)();
126
+ const [open, setOpen] = (0, import_react.useState)(false);
127
+ const [search, setSearch] = (0, import_react.useState)("");
129
128
  (0, import_react.useEffect)(() => {
130
129
  if (!modalOpen) {
131
130
  setOpen(false);
@@ -318,7 +317,7 @@ var SelectDrawer = (props, ref) => {
318
317
  title: import_utils.locales.getText("pisell2.text.create-new-customer"),
319
318
  onClick: handleAddClient
320
319
  }
321
- ), showWalkIn ? /* @__PURE__ */ import_react.default.createElement(
320
+ ), /* @__PURE__ */ import_react.default.createElement(
322
321
  ActionItem,
323
322
  {
324
323
  title: "Walk-In",
@@ -327,7 +326,7 @@ var SelectDrawer = (props, ref) => {
327
326
  closeDrawer();
328
327
  }
329
328
  }
330
- ) : null), /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: !!loading, delay: 500 }, !!options.length ? options.map((item) => {
329
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: !!loading, delay: 500 }, !!options.length ? options.map((item) => {
331
330
  var _a;
332
331
  return /* @__PURE__ */ import_react.default.createElement(
333
332
  "div",
@@ -47,16 +47,13 @@ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineCon
47
47
  var import_format = require("../../../forms/format");
48
48
  var import_utils2 = require("../../utils");
49
49
  var import_utils3 = require("../../../utils");
50
- var import_utils4 = require("../../service2/utils");
51
- var import_ChangePetModal = __toESM(require("../../pet/ChangePetModal"));
52
50
  var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
53
- 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, _G, _H, _I;
51
+ 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, _G, _H;
54
52
  const { globalState, setGlobalState } = props;
55
53
  const modalRef = (0, import_react.useRef)();
56
54
  const state = globalState;
57
55
  const stateRef = (0, import_react.useRef)(state);
58
56
  const prevCustomerId = (0, import_react.useRef)(null);
59
- const changePetRef = (0, import_react.useRef)(null);
60
57
  const context = (0, import_useEngineContext.default)();
61
58
  const [isHasFormRecord, setIsHasFormRecord] = (0, import_react.useState)(true);
62
59
  const isFranchisee = (_d = (_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.businessUtils) == null ? void 0 : _c.getAppByModal) == null ? void 0 : _d.call(_c, "franchisee");
@@ -111,14 +108,6 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
111
108
  }
112
109
  });
113
110
  }
114
- if (type === "setService") {
115
- setGlobalState({
116
- service: {
117
- ...stateRef.current.service,
118
- ...payload
119
- }
120
- });
121
- }
122
111
  };
123
112
  const boardConfig = (0, import_react.useMemo)(() => {
124
113
  var _a2, _b2, _c2;
@@ -139,18 +128,6 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
139
128
  state == null ? void 0 : state.modalOpen
140
129
  ]);
141
130
  const handleSelectPet = (val) => {
142
- var _a2, _b2;
143
- if ((0, import_utils4.isDayBooking)(state)) {
144
- const { ids, lists } = (0, import_utils4.isOpenDeletePet)(state, val);
145
- if ((ids == null ? void 0 : ids.length) > 0 && (lists == null ? void 0 : lists.length) > 0) {
146
- (_b2 = changePetRef.current) == null ? void 0 : _b2.open({
147
- ids,
148
- setGlobalState,
149
- service: ((_a2 = state.service) == null ? void 0 : _a2.value) || [],
150
- state
151
- });
152
- }
153
- }
154
131
  setGlobalState({
155
132
  pet: {
156
133
  ...state.pet,
@@ -282,7 +259,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
282
259
  }, [isWalkIn, formId, (_q = state.client.value) == null ? void 0 : _q.id, currentPetValue, boardConfig]);
283
260
  const petRender = (0, import_react.useMemo)(() => {
284
261
  var _a2, _b2, _c2;
285
- if (((state == null ? void 0 : state.disabledEdit) || boardConfig.type !== "form") && !(0, import_utils4.isDayBooking)(state)) {
262
+ if ((state == null ? void 0 : state.disabledEdit) || boardConfig.type !== "form") {
286
263
  return null;
287
264
  }
288
265
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !(currentPetValue == null ? void 0 : currentPetValue.length) && !isHasFormRecord && !isWalkIn && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -347,8 +324,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
347
324
  handleAddPet,
348
325
  currentPetValue,
349
326
  formId,
350
- (_x = (_w = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _w.holder) == null ? void 0 : _x.data_range,
351
- (_y = state.service) == null ? void 0 : _y.value
327
+ (_x = (_w = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _w.holder) == null ? void 0 : _x.data_range
352
328
  ]);
353
329
  const handleOpenClient = () => {
354
330
  if (!isWalkIn || (state == null ? void 0 : state.disableEventBookingEdit)) {
@@ -383,11 +359,11 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
383
359
  import_antd.Avatar,
384
360
  {
385
361
  className: "pisell-lowcode__booking-client-avatar",
386
- src: import_utils.image.ali((_z = state.client.value) == null ? void 0 : _z.cover, 100),
362
+ src: import_utils.image.ali((_y = state.client.value) == null ? void 0 : _y.cover, 100),
387
363
  size: 64,
388
364
  icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
389
365
  }
390
- ), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_A = state.client.value) == null ? void 0 : _A.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_B = state.client.value) == null ? void 0 : _B.email) : null, ((_C = state.client.value) == null ? void 0 : _C.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_D = state.client.value) == null ? void 0 : _D.phone) : null), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
366
+ ), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_z = state.client.value) == null ? void 0 : _z.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_A = state.client.value) == null ? void 0 : _A.email) : null, ((_B = state.client.value) == null ? void 0 : _B.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.phone) : null), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
391
367
  import_antd.Dropdown.Button,
392
368
  {
393
369
  menu: {
@@ -438,7 +414,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
438
414
  showHeader: !state.isBookingCreatePage,
439
415
  modalOpen: state.modalOpen,
440
416
  loading,
441
- autoFocus: !((_G = (_F = (_E = context == null ? void 0 : context.appHelper) == null ? void 0 : _E.utils) == null ? void 0 : _F.isTerminal) == null ? void 0 : _G.call(_F)),
417
+ autoFocus: !((_F = (_E = (_D = context == null ? void 0 : context.appHelper) == null ? void 0 : _D.utils) == null ? void 0 : _E.isTerminal) == null ? void 0 : _F.call(_E)),
442
418
  ref: modalRef,
443
419
  onClose: handleClose,
444
420
  handleSelectClient,
@@ -448,16 +424,14 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
448
424
  formData: state.pet.formData,
449
425
  searchChange,
450
426
  options: renderList,
451
- holder: (_H = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _H.holder,
452
- client: (_I = state == null ? void 0 : state.client) == null ? void 0 : _I.value,
427
+ holder: (_G = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _G.holder,
428
+ client: (_H = state == null ? void 0 : state.client) == null ? void 0 : _H.value,
453
429
  loadMore,
454
430
  showPet: (boardConfig == null ? void 0 : boardConfig.type) === "form",
455
431
  handleAddPet,
456
- franchiseeLoading,
457
- showWalkIn: !(0, import_utils4.isDayBooking)(state)
432
+ franchiseeLoading
458
433
  }
459
- ),
460
- /* @__PURE__ */ import_react.default.createElement(import_ChangePetModal.default, { ref: changePetRef })
434
+ )
461
435
  );
462
436
  });
463
437
  var vertical_default = VerticalClient;
@@ -51,16 +51,13 @@ var import_notes = __toESM(require("./notes"));
51
51
  var import_index = require("./index.less");
52
52
  var import_classnames = __toESM(require("classnames"));
53
53
  var import_antd = require("antd");
54
- var import_service2 = require("./service2");
55
- var import_utils3 = require("./service2/utils");
56
54
  var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
57
55
  var defaultModules = {
58
56
  client: 1,
59
57
  date: 1,
60
58
  service: 1,
61
59
  holder: 1,
62
- note: 1,
63
- service2: 0
60
+ note: 1
64
61
  };
65
62
  import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
66
63
  var Info = (0, import_model.Provider)((props) => {
@@ -124,14 +121,11 @@ var Info = (0, import_model.Provider)((props) => {
124
121
  globalState == null ? void 0 : globalState.renderType
125
122
  ]);
126
123
  const notes = (0, import_react.useMemo)(() => {
127
- var _a2, _b2, _c2, _d2;
124
+ var _a2, _b2;
128
125
  if (!modules.note) {
129
126
  return null;
130
127
  }
131
- if ((0, import_utils3.isDayBooking)(globalState)) {
132
- return /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote, onChange: addNote });
133
- }
134
- return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" || globalState.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_notes.default, null) : null : /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_d2 = (_c2 = modal.state) == null ? void 0 : _c2.notes) == null ? void 0 : _d2.orderNote, onChange: addNote });
128
+ return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" || globalState.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_notes.default, null) : null : /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote, onChange: addNote });
135
129
  }, [
136
130
  modules.note,
137
131
  globalState == null ? void 0 : globalState.bookingId,
@@ -156,7 +150,7 @@ var Info = (0, import_model.Provider)((props) => {
156
150
  },
157
151
  bodyClassName: (0, import_classnames.default)("booking-info-warp", {
158
152
  ["create-booking-page-info-wrap"]: isBookingCreatePage,
159
- ["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode && !(0, import_utils3.isTerminalDayBooking)(modal.state)
153
+ ["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
160
154
  })
161
155
  },
162
156
  /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((_i = modal.state) == null ? void 0 : _i.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
@@ -169,7 +163,6 @@ var Info = (0, import_model.Provider)((props) => {
169
163
  style: { paddingTop: 20 }
170
164
  },
171
165
  modules.service ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service.default, null) : null) : null,
172
- modules.service2 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service2.Service2Cart, null) : null) : null,
173
166
  notes,
174
167
  slot ? slot : null
175
168
  ))
@@ -76,9 +76,6 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
76
76
  _val.disabledEdit = false;
77
77
  }
78
78
  state.setGlobalState(_val);
79
- },
80
- setActiveCartId(state, payload) {
81
- state.setGlobalState(payload);
82
79
  }
83
80
  },
84
81
  reducers: {
@@ -43,8 +43,6 @@ var import_format = require("../../forms/format");
43
43
  var import_utils2 = require("../../utils");
44
44
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
45
45
  var import_ahooks = require("ahooks");
46
- var import_utils3 = require("../../info/service2/utils");
47
- var import_ChangePetModal = __toESM(require("./ChangePetModal"));
48
46
  var defaultParams = {
49
47
  skip: 1,
50
48
  num: 20,
@@ -67,7 +65,6 @@ var Pet = (props) => {
67
65
  const context = (0, import_useEngineContext.default)();
68
66
  const { isTerminal } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
69
67
  const [params, setParams] = (0, import_react.useState)(defaultParams);
70
- const changePetRef = (0, import_react.useRef)(null);
71
68
  state = state || (props == null ? void 0 : props.state);
72
69
  dispatch = dispatch || (props == null ? void 0 : props.dispatch);
73
70
  const boardParams = (0, import_react.useMemo)(() => {
@@ -211,14 +208,10 @@ var Pet = (props) => {
211
208
  let cur = [...state.pet.value[petForm.form_id] || []];
212
209
  let options = ((_c2 = (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) || [];
213
210
  if (res.type === "delete") {
214
- const isDay = (0, import_utils3.isDayBooking)(state);
215
- if (isDay && state.disabledEdit)
216
- return cur;
217
- cur = cur.filter((d) => d.form_record_id !== item.form_record_id);
211
+ cur = cur.filter(
212
+ (d) => d.form_record_id !== item.form_record_id
213
+ );
218
214
  addCallback();
219
- if (isDay) {
220
- handleDayChange(item);
221
- }
222
215
  } else {
223
216
  let obj = {
224
217
  customer: item == null ? void 0 : item.customer,
@@ -279,29 +272,27 @@ var Pet = (props) => {
279
272
  }
280
273
  });
281
274
  });
282
- const onValueChange = (0, import_ahooks.useMemoizedFn)(
283
- ({ values, edit = true, options }) => {
284
- var _a2, _b2;
285
- const updateObj = {};
286
- if (options) {
287
- updateObj.formData = [
288
- {
289
- ...(_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0],
290
- options
291
- }
292
- ];
293
- updateObj.pets = options;
294
- }
295
- dispatch({
296
- type: "setPet",
297
- payload: {
298
- edit,
299
- value: values,
300
- ...updateObj
275
+ const onValueChange = (0, import_ahooks.useMemoizedFn)(({ values, edit = true, options }) => {
276
+ var _a2, _b2;
277
+ const updateObj = {};
278
+ if (options) {
279
+ updateObj.formData = [
280
+ {
281
+ ...(_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0],
282
+ options
301
283
  }
302
- });
284
+ ];
285
+ updateObj.pets = options;
303
286
  }
304
- );
287
+ dispatch({
288
+ type: "setPet",
289
+ payload: {
290
+ edit,
291
+ value: values,
292
+ ...updateObj
293
+ }
294
+ });
295
+ });
305
296
  (0, import_react.useEffect)(() => {
306
297
  var _a2, _b2, _c2, _d2;
307
298
  if (clientChangeNotSetPet)
@@ -372,29 +363,6 @@ var Pet = (props) => {
372
363
  import_utils.locales.getText("pisell2.text.load-more")
373
364
  )) : null;
374
365
  }, [loadLoading, params, (_l = (_k = (_j = (_i = state.pet) == null ? void 0 : _i.formData) == null ? void 0 : _j[0]) == null ? void 0 : _k.options) == null ? void 0 : _l.length]);
375
- const handleDayChange = (e) => {
376
- var _a2, _b2;
377
- const id = e == null ? void 0 : e.form_record_id;
378
- const service = (_a2 = state.service.value) == null ? void 0 : _a2.filter(
379
- (item) => item._extend.holder_id === id
380
- );
381
- if (id && (service == null ? void 0 : service.length)) {
382
- changePetRef == null ? void 0 : changePetRef.current.open({
383
- ids: [id],
384
- dispatch,
385
- service: ((_b2 = state.service) == null ? void 0 : _b2.value) || []
386
- });
387
- }
388
- };
389
- const dayCustomSelect = (0, import_react.useMemo)(() => {
390
- const isDay = (0, import_utils3.isDayBooking)(state);
391
- if (isDay) {
392
- return {
393
- handleDayChange
394
- };
395
- }
396
- return {};
397
- }, [state.renderType, state.service.value]);
398
366
  return (0, import_react.useMemo)(() => {
399
367
  var _a2;
400
368
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-wraps" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: valueLoading, active: true, round: true }, /* @__PURE__ */ import_react.default.createElement(
@@ -404,10 +372,7 @@ var Pet = (props) => {
404
372
  watch: { value: state.pet.value },
405
373
  addCallback: (formDataConfig, data) => {
406
374
  var _a3, _b2, _c2;
407
- setPetOptions([
408
- { ...data, form_id: formDataConfig == null ? void 0 : formDataConfig.form_id },
409
- ...((_c2 = (_b2 = (_a3 = state.pet) == null ? void 0 : _a3.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) || []
410
- ]);
375
+ setPetOptions([{ ...data, form_id: formDataConfig == null ? void 0 : formDataConfig.form_id }, ...((_c2 = (_b2 = (_a3 = state.pet) == null ? void 0 : _a3.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) || []]);
411
376
  },
412
377
  loading: valueLoading,
413
378
  forms: state.pet.formData,
@@ -433,8 +398,7 @@ var Pet = (props) => {
433
398
  return true;
434
399
  },
435
400
  handleOpenModal,
436
- previewItemTitleRender,
437
- ...dayCustomSelect
401
+ previewItemTitleRender
438
402
  },
439
403
  optionRender: (item) => {
440
404
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -478,7 +442,7 @@ var Pet = (props) => {
478
442
  ...addButtonProps
479
443
  }
480
444
  }
481
- )), /* @__PURE__ */ import_react.default.createElement(import_ChangePetModal.default, { ref: changePetRef }));
445
+ )));
482
446
  }, [
483
447
  valueLoading,
484
448
  hideTitle,