@pisell/private-materials 3.2.23 → 3.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) 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.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +85 -35
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  14. package/es/components/appointmentBooking/components/Cart/Item/index.js +14 -10
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +15 -6
  16. package/es/components/appointmentBooking/components/Cart/index.js +3 -2
  17. package/es/components/appointmentBooking/components/Cart/index.less +1 -1
  18. package/es/components/appointmentBooking/components/Content/index.js +14 -2
  19. package/es/components/appointmentBooking/components/Content/index.less +15 -0
  20. package/es/components/appointmentBooking/components/Date/index.js +2 -2
  21. package/es/components/appointmentBooking/components/Date/index.less +6 -0
  22. package/es/components/appointmentBooking/components/Footer/index.js +7 -2
  23. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  24. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
  25. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  26. package/es/components/appointmentBooking/components/Guest/index.js +24 -4
  27. package/es/components/appointmentBooking/components/Guest/index.less +3 -3
  28. package/es/components/appointmentBooking/components/Header/index.js +9 -1
  29. package/es/components/appointmentBooking/components/Resource/index.js +6 -24
  30. package/es/components/appointmentBooking/components/Resource/index.less +0 -1
  31. package/es/components/appointmentBooking/components/Services/index.js +1 -14
  32. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  33. package/es/components/appointmentBooking/components/TimeSlicing/index.js +22 -17
  34. package/es/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
  35. package/es/components/appointmentBooking/components/Voucher/index.js +10 -10
  36. package/es/components/appointmentBooking/hooks.d.ts +6 -3
  37. package/es/components/appointmentBooking/hooks.js +52 -32
  38. package/es/components/appointmentBooking/index.js +8 -9
  39. package/es/components/appointmentBooking/locales.d.ts +6 -0
  40. package/es/components/appointmentBooking/locales.js +6 -0
  41. package/es/components/appointmentBooking/utils.d.ts +9 -0
  42. package/es/components/appointmentBooking/utils.js +18 -1
  43. package/es/components/booking/addons/index.js +7 -5
  44. package/es/components/booking/addons/model.d.ts +1 -10
  45. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  46. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  47. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  48. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  49. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  50. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  51. package/es/components/booking/components/footer/utils.js +8 -5
  52. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  53. package/es/components/booking/components/voucher/index.js +11 -10
  54. package/es/components/booking/forms/footer.d.ts +6 -0
  55. package/es/components/booking/forms/footer.js +88 -0
  56. package/es/components/booking/forms/index.d.ts +1 -1
  57. package/es/components/booking/forms/index.js +25 -20
  58. package/es/components/booking/forms/index.less +7 -0
  59. package/es/components/booking/forms/model.d.ts +1 -10
  60. package/es/components/booking/forms/sendModal/index.d.ts +27 -0
  61. package/es/components/booking/forms/sendModal/index.js +82 -0
  62. package/es/components/booking/forms/sendModal/index.less +9 -0
  63. package/es/components/booking/forms/sendModal/useSendModal.d.ts +9 -0
  64. package/es/components/booking/forms/sendModal/useSendModal.js +79 -0
  65. package/es/components/booking/forms/serve.d.ts +9 -0
  66. package/es/components/booking/forms/serve.js +20 -0
  67. package/es/components/booking/forms/table/index.d.ts +0 -1
  68. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  69. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  70. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  71. package/es/components/booking/info/date/index.d.ts +0 -1
  72. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  73. package/es/components/booking/info/model.d.ts +1 -10
  74. package/es/components/booking/info/notes/index.d.ts +0 -1
  75. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  76. package/es/components/booking/info/service/addService/index.js +3 -3
  77. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  78. package/es/components/booking/info/service/editService/index.js +71 -51
  79. package/es/components/booking/info/service/like/index.d.ts +0 -1
  80. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  81. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  82. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  83. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  84. package/es/components/booking/info2/service/addService/index.js +3 -2
  85. package/es/components/booking/info2/service/addService/utils.js +57 -5
  86. package/es/components/booking/info2/service/editService/Resources/index.js +20 -2
  87. package/es/components/booking/info2/service/editService/index.js +5 -3
  88. package/es/components/booking/info2/service/editService/utils.d.ts +4 -2
  89. package/es/components/booking/info2/service/editService/utils.js +18 -0
  90. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  91. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  92. package/es/components/booking/locales.d.ts +39 -0
  93. package/es/components/booking/locales.js +39 -0
  94. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  95. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  96. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  97. package/es/components/booking/model.d.ts +1 -9
  98. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  99. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  100. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  101. package/es/components/booking/notes/model.d.ts +1 -10
  102. package/es/components/booking/payments/model.d.ts +1 -10
  103. package/es/components/booking/utils.d.ts +2 -2
  104. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  105. package/es/components/eftpos/group/index.d.ts +0 -1
  106. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  107. package/es/components/eftpos/icon/device.d.ts +0 -1
  108. package/es/components/eftpos/receipt/index.d.ts +0 -1
  109. package/es/components/eftposPay/amount.d.ts +1 -2
  110. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  111. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  112. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  113. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  114. package/es/components/eftposPay/device.d.ts +1 -2
  115. package/es/components/eftposPay/hooks.d.ts +1 -1
  116. package/es/components/eftposPay/payo/config.d.ts +0 -1
  117. package/es/components/eftposPay/store/index.d.ts +4 -4
  118. package/es/components/eftposPay/tip.d.ts +0 -1
  119. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  120. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  121. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  122. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  123. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  124. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  125. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  126. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  127. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  128. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  129. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  130. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  131. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  132. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  133. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  134. package/es/components/login/index.d.ts +0 -1
  135. package/es/components/pay/toC/PaymentList/serve.js +2 -2
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  137. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  138. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  139. package/es/components/pay/toC/model.d.ts +1 -9
  140. package/es/components/pay/toC/serve.js +2 -2
  141. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  142. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  143. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  144. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +4 -1
  145. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  146. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  147. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  148. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  149. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  150. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  151. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  152. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  153. package/es/components/schedules/calendar/index.d.ts +0 -1
  154. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  155. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  156. package/es/components/schedules/model.d.ts +1 -9
  157. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  158. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  159. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  160. package/es/components/schedules/products/list/index.d.ts +0 -1
  161. package/es/components/schedules/resources/list/index.d.ts +0 -1
  162. package/es/components/schedules/utils.d.ts +1 -1
  163. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  164. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  165. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  166. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  167. package/es/components/shoppingCart/index.d.ts +0 -1
  168. package/es/components/wallet/Detail/model.d.ts +1 -13
  169. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  170. package/es/components/wallet/PointCard/model.d.ts +1 -13
  171. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  172. package/es/components/wallet/Voucher/model.d.ts +1 -13
  173. package/es/components/wallet/model.d.ts +1 -9
  174. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  175. package/es/utils/index.d.ts +1 -1
  176. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +44 -18
  177. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
  178. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  179. package/lib/components/appointmentBooking/components/Cart/Item/index.js +16 -6
  180. package/lib/components/appointmentBooking/components/Cart/Item/index.less +15 -6
  181. package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
  182. package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
  183. package/lib/components/appointmentBooking/components/Content/index.js +8 -2
  184. package/lib/components/appointmentBooking/components/Content/index.less +15 -0
  185. package/lib/components/appointmentBooking/components/Date/index.js +34 -28
  186. package/lib/components/appointmentBooking/components/Date/index.less +6 -0
  187. package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
  188. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  189. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
  190. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  191. package/lib/components/appointmentBooking/components/Guest/index.js +21 -4
  192. package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
  193. package/lib/components/appointmentBooking/components/Header/index.js +9 -1
  194. package/lib/components/appointmentBooking/components/Resource/index.js +4 -8
  195. package/lib/components/appointmentBooking/components/Resource/index.less +0 -1
  196. package/lib/components/appointmentBooking/components/Services/index.js +0 -12
  197. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  198. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +12 -4
  199. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
  200. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -8
  201. package/lib/components/appointmentBooking/hooks.d.ts +6 -3
  202. package/lib/components/appointmentBooking/hooks.js +26 -14
  203. package/lib/components/appointmentBooking/index.js +7 -7
  204. package/lib/components/appointmentBooking/locales.d.ts +6 -0
  205. package/lib/components/appointmentBooking/locales.js +6 -0
  206. package/lib/components/appointmentBooking/utils.d.ts +9 -0
  207. package/lib/components/appointmentBooking/utils.js +9 -1
  208. package/lib/components/booking/addons/index.js +7 -5
  209. package/lib/components/booking/addons/model.d.ts +1 -10
  210. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  211. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  212. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  213. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  214. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  215. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  216. package/lib/components/booking/components/footer/utils.js +4 -5
  217. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  218. package/lib/components/booking/components/voucher/index.js +3 -8
  219. package/lib/components/booking/forms/footer.d.ts +6 -0
  220. package/lib/components/booking/forms/footer.js +81 -0
  221. package/lib/components/booking/forms/index.d.ts +1 -1
  222. package/lib/components/booking/forms/index.js +4 -2
  223. package/lib/components/booking/forms/index.less +7 -0
  224. package/lib/components/booking/forms/model.d.ts +1 -10
  225. package/lib/components/booking/forms/sendModal/index.d.ts +27 -0
  226. package/lib/components/booking/forms/sendModal/index.js +128 -0
  227. package/lib/components/booking/forms/sendModal/index.less +9 -0
  228. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +9 -0
  229. package/lib/components/booking/forms/sendModal/useSendModal.js +70 -0
  230. package/lib/components/booking/forms/serve.d.ts +9 -0
  231. package/lib/components/booking/forms/serve.js +5 -2
  232. package/lib/components/booking/forms/table/index.d.ts +0 -1
  233. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  234. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  235. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  236. package/lib/components/booking/info/date/index.d.ts +0 -1
  237. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  238. package/lib/components/booking/info/model.d.ts +1 -10
  239. package/lib/components/booking/info/notes/index.d.ts +0 -1
  240. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  241. package/lib/components/booking/info/service/addService/index.js +2 -2
  242. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  243. package/lib/components/booking/info/service/editService/index.js +12 -2
  244. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  245. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  246. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  247. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  248. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  249. package/lib/components/booking/info2/service/addService/index.js +3 -2
  250. package/lib/components/booking/info2/service/addService/utils.js +36 -1
  251. package/lib/components/booking/info2/service/editService/Resources/index.js +16 -1
  252. package/lib/components/booking/info2/service/editService/index.js +4 -2
  253. package/lib/components/booking/info2/service/editService/utils.d.ts +4 -2
  254. package/lib/components/booking/info2/service/editService/utils.js +48 -0
  255. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  256. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  257. package/lib/components/booking/locales.d.ts +39 -0
  258. package/lib/components/booking/locales.js +39 -0
  259. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  260. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  261. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  262. package/lib/components/booking/model.d.ts +1 -9
  263. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  264. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  265. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  266. package/lib/components/booking/notes/model.d.ts +1 -10
  267. package/lib/components/booking/payments/model.d.ts +1 -10
  268. package/lib/components/booking/utils.d.ts +2 -2
  269. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  270. package/lib/components/eftpos/group/index.d.ts +0 -1
  271. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  272. package/lib/components/eftpos/icon/device.d.ts +0 -1
  273. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  274. package/lib/components/eftposPay/amount.d.ts +1 -2
  275. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  276. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  277. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  278. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  279. package/lib/components/eftposPay/device.d.ts +1 -2
  280. package/lib/components/eftposPay/hooks.d.ts +1 -1
  281. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  282. package/lib/components/eftposPay/store/index.d.ts +4 -4
  283. package/lib/components/eftposPay/tip.d.ts +0 -1
  284. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  285. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  286. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  287. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  288. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  289. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  290. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  291. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  292. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  293. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  294. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  295. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  296. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  297. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  298. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  299. package/lib/components/login/index.d.ts +0 -1
  300. package/lib/components/pay/toC/PaymentList/serve.js +1 -1
  301. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  302. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  303. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  304. package/lib/components/pay/toC/model.d.ts +1 -9
  305. package/lib/components/pay/toC/serve.js +1 -1
  306. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  307. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  308. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  309. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +4 -1
  310. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  311. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  312. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  313. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  314. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  315. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  316. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  317. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  318. package/lib/components/schedules/calendar/index.d.ts +0 -1
  319. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  320. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  321. package/lib/components/schedules/model.d.ts +1 -9
  322. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  323. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  324. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  325. package/lib/components/schedules/products/list/index.d.ts +0 -1
  326. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  327. package/lib/components/schedules/utils.d.ts +1 -1
  328. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  329. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  330. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  331. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  332. package/lib/components/shoppingCart/index.d.ts +0 -1
  333. package/lib/components/wallet/Detail/model.d.ts +1 -13
  334. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  335. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  336. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  337. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  338. package/lib/components/wallet/model.d.ts +1 -9
  339. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  340. package/lib/utils/index.d.ts +1 -1
  341. package/package.json +4 -4
  342. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  343. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
  344. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
  345. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  346. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
  347. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
