@pisell/private-materials 3.3.32 → 3.3.33

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 (420) 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/render/default/view.css +1 -1
  7. package/build/lowcode/render/default/view.js +6 -6
  8. package/build/lowcode/view.css +1 -1
  9. package/build/lowcode/view.js +6 -6
  10. package/es/businessModel/SalesModel/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -25
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +45 -25
  14. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Content/index.js +53 -36
  16. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  18. package/es/components/appointmentBooking/components/Form/index.js +61 -161
  19. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  20. package/es/components/appointmentBooking/components/Header/index.js +64 -50
  21. package/es/components/appointmentBooking/components/Resource/index.js +119 -102
  22. package/es/components/appointmentBooking/components/TimeSlicing/index.js +5 -12
  23. package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  24. package/es/components/appointmentBooking/context.js +43 -3
  25. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  26. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  27. package/es/components/appointmentBooking/hooks.d.ts +2 -3
  28. package/es/components/appointmentBooking/hooks.js +293 -209
  29. package/es/components/appointmentBooking/utils.d.ts +88 -2
  30. package/es/components/appointmentBooking/utils.js +325 -63
  31. package/es/components/booking/addons/model.js +5 -5
  32. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  33. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  34. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  35. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  36. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  37. package/es/components/booking/components/browserSelect/index.js +1 -1
  38. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  39. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  40. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  41. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  42. package/es/components/booking/components/voucher/index.d.ts +1 -0
  43. package/es/components/booking/forms/model.js +5 -5
  44. package/es/components/booking/forms/sendModal/useSendModal.d.ts +2 -1
  45. package/es/components/booking/forms/single/index.d.ts +1 -0
  46. package/es/components/booking/forms/table/index.d.ts +1 -0
  47. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  48. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  49. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  50. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  51. package/es/components/booking/info/date/index.d.ts +1 -0
  52. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  53. package/es/components/booking/info/header/index.d.ts +1 -0
  54. package/es/components/booking/info/notes/index.d.ts +1 -0
  55. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  56. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  57. package/es/components/booking/info/service/like/index.d.ts +1 -0
  58. package/es/components/booking/info/service/like/index.js +1 -1
  59. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  60. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  61. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  62. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  63. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  64. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  65. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  66. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  67. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  68. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  69. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  70. package/es/components/booking/materiels/startTime/index.js +1 -1
  71. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  72. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  73. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  74. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  75. package/es/components/booking/notes/addNote/index.d.ts +1 -0
  76. package/es/components/booking/notes/model.js +5 -5
  77. package/es/components/booking/payments/model.js +5 -5
  78. package/es/components/booking/utils.d.ts +2 -2
  79. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  80. package/es/components/eftpos/form/index.d.ts +1 -0
  81. package/es/components/eftpos/group/index.d.ts +1 -0
  82. package/es/components/eftpos/hooks.d.ts +1 -0
  83. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  84. package/es/components/eftpos/icon/device.d.ts +1 -0
  85. package/es/components/eftpos/index.d.ts +1 -0
  86. package/es/components/eftpos/pos.d.ts +1 -0
  87. package/es/components/eftpos/receipt/index.d.ts +1 -0
  88. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  89. package/es/components/eftposPay/amount.d.ts +2 -1
  90. package/es/components/eftposPay/app.d.ts +2 -1
  91. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  92. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  93. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  94. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  95. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  96. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  97. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  98. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  99. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  100. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  101. package/es/components/eftposPay/device.d.ts +2 -1
  102. package/es/components/eftposPay/hooks.d.ts +1 -1
  103. package/es/components/eftposPay/index.d.ts +1 -0
  104. package/es/components/eftposPay/pay.d.ts +1 -0
  105. package/es/components/eftposPay/payo/config.d.ts +1 -0
  106. package/es/components/eftposPay/store/index.d.ts +2 -2
  107. package/es/components/eftposPay/tip.d.ts +1 -0
  108. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  109. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  110. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  111. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  112. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  113. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  114. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  115. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  116. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  117. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  118. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  119. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  120. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  121. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  122. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  123. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
  124. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
  125. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
  126. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  127. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  128. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  129. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  130. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  131. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  132. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  133. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  134. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  135. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  136. package/es/components/listComponent/index.js +5 -5
  137. package/es/components/login/index.d.ts +1 -0
  138. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  139. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  140. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  141. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  142. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  143. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  144. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  145. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  146. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  147. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  148. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  149. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  150. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  151. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  152. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  153. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  154. package/es/components/productExtension/card/index.js +3 -3
  155. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  156. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  157. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  158. package/es/components/productExtension/fields/Forms/index.js +12 -12
  159. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  160. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  161. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  162. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  163. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  164. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  165. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  166. package/es/components/productExtension/index.d.ts +1 -0
  167. package/es/components/productExtension/server.js +2 -2
  168. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  169. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  170. package/es/components/ruleSetting/index.d.ts +1 -0
  171. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  172. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  173. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  174. package/es/components/schedules/calendar/index.d.ts +1 -0
  175. package/es/components/schedules/calendar/index.js +4 -4
  176. package/es/components/schedules/calendar/serve.js +2 -2
  177. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  178. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  179. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  180. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  181. package/es/components/schedules/components/ResourceList/index.js +1 -1
  182. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  183. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  184. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  185. package/es/components/schedules/components/Search/index.js +5 -5
  186. package/es/components/schedules/model.js +5 -5
  187. package/es/components/schedules/openHours/index.js +1 -1
  188. package/es/components/schedules/openHours/serve.js +2 -2
  189. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  190. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  191. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  192. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  193. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  194. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  195. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  196. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  197. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  198. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  199. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  200. package/es/components/schedules/products/index.d.ts +1 -0
  201. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  202. package/es/components/schedules/products/list/index.d.ts +1 -0
  203. package/es/components/schedules/products/serve.js +2 -2
  204. package/es/components/schedules/products/utils.js +5 -5
  205. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  206. package/es/components/schedules/resources/detail/index.js +10 -10
  207. package/es/components/schedules/resources/index.d.ts +1 -0
  208. package/es/components/schedules/resources/list/index.d.ts +1 -0
  209. package/es/components/schedules/resources/list/index.js +2 -2
  210. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  211. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  212. package/es/components/schedules/resources/serve.js +2 -2
  213. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  214. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  215. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  216. package/es/components/schedules/schedules/index.d.ts +1 -0
  217. package/es/components/schedules/utils.d.ts +1 -1
  218. package/es/components/schedules/utils.js +4 -4
  219. package/es/components/selectModal/index.js +2 -2
  220. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  221. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  222. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  223. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  224. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  225. package/es/components/shoppingCart/index.d.ts +1 -0
  226. package/es/components/taxSelect/index.d.ts +1 -0
  227. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  228. package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
  229. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  230. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  231. package/es/components/ticketBooking/index.d.ts +1 -0
  232. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  233. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  234. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  235. package/es/hooks/useComponents.js +1 -1
  236. package/es/utils/index.d.ts +1 -1
  237. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  238. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +0 -5
  239. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  240. package/lib/components/appointmentBooking/components/Cart/Item/index.js +33 -9
  241. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  242. package/lib/components/appointmentBooking/components/Content/index.js +35 -21
  243. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  244. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  245. package/lib/components/appointmentBooking/components/Form/index.js +54 -98
  246. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  247. package/lib/components/appointmentBooking/components/Header/index.js +39 -20
  248. package/lib/components/appointmentBooking/components/Resource/index.js +41 -59
  249. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -7
  250. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  251. package/lib/components/appointmentBooking/context.js +48 -4
  252. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  253. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  254. package/lib/components/appointmentBooking/hooks.d.ts +2 -3
  255. package/lib/components/appointmentBooking/hooks.js +143 -57
  256. package/lib/components/appointmentBooking/utils.d.ts +88 -2
  257. package/lib/components/appointmentBooking/utils.js +191 -51
  258. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  259. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  260. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  261. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  262. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  263. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  264. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  265. package/lib/components/booking/components/voucher/index.d.ts +1 -0
  266. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +2 -1
  267. package/lib/components/booking/forms/single/index.d.ts +1 -0
  268. package/lib/components/booking/forms/table/index.d.ts +1 -0
  269. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  270. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  271. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  272. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  273. package/lib/components/booking/info/date/index.d.ts +1 -0
  274. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  275. package/lib/components/booking/info/header/index.d.ts +1 -0
  276. package/lib/components/booking/info/notes/index.d.ts +1 -0
  277. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  278. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  279. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  280. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  281. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  282. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  283. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  284. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  285. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  286. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  287. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  288. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  289. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  290. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  291. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  292. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  293. package/lib/components/booking/notes/addNote/index.d.ts +1 -0
  294. package/lib/components/booking/utils.d.ts +2 -2
  295. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  296. package/lib/components/eftpos/form/index.d.ts +1 -0
  297. package/lib/components/eftpos/group/index.d.ts +1 -0
  298. package/lib/components/eftpos/hooks.d.ts +1 -0
  299. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  300. package/lib/components/eftpos/icon/device.d.ts +1 -0
  301. package/lib/components/eftpos/index.d.ts +1 -0
  302. package/lib/components/eftpos/pos.d.ts +1 -0
  303. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  304. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  305. package/lib/components/eftposPay/amount.d.ts +2 -1
  306. package/lib/components/eftposPay/app.d.ts +2 -1
  307. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  308. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  309. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  310. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  311. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  312. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  313. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  314. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  315. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  316. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  317. package/lib/components/eftposPay/device.d.ts +2 -1
  318. package/lib/components/eftposPay/hooks.d.ts +1 -1
  319. package/lib/components/eftposPay/index.d.ts +1 -0
  320. package/lib/components/eftposPay/pay.d.ts +1 -0
  321. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  322. package/lib/components/eftposPay/store/index.d.ts +2 -2
  323. package/lib/components/eftposPay/tip.d.ts +1 -0
  324. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  325. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  326. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  327. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  328. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  329. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  330. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  331. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  332. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  333. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  334. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  335. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  336. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  337. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  338. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  339. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
  340. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
  341. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
  342. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  343. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  344. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  345. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  346. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  347. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  348. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  349. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  350. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  351. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  352. package/lib/components/login/index.d.ts +1 -0
  353. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  354. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  355. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  356. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  357. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  358. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  359. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  360. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  361. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  362. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  363. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  364. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  365. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  366. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  367. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  368. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  369. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  370. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  371. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  372. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  373. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  374. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  375. package/lib/components/productExtension/index.d.ts +1 -0
  376. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  377. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  378. package/lib/components/ruleSetting/index.d.ts +1 -0
  379. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  380. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  381. package/lib/components/schedules/calendar/index.d.ts +1 -0
  382. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  383. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  384. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  385. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  386. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  387. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  388. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  389. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  390. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  391. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  392. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  393. package/lib/components/schedules/products/index.d.ts +1 -0
  394. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  395. package/lib/components/schedules/products/list/index.d.ts +1 -0
  396. package/lib/components/schedules/resources/index.d.ts +1 -0
  397. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  398. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  399. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  400. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  401. package/lib/components/schedules/schedules/index.d.ts +1 -0
  402. package/lib/components/schedules/utils.d.ts +1 -1
  403. package/lib/components/schedules/utils.js +1 -1
  404. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  405. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  406. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  407. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  408. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  409. package/lib/components/shoppingCart/index.d.ts +1 -0
  410. package/lib/components/taxSelect/index.d.ts +1 -0
  411. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  412. package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
  413. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  414. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  415. package/lib/components/ticketBooking/index.d.ts +1 -0
  416. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  417. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  418. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  419. package/lib/utils/index.d.ts +1 -1
  420. package/package.json +2 -2
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
2
3
  export * from './Sales';
