@pisell/private-materials 3.2.23 → 3.2.25

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 (259) 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 +4 -4
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +4 -4
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +83 -33
  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 +13 -5
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +8 -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 +6 -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/components/TabProduct/index.d.ts +0 -1
  44. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  45. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  46. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  47. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  48. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  49. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  50. package/es/components/booking/components/voucher/index.js +11 -10
  51. package/es/components/booking/forms/table/index.d.ts +0 -1
  52. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  53. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  54. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  55. package/es/components/booking/info/date/index.d.ts +0 -1
  56. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  57. package/es/components/booking/info/notes/index.d.ts +0 -1
  58. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  59. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  60. package/es/components/booking/info/service/like/index.d.ts +0 -1
  61. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  62. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  63. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  64. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  65. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  66. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  67. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  68. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  69. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  70. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  71. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  72. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  73. package/es/components/booking/utils.d.ts +2 -2
  74. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  75. package/es/components/eftpos/group/index.d.ts +0 -1
  76. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  77. package/es/components/eftpos/icon/device.d.ts +0 -1
  78. package/es/components/eftpos/receipt/index.d.ts +0 -1
  79. package/es/components/eftposPay/amount.d.ts +1 -2
  80. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  81. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  82. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  83. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  84. package/es/components/eftposPay/device.d.ts +1 -2
  85. package/es/components/eftposPay/hooks.d.ts +1 -1
  86. package/es/components/eftposPay/payo/config.d.ts +0 -1
  87. package/es/components/eftposPay/store/index.d.ts +4 -4
  88. package/es/components/eftposPay/tip.d.ts +0 -1
  89. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  90. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  91. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  92. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  93. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  94. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  95. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  96. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  97. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  98. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  99. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  100. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  101. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  102. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  103. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  104. package/es/components/login/index.d.ts +0 -1
  105. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  106. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  107. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  108. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  109. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  110. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  111. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  112. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  113. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  114. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  115. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  116. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  117. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  118. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  119. package/es/components/schedules/calendar/index.d.ts +0 -1
  120. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  121. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  122. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  123. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  124. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  125. package/es/components/schedules/products/list/index.d.ts +0 -1
  126. package/es/components/schedules/resources/list/index.d.ts +0 -1
  127. package/es/components/schedules/utils.d.ts +1 -1
  128. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  129. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  130. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  131. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  132. package/es/components/shoppingCart/index.d.ts +0 -1
  133. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  134. package/es/utils/index.d.ts +1 -1
  135. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +44 -18
  136. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
  137. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  138. package/lib/components/appointmentBooking/components/Cart/Item/index.js +15 -4
  139. package/lib/components/appointmentBooking/components/Cart/Item/index.less +8 -6
  140. package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
  141. package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
  142. package/lib/components/appointmentBooking/components/Content/index.js +8 -2
  143. package/lib/components/appointmentBooking/components/Content/index.less +15 -0
  144. package/lib/components/appointmentBooking/components/Date/index.js +34 -28
  145. package/lib/components/appointmentBooking/components/Date/index.less +6 -0
  146. package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
  147. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  148. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
  149. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  150. package/lib/components/appointmentBooking/components/Guest/index.js +21 -4
  151. package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
  152. package/lib/components/appointmentBooking/components/Header/index.js +6 -1
  153. package/lib/components/appointmentBooking/components/Resource/index.js +4 -8
  154. package/lib/components/appointmentBooking/components/Resource/index.less +0 -1
  155. package/lib/components/appointmentBooking/components/Services/index.js +0 -12
  156. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  157. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +12 -4
  158. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
  159. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -8
  160. package/lib/components/appointmentBooking/hooks.d.ts +6 -3
  161. package/lib/components/appointmentBooking/hooks.js +26 -14
  162. package/lib/components/appointmentBooking/index.js +7 -7
  163. package/lib/components/appointmentBooking/locales.d.ts +6 -0
  164. package/lib/components/appointmentBooking/locales.js +6 -0
  165. package/lib/components/appointmentBooking/utils.d.ts +9 -0
  166. package/lib/components/appointmentBooking/utils.js +9 -1
  167. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  168. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  169. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  170. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  171. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  172. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  173. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  174. package/lib/components/booking/components/voucher/index.js +3 -8
  175. package/lib/components/booking/forms/table/index.d.ts +0 -1
  176. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  177. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  178. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  179. package/lib/components/booking/info/date/index.d.ts +0 -1
  180. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  181. package/lib/components/booking/info/notes/index.d.ts +0 -1
  182. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  183. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  184. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  185. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  186. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  187. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  188. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  189. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  190. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  191. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  192. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  193. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  194. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  195. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  196. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  197. package/lib/components/booking/utils.d.ts +2 -2
  198. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  199. package/lib/components/eftpos/group/index.d.ts +0 -1
  200. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  201. package/lib/components/eftpos/icon/device.d.ts +0 -1
  202. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  203. package/lib/components/eftposPay/amount.d.ts +1 -2
  204. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  205. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  206. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  207. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  208. package/lib/components/eftposPay/device.d.ts +1 -2
  209. package/lib/components/eftposPay/hooks.d.ts +1 -1
  210. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  211. package/lib/components/eftposPay/store/index.d.ts +4 -4
  212. package/lib/components/eftposPay/tip.d.ts +0 -1
  213. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  214. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  215. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  216. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  217. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  218. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  219. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  220. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  221. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  222. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  223. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  224. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  225. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  226. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  227. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  228. package/lib/components/login/index.d.ts +0 -1
  229. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  230. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  231. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  232. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  233. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  234. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  235. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  236. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  237. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  238. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  239. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  240. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  241. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  242. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  243. package/lib/components/schedules/calendar/index.d.ts +0 -1
  244. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  245. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  246. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  247. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  248. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  249. package/lib/components/schedules/products/list/index.d.ts +0 -1
  250. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  251. package/lib/components/schedules/utils.d.ts +1 -1
  252. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  253. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  254. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  255. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  256. package/lib/components/shoppingCart/index.d.ts +0 -1
  257. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  258. package/lib/utils/index.d.ts +1 -1
  259. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
