@pisell/private-materials 6.2.17 → 6.2.18

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 (254) 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 +8 -8
  7. package/build/lowcode/render/default/view.js +2 -2
  8. package/build/lowcode/view.js +8 -8
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Summary/utils.d.ts +1 -1
  11. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  13. package/es/components/booking/addons/model.d.ts +10 -1
  14. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  15. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  16. package/es/components/booking/components/browserSelect/index.js +1 -1
  17. package/es/components/booking/components/customSelect/index.js +0 -1
  18. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  19. package/es/components/booking/editBookingModal/index.js +58 -29
  20. package/es/components/booking/editBookingModal/serve.d.ts +1 -0
  21. package/es/components/booking/editBookingModal/serve.js +19 -11
  22. package/es/components/booking/forms/model.d.ts +10 -1
  23. package/es/components/booking/forms/model.js +5 -5
  24. package/es/components/booking/forms/table/index.d.ts +0 -1
  25. package/es/components/booking/hooks/useClearCart.js +8 -11
  26. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  27. package/es/components/booking/info/client/index.js +2 -3
  28. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  29. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  30. package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
  31. package/es/components/booking/info/index.d.ts +0 -1
  32. package/es/components/booking/info/model.d.ts +10 -1
  33. package/es/components/booking/info/service/Lists.js +26 -36
  34. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  35. package/es/components/booking/info/service/like/index.d.ts +0 -1
  36. package/es/components/booking/info/service/like/index.js +1 -1
  37. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  38. package/es/components/booking/info/service2/utils.js +21 -20
  39. package/es/components/booking/info2/index.js +0 -1
  40. package/es/components/booking/info2/service/addService/utils.js +4 -7
  41. package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
  42. package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
  43. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  44. package/es/components/booking/info2/service/editService/index.js +165 -258
  45. package/es/components/booking/info2/service/index.js +15 -19
  46. package/es/components/booking/materiels/duration/index.js +2 -9
  47. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  48. package/es/components/booking/materiels/startTime/index.js +1 -1
  49. package/es/components/booking/model.d.ts +9 -1
  50. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  51. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  52. package/es/components/booking/notes/model.d.ts +10 -1
  53. package/es/components/booking/notes/model.js +5 -5
  54. package/es/components/booking/payments/model.d.ts +10 -1
  55. package/es/components/booking/payments/model.js +5 -5
  56. package/es/components/booking/utils.d.ts +2 -2
  57. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  58. package/es/components/eftpos/form/index.d.ts +0 -1
  59. package/es/components/eftpos/group/index.d.ts +0 -1
  60. package/es/components/eftpos/hooks.d.ts +0 -1
  61. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  62. package/es/components/eftpos/icon/device.d.ts +0 -1
  63. package/es/components/eftpos/receipt/index.d.ts +0 -1
  64. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  65. package/es/components/eftposPay/amount.d.ts +1 -1
  66. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  67. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  68. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  69. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  70. package/es/components/eftposPay/device.d.ts +1 -1
  71. package/es/components/eftposPay/hooks.d.ts +2 -2
  72. package/es/components/eftposPay/store/index.d.ts +6 -6
  73. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  74. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  75. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  78. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  79. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  80. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  81. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  82. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  83. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  84. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  85. package/es/components/listComponent/index.js +5 -5
  86. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  87. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  88. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  89. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  90. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  92. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  93. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  94. package/es/components/pay/toC/model.d.ts +9 -1
  95. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  96. package/es/components/productExtension/card/index.js +3 -3
  97. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  98. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  99. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  100. package/es/components/productExtension/fields/Forms/index.js +12 -12
  101. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  102. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  103. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  104. package/es/components/productExtension/server.js +2 -2
  105. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  106. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  107. package/es/components/schedules/calendar/index.js +4 -4
  108. package/es/components/schedules/calendar/serve.js +2 -2
  109. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  110. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  111. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  112. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  113. package/es/components/schedules/components/ResourceList/index.js +1 -1
  114. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  115. package/es/components/schedules/components/Search/index.js +5 -5
  116. package/es/components/schedules/model.d.ts +9 -1
  117. package/es/components/schedules/model.js +5 -5
  118. package/es/components/schedules/openHours/index.js +1 -1
  119. package/es/components/schedules/openHours/serve.js +2 -2
  120. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  121. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  122. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  123. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  124. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  125. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  126. package/es/components/schedules/products/index.d.ts +0 -1
  127. package/es/components/schedules/products/serve.js +2 -2
  128. package/es/components/schedules/products/utils.js +5 -5
  129. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  130. package/es/components/schedules/resources/detail/index.js +10 -10
  131. package/es/components/schedules/resources/list/index.js +2 -2
  132. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  133. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  134. package/es/components/schedules/resources/serve.js +2 -2
  135. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  136. package/es/components/schedules/utils.js +4 -4
  137. package/es/components/selectModal/index.js +2 -2
  138. package/es/components/shoppingCart/components/Cart/Product.js +41 -48
  139. package/es/components/shoppingCart/components/Cart/index.js +18 -21
  140. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  141. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  142. package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -177
  143. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  144. package/es/components/ticketBooking/components/timeBar/index.js +71 -78
  145. package/es/components/wallet/Detail/model.d.ts +13 -1
  146. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  147. package/es/components/wallet/PointCard/model.d.ts +13 -1
  148. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  149. package/es/components/wallet/Voucher/model.d.ts +13 -1
  150. package/es/components/wallet/model.d.ts +9 -1
  151. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  152. package/es/hooks/useComponents.js +1 -1
  153. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  154. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  155. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  156. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  157. package/lib/components/booking/addons/model.d.ts +10 -1
  158. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  159. package/lib/components/booking/components/customSelect/index.js +0 -1
  160. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  161. package/lib/components/booking/editBookingModal/index.js +56 -21
  162. package/lib/components/booking/editBookingModal/serve.d.ts +1 -0
  163. package/lib/components/booking/editBookingModal/serve.js +12 -6
  164. package/lib/components/booking/forms/model.d.ts +10 -1
  165. package/lib/components/booking/forms/table/index.d.ts +0 -1
  166. package/lib/components/booking/hooks/useClearCart.js +13 -16
  167. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  168. package/lib/components/booking/info/client/index.js +4 -5
  169. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  170. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  171. package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
  172. package/lib/components/booking/info/index.d.ts +0 -1
  173. package/lib/components/booking/info/model.d.ts +10 -1
  174. package/lib/components/booking/info/service/Lists.js +23 -35
  175. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  176. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  177. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  178. package/lib/components/booking/info/service2/utils.js +17 -17
  179. package/lib/components/booking/info2/service/addService/utils.js +3 -5
  180. package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
  181. package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
  182. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  183. package/lib/components/booking/info2/service/editService/index.js +70 -132
  184. package/lib/components/booking/info2/service/index.js +9 -13
  185. package/lib/components/booking/materiels/duration/index.js +2 -7
  186. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  187. package/lib/components/booking/model.d.ts +9 -1
  188. package/lib/components/booking/notes/model.d.ts +10 -1
  189. package/lib/components/booking/payments/model.d.ts +10 -1
  190. package/lib/components/booking/utils.d.ts +2 -2
  191. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  192. package/lib/components/eftpos/form/index.d.ts +0 -1
  193. package/lib/components/eftpos/group/index.d.ts +0 -1
  194. package/lib/components/eftpos/hooks.d.ts +0 -1
  195. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  196. package/lib/components/eftpos/icon/device.d.ts +0 -1
  197. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  198. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  199. package/lib/components/eftposPay/amount.d.ts +1 -1
  200. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  201. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  202. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  203. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  204. package/lib/components/eftposPay/device.d.ts +1 -1
  205. package/lib/components/eftposPay/hooks.d.ts +2 -2
  206. package/lib/components/eftposPay/store/index.d.ts +6 -6
  207. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  208. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  209. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  210. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  211. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  212. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  213. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  214. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  215. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  216. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  217. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  218. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  219. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  220. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  221. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  222. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  223. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  224. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  225. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  226. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  227. package/lib/components/pay/toC/model.d.ts +9 -1
  228. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  229. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  230. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  231. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  232. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  233. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  234. package/lib/components/schedules/model.d.ts +9 -1
  235. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  236. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  237. package/lib/components/schedules/products/index.d.ts +0 -1
  238. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  239. package/lib/components/schedules/utils.js +1 -1
  240. package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
  241. package/lib/components/shoppingCart/components/Cart/index.js +15 -18
  242. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  243. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  244. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +127 -145
  245. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  246. package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
  247. package/lib/components/wallet/Detail/model.d.ts +13 -1
  248. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  249. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  250. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  251. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  252. package/lib/components/wallet/model.d.ts +9 -1
  253. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  254. package/package.json +3 -3