3
4
  export default SalesModel;
@@ -86,11 +86,6 @@ var ContinueButton = ({ onNext }) => {
86
86
  };
87
87
  const handleContinue = async () => {
88
88
  try {
89
- if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepList == null ? void 0 : stepList.length)) {
90
- const loginOk = await handleLoginCheck();
91
- if (!loginOk) return;
92
- if (handleCheckAccount()) return;
93
- }
94
89
  return onNext && onNext();
95
90
  } catch (error) {
96
91
  console.log(error, "handleContinue_error");
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
4
  export default Total;
@@ -46,18 +46,19 @@ var import_Deposit = __toESM(require("../../Deposit"));
46
46
  var import_utils3 = require("../utils");
47
47
  var import_index = require("./index.less");
48
48
  var CartItem = ({ onNext }) => {
49
- var _a, _b, _c;
49
+ var _a, _b, _c, _d;
50
50
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
51
51
  const {
52
52
  carts,
53
53
  currentStep,
54
- resources,
55
54
  setResourceOtherParams,
56
55
  resourceOtherParams,
57
56
  summary,
58
- isLastStep
57
+ isLastStep,
58
+ currentSelectedResourcesRef,
59
+ currentStepParams
59
60
  } = (0, import_context.useAppointmentBookingContext)();
60
- const { accountLists, getHolders, form_id, addAccount } = (0, import_hooks2.useAppointmentBookingAccount)();
61
+ const { accountLists, getHolders, addAccount } = (0, import_hooks2.useAppointmentBookingAccount)();
61
62
  const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
62
63
  const { isFormSubject, bookingSubject } = (0, import_hooks2.useAppointmentBookingSetting)();
63
64
  const { isLogin } = (0, import_hooks2.useAppointmentBookingLogin)();
@@ -100,7 +101,7 @@ var CartItem = ({ onNext }) => {
100
101
  } else {
101
102
  appointmentBooking.updateCart({
102
103
  _id: e == null ? void 0 : e._id,
103
- resources: val ? [val] : []
104
+ resources: val ? (0, import_utils2.updateCartResources)(e, val) : []
104
105
  });
105
106
  }
106
107
  getResourceList();
@@ -150,8 +151,31 @@ var CartItem = ({ onNext }) => {
150
151
  }
151
152
  };
152
153
  const products = (0, import_react.useMemo)(() => {
153
- return (0, import_utils2.formatCarts)(carts, resources, utils, accountLists);
154
- }, [carts, resources, accountLists]);
154
+ var _a2;
155
+ console.log(currentSelectedResourcesRef.current, carts, "wh867865");
156
+ if (!(carts == null ? void 0 : carts.length)) return [];
157
+ if (((_a2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _a2.length) > 0) {
158
+ const newCarts = carts.map((item) => {
159
+ var _a3;
160
+ const currentResourceData = currentSelectedResourcesRef.current.find(
161
+ (resource) => (resource == null ? void 0 : resource._id) === (item == null ? void 0 : item._id)
162
+ );
163
+ const multiResources = (0, import_utils2.getMultiResources)(
164
+ item,
165
+ (_a3 = currentResourceData == null ? void 0 : currentResourceData.currentSelectedResource) == null ? void 0 : _a3.resourceItem,
166
+ currentStepParams == null ? void 0 : currentStepParams.key
167
+ );
168
+ return {
169
+ ...item,
170
+ isMultipleResource: true,
171
+ multiResources
172
+ };
173
+ });
174
+ return newCarts;
175
+ } else {
176
+ return carts;
177
+ }
178
+ }, [carts, currentSelectedResourcesRef.current, currentStepParams == null ? void 0 : currentStepParams.key]);
155
179
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
156
180
  "div",