@@ -8,6 +8,7 @@ import React, { useMemo, useState } from 'react';
8
8
  import { Dropdown } from 'antd';
9
9
  import { Button, Iconfont, PisellCard, PisellAvatar, PisellToast } from '@pisell/materials';
10
10
  import { locales, isMobile, getUniqueId } from '@pisell/utils';
11
+ import InformationOptionsModal from "./components/InformationOptionsModal";
11
12
  import { useAppointmentBookingContext } from "../../context";
12
13
  import { useAppointmentBookingAccount } from "../../hooks";
13
14
  import { formatGuest } from "../../utils";
@@ -17,6 +18,11 @@ var Guest = function Guest() {
17
18
  _useState2 = _slicedToArray(_useState, 2),
18
19
  openOption = _useState2[0],
19
20
  setOpenOption = _useState2[1];
21
+ // 编辑哪个holder
22
+ var _useState3 = useState(null),
23
+ _useState4 = _slicedToArray(_useState3, 2),
24
+ holderItem = _useState4[0],
25
+ setHolderItem = _useState4[1];
20
26
  var _useAppointmentBookin = useAppointmentBookingContext(),
21
27
  carts = _useAppointmentBookin.carts,
22
28
  appointmentBooking = _useAppointmentBookin.appointmentBooking;
@@ -56,6 +62,7 @@ var Guest = function Guest() {
56
62
  */
57
63
  var handleClick = function handleClick(_ref, item) {
58
64
  var key = _ref.key;
65
+ console.log(key, item, 'wh978967');
59
66
  // 编辑holder
60
67
  if (key === 'edit') {
61
68
  appointmentBooking.setActiveAccount(item.id);
@@ -87,6 +94,7 @@ var Guest = function Guest() {
87
94
  return /*#__PURE__*/React.createElement(Button, {
88
95
  size: "large",
89
96
  onClick: function onClick() {
97
+ setHolderItem(item);
90
98
  setOpenOption(true);
91
99
  }
92
100
  }, locales.getText('pisell2.event.option'));
@@ -95,11 +103,12 @@ var Guest = function Guest() {
95
103
  menu: {
96
104
  items: _options,
97
105
  onClick: function onClick(e) {
106
+ setHolderItem(item);
98
107
  handleClick(e, item);
99
108
  }
100
109
  },
101
110
  placement: "bottomRight",
102
- overlayClassName: "provider-information-custom-dropdown-menu"
111
+ overlayClassName: "appointment-guest-custom-dropdown-menu"
103
112
  }, /*#__PURE__*/React.createElement(Button, null, locales.getText('pisell2.event.option')));
104
113
  };
105
114
  var handleAddGuest = function handleAddGuest() {
@@ -119,7 +128,7 @@ var Guest = function Guest() {
119
128
  appointmentBooking.back();
120
129
  };
121
130
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
122
- className: "provider-information-wrap"
131
+ className: "appointment-guest-wrap"
123
132
  }, lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
124
133
  var _item$children;
125
134
  return /*#__PURE__*/React.createElement(PisellCard, {
@@ -145,12 +154,23 @@ var Guest = function Guest() {
145
154
  width: 'max-content'
146
155
  },
147
156
  onClick: handleAddGuest,
148
- className: "provider-information-add-button"
157
+ className: "appointment-guest-add-button"
149
158
  }, /*#__PURE__*/React.createElement(Iconfont, {
150
159
  type: "pisell2-plus",
151
160
  style: {
152
161
  fontSize: '20px'
153
162
  }
154
- }), locales.getText('pisell2.appointment.add.guest'))));
163
+ }), locales.getText('pisell2.appointment.add.guest'))), openOption ? /*#__PURE__*/React.createElement(InformationOptionsModal, {
164
+ options: options,
165
+ open: openOption,
166
+ holderItem: holderItem,
167
+ onCancel: function onCancel() {
168
+ return setOpenOption(false);
169
+ },
170
+ onClick: function onClick(e) {
171
+ handleClick(e, holderItem);
172
+ setOpenOption(false);
173
+ }
174
+ }) : null);
155
175
  };