@@ -142,8 +142,7 @@ var getTimeObj = ({
142
142
  cacheItem,
143
143
  useStartTime,
144
144
  currentResource,
145
- // 没有使用该参数
146
- // state,
145
+ state,
147
146
  durationProps
148
147
  });
149
148
  let obj = (0, import_utils.sliceDayIntoFiveMinutes)(
@@ -243,8 +242,7 @@ var setDefaultResource = ({ cacheItem, resources }) => {
243
242
  }
244
243
  const defaultResource = defaultOriginalResource.map((d) => {
245
244
  return {
246
- // ...d,
247
- children: d.children,
245
+ ...d,
248
246
  relation_type: d.relation_type,
249
247
  form_id: item.form_id,
250
248
  relation_id: d.id,
@@ -304,7 +302,7 @@ var getResourceByIds = (resourcesOriginMap, cacheItem, extraParams) => {
304
302
  extraResourceIds = (resourcesOrigin || []).filter((d) => d.form_code === item.code).map((d) => d.id);
305
303
  } else {
306
304
  extraResourceIds = extraResources.filter((_extraItem) => {
307
- return _extraItem.form_id === form_id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
305
+ return _extraItem.form_id === form_id && !!_extraItem.id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
308
306
  }).map((_extraItem) => _extraItem.id);
309
307
  }
310
308
  extraResourceIds = Array.from(new Set(extraResourceIds));
@@ -65,7 +65,6 @@ var AddTimeModal = () => {
65
65
  const [number, setNumber] = (0, import_react.useState)(1);
66
66
  const originServices = (0, import_react.useRef)([]);
67
67
  const [renderList, setRenderList] = (0, import_react.useState)([]);
68
- console.log(renderList, "renderListrenderList");
69
68
  const context = (0, import_useEngineContext.default)();
70
69
  const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
71
70
  const statusMap = {
@@ -127,7 +126,6 @@ var AddTimeModal = () => {
127
126
  }
128
127
  return arr.filter(Boolean);
129
128
  }, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
130
- console.log(currentResource, "currentResource");
131
129
  const getTimeUsableStatus = (time) => {
132
130
  var _a2, _b2;
133
131
  if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
@@ -208,7 +206,6 @@ var AddTimeModal = () => {
208
206
  setLoading("list");
209
207
  const newList = await _getAddTimeProducts();
210
208
  let list = newList.map((d) => {
211
- debugger;
212
209
  let isUsable = (0, import_utils2.isUsableProduct)(d.add_time, state.service.cacheItem);
213
210
  return {
214
211
  ...d,
@@ -168,11 +168,9 @@ var Resources = ({
168
168
  const getIsAutoAllocation = (id) => {
169
169
  return (0, import_utils2.getAutoAllocationStorage)(id);
170
170
  };
171
- console.log("resourcesss");
172
171
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
173
172
  var _a2;
174
173
  const cur = _value[item.form_id];
175
- console.log(cur, "curcur");
176
174
  const errors = (cur || []).reduce((pre, d) => {
177
175
  return pre.concat((d == null ? void 0 : d.errors) || []);
178
176
  }, []);
@@ -72,7 +72,7 @@ var Resources = ({
72
72
  const originData = (0, import_react.useMemo)(() => {
73
73
  var _a2;
74
74
  return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resources) || [];
75
- }, [(_b = originCacheItem == null ? void 0 : originCacheItem._data) == null ? void 0 : _b.resource]);
75
+ }, [(_b = originCacheItem == null ? void 0 : originCacheItem._data) == null ? void 0 : _b.resources]);
76
76
  const resourceMaps = (0, import_react.useMemo)(() => {
77
77
  var _a2;
78
78
  return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resourceMaps) || [];
@@ -54,7 +54,7 @@ var import_utils6 = require("../../../info/service2/utils");
54
54
  var import_utils7 = require("../../../../ticketBooking/utils");
55
55
  var submitLock = false;
56
56
  var Info = (_, ref) => {
57
- 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;
57
+ 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;
58
58
  const [form] = import_antd.Form.useForm();
59
59
  const useTotal = import_antd.Form.useWatch("total", form);
60
60
  const useResource = import_antd.Form.useWatch("resource", form);
@@ -67,7 +67,7 @@ var Info = (_, ref) => {
67
67
  var _a2, _b2;
68
68
  return ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem) && (0, import_utils6.isNormalProductByDurationSchedule)((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem);
69
69
  }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
70
- const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
70
+ const getCurrentCacheItem = (_cacheItem) => {
71
71
  let values = form.getFieldsValue();
72
72
  let _item = _cacheItem || state.service.cacheItem;
73
73
  return {
@@ -77,43 +77,40 @@ var Info = (_, ref) => {
77
77
  ...values
78
78
  }
79
79
  };
80
- });
80
+ };
81
81
  const currentResource = (0, import_react.useMemo)(() => {
82
82
  return null;
83
- }, []);
83
+ }, [useResource]);
84
84
  const durationProps = (0, import_react.useMemo)(() => {
85
85
  var _a2, _b2, _c2;
86
86
  let _cacheItem = getCurrentCacheItem();
87
- const val2 = (0, import_utils4.getDurationProps)({
87
+ return (0, import_utils4.getDurationProps)({
88
88
  cacheItem: _cacheItem,
89
89
  useStartTime,
90
- // currentResource,
90
+ currentResource,
91
91
  slice: (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time
92
92
  });
93
- return val2;
94
93
  }, [
95
- // currentResource,
94
+ currentResource,
96
95
  state.service.cacheItem,
97
96
  useStartTime,
98
97
  useResource,
99
98
  (_d = (_c = (_b = state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.service_time
100
99
  ]);
101
100
  const flexibleOption = (0, import_react.useMemo)(() => {
102
- const op = (0, import_utils4.getFlexibleOption)({
101
+ return (0, import_utils4.getFlexibleOption)({
103
102
  durationProps
104
103
  });
105
- return op;
106
104
  }, [durationProps, import_utils.locales.locale]);
107
105
  const timeObj = (0, import_react.useMemo)(() => {
108
- const val2 = (0, import_utils4.getTimeObj)({
106
+ return (0, import_utils4.getTimeObj)({
109
107
  durationProps,
110
108
  useStartTime,
111
109
  currentResource,
112
110
  state,
113
111
  useDuration
114
112
  });
115
- return val2;
116
- }, [durationProps, useStartTime, currentResource, (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time, useDuration]);
113
+ }, [durationProps, useStartTime, currentResource, state, useDuration]);
117
114
  (0, import_react.useEffect)(() => {
118
115
  try {
119
116
  if (useDuration.indexOf("flexible_") == 0) {
@@ -221,32 +218,13 @@ var Info = (_, ref) => {
221
218
  }
222
219
  });
223
220
  };
224
- const { run: setEditDataRun } = (0, import_ahooks.useDebounceFn)(
225
- (...params) => {
226
- setEditData(...params);
227
- },
228
- {
229
- wait: 50,
230
- leading: true,
231
- trailing: false
232
- }
233
- );
234
221
  const setEditData = (0, import_ahooks.useMemoizedFn)(
235
222
  (_cacheItem, open, openProductDetail) => {
236
- console.timeEnd("handleChange");
237
- console.log("setEditDatasetEditData", _cacheItem, open);
223
+ form.resetFields();
238
224
  isChangeTotal.current = false;
239
225
  let cacheItem = _cacheItem || state.service.cacheItem;
240
226
  let values = cacheItem._extend;
241
- const startTime2 = performance.now();
242
- console.log(startTime2, "startTime");
243
- form.resetFields();
244
227
  form.setFieldsValue(values);
245
- const endTime = performance.now();
246
- console.log(endTime - window.pp1, "打开商品5");
247
- console.log("执行时间", endTime - startTime2, values);
248
- setTimeout(() => {
249
- }, 20);
250
228
  if (openProductDetail) {
251
229
  setTimeout(() => {
252
230
  handleEdit({});
@@ -259,7 +237,7 @@ var Info = (_, ref) => {
259
237
  let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
260
238
  let cPrice = Number(useTotal || 0);
261
239
  return cPrice !== oPrice;
262
- }, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
240
+ }, [useTotal, (_f = (_e = state.service.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.origin_total]);
263
241
  const getResources = () => {
264
242
  let res = (0, import_utils4.formatResources)({
265
243
  cacheItem: getCurrentCacheItem(),
@@ -281,9 +259,9 @@ var Info = (_, ref) => {
281
259
  updateResourceErrors(res.maps);
282
260
  };
283
261
  const updateResourceErrors = (resourceMaps) => {
284
- let { resource: resource2 } = form.getFieldsValue();
285
- if (resource2) {
286
- let _resource = { ...resource2 };
262
+ let { resource } = form.getFieldsValue();
263
+ if (resource) {
264
+ let _resource = { ...resource };
287
265
  for (let form_id in _resource) {
288
266
  _resource[form_id] = _resource[form_id].map((d) => {
289
267
  var _a2, _b2;
@@ -317,17 +295,24 @@ var Info = (_, ref) => {
317
295
  ]);
318
296
  (0, import_react.useEffect)(() => {
319
297
  if (state.isBookingCreatePage && state.service.editModal) {
320
- setEditDataRun(null);
298
+ setEditData(null);
321
299
  }
322
300
  }, [state.service.editModal, state.isBookingCreatePage]);
323
301
  (0, import_react.useEffect)(() => {
324
302
  getDiscount();
325
- }, [useTotal, (_k = (_j = state.service.cacheItem) == null ? void 0 : _j._extend) == null ? void 0 : _k.origin_total]);
303
+ }, [useTotal, (_h = (_g = state.service.cacheItem) == null ? void 0 : _g._extend) == null ? void 0 : _h.origin_total]);
304
+ const isDiscount = (0, import_react.useMemo)(() => {
305
+ var _a2, _b2, _c2;
306
+ if (!((_a2 = state.service) == null ? void 0 : _a2.cacheItem)) {
307
+ return false;
308
+ }
309
+ return useTotal != ((_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend.origin_total);
310
+ }, [useTotal, (_j = (_i = state.service) == null ? void 0 : _i.cacheItem) == null ? void 0 : _j._extend.origin_total]);
326
311
  const bundles = (0, import_react.useMemo)(() => {
327
312
  var _a2, _b2, _c2, _d2;
328
313
  return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
329
- }, [(_o = (_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.other) == null ? void 0 : _o.bundle]);
330
- const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
314
+ }, [(_n = (_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.other) == null ? void 0 : _n.bundle]);
315
+ const handleEdit = (e) => {
331
316
  var _a2, _b2, _c2, _d2, _e2;
332
317
  const item = state.service.cacheItem;
333
318
  let values = form.getFieldsValue();
@@ -413,8 +398,8 @@ var Info = (_, ref) => {
413
398
  });
414
399
  }
415
400
  });
416
- });
417
- const handleChange = (0, import_ahooks.useMemoizedFn)((e) => {
401
+ };
402
+ const handleChange = (e) => {
418
403
  if (state.channelDisabledEdit) {
419
404
  return;
420
405
  }
@@ -428,10 +413,10 @@ var Info = (_, ref) => {
428
413
  // changeService: true,
429
414
  }
430
415
  });
431
- });
416
+ };
432
417
  (0, import_react.useImperativeHandle)(ref, () => {
433
418
  return {
434
- init: setEditDataRun
419
+ init: setEditData
435
420
  };
436
421
  });
437
422
  const handleTotalChange = (number) => {
@@ -443,30 +428,43 @@ var Info = (_, ref) => {
443
428
  }
444
429
  return false;
445
430
  }, [state.renderType, isNormalProduct]);
446
- const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
447
- console.log(isShowTimeAndResource, "isShowTimeAndResource");
448
- const productName = (0, import_react.useMemo)(() => {
449
- var _a2, _b2, _c2;
450
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
431
+ const SelectTime = (_o = window.BaseMaterials) == null ? void 0 : _o.SelectTime;
432
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
433
+ import_drawer.default,
434
+ {
435
+ titleNoWrap: true,
436
+ zIndex: state.service.changeService ? 999 : 1e3,
437
+ forceRender: true,
438
+ mask: state.drawerMask,
439
+ open: state.service.editModal && !((_p = state.service.cacheItem) == null ? void 0 : _p.autoClose),
440
+ title: import_utils.locales.getText("pisell2.text.edit-service"),
441
+ onClose: () => {
442
+ dispatch({
443
+ type: "setService",
444
+ payload: {
445
+ editModal: false,
446
+ cacheItem: null,
447
+ changeService: false
448
+ }
449
+ });
450
+ }
451
+ },
452
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
451
453
  import_collapsibleList.default,
452
454
  {
453
455
  style: { marginTop: bundles.length ? "8px" : 0 },
454
456
  list: bundles,
455
457
  renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
456
458
  }
457
- ))));
458
- }, [(_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
459
- const price = (0, import_react.useMemo)(() => {
460
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
461
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
459
+ )))), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
462
460
  import_antd.Form.Item,
463
461
  {
464
462
  label: import_utils.locales.getText("pisell2.text.price"),
465
463
  name: "total",
466
464
  rules: [{ required: true }],
467
- extra: useTotal !== ((_b2 = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) == null ? void 0 : _b2.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
465
+ extra: useTotal !== ((_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
468
466
  (0, import_utils.formatAmount)(
469
- (_d2 = (_c2 = state.service.cacheItem) == null ? void 0 : _c2._extend) == null ? void 0 : _d2.origin_total,
467
+ (_w = (_v = state.service.cacheItem) == null ? void 0 : _v._extend) == null ? void 0 : _w.origin_total,
470
468
  2,
471
469
  state.amountSymbol
472
470
  ),
@@ -482,25 +480,18 @@ var Info = (_, ref) => {
482
480
  prefix: state.amountSymbol,
483
481
  onChange: handleTotalChange,
484
482
  disabled: state.channelDisabledEdit,
485
- originValue: ((_f2 = (_e2 = state.service.cacheItem) == null ? void 0 : _e2._extend) == null ? void 0 : _f2.origin_total) || 0,
486
- placeholder: ((_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total) || "0"
483
+ originValue: ((_y = (_x = state.service.cacheItem) == null ? void 0 : _x._extend) == null ? void 0 : _y.origin_total) || 0,
484
+ placeholder: ((_A = (_z = state.service.cacheItem) == null ? void 0 : _z._extend) == null ? void 0 : _A.origin_total) || "0"
487
485
  }
488
486
  )
489
- ));
490
- }, [useTotal, (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total, state.amountSymbol, state.channelDisabledEdit]);
491
- const reason = (0, import_react.useMemo)(() => {
492
- return isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
487
+ )), isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
493
488
  import_antd.Form.Item,
494
489
  {
495
490
  label: import_utils.locales.getText("pisell2.text.discount-reason"),
496
491
  name: "discount_reason"
497
492
  },
498
493
  /* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
499
- )) : null;
500
- }, [isReason]);
501
- const startTime = (0, import_react.useMemo)(() => {
502
- var _a2, _b2, _c2, _d2;
503
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
494
+ )) : null, isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
504
495
  import_antd.Form.Item,
505
496
  {
506
497
  label: import_utils.locales.getText("pisell2.text.start_time"),
@@ -510,7 +501,7 @@ var Info = (_, ref) => {
510
501
  SelectTime ? /* @__PURE__ */ import_react.default.createElement(
511
502
  SelectTime,
512
503
  {
513
- slice: (_d2 = (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time) == null ? void 0 : _d2.value,
504
+ slice: (_E = (_D = (_C = (_B = state.bookingConfig) == null ? void 0 : _B.config) == null ? void 0 : _C.basic) == null ? void 0 : _D.service_time) == null ? void 0 : _E.value,
514
505
  timePickerProps: {
515
506
  style: { width: "100%" }
516
507
  },
@@ -519,11 +510,7 @@ var Info = (_, ref) => {
519
510
  }
520
511
  }
521
512
  ) : null
522
- ));
523
- }, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value]);
524
- const duration = (0, import_react.useMemo)(() => {
525
- console.log("render form duration");
526
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
513
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
527
514
  import_antd.Form.Item,
528
515
  {
529
516
  label: import_utils.locales.getText("pisell2.text.duration"),
@@ -531,34 +518,23 @@ var Info = (_, ref) => {
531
518
  rules: [{ required: true }]
532
519
  },
533
520
  /* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
534
- ));
535
- }, [durationProps, timeObj]);
536
- const resource = (0, import_react.useMemo)(() => {
537
- console.log("render form resource");
538
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
521
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
539
522
  import_Resources.default,
540
523
  {
541
524
  ref: resourcesRef,
542
525
  state,
543
526
  cacheItem: state.service.cacheItem,
544
- getCurrentCacheItem
527
+ getCurrentCacheItem,
528
+ useDuration,
529
+ useStartTime
545
530
  }
546
- ));
547
- }, [state.renderType, (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources, (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps]);
548
- const capacity = (0, import_react.useMemo)(() => {
549
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(
531
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(
550
532
  import_Capacity.default,
551
533
  {
552
534
  state,
553
535
  cacheItem: state.service.cacheItem
554
536
  }
555
- ));
556
- }, [state.locale, state.isTerminal, (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys]);
557
- const hiddenQuantity = (0, import_react.useMemo)(() => {
558
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
559
- }, []);
560
- const quantity = (0, import_react.useMemo)(() => {
561
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
537
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null))), isNormalProduct && /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
562
538
  import_antd.Form.Item,
563
539
  {
564
540
  label: import_utils.locales.getText("pisell2.text.quantity"),
@@ -580,11 +556,7 @@ var Info = (_, ref) => {
580
556
  }
581
557
  }
582
558
  )
583
- ));
584
- }, []);
585
- const footer = (0, import_react.useMemo)(() => {
586
- var _a2;
587
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
559
+ )))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
588
560
  "div",
589
561
  {
590
562
  className: "pisell-lowcode__booking-service-delete-wrap",
@@ -596,47 +568,13 @@ var Info = (_, ref) => {
596
568
  {
597
569
  type: "primary",
598
570
  className: "pisell-lowcode__booking-service-body-edit-footer-apple",
599
- disabled: !isNormalProduct && !((_a2 = state.service.resourcesOrigin) == null ? void 0 : _a2.length),
571
+ disabled: !isNormalProduct && !((_F = state.service.resourcesOrigin) == null ? void 0 : _F.length),
600
572
  onClick: () => {
601
573
  form.submit();
602
574
  }
603
575
  },
604
576
  import_utils.locales.getText("pisell2.text.apply")
605
- ));
606
- }, [isNormalProduct, (_G = state.service.resourcesOrigin) == null ? void 0 : _G.length]);
607
- console.log("render edit");
608
- console.log(state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose), performance.now() - window.pp1, "打开商品1");
609
- const [val, setVal] = (0, import_react.useState)(false);
610
- (0, import_react.useEffect)(() => {
611
- if (isShowTimeAndResource) {
612
- setTimeout(() => {
613
- setVal(true);
614
- }, 200);
615
- } else {
616
- setVal(false);
617
- }
618
- }, [isShowTimeAndResource]);
619
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
620
- import_drawer.default,
621
- {
622
- titleNoWrap: true,
623
- zIndex: state.service.changeService ? 999 : 1e3,
624
- forceRender: true,
625
- mask: state.drawerMask,
626
- open: state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
627
- title: import_utils.locales.getText("pisell2.text.edit-service"),
628
- onClose: () => {
629
- dispatch({
630
- type: "setService",
631
- payload: {
632
- editModal: false,
633
- cacheItem: null,
634
- changeService: false
635
- }
636
- });
637
- }
638
- },
639
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)
577
+ )))
640
578
  ));
641
579
  };
642
580
  var editService_default = (0, import_react.forwardRef)(Info);
@@ -56,18 +56,14 @@ var Service = () => {
56
56
  }, []);
57
57
  const clearCart = (0, import_useClearCart.default)(state, dispatch);
58
58
  const { dom } = (0, import_useQuotation.default)(state, dispatch);
59
- const renderMemo = (0, import_react.useMemo)(() => {
60
- console.log("render info22222");
61
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, clearCart, /* @__PURE__ */ import_react.default.createElement(
62
- import_Lists.default,
63
- {
64
- isParallelResource: true,
65
- onEdit: handleEdit,
66
- onAction: handleAction,
67
- onChange: (e, type) => dispatchService(type || "setService", e)
68
- }
69
- ), !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit }) : null), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null), dom);
70
- }, [clearCart, dom, showAddTimeModal, clearCart]);
71
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderMemo);
59
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, clearCart, /* @__PURE__ */ import_react.default.createElement(
60
+ import_Lists.default,
61
+ {
62
+ isParallelResource: true,
63
+ onEdit: handleEdit,
64
+ onAction: handleAction,
65
+ onChange: (e, type) => dispatchService(type || "setService", e)
66
+ }
67
+ ), !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit }) : null), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null), dom);
72
68
  };
73
69
  var service_default = import_react.default.memo(Service);
@@ -49,7 +49,6 @@ var Duration = (props) => {
49
49
  timeObj,
50
50
  ...resetProps
51
51
  } = props;
52
- const startDateStr = (0, import_react.useMemo)(() => (0, import_dayjs.default)(startDate).format("YYYY-MM-DD HH:mm:ss"), [startDate]);
53
52
  const times = (0, import_react.useMemo)(() => {
54
53
  if (timeObj) {
55
54
  return timeObj.durationSlicesBasedOnTime;
@@ -77,7 +76,7 @@ var Duration = (props) => {
77
76
  });
78
77
  }
79
78
  return durationSlicesBasedOnTime;
80
- }, [timeObj.durationSlicesBasedOnTime, slice, locale, duration, startDateStr, usableTime == null ? void 0 : usableTime.end_at]);
79
+ }, [timeObj, slice, locale, duration, startDate, usableTime]);
81
80
  (0, import_react.useEffect)(() => {
82
81
  timeObjChange == null ? void 0 : timeObjChange(times);
83
82
  }, [times]);
@@ -89,10 +88,6 @@ var Duration = (props) => {
89
88
  },
90
89
  []
91
90
  );
92
- const options = (0, import_react.useMemo)(() => {
93
- console.log("render form options");
94
- return renderOptions(times);
95
- }, [times]);
96
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { ...selectProps, ...resetProps }, options);
91
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { ...selectProps, ...resetProps }, renderOptions(times));
97
92
  };
98
93
  var duration_default = Duration;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -105,4 +106,11 @@ export declare const walkInData: {
105
106
  id: number;
106
107
  nickname: string;
107
108
  };
108
- export declare const Provider: any, Context: any;
109
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
110
+ state: FormState;
111
+ } & {
112
+ dispatch: (params: {
113
+ type: string;
114
+ payload: any;
115
+ }) => void;
116
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | "flexible" | {
168
+ }) => number | {
169
169
  type: string;
170
170
  value: number;
171
- };
171
+ } | "flexible";
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 递归循环表单数据
4
3
  * @Author: hongbing.wang
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RadioGroupProps } from 'antd';
3
2
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
4
3
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Eftpos } from './const';
3
2
  /**
4
3
  * @title: tyro 设备连接
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 自定义组件设置
4
3
  * @description: 自定义组件设置
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.css';
3
2
  /**
4
3
  * @title: 自定义组件设置