3
2
  import './index.less';
4
3
  interface ModalProps extends AntModalProps {
@@ -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 };
@@ -47,21 +47,20 @@ var ContinueButton = () => {
47
47
  const [loading, setLoading] = (0, import_react.useState)(false);
48
48
  const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
49
49
  const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
50
+ const shopDiscount = (0, import_hooks.useShopDiscount)();
50
51
  const {
51
52
  currentStep,
52
53
  isLastStep,
53
54
  carts,
54
55
  appointmentBooking,
55
- resourceOtherParams
56
+ resourceOtherParams,
57
+ summary
56
58
  } = (0, import_context.useAppointmentBookingContext)();
57
- const { getResourceTimeSlot } = (0, import_hooks.useAppointmentBookingResource)();
59
+ const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
58
60
  const disabled = (0, import_react.useMemo)(() => {
59
- var _a2, _b;
61
+ var _a2;
60
62
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
61
63
  if (!carts.length) return true;
62
- if (key === "select-resource" && ((_b = resourceOtherParams == null ? void 0 : resourceOtherParams.errorList) == null ? void 0 : _b.length) > 0) {
63
- return true;
64
- }
65
64
  return false;
66
65
  }, [
67
66
  (_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key,
@@ -69,39 +68,60 @@ var ContinueButton = () => {
69
68
  accountLists,
70
69
  resourceOtherParams == null ? void 0 : resourceOtherParams.errorList
71
70
  ]);
71
+ const clearData = () => {
72
+ appointmentBooking.destroy();
73
+ shopDiscount.destroy();
74
+ };
72
75
  const handleNextStep = async () => {
73
- var _a2, _b;
76
+ var _a2, _b, _c, _d, _e;
74
77
  if (isLastStep) {
75
78
  setLoading(true);
76
79
  try {
77
80
  const res = await appointmentBooking.submitOrder();
78
- utils.action({
79
- type: "pisell1.payment",
80
- data: res == null ? void 0 : res.data,
81
- callback: (e) => {
82
- console.log(e, currentStep, "wh9896788");
81
+ if ((summary == null ? void 0 : summary.total) > 0) {
82
+ utils.action({
83
+ type: "pisell1.payment",
84
+ data: res == null ? void 0 : res.data
85
+ });
86
+ } else {
87
+ const { order_id, total_amount } = (res == null ? void 0 : res.data) || {};
88
+ const freeResult = await appointmentBooking.getFreeProduct(order_id);
89
+ console.log(freeResult, "freeResult");
90
+ if ((_a2 = freeResult == null ? void 0 : freeResult.data) == null ? void 0 : _a2.status) {
91
+ const url = `/payment-finish/success?order_id=${order_id}&amount=${Number(
92
+ total_amount
93
+ )}`;
94
+ (_b = utils == null ? void 0 : utils.history) == null ? void 0 : _b.replace(url);
95
+ } else {
96
+ (0, import_materials.PisellToast)({
97
+ content: (_c = freeResult == null ? void 0 : freeResult.data) == null ? void 0 : _c.message
98
+ });
83
99
  }
84
- });
100
+ }
101
+ clearData();
85
102
  setLoading(false);
86
103
  } catch (error) {
87
104
  setLoading(false);
88
105
  }
89
106
  return;
90
107
  }
91
- if (((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key) === "select-resource") {
92
- getResourceTimeSlot("resources");
108
+ if (((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-resource") {
109
+ getResourceTimeSlot();
93
110
  }
94
- if (((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-time") {
111
+ if (((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) === "select-time") {
95
112
  }
96
113
  return appointmentBooking.next();
97
114
  };
98
115
  const handleContinue = async () => {
116
+ var _a2;
117
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
118
+ console.log(currentStep, isLastStep, isLogin, "wh9896788222");
99
119
  if (isLastStep) {
100
120
  if (!isLogin) {
101
121
  return openLoginModal({
102
122
  callback: (status) => {
103
- var _a2, _b, _c;
104
- const user = (_c = (_b = (_a2 = utils.store) == null ? void 0 : _a2.getState()) == null ? void 0 : _b.global) == null ? void 0 : _c.userInfo;
123
+ var _a3, _b, _c;
124
+ const user = (_c = (_b = (_a3 = utils.store) == null ? void 0 : _a3.getState()) == null ? void 0 : _b.global) == null ? void 0 : _c.userInfo;
105
125
  const currentUser = (0, import_utils2.formatCustomer)(user);
106
126
  const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
107
127
  if (status === "success") {
@@ -112,6 +132,12 @@ var ContinueButton = () => {
112
132
  });
113
133
  }
114
134
  }
135
+ if (key === "select-resource" && (0, import_utils2.isEmptyCartsResourceId)(carts)) {
136
+ (0, import_materials.PisellToast)({
137
+ content: import_utils.locales.getText("pisell2.appointment.no.available.time")
138
+ });
139
+ return;
140
+ }
115
141
  handleNextStep();
116
142
  };
117
143
  const continueText = (0, import_react.useMemo)(() => {
@@ -42,7 +42,7 @@ var Total = ({ className, isFooter }) => {
42
42
  const { summary, symbolic } = (0, import_context.useAppointmentBookingContext)();
43
43
  const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = summary;
44
44
  console.log(summary, "summarysummary");
45
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `event-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
45
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `appointment-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
46
46
  "div",
47
47
  {
48
48
  className: (0, import_classnames.default)("event-total", {
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const CartItem: () => JSX.Element;
2
+ declare const CartItem: ({ onConfirm }: any) => JSX.Element;
3
3
  export default CartItem;
@@ -43,12 +43,19 @@ var import_utils2 = require("../../../utils");
43
43
  var import_Voucher = __toESM(require("../../Voucher"));
44
44
  var import_Total = __toESM(require("./Total"));
45
45
  var import_index = require("./index.less");
46
- var CartItem = () => {
46
+ var CartItem = ({ onConfirm }) => {
47
47
  var _a, _b;
48
48
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
49
- const { carts, isLastStep, currentStep, resources } = (0, import_context.useAppointmentBookingContext)();
49
+ const {
50
+ carts,
51
+ isLastStep,
52
+ currentStep,
53
+ resources,
54
+ setResourceOtherParams,
55
+ resourceOtherParams
56
+ } = (0, import_context.useAppointmentBookingContext)();
50
57
  const { accountLists } = (0, import_hooks2.useAppointmentBookingAccount)();
51
- console.log(accountLists, "wh97879678");
58
+ const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
52
59
  const currentUser = (0, import_utils2.formatCurrentUser)();
53
60
  const holderIds = (0, import_react.useMemo)(() => {
54
61
  return accountLists.map((item) => item.id);
@@ -70,6 +77,10 @@ var CartItem = () => {
70
77
  return appointmentBooking.removeAccount(val);
71
78
  }
72
79
  if (type === "change_resource") {
80
+ setResourceOtherParams({
81
+ ...resourceOtherParams,
82
+ errorList: null
83
+ });
73
84
  return appointmentBooking.updateCart({
74
85
  _id: e == null ? void 0 : e._id,
75
86
  resources: [val]
@@ -79,7 +90,7 @@ var CartItem = () => {
79
90
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
80
91
  "div",
81
92
  {
82
- className: `cart-item-wrap ${(0, import_utils.isMobile)() ? "cart-mobile-item-wrap" : ""}`
93
+ className: `appointment-cart-item-wrap ${(0, import_utils.isMobile)() ? "appointment-cart-mobile-item-wrap" : ""}`
83
94
  },
84
95
  /* @__PURE__ */ import_react.default.createElement("div", { className: "content" }, /* @__PURE__ */ import_react.default.createElement(
85
96
  import_shoppingCart.default,
@@ -1,9 +1,9 @@
1
- .cart-item-wrap {
2
- height: 100%;
1
+ .appointment-cart-item-wrap {
2
+ height: calc(100vh - 100px);
3
3
  .content {
4
4
  background: #fff;
5
5
  padding: 0 16px;
6
- max-height: 60vh;
6
+ max-height: calc(100% - 240px);
7
7
  overflow-y: auto;
8
8
 
9
9
  .pisell-lowcode__shopping-cart-content {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  }
25
25
 
26
- .event-total-wrap {
26
+ .appointment-total-wrap {
27
27
  color: var(--Text-Text_1, #1b1b1b);
28
28
  font-size: 20px;
29
29
  font-weight: 600;
@@ -67,15 +67,17 @@
67
67
  }
68
68
  }
69
69
 
70
- .cart-mobile-item-wrap {
70
+ .appointment-cart-mobile-item-wrap {
71
71
  display: flex;
72
72
  flex-direction: column;
73
73
  position: relative;
74
+ height: 100%;
74
75
 
75
76
  .content {
76
77
  flex: 1;
77
78
  overflow-y: auto;
78
- padding: 0 0 140px;
79
+ padding: 0 0 210px;
80
+ max-height: 100%;
79
81
  }
80
82
  .appointment-footer {
81
83
  z-index: 10;
@@ -50,8 +50,9 @@ var Cart = ({ open, onCancel }) => {
50
50
  padding: "20px"
51
51
  },
52
52
  destroyOnClose: true,
53
- className: `event-cart-modal`,
54
- footer: null
53
+ className: `appointment-cart-modal`,
54
+ footer: null,
55
+ forceRender: true
55
56
  },
56
57
  /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflowY: "auto" } }, /* @__PURE__ */ import_react.default.createElement(import_Item.default, null))
57
58
  );
@@ -1,2 +1,2 @@
1
- .event-cart-modal {
1
+ .appointment-cart-modal {
2
2
  }
@@ -47,11 +47,15 @@ var import_hooks = require("../../hooks");
47
47
  var import_index = require("./index.less");
48
48
  var Layout = () => {
49
49
  var _a, _b, _c;
50
- const { currentStep } = (0, import_context.useAppointmentBookingContext)();
50
+ const { currentStep, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
51
51
  (0, import_hooks.useAppointmentBookingCart)();
52
52
  (0, import_hooks.useAppointmentBookingStep)();
53
53
  const [params, setParams] = (0, import_react.useState)({});
54
54
  (0, import_react.useEffect)(() => {
55
+ setResourceOtherParams({
56
+ ...resourceOtherParams,
57
+ errorList: null
58
+ });
55
59
  window.scrollTo({
56
60
  top: 0,
57
61
  behavior: "smooth"
@@ -81,7 +85,9 @@ var Layout = () => {
81
85
  if ((0, import_utils.isMobile)()) {
82
86
  const header = document.querySelector(".event-progress-bar");
83
87
  const footer = document.querySelector(".pisell-section-footers-wrapper");
84
- const content = document.querySelector(".event-content-mobile-wrap");
88
+ const content = document.querySelector(
89
+ ".parallel-content-mobile-wrap"
90
+ );
85
91
  const headerHeight = ((_a2 = header == null ? void 0 : header.getBoundingClientRect()) == null ? void 0 : _a2.height) || 0;
86
92
  const footerHeight = ((_b2 = footer == null ? void 0 : footer.getBoundingClientRect()) == null ? void 0 : _b2.height) || 0;
87
93
  const windowHeight = window.innerHeight;
@@ -10,6 +10,10 @@
10
10
  width: 634px;
11
11
  // padding: 16px 0;
12
12
 
13
+ .appointment-resource-wrap {
14
+ padding: 16px 0;
15
+ }
16
+
13
17
  .booking-tab-product {
14
18
  .booking-tabs-wrap {
15
19
  top: 77px !important;
@@ -38,7 +42,18 @@
38
42
  flex: none;
39
43
  // padding: 16px 16px 0;
40
44
 
45
+ .calendar-date-box {
46
+ padding: 0 16px;
47
+ }
48
+
49
+ .appointment-resource-wrap {
50
+ padding: 16px;
51
+ }
52
+
41
53
  .booking-tab-product {
54
+ .booking-tabs-wrap {
55
+ top: 0 !important;
56
+ }
42
57
  .booking-category-list {
43
58
  padding: 0 20px;
44
59
  }
@@ -143,42 +143,48 @@ var CalendarDate = (props) => {
143
143
  setCurrentMonth(newNextMonth);
144
144
  setLoading(true);
145
145
  };
146
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-date-box" }, !dateMonthList.length ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, style: { paddingTop: "16px" } }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ import_react.default.createElement(
146
+ return /* @__PURE__ */ import_react.default.createElement(
147
147
  "div",
148
148
  {
149
- className: (0, import_classnames.default)("calendar-last-month", {
150
- ["last-month-disabled"]: lastMonthDisable()
151
- }),
152
- onClick: () => {
153
- if (lastMonthDisable()) return;
154
- lastMonth();
155
- }
149
+ className: `calendar-date-box ${(0, import_utils.isMobile)() ? "calendar-date-mobile-box" : ""}`
156
150
  },
157
- /* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
158
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
159
- const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
160
- const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
161
- currentMonth,
162
- "month"
163
- );
164
- return /* @__PURE__ */ import_react.default.createElement(
151
+ !dateMonthList.length ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, style: { paddingTop: "16px" } }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ import_react.default.createElement(
165
152
  "div",
166
153
  {
167
- key: index,
168
- className: (0, import_classnames.default)("calendar-days-items", {
169
- ["disabledDate"]: day == null ? void 0 : day.disabled,
170
- ["selectDate"]: currentDate === date,
171
- ["other-month-days"]: !isCurrentMonth,
172
- ["loading-item"]: loading
154
+ className: (0, import_classnames.default)("calendar-last-month", {
155
+ ["last-month-disabled"]: lastMonthDisable()
173
156
  }),
174
157
  onClick: () => {
175
- if (day == null ? void 0 : day.disabled) return;
176
- setCurrentDate(date);
177
- appointmentBooking.setDateRange([day]);
158
+ if (lastMonthDisable()) return;
159
+ lastMonth();
178
160
  }
179
161
  },
180
- isCurrentMonth && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("day-text") }, (0, import_dayjs.default)(day.date).format("D"))
181
- );
182
- })))));
162
+ /* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
163
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
164
+ const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
165
+ const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
166
+ currentMonth,
167
+ "month"
168
+ );
169
+ return /* @__PURE__ */ import_react.default.createElement(
170
+ "div",
171
+ {
172
+ key: index,
173
+ className: (0, import_classnames.default)("calendar-days-items", {
174
+ ["disabledDate"]: day == null ? void 0 : day.disabled,
175
+ ["selectDate"]: currentDate === date,
176
+ ["other-month-days"]: !isCurrentMonth,
177
+ ["loading-item"]: loading
178
+ }),
179
+ onClick: () => {
180
+ if (day == null ? void 0 : day.disabled) return;
181
+ setCurrentDate(date);
182
+ appointmentBooking.setDateRange([day]);
183
+ }
184
+ },
185
+ isCurrentMonth && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("day-text") }, (0, import_dayjs.default)(day.date).format("D"))
186
+ );
187
+ }))))
188
+ );
183
189
  };
184
190
  var Date_default = CalendarDate;
@@ -134,3 +134,9 @@
134
134
  cursor: not-allowed;
135
135
  }
136
136
  }
137
+
138
+ .calendar-date-mobile-box {
139
+ .calendar-days-items {
140
+ height: 54px;
141
+ }
142
+ }
@@ -42,8 +42,12 @@ var import_Cart = __toESM(require("../Cart"));
42
42
  var import_Total = __toESM(require("../Cart/Item/Total"));
43
43
  var import_index = require("./index.less");
44
44
  var Footer = () => {
45
- const { carts } = (0, import_context.useAppointmentBookingContext)();
45
+ var _a;
46
+ const { carts, currentStep } = (0, import_context.useAppointmentBookingContext)();
46
47
  const [open, setOpen] = (0, import_react2.useState)(false);
48
+ (0, import_react.useEffect)(() => {
49
+ setOpen(false);
50
+ }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
47
51
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
48
52
  import_materials.SectionFooters,
49
53
  {
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const GuestOptionsModal: (props: any) => JSX.Element;
3
+ export default GuestOptionsModal;
@@ -0,0 +1,74 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.tsx
30
+ var InformationOptionsModal_exports = {};
31
+ __export(InformationOptionsModal_exports, {
32
+ default: () => InformationOptionsModal_default
33
+ });
34
+ module.exports = __toCommonJS(InformationOptionsModal_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_materials = require("@pisell/materials");
37
+ var import_index = require("./index.less");
38
+ var GuestOptionsModal = (props) => {
39
+ const { open, onCancel, options, onClick, holderItem } = props;
40
+ const lists = (0, import_react.useMemo)(() => {
41
+ let _options = [...options];
42
+ if (!(holderItem == null ? void 0 : holderItem.isGuest)) {
43
+ _options = _options.filter((option) => option.key !== "remove");
44
+ }
45
+ return _options;
46
+ }, [options]);
47
+ return /* @__PURE__ */ import_react.default.createElement(
48
+ import_materials.PisellModal,
49
+ {
50
+ open,
51
+ platform: "h5",
52
+ closable: true,
53
+ bodyStyle: { padding: "0 24px" },
54
+ destroyOnClose: true,
55
+ footer: null,
56
+ onCancel,
57
+ mobileModalHeight: "auto",
58
+ className: "guest-option-modal",
59
+ headerDivider: false
60
+ },
61
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "guest-options-wrap" }, lists.map((item) => {
62
+ return /* @__PURE__ */ import_react.default.createElement(
63
+ "div",
64
+ {
65
+ key: item.key,
66
+ className: `guest-options-wrap-item ${item.key === "remove" ? "remove" : ""}`,
67
+ onClick: () => onClick(item)
68
+ },
69
+ item.label
70
+ );
71
+ }))
72
+ );
73
+ };
74
+ var InformationOptionsModal_default = GuestOptionsModal;
@@ -0,0 +1,28 @@
1
+ .guest-options-wrap {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 16px;
5
+ .guest-options-wrap-item {
6
+ color: var(--Gray-900, #101828);
7
+ font-size: 16px;
8
+ font-weight: 600;
9
+ line-height: 24px;
10
+ display: flex;
11
+ padding: 9px 10px;
12
+ align-items: center;
13
+ flex: 1 0 0;
14
+ }
15
+
16
+ .remove {
17
+ color: var(--Error-700, #b42318);
18
+ }
19
+ }
20
+
21
+ .guest-option-modal {
22
+ .pisell-lowcode-modal-header {
23
+ border: none;
24
+ }
25
+ .pisell-lowcode-modal-body {
26
+ height: max-content;
27
+ }
28
+ }
@@ -36,12 +36,14 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
+ var import_InformationOptionsModal = __toESM(require("./components/InformationOptionsModal"));
39
40
  var import_context = require("../../context");
40
41
  var import_hooks = require("../../hooks");
41
42
  var import_utils2 = require("../../utils");
42
43
  var import_index = require("./index.less");
43
44
  var Guest = () => {
44
45
  const [openOption, setOpenOption] = (0, import_react.useState)(false);
46
+ const [holderItem, setHolderItem] = (0, import_react.useState)(null);
45
47
  const { carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
46
48
  const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
47
49
  const lists = (0, import_react.useMemo)(() => {
@@ -59,6 +61,7 @@ var Guest = () => {
59
61
  }
60
62
  ];
61
63
  const handleClick = ({ key }, item) => {
64
+ console.log(key, item, "wh978967");
62
65
  if (key === "edit") {
63
66
  appointmentBooking.setActiveAccount(item.id);
64
67
  appointmentBooking.back();
@@ -78,6 +81,7 @@ var Guest = () => {
78
81
  {
79
82
  size: "large",
80
83
  onClick: () => {
84
+ setHolderItem(item);
81
85
  setOpenOption(true);
82
86
  }
83
87
  },
@@ -90,11 +94,12 @@ var Guest = () => {
90
94
  menu: {
91
95
  items: _options,
92
96
  onClick: (e) => {
97
+ setHolderItem(item);
93
98
  handleClick(e, item);
94
99
  }
95
100
  },
96
101
  placement: "bottomRight",
97
- overlayClassName: "provider-information-custom-dropdown-menu"
102
+ overlayClassName: "appointment-guest-custom-dropdown-menu"
98
103
  },
99
104
  /* @__PURE__ */ import_react.default.createElement(import_materials.Button, null, import_utils.locales.getText("pisell2.event.option"))
100
105
  );
@@ -114,7 +119,7 @@ var Guest = () => {
114
119
  appointmentBooking.setActiveAccount(guest.id);
115
120
  appointmentBooking.back();
116
121
  };
117
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "provider-information-wrap" }, lists == null ? void 0 : lists.map((item) => {
122
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-guest-wrap" }, lists == null ? void 0 : lists.map((item) => {
118
123
  var _a;
119
124
  return /* @__PURE__ */ import_react.default.createElement(
120
125
  import_materials.PisellCard,
@@ -134,10 +139,22 @@ var Guest = () => {
134
139
  size: "large",
135
140
  style: { width: "max-content" },
136
141
  onClick: handleAddGuest,
137
- className: "provider-information-add-button"
142
+ className: "appointment-guest-add-button"
138
143
  },
139
144
  /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-plus", style: { fontSize: "20px" } }),
140
145
  import_utils.locales.getText("pisell2.appointment.add.guest")
141
- )));
146
+ )), openOption ? /* @__PURE__ */ import_react.default.createElement(
147
+ import_InformationOptionsModal.default,
148
+ {
149
+ options,
150
+ open: openOption,
151
+ holderItem,
152
+ onCancel: () => setOpenOption(false),
153
+ onClick: (e) => {
154
+ handleClick(e, holderItem);
155
+ setOpenOption(false);
156
+ }
157
+ }
158
+ ) : null);
142
159
  };
143
160
  var Guest_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);
@@ -36,10 +36,12 @@ var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_progressBar = __toESM(require("../../../eventBooking/components/progressBar"));
38
38
  var import_context = require("../../context");
39
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
39
40
  var import_index = require("./index.less");
40
41
  var Header = () => {
41
42
  var _a, _b;
42
43
  const { currentStep, appointmentBooking, resources } = (0, import_context.useAppointmentBookingContext)();
44
+ const context = (0, import_useEngineContext.default)();
43
45
  const stepName = (0, import_react.useMemo)(() => {
44
46
  var _a2, _b2, _c, _d, _e;
45
47
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
@@ -65,7 +67,10 @@ var Header = () => {
65
67
  appointmentBooking.back();
66
68
  };
67
69
  const handleClose = () => {
68
- appointmentBooking.close();
70
+ var _a2;
71
+ const utils = context.appHelper.utils || {};
72
+ (_a2 = utils == null ? void 0 : utils.history) == null ? void 0 : _a2.replace("/");
73
+ appointmentBooking.destroy();
69
74
  };
70
75
  return /* @__PURE__ */ import_react.default.createElement(
71
76
  import_progressBar.default,