157
181
  {
@@ -165,8 +189,8 @@ var CartItem = ({ onNext }) => {
165
189
  hideAddBtn: false,
166
190
  holders,
167
191
  disabledEdit: isLastStep,
168
- isShowChangeResource: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-resource",
169
- isShowDelete: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-service",
192
+ isShowChangeResource: (_c = (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) == null ? void 0 : _c.startsWith("select-resource"),
193
+ isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
170
194
  isShowPackageNote: false,
171
195
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
172
196
  isShowHolder: isFormSubject,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
3
4
  export default Cart;
@@ -51,7 +51,6 @@ var import_index = require("./index.less");
51
51
  var Layout = () => {
52
52
  var _a, _b, _c, _d, _e;
53
53
  const stepRef = (0, import_react.useRef)();
54
- const formRef = (0, import_react.useRef)();
55
54
  const {
56
55
  currentStep,
57
56
  setResourceOtherParams,
@@ -60,17 +59,19 @@ var Layout = () => {
60
59
  appointmentBooking,
61
60
  setLoading,
62
61
  policyParams,
63
- closePolicy
62
+ closePolicy,
63
+ currentStepParams
64
64
  } = (0, import_context.useAppointmentBookingContext)();
65
65
  const { isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
66
66
  const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
67
67
  const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
68
- const { removeStep, stepList } = (0, import_hooks.useAppointmentBookingStep)();
68
+ const { removeStep } = (0, import_hooks.useAppointmentBookingStep)();
69
69
  const { shopDiscount } = (0, import_hooks.useShopDiscount)();
70
70
  (0, import_hooks.useAppointmentBookingCart)();
71
71
  (0, import_hooks.useAppointmentBookingStep)();
72
72
  const [params, setParams] = (0, import_react.useState)({});
73
73
  (0, import_react.useEffect)(() => {
74
+ appointmentBooking.removeStep("fill-form");
74
75
  return () => {
75
76
  var _a2;
76
77
  setIsAgreeDepositPolicy(false);
@@ -78,6 +79,16 @@ var Layout = () => {
78
79
  (_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
79
80
  };
80
81
  }, []);
82
+ (0, import_react.useEffect)(() => {
83
+ var _a2;
84
+ if ((currentStepParams == null ? void 0 : currentStepParams.index) < 0) return;
85
+ const resourceStepIndex = (_a2 = currentStepParams == null ? void 0 : currentStepParams.stepLists) == null ? void 0 : _a2.findIndex(
86
+ (item) => item.key === "select-resource"
87
+ );
88
+ if ((currentStepParams == null ? void 0 : currentStepParams.index) < resourceStepIndex) {
89
+ appointmentBooking.setOtherData("current_selected_resources", null);
90
+ }
91
+ }, [currentStepParams]);
81
92
  (0, import_react.useEffect)(() => {
82
93
  try {
83
94
  if (isFormSubject) {
@@ -112,29 +123,32 @@ var Layout = () => {
112
123
  behavior: "smooth"
113
124
  });
114
125
  }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
126
+ const components = {
127
+ // 选择服务
128
+ "select-service": import_Services.default,
129
+ // 添加客户
130
+ "select-guest": import_Guest.default,
131
+ // 选择时间
132
+ "select-date": import_Date.default,
133
+ // 时间切片
134
+ "select-time": import_TimeSlicing.default,
135
+ // 确认信息
136
+ "confirm-information": import_ConfirmInformation.default
137
+ };
115
138
  const Com = (0, import_react.useMemo)(() => {
116
139
  var _a2;
117
140
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
118
141
  if (!key) return null;
119
- const components = {
120
- // 选择服务
121
- "select-service": import_Services.default,
122
- // 添加客户
123
- "select-guest": import_Guest.default,
124
- // 选择时间
125
- "select-date": import_Date.default,
126
- // 选择资源
127
- "select-resource": import_Resource.default,
128
- // 时间切片
129
- "select-time": import_TimeSlicing.default,
130
- // 填写表单
131
- "fill-form": import_Form.default,
132
- // 确认信息
133
- "confirm-information": import_ConfirmInformation.default
134
- };
135
- let Com2 = components[key];
142
+ let Com2;
143
+ if (key.startsWith("select-resource")) {
144
+ Com2 = import_Resource.default;
145
+ } else if (key.startsWith("fill-form")) {
146
+ Com2 = import_Form.default;
147
+ } else {
148
+ Com2 = components[key];
149
+ }
136
150
  return /* @__PURE__ */ import_react.default.createElement(Com2, { onChange: setParams, params, ref: stepRef });
137
- }, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key, stepRef]);
151
+ }, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key]);
138
152
  (0, import_react.useEffect)(() => {
139
153
  var _a2, _b2;
140
154
  if ((0, import_utils.isMobile)()) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: () => JSX.Element;
3
4
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -37,81 +37,58 @@ var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
37
37
  var import_utils = require("../../utils");
38
38
  var import_context = require("../../context");
39
39
  var import_hooks = require("../../hooks");
40
- var import_PolicyModal = __toESM(require("../../deposit/components/PolicyModal"));
41
40
  var import_index = require("./index.less");
42
41
  var Form = (0, import_react.forwardRef)((props, ref) => {
43
42
  const manualRef = (0, import_react.useRef)();
44
- const [currentFormIndex, setCurrentFormIndex] = (0, import_react.useState)(0);
45
- const [showAgreement, setShowAgreement] = (0, import_react.useState)(false);
46
- const [agreementContent, setAgreementContent] = (0, import_react.useState)({});
47
- const [formStatus, setFormStatus] = (0, import_react.useState)([]);
48
43
  const [isClearData, setIsClearData] = (0, import_react.useState)(false);
49
- const [formId, setFormId] = (0, import_react.useState)(0);
50
- const { carts, appointmentBooking, setLoading } = (0, import_context.useAppointmentBookingContext)();
44
+ const {
45
+ appointmentBooking,
46
+ setLoading,
47
+ currentStepParams,
48
+ currentSelectedResourcesRef
49
+ } = (0, import_context.useAppointmentBookingContext)();
51
50
  const { getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
52
51
  const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
53
52
  const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
54
- const utils = (0, import_hooks.contextUtils)();
55
53
  (0, import_react.useImperativeHandle)(ref, () => ({
56
54
  next: () => {
57
55
  var _a, _b;
56
+ debugger;
58
57
  setLoading(true);
59
58
  (_b = (_a = manualRef.current) == null ? void 0 : _a.submit) == null ? void 0 : _b.call(_a);
60
59
  }
61
60
  }));
62
- const key = "booking_form";
63
- const formStorage = getOtherData("booking_form") || {};
64
- const resources = (0, import_react.useMemo)(() => {
65
- const _resource = getResourceList();
66
- return (_resource == null ? void 0 : _resource.resources) || [];
67
- }, []);
68
- const forms = (0, import_react.useMemo)(() => {
69
- const newCarts = (0, import_utils.formatCarts)(carts, resources, utils);
70
- if (!(newCarts == null ? void 0 : newCarts.length) || !(resources == null ? void 0 : resources.length)) return [];
71
- return (0, import_utils.formatForms)(newCarts) || [];
72
- }, [carts, resources]);
73
- (0, import_react.useEffect)(() => {
74
- var _a;
75
- if (!(forms == null ? void 0 : forms.length)) return;
76
- setFormId(((_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.form_id) || 0);
77
- }, [forms, currentFormIndex]);
78
61
  const [FormCard] = (0, import_useComponents.default)({
79
62
  components: ["FormCard"]
80
63
  });
81
- const goToNextForm = () => {
82
- var _a, _b, _c;
83
- const nextIndex = currentFormIndex + 1;
84
- if (nextIndex < forms.length) {
85
- setIsClearData(true);
86
- setCurrentFormIndex(nextIndex);
87
- if (!((_a = forms == null ? void 0 : forms[nextIndex]) == null ? void 0 : _a.form_id) && ((_b = forms == null ? void 0 : forms[nextIndex]) == null ? void 0 : _b.policy_id)) {
88
- setLoading(true);
89
- setAgreementContent({ id: (_c = forms == null ? void 0 : forms[nextIndex]) == null ? void 0 : _c.policy_id });
90
- setShowAgreement(true);
91
- } else {
92
- setLoading(false);
93
- }
94
- } else {
95
- nextStep();
96
- }
97
- };
64
+ const key = "booking_form";
65
+ const formStorage = getOtherData("booking_form") || {};
66
+ const appointmentBoard = (0, import_react.useMemo)(() => {
67
+ const { resources } = getResourceList();
68
+ return (0, import_utils.currentAppointmentBoard)(
69
+ currentStepParams.key,
70
+ resources,
71
+ appointmentBooking
72
+ );
73
+ }, [currentStepParams.key]);
74
+ const formId = (0, import_react.useMemo)(() => {
75
+ return (appointmentBoard == null ? void 0 : appointmentBoard.resource_form_id) || 0;
76
+ }, [appointmentBoard == null ? void 0 : appointmentBoard.resource_form_id]);
98
77
  const updateFormStatus = (status) => {
99
78
  if (status === "error") {
100
79
  setLoading(false);
101
80
  }
102
- const newFormStatus = (0, import_utils.updateLists)(formStatus, "id", formId, {
103
- status
104
- });
105
- setFormStatus(newFormStatus);
106
81
  };
107
82
  const setFormStorage = (values) => {
108
- var _a;
109
- const cart_id = (_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.cart_id;
110
83
  const oldData = getOtherData(key);
111
- const newData = (0, import_utils.updateBookingFormStorage)(oldData, cart_id, values);
84
+ const newData = (0, import_utils.updateBookingFormStorage)(
85
+ oldData,
86
+ currentStepParams == null ? void 0 : currentStepParams.key,
87
+ values
88
+ );
112
89
  setOtherData(key, { ...newData });
113
90
  appointmentBooking.updateCart({
114
- _id: cart_id,
91
+ _id: appointmentBoard == null ? void 0 : appointmentBoard.cart_id,
115
92
  relationForms: [
116
93
  {
117
94
  form_id: formId,
@@ -121,59 +98,38 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
121
98
  });
122
99
  };
123
100
  const handleFormFinish = (status, values) => {
124
- var _a, _b;
125
- setIsClearData(false);
126
- updateFormStatus(status);
127
- if (status === "success") {
128
- setFormStorage(values);
129
- if ((_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.policy_id) {
130
- setAgreementContent({ id: (_b = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _b.policy_id });
131
- setShowAgreement(true);
132
- } else {
133
- goToNextForm();
101
+ try {
102
+ setIsClearData(false);
103
+ updateFormStatus(status);
104
+ if (status === "success") {
105
+ setFormStorage(values);
106
+ nextStep();
134
107
  }
108
+ } catch (error) {
109
+ setLoading(false);
135
110
  }
136
111
  };
137
- const handleAgreementOk = () => {
138
- setShowAgreement(false);
139
- goToNextForm();
140
- };
141
- const formCom = (0, import_react.useMemo)(() => {
142
- var _a;
143
- if (!formId) return;
144
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-form-wrap" }, /* @__PURE__ */ import_react.default.createElement(
145
- FormCard,
146
- {
147
- id: formId,
148
- ref: manualRef,
149
- isGetLastData: false,
150
- setting: { isHidden: 1 },
151
- formWrapStyle: { padding: "16px" },
152
- isV2API: true,
153
- isShowSkeleton: true,
154
- onSubmit: (status, values) => {
155
- handleFormFinish(status, values);
156
- },
157
- onFinishFailed: (e) => {
158
- updateFormStatus("error");
159
- },
160
- onFormValueChange: (values) => {
161
- },
162
- defaultValues: (formStorage == null ? void 0 : formStorage[(_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.cart_id]) || {},
163
- isClearData: false
164
- }
165
- ));
166
- }, [currentFormIndex, formId]);
167
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, formCom, showAgreement ? /* @__PURE__ */ import_react.default.createElement(
168
- import_PolicyModal.default,
112
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-form-wrap" }, /* @__PURE__ */ import_react.default.createElement(
113
+ FormCard,
169
114
  {
170
- open: showAgreement,
171
- onCancel: () => setShowAgreement(false),
172
- onConfirm: () => handleAgreementOk(),
173
- item: agreementContent,
174
- onChange: () => setLoading(false),
175
- isHideCheckout: false
115
+ id: formId,
116
+ ref: manualRef,
117
+ isGetLastData: false,
118
+ setting: { isHidden: 1 },
119
+ formWrapStyle: { padding: "16px" },
120
+ isV2API: true,
121
+ isShowSkeleton: true,
122
+ onSubmit: (status, values) => {
123
+ handleFormFinish(status, values);
124
+ },
125
+ onFinishFailed: (e) => {
126
+ updateFormStatus("error");
127
+ },
128
+ onFormValueChange: (values) => {
129
+ },
130
+ defaultValues: (formStorage == null ? void 0 : formStorage[currentStepParams == null ? void 0 : currentStepParams.key]) || {},
131
+ isClearData: false
176
132
  }
177
- ) : null);
133
+ )));
178
134
  });
179
135
  var Form_default = Form;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -38,26 +38,41 @@ var import_progressBar = __toESM(require("../../../eventBooking/components/progr
38
38
  var import_context = require("../../context");
39
39
  var import_hooks = require("../../hooks");
40
40
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
41
+ var import_utils2 = require("../../utils");
41
42
  var import_index = require("./index.less");
42
43
  var Header = () => {
43
44
  var _a;
44
- const { currentStep, appointmentBooking, resources, setTimes, carts } = (0, import_context.useAppointmentBookingContext)();
45
+ const {
46
+ currentStep,
47
+ appointmentBooking,
48
+ setTimes,
49
+ carts,
50
+ currentStepParams,
51
+ currentSelectedResourcesRef
52
+ } = (0, import_context.useAppointmentBookingContext)();
45
53
  const shopDiscount = (0, import_hooks.useShopDiscount)();
46
54
  const context = (0, import_useEngineContext.default)();
47
- const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
48
- const { getStepIndex, stepList, updateStep } = (0, import_hooks.useAppointmentBookingStep)();
49
- const { setOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
55
+ const { stepList, updateStep } = (0, import_hooks.useAppointmentBookingStep)();
56
+ const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
50
57
  const { checkProductType } = (0, import_hooks.useAppointmentBookingProduct)();
58
+ const utils = (0, import_hooks.contextUtils)();
51
59
  const stepName = (0, import_react.useMemo)(() => {
52
- var _a2, _b, _c, _d, _e;
60
+ var _a2, _b, _c, _d;
53
61
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
54
62
  if (!key) return "";
55
- if (key === "select-resource") {
56
- const name = ((_d = (_c = (_b = resources == null ? void 0 : resources[0]) == null ? void 0 : _b.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.title) || "";
63
+ if (key.startsWith("select-resource")) {
64
+ const currentResource = (_c = (_b = currentSelectedResourcesRef.current) == null ? void 0 : _b[0]) == null ? void 0 : _c.currentSelectedResource;
65
+ const resourceItem = (currentResource == null ? void 0 : currentResource.resourceItem) || {};
66
+ const name = (0, import_utils2.getResourceTitle)(
67
+ appointmentBooking,
68
+ resourceItem == null ? void 0 : resourceItem.code,
69
+ utils,
70
+ resourceItem
71
+ );
57
72
  return import_utils.locales.getText("pisell2.event.select.category")(name);
58
73
  }
59
- return ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description) || "";
60
- }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, resources]);
74
+ return ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.description) || "";
75
+ }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, currentSelectedResourcesRef.current]);
61
76
  const handleBack = async () => {
62
77
  var _a2, _b;
63
78
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
@@ -82,17 +97,21 @@ var Header = () => {
82
97
  if (key === "select-time") {
83
98
  setTimes([]);
84
99
  }
85
- if (key === "fill-form") {
86
- setOtherData("booking_form", {});
87
- }
88
- const resourceStep = stepList[(currentStep == null ? void 0 : currentStep.index) - 1];
89
- if ((resourceStep == null ? void 0 : resourceStep.isSkip) && (resourceStep == null ? void 0 : resourceStep.key) === "select-resource") {
90
- appointmentBooking.deleteCartItemInfo("resource");
100
+ if (key.startsWith("fill-form")) {
101
+ const form_key = "booking_form";
102
+ let booking_form = getOtherData(form_key);
103
+ setOtherData(form_key, { ...booking_form, [key]: {} });
91
104
  }
92
105
  appointmentBooking.back();
93
- if ((resourceStep == null ? void 0 : resourceStep.isSkip) && ((resourceStep == null ? void 0 : resourceStep.key) === "select-resource" || (resourceStep == null ? void 0 : resourceStep.key) === "select-service")) {
94
- updateStep(resourceStep == null ? void 0 : resourceStep.key, {
95
- index: currentStep == null ? void 0 : currentStep.index,
106
+ const prevStepData = stepList[(currentStepParams == null ? void 0 : currentStepParams.index) - 1];
107
+ const currentStepData = stepList[currentStepParams == null ? void 0 : currentStepParams.index];
108
+ debugger;
109
+ if ((currentStepData == null ? void 0 : currentStepData.isSkip) || (prevStepData == null ? void 0 : prevStepData.isSkip)) {
110
+ const key2 = (currentStepData == null ? void 0 : currentStepData.isSkip) ? currentStepData == null ? void 0 : currentStepData.key : prevStepData == null ? void 0 : prevStepData.key;
111
+ if (key2 === "select-resource") {
112
+ appointmentBooking.deleteCartItemInfo("resource");
113
+ }
114
+ updateStep(key2, {
96
115
  isSkip: false
97
116
  });
98
117
  }
@@ -101,8 +120,8 @@ var Header = () => {
101
120
  var _a2, _b;
102
121
  appointmentBooking.destroy();
103
122
  (_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
104
- const utils = context.appHelper.utils || {};
105
- (_b = utils == null ? void 0 : utils.history) == null ? void 0 : _b.replace("/");
123
+ const utils2 = context.appHelper.utils || {};
124
+ (_b = utils2 == null ? void 0 : utils2.history) == null ? void 0 : _b.replace("/");
106
125
  };
107
126
  return /* @__PURE__ */ import_react.default.createElement(
108
127
  import_progressBar.default,