@pisell/private-materials 3.2.22 → 3.2.23

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 (237) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/assets/guests.svg +1 -0
  12. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +83 -104
  13. package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
  14. package/es/components/appointmentBooking/components/Cart/Item/index.js +32 -18
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +7 -4
  16. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  17. package/es/components/appointmentBooking/components/Content/index.js +11 -11
  18. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Date/index.js +49 -32
  20. package/es/components/appointmentBooking/components/Date/index.less +5 -0
  21. package/es/components/appointmentBooking/components/Guest/index.js +8 -21
  22. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  23. package/es/components/appointmentBooking/components/Header/index.js +44 -7
  24. package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  25. package/es/components/appointmentBooking/components/Resource/index.js +28 -20
  26. package/es/components/appointmentBooking/components/Resource/index.less +5 -0
  27. package/es/components/appointmentBooking/components/Services/index.js +20 -9
  28. package/es/components/appointmentBooking/components/TimeSlicing/index.js +47 -32
  29. package/es/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
  30. package/es/components/appointmentBooking/components/Voucher/index.js +28 -18
  31. package/es/components/appointmentBooking/context.d.ts +2 -0
  32. package/es/components/appointmentBooking/context.js +7 -1
  33. package/es/components/appointmentBooking/hooks.d.ts +45 -9
  34. package/es/components/appointmentBooking/hooks.js +158 -121
  35. package/es/components/appointmentBooking/index.d.ts +0 -1
  36. package/es/components/appointmentBooking/index.js +12 -7
  37. package/es/components/appointmentBooking/locales.d.ts +30 -0
  38. package/es/components/appointmentBooking/locales.js +30 -0
  39. package/es/components/appointmentBooking/utils.d.ts +19 -0
  40. package/es/components/appointmentBooking/utils.js +68 -1
  41. package/es/components/booking/components/footer/utils.js +15 -15
  42. package/es/components/booking/components/voucher/index.d.ts +1 -1
  43. package/es/components/booking/components/voucher/index.js +28 -27
  44. package/es/components/booking/deposit/index.d.ts +0 -1
  45. package/es/components/booking/forms/single/index.d.ts +0 -1
  46. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  47. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  48. package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
  49. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  50. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  51. package/es/components/booking/info/header/index.d.ts +0 -1
  52. package/es/components/booking/info/index.d.ts +0 -1
  53. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  54. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  55. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  56. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  57. package/es/components/booking/info/service2/utils.d.ts +1 -1
  58. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  59. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  60. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  61. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  62. package/es/components/booking/utils.d.ts +2 -2
  63. package/es/components/eftpos/form/index.d.ts +0 -1
  64. package/es/components/eftpos/hooks.d.ts +0 -1
  65. package/es/components/eftpos/index.d.ts +0 -1
  66. package/es/components/eftpos/pos.d.ts +0 -1
  67. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  68. package/es/components/eftposPay/amount.d.ts +1 -1
  69. package/es/components/eftposPay/app.d.ts +0 -1
  70. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  71. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  72. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  73. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  74. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  75. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  76. package/es/components/eftposPay/device.d.ts +1 -1
  77. package/es/components/eftposPay/hooks.d.ts +1 -1
  78. package/es/components/eftposPay/index.d.ts +0 -1
  79. package/es/components/eftposPay/pay.d.ts +0 -1
  80. package/es/components/eftposPay/store/index.d.ts +3 -3
  81. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  82. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  83. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  84. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  85. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  86. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  87. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  88. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  89. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  90. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  91. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  92. package/es/components/eventBooking/index.d.ts +0 -1
  93. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  94. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  95. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  96. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  97. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  98. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  99. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  100. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  101. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  102. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  103. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  104. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  105. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  108. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  109. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  110. package/es/components/schedules/products/index.d.ts +0 -1
  111. package/es/components/schedules/resources/index.d.ts +0 -1
  112. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  113. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  114. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  115. package/es/components/schedules/schedules/index.d.ts +0 -1
  116. package/es/components/shoppingCart/components/Cart/Product.js +3 -0
  117. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  118. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  119. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  120. package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
  121. package/es/components/shoppingCart/type.d.ts +1 -0
  122. package/es/components/taxSelect/index.d.ts +0 -1
  123. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  124. package/lib/components/appointmentBooking/assets/guests.svg +1 -0
  125. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +37 -27
  126. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
  127. package/lib/components/appointmentBooking/components/Cart/Item/index.js +23 -11
  128. package/lib/components/appointmentBooking/components/Cart/Item/index.less +7 -4
  129. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  130. package/lib/components/appointmentBooking/components/Content/index.js +3 -5
  131. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
  132. package/lib/components/appointmentBooking/components/Date/index.js +53 -47
  133. package/lib/components/appointmentBooking/components/Date/index.less +5 -0
  134. package/lib/components/appointmentBooking/components/Guest/index.js +6 -5
  135. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  136. package/lib/components/appointmentBooking/components/Header/index.js +25 -3
  137. package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  138. package/lib/components/appointmentBooking/components/Resource/index.js +16 -17
  139. package/lib/components/appointmentBooking/components/Resource/index.less +5 -0
  140. package/lib/components/appointmentBooking/components/Services/index.js +21 -2
  141. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +23 -21
  142. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
  143. package/lib/components/appointmentBooking/components/Voucher/index.js +28 -16
  144. package/lib/components/appointmentBooking/context.d.ts +2 -0
  145. package/lib/components/appointmentBooking/context.js +4 -1
  146. package/lib/components/appointmentBooking/hooks.d.ts +45 -9
  147. package/lib/components/appointmentBooking/hooks.js +28 -41
  148. package/lib/components/appointmentBooking/index.d.ts +0 -1
  149. package/lib/components/appointmentBooking/index.js +11 -7
  150. package/lib/components/appointmentBooking/locales.d.ts +30 -0
  151. package/lib/components/appointmentBooking/locales.js +30 -0
  152. package/lib/components/appointmentBooking/utils.d.ts +19 -0
  153. package/lib/components/appointmentBooking/utils.js +39 -1
  154. package/lib/components/booking/components/footer/utils.js +1 -15
  155. package/lib/components/booking/components/voucher/index.d.ts +1 -1
  156. package/lib/components/booking/components/voucher/index.js +28 -17
  157. package/lib/components/booking/deposit/index.d.ts +0 -1
  158. package/lib/components/booking/forms/single/index.d.ts +0 -1
  159. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  160. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  161. package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
  162. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  163. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  164. package/lib/components/booking/info/header/index.d.ts +0 -1
  165. package/lib/components/booking/info/index.d.ts +0 -1
  166. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  167. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  168. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  169. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  170. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  171. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  172. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  173. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  174. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  175. package/lib/components/booking/utils.d.ts +2 -2
  176. package/lib/components/eftpos/form/index.d.ts +0 -1
  177. package/lib/components/eftpos/hooks.d.ts +0 -1
  178. package/lib/components/eftpos/index.d.ts +0 -1
  179. package/lib/components/eftpos/pos.d.ts +0 -1
  180. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  181. package/lib/components/eftposPay/amount.d.ts +1 -1
  182. package/lib/components/eftposPay/app.d.ts +0 -1
  183. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  184. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  185. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  186. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  187. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  188. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  189. package/lib/components/eftposPay/device.d.ts +1 -1
  190. package/lib/components/eftposPay/hooks.d.ts +1 -1
  191. package/lib/components/eftposPay/index.d.ts +0 -1
  192. package/lib/components/eftposPay/pay.d.ts +0 -1
  193. package/lib/components/eftposPay/store/index.d.ts +3 -3
  194. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  195. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  196. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  197. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  198. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  199. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  200. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  201. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  202. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  203. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  204. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  205. package/lib/components/eventBooking/index.d.ts +0 -1
  206. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  207. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  208. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  209. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  210. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  211. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  212. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  213. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  214. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  215. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  216. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  217. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  218. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  219. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  220. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  221. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  222. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  223. package/lib/components/schedules/products/index.d.ts +0 -1
  224. package/lib/components/schedules/resources/index.d.ts +0 -1
  225. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  226. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  227. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  228. package/lib/components/schedules/schedules/index.d.ts +0 -1
  229. package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
  230. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  231. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  232. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  233. package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
  234. package/lib/components/shoppingCart/type.d.ts +1 -0
  235. package/lib/components/taxSelect/index.d.ts +0 -1
  236. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  237. package/package.json +4 -4
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const PhoneField: ({ value, onChange }: any) => JSX.Element;
2
3
  export default PhoneField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface CustomerListProps {
3
4
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface valueType {
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SelectResourcesTable: ({ value, onChange }: any) => JSX.Element;
3
4
  export default SelectResourcesTable;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { ScheduleItem } from '../../../type';
4
3
  declare type Item = any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from 'antd';
3
2
  import { ScheduleItem } from '../../type';
4
3
  import './index.less';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const MaxParticipantsModule: ({ form, value, onChange, useSchedule, isAutoChange, onData, }: {
4
3
  form: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const AddSchedules: ({ value, onChange, drawerContainer, isSelf }: any) => JSX.Element;
4
3
  export default AddSchedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare type Value = number[];
4
3
  declare const SchedulesModule: ({ value, onChange, drawerContainer, ruleFn, tabKey, previewItemChange, isSelf, isTitle, }: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductDetail: ({ form, currentProduct, }: {
4
3
  form: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductDetailDrawer: () => JSX.Element;
4
3
  export default ProductDetailDrawer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Products: () => JSX.Element;
4
3
  export default Products;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Resources: () => JSX.Element;
4
3
  export default Resources;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const RelationProduct: ({ value, onChange, }: {
4
3
  value?: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ScheduleItem } from '../../type';
3
2
  import './index.less';
4
3
  declare type AllSchedulesPropsType = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DrawerProps } from "antd";
3
2
  import { ScheduleItem } from "../../type";
4
3
  import "./index.less";
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SchedulesConnect: () => JSX.Element;
3
2
  export default SchedulesConnect;
@@ -68,6 +68,9 @@ var Product = function Product(props) {
68
68
  },
69
69
  onCard: function onCard(e) {
70
70
  return handleChange === null || handleChange === void 0 ? void 0 : handleChange(e, 'view');
71
+ },
72
+ onChangeResource: function onChangeResource(e) {
73
+ return handleChange(item, 'change_resource', e);
71
74
  }
72
75
  }, productParams));
73
76
  }), !hideAddBtn && platform !== 'h5' && isAdd ? useAddService(id, 'more') : null);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: () => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Content: () => JSX.Element;
3
4
  export default Content;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useAddService: (id?: number, type?: string) => JSX.Element | null;
2
3
  export default useAddService;
@@ -16,8 +16,9 @@ var useClearCart = function useClearCart(key) {
16
16
  onChange = _useContext.onChange;
17
17
  var isProductList = state.isProductList,
18
18
  disabledEdit = state.disabledEdit,
19
- holders = state.holders;
20
-
19
+ holders = state.holders,
20
+ isHideClearCart = state.isHideClearCart;
21
+ console.log(state, 'wh978968');
21
22
  /**
22
23
  * @title: 清空购物车
23
24
  * @description:
@@ -47,7 +48,7 @@ var useClearCart = function useClearCart(key) {
47
48
  // updateState(updateProduct(state, products));
48
49
  // onChange(products);
49
50
  };
50
- return !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 ? /*#__PURE__*/React.createElement("span", {
51
+ return !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 && !isHideClearCart ? /*#__PURE__*/React.createElement("span", {
51
52
  className: classNames('pisell-lowcode__shopping-cart-clear-btn', {
52
53
  'pisell-lowcode__shopping-cart-clear-btn-empty': isProductList
53
54
  }),
@@ -27,6 +27,7 @@ export interface shoppingCartProps {
27
27
  isShowDelete?: boolean;
28
28
  collapseParams?: CollapseProps;
29
29
  productParams?: productProps;
30
+ isHideClearCart?: boolean;
30
31
  }
31
32
  /**
32
33
  * @title: 商品卡片
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  import "./index.less";
4
3
  interface TaxSelectProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
2
3
  import './index.less';
3
4
  interface ModalProps extends AntModalProps {
@@ -0,0 +1 @@
1
+ <svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M30.6 18.8a1 1 0 0 1-1.4-.2A6.45 6.45 0 0 0 24 16a1 1 0 0 1 0-2 3 3 0 1 0-2.905-3.75 1 1 0 0 1-1.937-.5 5 5 0 1 1 8.217 4.939 8.5 8.5 0 0 1 3.429 2.71A1 1 0 0 1 30.6 18.8m-6.735 7.7a1 1 0 1 1-1.73 1 7.125 7.125 0 0 0-12.27 0 1 1 0 1 1-1.73-1 9 9 0 0 1 4.217-3.74 6 6 0 1 1 7.296 0 9 9 0 0 1 4.217 3.74M16 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8m-7-7a1 1 0 0 0-1-1 3 3 0 1 1 2.905-3.75 1 1 0 0 0 1.938-.5 5 5 0 1 0-8.218 4.939 8.5 8.5 0 0 0-3.425 2.71A1 1 0 1 0 2.8 18.6 6.45 6.45 0 0 1 8 16a1 1 0 0 0 1-1"></path></svg>
@@ -35,55 +35,64 @@ module.exports = __toCommonJS(ContinueButton_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_materials = require("@pisell/materials");
38
- var import_utils2 = require("../../../../Sales/Checkout/utils");
39
38
  var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
40
39
  var import_hooks = require("../../../hooks");
41
40
  var import_context = require("../../../context");
41
+ var import_utils2 = require("../../../utils");
42
42
  var import_index = require("./index.less");
43
43
  var ContinueButton = () => {
44
+ var _a;
44
45
  const context = (0, import_useEngineContext.default)();
45
46
  const utils = context.appHelper.utils || {};
46
47
  const [loading, setLoading] = (0, import_react.useState)(false);
47
48
  const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
48
- const { currentStep, isLastStep, carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
49
- const data = {};
50
- const createBooking = {
51
- loading: false
52
- };
53
- const checkBeforeBooking = {
54
- loading: false
55
- };
56
- const handleCheckout = async () => {
57
- var _a;
58
- const value = (0, import_utils2.formatValues)(data);
59
- const result = { success: true };
60
- if (result == null ? void 0 : result.success) {
61
- } else {
62
- (0, import_materials.PisellToast)({
63
- content: ((_a = result == null ? void 0 : result.err) == null ? void 0 : _a.message) || ""
64
- });
49
+ const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
50
+ const {
51
+ currentStep,
52
+ isLastStep,
53
+ carts,
54
+ appointmentBooking,
55
+ resourceOtherParams
56
+ } = (0, import_context.useAppointmentBookingContext)();
57
+ const { getResourceTimeSlot } = (0, import_hooks.useAppointmentBookingResource)();
58
+ const disabled = (0, import_react.useMemo)(() => {
59
+ var _a2, _b;
60
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
61
+ 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;
65
64
  }
66
- };
65
+ return false;
66
+ }, [
67
+ (_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key,
68
+ carts,
69
+ accountLists,
70
+ resourceOtherParams == null ? void 0 : resourceOtherParams.errorList
71
+ ]);
67
72
  const handleNextStep = async () => {
73
+ var _a2, _b;
68
74
  if (isLastStep) {
69
75
  setLoading(true);
70
76
  try {
71
77
  const res = await appointmentBooking.submitOrder();
72
- console.log(isLastStep, isLogin, res, "wh9896788");
73
78
  utils.action({
74
79
  type: "pisell1.payment",
75
80
  data: res == null ? void 0 : res.data,
76
81
  callback: (e) => {
77
- console.log(e, "wh9896788");
82
+ console.log(e, currentStep, "wh9896788");
78
83
  }
79
84
  });
80
85
  setLoading(false);
81
86
  } catch (error) {
82
- console.log(isLastStep, isLogin, error, "wh9896788");
83
87
  setLoading(false);
84
88
  }
85
89
  return;
86
90
  }
91
+ if (((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key) === "select-resource") {
92
+ getResourceTimeSlot("resources");
93
+ }
94
+ if (((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-time") {
95
+ }
87
96
  return appointmentBooking.next();
88
97
  };
89
98
  const handleContinue = async () => {
@@ -91,7 +100,12 @@ var ContinueButton = () => {
91
100
  if (!isLogin) {
92
101
  return openLoginModal({
93
102
  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;
105
+ const currentUser = (0, import_utils2.formatCustomer)(user);
106
+ const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
94
107
  if (status === "success") {
108
+ appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
95
109
  handleNextStep();
96
110
  }
97
111
  }
@@ -107,14 +121,10 @@ var ContinueButton = () => {
107
121
  return import_utils.locales.getText("pisell2.event.close.continue");
108
122
  }
109
123
  }, [isLastStep]);
110
- const confirmLoading = (0, import_react.useMemo)(() => {
111
- if (!isLastStep) return false;
112
- return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading);
113
- }, [isLastStep, createBooking == null ? void 0 : createBooking.loading, checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading]);
114
124
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
115
125
  import_materials.Button,
116
126
  {
117
- disabled: !(carts == null ? void 0 : carts.length),
127
+ disabled,
118
128
  size: "large",
119
129
  type: "primary",
120
130
  onClick: () => handleContinue(),
@@ -41,6 +41,7 @@ var import_context = require("../../../context");
41
41
  var Total = ({ className, isFooter }) => {
42
42
  const { summary, symbolic } = (0, import_context.useAppointmentBookingContext)();
43
43
  const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = summary;
44
+ console.log(summary, "summarysummary");
44
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
46
  "div",
46
47
  {
@@ -38,32 +38,42 @@ var import_shoppingCart = __toESM(require("../../../../shoppingCart"));
38
38
  var import_ContinueButton = __toESM(require("../ContinueButton"));
39
39
  var import_hooks = require("../../../hooks");
40
40
  var import_context = require("../../../context");
41
- var import_Total = __toESM(require("./Total"));
41
+ var import_hooks2 = require("../../../hooks");
42
42
  var import_utils2 = require("../../../utils");
43
43
  var import_Voucher = __toESM(require("../../Voucher"));
44
+ var import_Total = __toESM(require("./Total"));
44
45
  var import_index = require("./index.less");
45
46
  var CartItem = () => {
46
47
  var _a, _b;
47
48
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
48
- const appointmentBookingAccount = (0, import_hooks.useAppointmentBookingAccount)();
49
- const { carts, summary, isLastStep, currentStep, resources } = (0, import_context.useAppointmentBookingContext)();
50
- const { accountLists, currentUser } = appointmentBookingAccount;
51
- console.log(summary, carts, (0, import_utils2.formatCarts)(carts, resources), "accountLists");
49
+ const { carts, isLastStep, currentStep, resources } = (0, import_context.useAppointmentBookingContext)();
50
+ const { accountLists } = (0, import_hooks2.useAppointmentBookingAccount)();
51
+ console.log(accountLists, "wh97879678");
52
+ const currentUser = (0, import_utils2.formatCurrentUser)();
52
53
  const holderIds = (0, import_react.useMemo)(() => {
53
54
  return accountLists.map((item) => item.id);
54
55
  }, [accountLists]);
55
56
  const holders = (0, import_react.useMemo)(() => {
56
57
  return (0, import_utils2.formatHolder)(accountLists);
57
58
  }, [accountLists]);
58
- const handleClickCard = (e, type, key) => {
59
- console.log(e, type, key, "wh9988767");
59
+ const handleClickCard = (e, type, val) => {
60
60
  if (type === "note") {
61
- return appointmentBooking.updateCart(e == null ? void 0 : e._id, { products: e });
61
+ return appointmentBooking.updateCart({
62
+ _id: e == null ? void 0 : e._id,
63
+ ...val
64
+ });
62
65
  }
63
66
  if (type === "delete") {
67
+ return appointmentBooking.deleteCart(e == null ? void 0 : e._id);
64
68
  }
65
69
  if (type === "delete_holders") {
66
- return appointmentBooking.removeAccount(key);
70
+ return appointmentBooking.removeAccount(val);
71
+ }
72
+ if (type === "change_resource") {
73
+ return appointmentBooking.updateCart({
74
+ _id: e == null ? void 0 : e._id,
75
+ resources: [val]
76
+ });
67
77
  }
68
78
  };
69
79
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -80,7 +90,8 @@ var CartItem = () => {
80
90
  holders,
81
91
  disabledEdit: isLastStep,
82
92
  isShowChangeResource: ((_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key) === "select-resource",
83
- isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.index) < 2
93
+ isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-service",
94
+ isShowPackageNote: false
84
95
  },
85
96
  collapseParams: {
86
97
  activeKey: holderIds,
@@ -89,10 +100,11 @@ var CartItem = () => {
89
100
  platform: "h5",
90
101
  emptyText: import_utils.locales.getText("pisell2.event.empty.service"),
91
102
  isOpenGroup: !!(holderIds == null ? void 0 : holderIds.length),
103
+ isHideClearCart: true,
92
104
  onChange: (e, type, key) => handleClickCard(e, type, key)
93
105
  }
94
106
  )),
95
- /* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
107
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
96
108
  ));
97
109
  };
98
110
  var Item_default = CartItem;
@@ -2,7 +2,10 @@
2
2
  height: 100%;
3
3
  .content {
4
4
  background: #fff;
5
- padding: 20px;
5
+ padding: 0 16px;
6
+ max-height: 60vh;
7
+ overflow-y: auto;
8
+
6
9
  .pisell-lowcode__shopping-cart-content {
7
10
  .ant-card-body {
8
11
  padding: 0;
@@ -10,9 +13,9 @@
10
13
  }
11
14
  }
12
15
 
13
- .event-footer {
16
+ .appointment-footer {
14
17
  background: #fff;
15
- padding: 20px;
18
+ padding: 10px 16px 0;
16
19
  display: flex;
17
20
  flex-direction: column;
18
21
  gap: 14px;
@@ -74,7 +77,7 @@
74
77
  overflow-y: auto;
75
78
  padding: 0 0 140px;
76
79
  }
77
- .event-footer {
80
+ .appointment-footer {
78
81
  z-index: 10;
79
82
  position: fixed;
80
83
  bottom: 0;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Layout: () => JSX.Element;
4
3
  export default Layout;
@@ -42,18 +42,16 @@ var import_Date = __toESM(require("../Date"));
42
42
  var import_Resource = __toESM(require("../Resource"));
43
43
  var import_TimeSlicing = __toESM(require("../TimeSlicing"));
44
44
  var import_Guest = __toESM(require("../Guest"));
45
- var import_hooks = require("../../hooks");
46
45
  var import_context = require("../../context");
46
+ 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 appointmentBookingStep = (0, import_hooks.useAppointmentBookingStep)();
51
- const appointmentBookingCart = (0, import_hooks.useAppointmentBookingCart)();
52
50
  const { currentStep } = (0, import_context.useAppointmentBookingContext)();
51
+ (0, import_hooks.useAppointmentBookingCart)();
52
+ (0, import_hooks.useAppointmentBookingStep)();
53
53
  const [params, setParams] = (0, import_react.useState)({});
54
54
  (0, import_react.useEffect)(() => {
55
- var _a2;
56
- console.log((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key, "whcurrentStep?.step?.key");
57
55
  window.scrollTo({
58
56
  top: 0,
59
57
  behavior: "smooth"
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const CalendarDate: (props: any) => JSX.Element;
4
3
  export default CalendarDate;
@@ -36,19 +36,29 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_dayjs = __toESM(require("dayjs"));
38
38
  var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
39
- var import_state = require("./state");
40
39
  var import_classnames = __toESM(require("classnames"));
40
+ var import_utils = require("@pisell/utils");
41
41
  var import_icons = require("@ant-design/icons");
42
42
  var import_context = require("../../context");
43
43
  var import_index = require("./index.less");
44
44
  import_dayjs.default.extend(import_isSameOrBefore.default);
45
45
  var CalendarDate = (props) => {
46
+ const [loading, setLoading] = (0, import_react.useState)(false);
46
47
  const [currentDate, setCurrentDate] = (0, import_react.useState)();
47
48
  const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
48
49
  const [currentMonth, setCurrentMonth] = (0, import_react.useState)(() => {
49
50
  return (0, import_dayjs.default)();
50
51
  });
51
52
  const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
53
+ const weekListText = [
54
+ import_utils.locales.getText("pisell2.appointment.sunday"),
55
+ import_utils.locales.getText("pisell2.appointment.monday"),
56
+ import_utils.locales.getText("pisell2.appointment.tuesday"),
57
+ import_utils.locales.getText("pisell2.appointment.wednesday"),
58
+ import_utils.locales.getText("pisell2.appointment.thursday"),
59
+ import_utils.locales.getText("pisell2.appointment.friday"),
60
+ import_utils.locales.getText("pisell2.appointment.saturday")
61
+ ];
52
62
  const startingColumn = 0 % 7;
53
63
  const columns = Array.from(
54
64
  { length: 7 },
@@ -80,40 +90,44 @@ var CalendarDate = (props) => {
80
90
  return lastDate.isBefore((0, import_dayjs.default)(), "month");
81
91
  };
82
92
  const getDates = async (date) => {
83
- const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
84
- const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
85
- const params = {
86
- startDate,
87
- endDate
88
- };
89
- const data = await appointmentBooking.getAvailableDate(params);
90
- console.log(
91
- data,
92
- params,
93
- date,
94
- date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM"),
95
- "wh78968"
96
- );
97
- if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
98
- const firstAvailableDate = data.find(
99
- (d) => d.status === "available"
100
- );
101
- setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
102
- appointmentBooking.setDateRange([firstAvailableDate]);
103
- }
104
- const baseMonthData = getMonthData(date.format("YYYY-MM"));
105
- const updatedDates = baseMonthData.map((day) => {
106
- const matchedDay = data.find((d) => d.date === day.date);
107
- if (matchedDay) {
108
- return {
109
- ...day,
110
- ...matchedDay,
111
- disabled: matchedDay.status === "unavailable"
112
- };
93
+ try {
94
+ const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
95
+ const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
96
+ const params = {
97
+ startDate,
98
+ endDate
99
+ };
100
+ const data = await appointmentBooking.getAvailableDate(params);
101
+ const selected = await appointmentBooking.getDateRange();
102
+ if ((selected == null ? void 0 : selected.length) > 0) {
103
+ setCurrentDate(selected[0].date);
104
+ } else {
105
+ if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
106
+ const firstAvailableDate = data.find(
107
+ (d) => d.status === "available"
108
+ );
109
+ setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
110
+ appointmentBooking.setDateRange([firstAvailableDate]);
111
+ }
113
112
  }
114
- return day;
115
- });
116
- setDateMonthList(updatedDates);
113
+ const baseMonthData = getMonthData(date.format("YYYY-MM"));
114
+ const updatedDates = baseMonthData.map((day) => {
115
+ const matchedDay = data.find((d) => d.date === day.date);
116
+ if (matchedDay) {
117
+ return {
118
+ ...day,
119
+ ...matchedDay,
120
+ disabled: matchedDay.status === "unavailable"
121
+ };
122
+ }
123
+ return day;
124
+ });
125
+ setLoading(false);
126
+ setDateMonthList(updatedDates);
127
+ } catch (error) {
128
+ setLoading(false);
129
+ console.log(error, "wh978968234234");
130
+ }
117
131
  };
118
132
  (0, import_react.useEffect)(() => {
119
133
  getDates(currentMonth);
@@ -127,6 +141,7 @@ var CalendarDate = (props) => {
127
141
  let currentMonthText = currentMonth.format("YYYY-MM");
128
142
  let newNextMonth = (0, import_dayjs.default)(currentMonthText).add(1, "month");
129
143
  setCurrentMonth(newNextMonth);
144
+ setLoading(true);
130
145
  };
131
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(
132
147
  "div",
@@ -140,7 +155,7 @@ var CalendarDate = (props) => {
140
155
  }
141
156
  },
142
157
  /* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
143
- ), /* @__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" }, import_state.weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
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) => {
144
159
  const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
145
160
  const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
146
161
  currentMonth,
@@ -152,26 +167,17 @@ var CalendarDate = (props) => {
152
167
  key: index,
153
168
  className: (0, import_classnames.default)("calendar-days-items", {
154
169
  ["disabledDate"]: day == null ? void 0 : day.disabled,
155
- // ['disabledSelect']: status === 'sold_out',
156
170
  ["selectDate"]: currentDate === date,
157
- ["other-month-days"]: !isCurrentMonth
171
+ ["other-month-days"]: !isCurrentMonth,
172
+ ["loading-item"]: loading
158
173
  }),
159
174
  onClick: () => {
160
175
  if (day == null ? void 0 : day.disabled) return;
161
- console.log(day, "wh987976");
162
176
  setCurrentDate(date);
163
177
  appointmentBooking.setDateRange([day]);
164
178
  }
165
179
  },
166
- isCurrentMonth && /* @__PURE__ */ import_react.default.createElement(
167
- "div",
168
- {
169
- className: (0, import_classnames.default)("day-text", {
170
- // ['day-line']: !disabled,
171
- })
172
- },
173
- (0, import_dayjs.default)(day.date).format("D")
174
- )
180
+ isCurrentMonth && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("day-text") }, (0, import_dayjs.default)(day.date).format("D"))
175
181
  );
176
182
  })))));
177
183
  };
@@ -128,4 +128,9 @@
128
128
  background: none;
129
129
  border: none;
130
130
  }
131
+
132
+ &.loading-item {
133
+ background: #eaecf0;
134
+ cursor: not-allowed;
135
+ }
131
136
  }