156
176
  export default Guest;
@@ -1,4 +1,4 @@
1
- .provider-information-wrap {
1
+ .appointment-guest-wrap {
2
2
  padding: 16px;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -7,7 +7,7 @@
7
7
  margin-top: 16px;
8
8
  width: 100%;
9
9
 
10
- .provider-information-add-button {
10
+ .appointment-guest-add-button {
11
11
  display: flex;
12
12
  align-items: center;
13
13
  .pisell-lowcode-image-mask-info {
@@ -64,7 +64,7 @@
64
64
  }
65
65
  }
66
66
 
67
- .provider-information-custom-dropdown-menu {
67
+ .appointment-guest-custom-dropdown-menu {
68
68
  .pisell-lowcode-dropdown-menu {
69
69
  padding: 6px;
70
70
  border-bottom: 1px solid var(--Gray-200, #eaecf0);
@@ -2,6 +2,8 @@ import React, { useMemo } from 'react';
2
2
  import { locales } from '@pisell/utils';
3
3
  import ProgressBar from "../../../eventBooking/components/progressBar";
4
4
  import { useAppointmentBookingContext } from "../../context";
5
+ import { useShopDiscount } from "../../hooks";
6
+ import useEngineContext from "../../../../hooks/useEngineContext";
5
7
  import "./index.less";
6
8
  var Header = function Header() {
7
9
  var _currentStep$step3, _currentStep$step5;
@@ -9,6 +11,8 @@ var Header = function Header() {
9
11
  currentStep = _useAppointmentBookin.currentStep,
10
12
  appointmentBooking = _useAppointmentBookin.appointmentBooking,
11
13
  resources = _useAppointmentBookin.resources;
14
+ var shopDiscount = useShopDiscount();
15
+ var context = useEngineContext();
12
16
 
13
17
  /**
14
18
  * @title: 获取资源名称
@@ -66,7 +70,11 @@ var Header = function Header() {
66
70
  * @Date: 2025-01-22 13:43
67
71
  */
68
72
  var handleClose = function handleClose() {
69
- appointmentBooking.close();
73
+ var _utils$history;
74
+ appointmentBooking.destroy();
75
+ shopDiscount.destroy();
76
+ var utils = context.appHelper.utils || {};
77
+ utils === null || utils === void 0 || (_utils$history = utils.history) === null || _utils$history === void 0 || _utils$history.replace('/');
70
78
  };
71
79
  return /*#__PURE__*/React.createElement(ProgressBar, {
72
80
  title: currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.title,
@@ -18,7 +18,6 @@ var Resource = function Resource() {
18
18
  _useState2 = _slicedToArray(_useState, 2),
19
19
  selectedResource = _useState2[0],
20
20
  setSelectedResource = _useState2[1];
21
- // const appointmentBooking = useAppointmentBooking();
22
21
  var _useAppointmentBookin = useAppointmentBookingContext(),
23
22
  appointmentBooking = _useAppointmentBookin.appointmentBooking,
24
23
  resources = _useAppointmentBookin.resources,
@@ -27,12 +26,10 @@ var Resource = function Resource() {
27
26
  var _useAppointmentBookin2 = useAppointmentBookingResource(),
28
27
  getResourceList = _useAppointmentBookin2.getResourceList,
29
28
  autoSelectAllProductResources = _useAppointmentBookin2.autoSelectAllProductResources;
30
- console.log(resources, carts, appointmentBooking, 'lists, products');
31
29
  useEffect(function () {
32
- var _resources$;
33
30
  var _resources = getResourceList();
34
- var code = _resources === null || _resources === void 0 || (_resources$ = _resources[0]) === null || _resources$ === void 0 || (_resources$ = _resources$.resources) === null || _resources$ === void 0 || (_resources$ = _resources$[0]) === null || _resources$ === void 0 ? void 0 : _resources$.code;
35
- autoSelectAllProductResources(code);
31
+ autoSelectAllProductResources();
32
+ getResourceList();
36
33
  }, []);
37
34
  useEffect(function () {
38
35
  var _resourceOtherParams$;
@@ -46,14 +43,14 @@ var Resource = function Resource() {
46
43
  var anyResource = [{
47
44
  id: 0,
48
45
  image: guestsImg,
49
- title: 'Any professional',
50
- subtitle: 'for maximum availability'
46
+ title: locales.getText('pisell2.appointment.any.professional'),
47
+ subtitle: locales.getText('pisell2.appointment.for.maximum.availability')
51
48
  }];
52
49
  var currentResource = useMemo(function () {
53
50
  if (resources.length && carts.length) {
54
51
  if (carts.length === 1) {
55
- var _resources$2;
56
- return (_resources$2 = resources[0]) === null || _resources$2 === void 0 || (_resources$2 = _resources$2.resources) === null || _resources$2 === void 0 ? void 0 : _resources$2[0];
52
+ var _resources$;
53
+ return (_resources$ = resources[0]) === null || _resources$ === void 0 || (_resources$ = _resources$.resources) === null || _resources$ === void 0 ? void 0 : _resources$[0];
57
54
  } else {
58
55
  return {
59
56
  renderList: []
@@ -62,31 +59,16 @@ var Resource = function Resource() {
62
59
  }
63
60
  }, [resources, carts]);
64
61
  var resourcesResult = useMemo(function () {
65
- console.log(currentResource, resources, 'wh98765756');
66
62
  return anyResource.concat((currentResource === null || currentResource === void 0 ? void 0 : currentResource.renderList) || []);
67
63
  }, [currentResource]);
68
64
  var _onClick = function onClick(e) {
69
65
  setSelectedResource(e.id);
70
- console.log(currentResource, e, carts, 'whcurrentResourcecurrentResource');
71
66
  if (e.id) {
72
67
  var _carts$;
73
- // getResourceTimeSlot('resources');
74
68
  return appointmentBooking.updateCart({
75
69
  _id: carts === null || carts === void 0 || (_carts$ = carts[0]) === null || _carts$ === void 0 ? void 0 : _carts$._id,
76
70
  resources: [e]
77
71
  });
78
-
79
- // getResourceTimeSlot({
80
- // product: resources?.[0]?.product,
81
- // resources: currentResource?.renderList,
82
- // currentResourceId: e.id,
83
- // });
84
-
85
- // onChange({
86
- // times: times,
87
- // product: resources?.[0]?.product,
88
- // resources: resources[0]?.resources?.[1]?.renderList || [],
89
- // });
90
72
  }
91
73
  };
92
74
  return /*#__PURE__*/React.createElement("div", {
@@ -1,5 +1,4 @@
1
1
  .appointment-resource-wrap {
2
- padding-top: 16px;
3
2
  .pisell-lowcode-card {
4
3
  min-height: 166px !important;
5
4
  }
@@ -19,8 +19,7 @@ import TabProduct from "../../../booking/components/TabProduct";
19
19
  import { formatProductListByCategory } from "../../../booking/utils";
20
20
  import useEngineContext from "../../../../hooks/useEngineContext";
21
21
  import { useAppointmentBookingContext } from "../../context";
22
- import { useAppointmentBookingAccount, useAppointmentBooking } from "../../hooks";
23
- import { formatCurrentUser } from "../../utils";
22
+ import { useAppointmentBooking } from "../../hooks";
24
23
  import "./index.less";
25
24
  var Services = function Services() {
26
25
  var searchRef = useRef();
@@ -35,19 +34,7 @@ var Services = function Services() {
35
34
  var _useAppointmentBookin = useAppointmentBookingContext(),
36
35
  products = _useAppointmentBookin.products,
37
36
  setProducts = _useAppointmentBookin.setProducts;
38
- var _useAppointmentBookin2 = useAppointmentBookingAccount(),
39
- accountLists = _useAppointmentBookin2.accountLists;
40
- var accountRef = useRef(accountLists);
41
- var currentUser = formatCurrentUser();
42
37
  useEffect(function () {
43
- console.log(accountLists, accountRef, 'wh978896786');
44
- }, [accountLists, accountRef]);
45
- useEffect(function () {
46
- var _accountRef$current;
47
- console.log(accountRef.current, currentUser, 'accountRef');
48
- if (!((_accountRef$current = accountRef.current) !== null && _accountRef$current !== void 0 && _accountRef$current.length) && currentUser) {
49
- appointmentBooking.addAccount([currentUser]);
50
- }
51
38
  var _ref2 = appointmentBooking.otherParams || {},
52
39
  productModuleParams = _ref2.productModuleParams;
53
40
  appointmentBooking.loadProducts(productModuleParams).then(function (res) {
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const Resource: ({ params }: any) => JSX.Element;
2
+ declare const Resource: () => JSX.Element;
3
3
  export default Resource;
@@ -12,45 +12,50 @@ import React, { useEffect, useState } from 'react';
12
12
  import { Iconfont, PisellEmpty } from '@pisell/materials';
13
13
  import { locales } from '@pisell/utils';
14
14
  import { useAppointmentBookingContext } from "../../context";
15
+ import { useAppointmentBookingResource } from "../../hooks";
15
16
  import "./index.less";
16
- var Resource = function Resource(_ref) {
17
- var params = _ref.params;
17
+ var Resource = function Resource() {
18
18
  var _useState = useState(''),
19
19
  _useState2 = _slicedToArray(_useState, 2),
20
20
  selectedResource = _useState2[0],
21
21
  setSelectedResource = _useState2[1];
22
22
  var _useAppointmentBookin = useAppointmentBookingContext(),
23
23
  times = _useAppointmentBookin.times,
24
- resources = _useAppointmentBookin.resources,
25
24
  appointmentBooking = _useAppointmentBookin.appointmentBooking,
26
- carts = _useAppointmentBookin.carts,
27
- setSelectedTime = _useAppointmentBookin.setSelectedTime;
28
- console.log(params, resources, times, 'wh8765');
25
+ setSelectedTime = _useAppointmentBookin.setSelectedTime,
26
+ resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
27
+ var _useAppointmentBookin2 = useAppointmentBookingResource(),
28
+ getResourceTimeSlot = _useAppointmentBookin2.getResourceTimeSlot,
29
+ getResourceList = _useAppointmentBookin2.getResourceList;
30
+ useEffect(function () {
31
+ getResourceTimeSlot();
32
+ }, []);
29
33
  var getAutoSelect = /*#__PURE__*/function () {
30
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
31
- var _yield$appointmentBoo, errorList, result;
34
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
35
+ var _getResourceList, resourceCodes, _yield$appointmentBoo, errorList, result;
32
36
  return _regeneratorRuntime().wrap(function _callee$(_context) {
33
37
  while (1) switch (_context.prev = _context.next) {
34
38
  case 0:
35
39
  setSelectedTime(val);
36
- _context.next = 3;
37
- return appointmentBooking.autoSelectAllProductResources('sites', val);
38
- case 3:
40
+ _getResourceList = getResourceList(), resourceCodes = _getResourceList.resourceCodes;
41
+ _context.next = 4;
42
+ return appointmentBooking.autoSelectAllProductResources(resourceCodes === null || resourceCodes === void 0 ? void 0 : resourceCodes[1], val);
43
+ case 4:
39
44
  _yield$appointmentBoo = _context.sent;
40
45
  errorList = _yield$appointmentBoo.errorList;
41
- _context.next = 7;
46
+ _context.next = 8;
42
47
  return appointmentBooking.submitTimeSlot(val);
43
- case 7:
48
+ case 8:
44
49
  result = _context.sent;
45
50
  console.log(errorList, result, 'wh9896788');
46
- case 9:
51
+ case 10:
47
52
  case "end":
48
53
  return _context.stop();
49
54
  }
50
55
  }, _callee);
51
56
  }));
52
57
  return function getAutoSelect(_x) {
53
- return _ref2.apply(this, arguments);
58
+ return _ref.apply(this, arguments);
54
59
  };
55
60
  }();
56
61
  useEffect(function () {
@@ -61,7 +66,7 @@ var Resource = function Resource(_ref) {
61
66
  }
62
67
  }, [times]);
63
68
  var _onClick = /*#__PURE__*/function () {
64
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
69
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
65
70
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
66
71
  while (1) switch (_context2.prev = _context2.next) {
67
72
  case 0:
@@ -74,7 +79,7 @@ var Resource = function Resource(_ref) {
74
79
  }, _callee2);
75
80
  }));
76
81
  return function onClick(_x2) {
77
- return _ref3.apply(this, arguments);
82
+ return _ref2.apply(this, arguments);
78
83
  };
79
84
  }();
80
85
  return (times === null || times === void 0 ? void 0 : times.length) > 0 ? /*#__PURE__*/React.createElement("div", {
@@ -1,4 +1,5 @@
1
1
  .appointment-time-slicing-wrap {
2
+ padding-top: 20px;
2
3
  .item {
3
4
  cursor: pointer;
4
5
  padding: 25px 20px;
@@ -20,8 +20,7 @@ import classNames from 'classnames';
20
20
  import { Button } from 'antd';
21
21
  import { locales } from '@pisell/utils';
22
22
  import useEngineContext from "../../../../hooks/useEngineContext";
23
- import { PisellInput, PisellTooltip, PisellGoodPassCard, PisellText, PisellToast } from '@pisell/materials';
24
- import { QuestionCircleOutlined } from '@ant-design/icons';
23
+ import { PisellInput, PisellGoodPassCard, PisellText, PisellToast } from '@pisell/materials';
25
24
  import { useAppointmentBooking, useShopDiscount, useAppointmentBookingLogin, useAppointmentBookingAccount } from "../../hooks";
26
25
  import { formatCustomer } from "../../utils";
27
26
  import "../../../booking/components/voucher/index.less";
@@ -126,6 +125,7 @@ var VoucherCard = function VoucherCard(props) {
126
125
  val = _context.sent;
127
126
  if (val !== null && val !== void 0 && val.isAvailable) {
128
127
  cart === null || cart === void 0 || cart.batchSetItems(val.productList);
128
+ setCode('');
129
129
  } else {
130
130
  PisellToast({
131
131
  content: locales.getText('pisell2.text.goodpass.code-invalid')
@@ -217,14 +217,14 @@ var VoucherCard = function VoucherCard(props) {
217
217
  setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
218
218
  },
219
219
  size: "small",
220
- placeholder: locales.getText('pisell2.text.goodpass.enter-code'),
221
- suffix: /*#__PURE__*/React.createElement(PisellTooltip, {
222
- title: ""
223
- }, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
224
- style: {
225
- color: 'rgba(0,0,0,.45)'
226
- }
227
- }))
220
+ placeholder: locales.getText('pisell2.text.goodpass.enter-code')
221
+ // suffix={
222
+ // <PisellTooltip title="">
223
+ // <QuestionCircleOutlined
224
+ // style={{ color: 'rgba(0,0,0,.45)' }}
225
+ // />
226
+ // </PisellTooltip>
227
+ // }
228
228
  })), /*#__PURE__*/React.createElement(Button, {
229
229
  size: "small",
230
230
  onClick: onScanCode,
@@ -55,7 +55,10 @@ export declare const useAppointmentBookingAccount: () => {
55
55
  * @Date: 2025-04-15 11:29
56
56
  */
57
57
  export declare const useAppointmentBookingResource: () => {
58
- getResourceTimeSlot: (params: any) => Promise<void>;
59
- getResourceList: () => any;
60
- autoSelectAllProductResources: (code: string) => Promise<any>;
58
+ getResourceTimeSlot: (index?: number) => Promise<void>;
59
+ getResourceList: () => {
60
+ resources: any;
61
+ resourceCodes: any;
62
+ };
63
+ autoSelectAllProductResources: (index?: number) => Promise<any>;
61
64
  };
@@ -42,17 +42,20 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
42
42
  setCurrentStep = _useAppointmentBookin.setCurrentStep,
43
43
  setIsLastStep = _useAppointmentBookin.setIsLastStep;
44
44
  var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList) || [];
45
+ var getCurrentAndLastStep = function getCurrentAndLastStep() {
46
+ var _currentStep = appointmentBooking.getCurrentStep();
47
+ setCurrentStep(_currentStep);
48
+ setIsLastStep((_currentStep === null || _currentStep === void 0 ? void 0 : _currentStep.index) === stepList.length - 1);
49
+ };
45
50
  useEffect(function () {
51
+ getCurrentAndLastStep();
46
52
  pisellOS.effects.on('appointmentBooking_step:changed', /*#__PURE__*/function () {
47
53
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
48
- var _currentStep;
49
54
  return _regeneratorRuntime().wrap(function _callee$(_context) {
50
55
  while (1) switch (_context.prev = _context.next) {
51
56
  case 0:
52
57
  if (res.path === 'currentStep') {
53
- _currentStep = appointmentBooking.getCurrentStep();
54
- setCurrentStep(_currentStep);
55
- setIsLastStep((_currentStep === null || _currentStep === void 0 ? void 0 : _currentStep.index) === stepList.length - 1);
58
+ getCurrentAndLastStep();
56
59
  }
57
60
  case 1:
58
61
  case "end":
@@ -187,7 +190,6 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
187
190
  setAccountLists = _useState2[1];
188
191
  var getAccountLists = /*#__PURE__*/function () {
189
192
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
190
- var _appointmentBooking$s2;
191
193
  var data;
192
194
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
193
195
  while (1) switch (_context4.prev = _context4.next) {
@@ -196,8 +198,8 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
196
198
  return appointmentBooking.getAccounts();
197
199
  case 2:
198
200
  data = _context4.sent;
201
+ console.log('appointmentBooking_accountList:changed', data);
199
202
  setAccountLists(data || []);
200
- console.log('currentUser4455777', appointmentBooking, (_appointmentBooking$s2 = appointmentBooking.store) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.accountList) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.store) === null || _appointmentBooking$s2 === void 0 ? void 0 : _appointmentBooking$s2.accountList, data);
201
203
  case 5:
202
204
  case "end":
203
205
  return _context4.stop();
@@ -209,12 +211,14 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
209
211
  };
210
212
  }();
211
213
  useEffect(function () {
214
+ getAccountLists();
212
215
  pisellOS.effects.on('appointmentBooking_accountList:changed', /*#__PURE__*/function () {
213
216
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(res) {
214
217
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
215
218
  while (1) switch (_context5.prev = _context5.next) {
216
219
  case 0:
217
220
  if (res.path === 'accounts') {
221
+ console.log('appointmentBooking_accountList:changed', res);
218
222
  getAccountLists();
219
223
  }
220
224
  case 1:
@@ -227,7 +231,6 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
227
231
  return _ref6.apply(this, arguments);
228
232
  };
229
233
  }());
230
- getAccountLists();
231
234
  }, []);
232
235
  return {
233
236
  accountLists: accountLists
@@ -251,19 +254,41 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
251
254
  var _ref7 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
252
255
  resourceSort = _ref7.resourceSort;
253
256
 
257
+ // 设置资源列表
258
+ var getResourceList = function getResourceList() {
259
+ var _resources2;
260
+ var resources = appointmentBooking.getResourcesList();
261
+ resources = resources.map(function (item) {
262
+ return _objectSpread(_objectSpread({}, item), {}, {
263
+ resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
264
+ });
265
+ });
266
+ var _resources = ((_resources2 = resources) === null || _resources2 === void 0 || (_resources2 = _resources2[0]) === null || _resources2 === void 0 ? void 0 : _resources2.resources) || [];
267
+ var resourceCodes = _resources.map(function (item) {
268
+ return item.code;
269
+ });
270
+ setResources(resources || []);
271
+ return {
272
+ resources: resources,
273
+ resourceCodes: resourceCodes
274
+ };
275
+ };
276
+
254
277
  // 设置时间切片
255
278
  var getResourceTimeSlot = /*#__PURE__*/function () {
256
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
257
- var data;
279
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(index) {
280
+ var _getResourceList, resourceCodes, code, data;
258
281
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
259
282
  while (1) switch (_context6.prev = _context6.next) {
260
283
  case 0:
261
- _context6.next = 2;
262
- return appointmentBooking.getTimeSlotByAllResources(params);
263
- case 2:
284
+ _getResourceList = getResourceList(), resourceCodes = _getResourceList.resourceCodes;
285
+ code = resourceCodes === null || resourceCodes === void 0 ? void 0 : resourceCodes[index || 0];
286
+ _context6.next = 4;
287
+ return appointmentBooking.getTimeSlotByAllResources(code);
288
+ case 4:
264
289
  data = _context6.sent;
265
290
  setTimes(data || []);
266
- case 4:
291
+ case 6:
267
292
  case "end":
268
293
  return _context6.stop();
269
294
  }
@@ -274,33 +299,28 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
274
299
  };
275
300
  }();
276
301
 
277
- // 设置资源列表
278
- var getResourceList = function getResourceList() {
279
- var resources = appointmentBooking.getResourcesList();
280
- resources = resources.map(function (item) {
281
- return _objectSpread(_objectSpread({}, item), {}, {
282
- resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
283
- });
284
- });
285
- setResources(resources || []);
286
- console.log(resources, 'resourcesresources');
287
- return resources;
288
- };
289
-
290
302
  // 获取自动分配
291
303
  var autoSelectAllProductResources = /*#__PURE__*/function () {
292
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(code) {
293
- var res;
304
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(index) {
305
+ var _getResourceList2, resourceCodes, code, data, res;
294
306
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
295
307
  while (1) switch (_context7.prev = _context7.next) {
296
308
  case 0:
297
- _context7.next = 2;
309
+ _getResourceList2 = getResourceList(), resourceCodes = _getResourceList2.resourceCodes;
310
+ code = resourceCodes === null || resourceCodes === void 0 ? void 0 : resourceCodes[index || 0];
311
+ _context7.next = 4;
312
+ return appointmentBooking.getTimeSlotByAllResources(code);
313
+ case 4:
314
+ data = _context7.sent;
315
+ _context7.next = 7;
298
316
  return appointmentBooking.autoSelectAllProductResources(code);
299
- case 2:
317
+ case 7:
300
318
  res = _context7.sent;
301
- setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), res));
319
+ setResourceOtherParams(_objectSpread(_objectSpread(_objectSpread({}, resourceOtherParams), res), {}, {
320
+ resourceCodes: resourceCodes
321
+ }));
302
322
  return _context7.abrupt("return", res);
303
- case 5:
323
+ case 10:
304
324
  case "end":
305
325
  return _context7.stop();
306
326
  }
@@ -4,7 +4,8 @@ import useEngineContext from "../../hooks/useEngineContext";
4
4
  import { AppointmentBookingProvider } from "./context";
5
5
  import Content from "./components/Content";
6
6
  import localeTexts from "./locales";
7
- import { useAppointmentBooking, useAppointmentBookingAccount } from "./hooks";
7
+ import { useAppointmentBooking } from "./hooks";
8
+ import { formatCurrentUser } from "./utils";
8
9
  import "./index.less";
9
10
  var AppointmentBooking = function AppointmentBooking() {
10
11
  var _utils$storage;
@@ -12,16 +13,14 @@ var AppointmentBooking = function AppointmentBooking() {
12
13
  var utils = context.appHelper.utils || {};
13
14
  locales.init(localeTexts, (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en');
14
15
  var appointmentBooking = useAppointmentBooking();
15
- var _useAppointmentBookin = useAppointmentBookingAccount(),
16
- accountLists = _useAppointmentBookin.accountLists;
17
- console.log(appointmentBooking, 'wh97886786currentUser4455777');
16
+ var currentUser = formatCurrentUser();
18
17
  useEffect(function () {
19
- var res = appointmentBooking.getAccounts();
20
- console.log(res, 'wh98867');
18
+ appointmentBooking.getAccounts().then(function (data) {
19
+ if (!data.length) {
20
+ appointmentBooking.addAccount([currentUser]);
21
+ }
22
+ });
21
23
  }, []);
22
- useEffect(function () {
23
- console.log(accountLists, 'wh98867555');
24
- }, [accountLists]);
25
24
  return /*#__PURE__*/React.createElement("div", {
26
25
  className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
27
26
  }, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
@@ -85,6 +85,8 @@ declare const _default: {
85
85
  'pisell2.appointment.friday': string;
86
86
  'pisell2.appointment.saturday': string;
87
87
  'pisell2.appointment.sunday': string;
88
+ 'pisell2.appointment.any.professional': string;
89
+ 'pisell2.appointment.for.maximum.availability': string;
88
90
  'pisell2.text.apply': string;
89
91
  'pisell2.text.goodpass': string;
90
92
  'pisell2.text.goodpass.product-vouchers': string;
@@ -181,6 +183,8 @@ declare const _default: {
181
183
  'pisell2.appointment.friday': string;
182
184
  'pisell2.appointment.saturday': string;
183
185
  'pisell2.appointment.sunday': string;
186
+ 'pisell2.appointment.any.professional': string;
187
+ 'pisell2.appointment.for.maximum.availability': string;
184
188
  'pisell2.text.apply': string;
185
189
  'pisell2.text.goodpass': string;
186
190
  'pisell2.text.goodpass.product-vouchers': string;
@@ -277,6 +281,8 @@ declare const _default: {
277
281
  'pisell2.appointment.friday': string;
278
282
  'pisell2.appointment.saturday': string;
279
283
  'pisell2.appointment.sunday': string;
284
+ 'pisell2.appointment.any.professional': string;
285
+ 'pisell2.appointment.for.maximum.availability': string;
280
286
  'pisell2.text.apply': string;
281
287
  'pisell2.text.goodpass': string;
282
288
  'pisell2.text.goodpass.product-vouchers': string;
@@ -99,6 +99,8 @@ export default {
99
99
  'pisell2.appointment.friday': 'Fri',
100
100
  'pisell2.appointment.saturday': 'Sat',
101
101
  'pisell2.appointment.sunday': 'Sun',
102
+ 'pisell2.appointment.any.professional': 'Any professional',
103
+ 'pisell2.appointment.for.maximum.availability': 'for maximum availability',
102
104
  'pisell2.text.apply': 'Apply',
103
105
  'pisell2.text.goodpass': "GoodPass",
104
106
  'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
@@ -209,6 +211,8 @@ export default {
209
211
  'pisell2.appointment.friday': '周五',
210
212
  'pisell2.appointment.saturday': '周六',
211
213
  'pisell2.appointment.sunday': '周日',
214
+ 'pisell2.appointment.any.professional': '随机分配',
215
+ 'pisell2.appointment.for.maximum.availability': '立即匹配',
212
216
  'pisell2.text.apply': '应用',
213
217
  'pisell2.text.goodpass': "商品券",
214
218
  'pisell2.text.goodpass.product-vouchers': "商品兑换券",
@@ -319,6 +323,8 @@ export default {
319
323
  'pisell2.appointment.friday': '周五',
320
324
  'pisell2.appointment.saturday': '周六',
321
325
  'pisell2.appointment.sunday': '周日',
326
+ 'pisell2.appointment.any.professional': '隨機分配',
327
+ 'pisell2.appointment.for.maximum.availability': '立即匹配',
322
328
  'pisell2.text.apply': '應用',
323
329
  'pisell2.text.goodpass': "商品券",
324
330
  'pisell2.text.goodpass.product-vouchers': "商品兌換券",