@pisell/private-materials 3.3.16 → 3.3.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +7 -7
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +3 -3
  9. package/es/components/Sales/Summary/utils.d.ts +1 -1
  10. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -16
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.js +0 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +40 -13
  14. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Cart/utils.d.ts +20 -0
  16. package/es/components/appointmentBooking/components/Cart/utils.js +67 -1
  17. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +2 -3
  18. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Content/index.js +50 -7
  20. package/es/components/appointmentBooking/components/Date/index.js +6 -0
  21. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  22. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  23. package/es/components/appointmentBooking/components/Form/index.js +61 -49
  24. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  25. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  26. package/es/components/appointmentBooking/components/Header/index.js +5 -4
  27. package/es/components/appointmentBooking/components/Services/index.js +2 -4
  28. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  29. package/es/components/appointmentBooking/context.d.ts +5 -1
  30. package/es/components/appointmentBooking/context.js +37 -14
  31. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  32. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  33. package/es/components/appointmentBooking/hooks.js +7 -19
  34. package/es/components/appointmentBooking/locales.d.ts +3 -0
  35. package/es/components/appointmentBooking/locales.js +196 -193
  36. package/es/components/appointmentBooking/utils.js +21 -13
  37. package/es/components/booking/components/customSelect/index.js +2 -0
  38. package/es/components/booking/components/footer/index.d.ts +0 -1
  39. package/es/components/booking/components/footer/index.js +27 -22
  40. package/es/components/booking/components/footer/utils.d.ts +1 -0
  41. package/es/components/booking/components/footer/utils.js +17 -2
  42. package/es/components/booking/components/voucher/index.d.ts +1 -0
  43. package/es/components/booking/forms/footer.d.ts +1 -0
  44. package/es/components/booking/forms/forms.d.ts +4 -0
  45. package/es/components/booking/forms/forms.js +14 -3
  46. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  47. package/es/components/booking/forms/single/index.d.ts +1 -2
  48. package/es/components/booking/forms/single/index.js +33 -26
  49. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  50. package/es/components/booking/info/client/index.js +24 -3
  51. package/es/components/booking/info/client/index.less +39 -0
  52. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  53. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +10 -1
  54. package/es/components/booking/info/clientVariant/utils.d.ts +1 -0
  55. package/es/components/booking/info/clientVariant/utils.js +6 -0
  56. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +17 -2
  57. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
  58. package/es/components/booking/info/clientVariant/vertical/index.js +29 -4
  59. package/es/components/booking/info/clientVariant/vertical/index.less +18 -0
  60. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  61. package/es/components/booking/info/hooks/useAddHolder.d.ts +8 -1
  62. package/es/components/booking/info/hooks/useAddHolder.js +131 -31
  63. package/es/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
  64. package/es/components/booking/info/hooks/useGetHolderList.js +48 -0
  65. package/es/components/booking/info/hooks/useHolderConfig.js +2 -2
  66. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  67. package/es/components/booking/info/hooks/useInfoHolder.js +4 -41
  68. package/es/components/booking/info/pet/index.js +83 -8
  69. package/es/components/booking/info/pet/serve.d.ts +1 -0
  70. package/es/components/booking/info/pet/serve.js +27 -0
  71. package/es/components/booking/info/service/Lists.d.ts +0 -1
  72. package/es/components/booking/info/service/Lists.js +2 -1
  73. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  74. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  75. package/es/components/booking/info/service2/utils.d.ts +2 -0
  76. package/es/components/booking/info/service2/utils.js +20 -10
  77. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  78. package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
  79. package/es/components/booking/info2/utilsByBooking.js +9 -1
  80. package/es/components/booking/locales.d.ts +21 -0
  81. package/es/components/booking/locales.js +42 -3
  82. package/es/components/booking/utils.js +3 -1
  83. package/es/components/eftposPay/amount.d.ts +1 -1
  84. package/es/components/eftposPay/device.d.ts +1 -1
  85. package/es/components/eftposPay/hooks.d.ts +1 -1
  86. package/es/components/eftposPay/store/index.d.ts +3 -3
  87. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  88. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  89. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  90. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  91. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  92. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  93. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  94. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  95. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  96. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  97. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  98. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  99. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  100. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  101. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  102. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  103. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  104. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  105. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  106. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  107. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  108. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  109. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  110. package/es/components/shoppingCart/Provider.js +0 -1
  111. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  112. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  113. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  114. package/es/components/shoppingCart/components/Render/index.js +0 -1
  115. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  116. package/es/components/shoppingCart/hooks/useClearCart.js +0 -2
  117. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -3
  118. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  119. package/es/components/ticketBooking/components/ticketBooking/index.js +5 -6
  120. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  121. package/es/components/ticketBooking/index.d.ts +5 -2
  122. package/es/components/ticketBooking/index.js +20 -5
  123. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  124. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  125. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  126. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -8
  127. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +0 -1
  128. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  129. package/lib/components/appointmentBooking/components/Cart/Item/index.js +27 -11
  130. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  131. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +20 -0
  132. package/lib/components/appointmentBooking/components/Cart/utils.js +32 -2
  133. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +3 -3
  134. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  135. package/lib/components/appointmentBooking/components/Content/index.js +26 -1
  136. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  137. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  138. package/lib/components/appointmentBooking/components/Form/index.js +48 -36
  139. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  140. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  141. package/lib/components/appointmentBooking/components/Header/index.js +5 -4
  142. package/lib/components/appointmentBooking/components/Services/index.js +4 -6
  143. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -4
  144. package/lib/components/appointmentBooking/context.d.ts +5 -1
  145. package/lib/components/appointmentBooking/context.js +17 -5
  146. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  147. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  148. package/lib/components/appointmentBooking/hooks.js +1 -12
  149. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  150. package/lib/components/appointmentBooking/locales.js +4 -1
  151. package/lib/components/appointmentBooking/utils.js +19 -13
  152. package/lib/components/booking/components/customSelect/index.js +2 -0
  153. package/lib/components/booking/components/footer/index.d.ts +0 -1
  154. package/lib/components/booking/components/footer/index.js +3 -1
  155. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  156. package/lib/components/booking/components/footer/utils.js +16 -1
  157. package/lib/components/booking/components/voucher/index.d.ts +1 -0
  158. package/lib/components/booking/forms/footer.d.ts +1 -0
  159. package/lib/components/booking/forms/forms.d.ts +4 -0
  160. package/lib/components/booking/forms/forms.js +13 -3
  161. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  162. package/lib/components/booking/forms/single/index.d.ts +1 -2
  163. package/lib/components/booking/forms/single/index.js +13 -1
  164. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  165. package/lib/components/booking/info/client/index.js +20 -3
  166. package/lib/components/booking/info/client/index.less +39 -0
  167. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  168. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +8 -1
  169. package/lib/components/booking/info/clientVariant/utils.d.ts +1 -0
  170. package/lib/components/booking/info/clientVariant/utils.js +34 -0
  171. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -3
  172. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
  173. package/lib/components/booking/info/clientVariant/vertical/index.js +31 -6
  174. package/lib/components/booking/info/clientVariant/vertical/index.less +18 -0
  175. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  176. package/lib/components/booking/info/hooks/useAddHolder.d.ts +8 -1
  177. package/lib/components/booking/info/hooks/useAddHolder.js +88 -16
  178. package/lib/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
  179. package/lib/components/booking/info/hooks/useGetHolderList.js +61 -0
  180. package/lib/components/booking/info/hooks/useHolderConfig.js +2 -2
  181. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  182. package/lib/components/booking/info/hooks/useInfoHolder.js +2 -21
  183. package/lib/components/booking/info/pet/index.js +57 -10
  184. package/lib/components/booking/info/pet/serve.d.ts +1 -0
  185. package/lib/components/booking/info/pet/serve.js +33 -0
  186. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  187. package/lib/components/booking/info/service/Lists.js +1 -1
  188. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  189. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  190. package/lib/components/booking/info/service2/utils.d.ts +2 -0
  191. package/lib/components/booking/info/service2/utils.js +17 -7
  192. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  193. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
  194. package/lib/components/booking/info2/utilsByBooking.js +8 -1
  195. package/lib/components/booking/locales.d.ts +21 -0
  196. package/lib/components/booking/locales.js +42 -3
  197. package/lib/components/booking/utils.js +3 -1
  198. package/lib/components/eftposPay/amount.d.ts +1 -1
  199. package/lib/components/eftposPay/device.d.ts +1 -1
  200. package/lib/components/eftposPay/hooks.d.ts +1 -1
  201. package/lib/components/eftposPay/store/index.d.ts +3 -3
  202. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  203. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  204. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  205. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  206. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  207. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  208. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  209. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  210. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  211. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  212. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  213. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  214. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  215. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  216. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  217. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  218. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  219. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  220. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  221. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  222. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  223. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  224. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  225. package/lib/components/shoppingCart/Provider.js +0 -1
  226. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  227. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  228. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  229. package/lib/components/shoppingCart/components/Render/index.js +0 -1
  230. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  231. package/lib/components/shoppingCart/hooks/useClearCart.js +1 -2
  232. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -3
  233. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  234. package/lib/components/ticketBooking/components/ticketBooking/index.js +4 -3
  235. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  236. package/lib/components/ticketBooking/index.d.ts +5 -2
  237. package/lib/components/ticketBooking/index.js +13 -4
  238. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  239. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  240. package/lowcode/ticket-booking/meta.ts +26 -0
  241. package/package.json +2 -2
@@ -45,6 +45,7 @@ var import_Guest = __toESM(require("../Guest"));
45
45
  var import_Form = __toESM(require("../Form"));
46
46
  var import_ConfirmInformation = __toESM(require("../ConfirmInformation"));
47
47
  var import_context = require("../../context");
48
+ var import_PolicyModal = __toESM(require("../../deposit/components/PolicyModal"));
48
49
  var import_hooks = require("../../hooks");
49
50
  var import_index = require("./index.less");
50
51
  var Layout = () => {
@@ -63,12 +64,18 @@ var Layout = () => {
63
64
  const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
64
65
  const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
65
66
  const { removeStep, stepList } = (0, import_hooks.useAppointmentBookingStep)();
67
+ const { shopDiscount } = (0, import_hooks.useShopDiscount)();
68
+ const [showAgreement, setShowAgreement] = (0, import_react.useState)(false);
69
+ const [agreementContent, setAgreementContent] = (0, import_react.useState)({});
66
70
  (0, import_hooks.useAppointmentBookingCart)();
67
71
  (0, import_hooks.useAppointmentBookingStep)();
68
72
  const [params, setParams] = (0, import_react.useState)({});
69
73
  (0, import_react.useEffect)(() => {
70
74
  return () => {
75
+ var _a2;
71
76
  setIsAgreeDepositPolicy(false);
77
+ appointmentBooking.destroy();
78
+ (_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
72
79
  };
73
80
  }, []);
74
81
  (0, import_react.useEffect)(() => {
@@ -158,6 +165,16 @@ var Layout = () => {
158
165
  return (_b2 = (_a3 = stepRef == null ? void 0 : stepRef.current) == null ? void 0 : _a3.next) == null ? void 0 : _b2.call(_a3);
159
166
  } }));
160
167
  }, [isDateSelectedFirst, (_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key]);
168
+ const isFooter = (0, import_react.useMemo)(() => {
169
+ var _a2;
170
+ if (!(0, import_utils.isMobile)()) return false;
171
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
172
+ if (isDateSelectedFirst && key === "select-date") return false;
173
+ return key !== "confirm-information";
174
+ }, [isDateSelectedFirst, (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key]);
175
+ const handleAgreementOk = () => {
176
+ setShowAgreement(false);
177
+ };
161
178
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, null), /* @__PURE__ */ import_react.default.createElement(
162
179
  "div",
163
180
  {
@@ -165,7 +182,7 @@ var Layout = () => {
165
182
  },
166
183
  /* @__PURE__ */ import_react.default.createElement("div", { className: "parallel-content-left" }, Com),
167
184
  isShowCartCom
168
- ), (0, import_utils.isMobile)() && ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) !== "confirm-information" ? /* @__PURE__ */ import_react.default.createElement(
185
+ ), isFooter ? /* @__PURE__ */ import_react.default.createElement(
169
186
  import_Footer.default,
170
187
  {
171
188
  onNext: () => {
@@ -173,6 +190,14 @@ var Layout = () => {
173
190
  return (_b2 = (_a2 = stepRef == null ? void 0 : stepRef.current) == null ? void 0 : _a2.next) == null ? void 0 : _b2.call(_a2);
174
191
  }
175
192
  }
193
+ ) : null, showAgreement ? /* @__PURE__ */ import_react.default.createElement(
194
+ import_PolicyModal.default,
195
+ {
196
+ open: showAgreement,
197
+ onCancel: handleAgreementOk,
198
+ item: agreementContent,
199
+ onChange: () => setLoading(false)
200
+ }
176
201
  ) : null);
177
202
  };
178
203
  var Content_default = Layout;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: () => JSX.Element;
3
4
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -45,6 +45,8 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
45
45
  const [showAgreement, setShowAgreement] = (0, import_react.useState)(false);
46
46
  const [agreementContent, setAgreementContent] = (0, import_react.useState)({});
47
47
  const [formStatus, setFormStatus] = (0, import_react.useState)([]);
48
+ const [isClearData, setIsClearData] = (0, import_react.useState)(false);
49
+ const [formId, setFormId] = (0, import_react.useState)(0);
48
50
  const { carts, appointmentBooking, setLoading } = (0, import_context.useAppointmentBookingContext)();
49
51
  const { getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
50
52
  const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
@@ -56,20 +58,20 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
56
58
  }
57
59
  }));
58
60
  const key = "booking_form";
61
+ const formStorage = getOtherData("booking_form") || {};
59
62
  const resources = (0, import_react.useMemo)(() => {
60
63
  const _resource = getResourceList();
61
64
  return (_resource == null ? void 0 : _resource.resources) || [];
62
65
  }, []);
63
- const formStorage = (0, import_react.useMemo)(() => {
64
- return getOtherData(key);
65
- }, []);
66
66
  const newCarts = (0, import_utils.formatCarts)(carts, resources);
67
67
  const forms = (0, import_react.useMemo)(() => {
68
68
  if (!(newCarts == null ? void 0 : newCarts.length) || !(resources == null ? void 0 : resources.length)) return [];
69
69
  return (0, import_utils.formatForms)(newCarts) || [];
70
70
  }, [newCarts, resources]);
71
- const currentForm = (0, import_react.useMemo)(() => {
72
- return forms == null ? void 0 : forms[currentFormIndex];
71
+ (0, import_react.useEffect)(() => {
72
+ var _a;
73
+ if (!(forms == null ? void 0 : forms.length)) return;
74
+ setFormId(((_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.form_id) || 0);
73
75
  }, [forms, currentFormIndex]);
74
76
  const [FormCard] = (0, import_useComponents.default)({
75
77
  components: ["FormCard"]
@@ -78,11 +80,14 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
78
80
  var _a, _b, _c;
79
81
  const nextIndex = currentFormIndex + 1;
80
82
  if (nextIndex < forms.length) {
83
+ setIsClearData(true);
81
84
  setCurrentFormIndex(nextIndex);
82
85
  if (!((_a = forms == null ? void 0 : forms[nextIndex]) == null ? void 0 : _a.form_id) && ((_b = forms == null ? void 0 : forms[nextIndex]) == null ? void 0 : _b.policy_id)) {
83
86
  setLoading(true);
84
87
  setAgreementContent({ id: (_c = forms == null ? void 0 : forms[nextIndex]) == null ? void 0 : _c.policy_id });
85
88
  setShowAgreement(true);
89
+ } else {
90
+ setLoading(false);
86
91
  }
87
92
  } else {
88
93
  appointmentBooking.next();
@@ -92,31 +97,35 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
92
97
  if (status === "error") {
93
98
  setLoading(false);
94
99
  }
95
- const newFormStatus = (0, import_utils.updateLists)(formStatus, "id", currentForm == null ? void 0 : currentForm.form_id, {
100
+ const newFormStatus = (0, import_utils.updateLists)(formStatus, "id", formId, {
96
101
  status
97
102
  });
98
103
  setFormStatus(newFormStatus);
99
104
  };
100
105
  const setFormStorage = (values) => {
106
+ var _a;
107
+ const cart_id = (_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.cart_id;
101
108
  const oldData = getOtherData(key);
102
- const newData = (0, import_utils.updateBookingFormStorage)(oldData, currentForm == null ? void 0 : currentForm.id, values);
109
+ const newData = (0, import_utils.updateBookingFormStorage)(oldData, cart_id, values);
103
110
  setOtherData(key, { ...newData });
104
111
  appointmentBooking.updateCart({
105
- _id: currentForm == null ? void 0 : currentForm.cart_id,
112
+ _id: cart_id,
106
113
  relationForms: [
107
114
  {
108
- form_id: currentForm == null ? void 0 : currentForm.form_id,
109
- form_record_ids: [currentForm == null ? void 0 : currentForm.id]
115
+ form_id: formId,
116
+ form_record_ids: [values == null ? void 0 : values.form_record_id]
110
117
  }
111
118
  ]
112
119
  });
113
120
  };
114
121
  const handleFormFinish = (status, values) => {
122
+ var _a, _b;
123
+ setIsClearData(false);
115
124
  updateFormStatus(status);
116
125
  if (status === "success") {
117
126
  setFormStorage(values);
118
- if (currentForm == null ? void 0 : currentForm.policy_id) {
119
- setAgreementContent({ id: currentForm.policy_id });
127
+ if ((_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.policy_id) {
128
+ setAgreementContent({ id: (_b = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _b.policy_id });
120
129
  setShowAgreement(true);
121
130
  } else {
122
131
  goToNextForm();
@@ -127,30 +136,33 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
127
136
  setShowAgreement(false);
128
137
  goToNextForm();
129
138
  };
130
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, (currentForm == null ? void 0 : currentForm.form_id) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-form-wrap" }, /* @__PURE__ */ import_react.default.createElement(
131
- FormCard,
132
- {
133
- id: currentForm == null ? void 0 : currentForm.form_id,
134
- ref: manualRef,
135
- isGetLastData: false,
136
- setting: { isHidden: 1 },
137
- formWrapStyle: { padding: "16px" },
138
- isV2API: true,
139
- isShowSkeleton: true,
140
- onSubmit: (status, values) => {
141
- handleFormFinish(status, values);
142
- },
143
- onFinishFailed: (e) => {
144
- console.log(e, "updateFormStatus");
145
- updateFormStatus("error");
146
- },
147
- onFormValueChange: (values) => {
148
- console.log(values, "onFormValueChange");
149
- },
150
- defaultValues: (formStorage == null ? void 0 : formStorage[currentForm == null ? void 0 : currentForm.id]) || {},
151
- isClearData: !(formStorage == null ? void 0 : formStorage[currentForm == null ? void 0 : currentForm.id])
152
- }
153
- )) : null, showAgreement ? /* @__PURE__ */ import_react.default.createElement(
139
+ const formCom = (0, import_react.useMemo)(() => {
140
+ var _a;
141
+ if (!formId) return;
142
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-form-wrap" }, /* @__PURE__ */ import_react.default.createElement(
143
+ FormCard,
144
+ {
145
+ id: formId,
146
+ ref: manualRef,
147
+ isGetLastData: false,
148
+ setting: { isHidden: 1 },
149
+ formWrapStyle: { padding: "16px" },
150
+ isV2API: true,
151
+ isShowSkeleton: true,
152
+ onSubmit: (status, values) => {
153
+ handleFormFinish(status, values);
154
+ },
155
+ onFinishFailed: (e) => {
156
+ updateFormStatus("error");
157
+ },
158
+ onFormValueChange: (values) => {
159
+ },
160
+ defaultValues: (formStorage == null ? void 0 : formStorage[(_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.cart_id]) || {},
161
+ isClearData: false
162
+ }
163
+ ));
164
+ }, [currentFormIndex, formId]);
165
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, formCom, showAgreement ? /* @__PURE__ */ import_react.default.createElement(
154
166
  import_PolicyModal.default,
155
167
  {
156
168
  open: showAgreement,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -51,11 +51,12 @@ var Header = () => {
51
51
  const stepName = (0, import_react.useMemo)(() => {
52
52
  var _a2, _b, _c, _d, _e;
53
53
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
54
+ if (!key) return "";
54
55
  if (key === "select-resource") {
55
56
  const name = ((_d = (_c = (_b = resources == null ? void 0 : resources[0]) == null ? void 0 : _b.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.title) || "";
56
57
  return import_utils.locales.getText("pisell2.event.select.category")(name);
57
58
  }
58
- return (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description;
59
+ return ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description) || "";
59
60
  }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, resources]);
60
61
  const handleBack = async () => {
61
62
  var _a2, _b;
@@ -89,7 +90,7 @@ var Header = () => {
89
90
  appointmentBooking.deleteCartItemInfo("resource");
90
91
  }
91
92
  appointmentBooking.back();
92
- if ((resourceStep == null ? void 0 : resourceStep.isSkip) && (resourceStep == null ? void 0 : resourceStep.key) === "select-resource") {
93
+ if ((resourceStep == null ? void 0 : resourceStep.isSkip) && ((resourceStep == null ? void 0 : resourceStep.key) === "select-resource" || (resourceStep == null ? void 0 : resourceStep.key) === "select-service")) {
93
94
  updateStep(resourceStep == null ? void 0 : resourceStep.key, {
94
95
  index: currentStep == null ? void 0 : currentStep.index,
95
96
  isSkip: false
@@ -106,9 +107,9 @@ var Header = () => {
106
107
  return /* @__PURE__ */ import_react.default.createElement(
107
108
  import_progressBar.default,
108
109
  {
109
- title: `${import_utils.locales.getText("pisell2.appointment.step")(
110
+ title: currentStep ? `${import_utils.locales.getText("pisell2.appointment.step")(
110
111
  (currentStep == null ? void 0 : currentStep.index) + 1
111
- )}`,
112
+ )}` : "",
112
113
  description: stepName,
113
114
  showBack: (currentStep == null ? void 0 : currentStep.index) > 0,
114
115
  onBack: () => handleBack(),
@@ -35,12 +35,12 @@ module.exports = __toCommonJS(Services_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_dayjs = __toESM(require("dayjs"));
37
37
  var import_utils = require("@pisell/utils");
38
- var import_materials = require("@pisell/materials");
39
38
  var import_productSelect = __toESM(require("../../../productSelect"));
40
39
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
41
40
  var import_context = require("../../context");
42
41
  var import_hooks = require("../../hooks");
43
42
  var import_index = require("./index.less");
43
+ var import_utils2 = require("../../utils");
44
44
  var Services = (0, import_react.forwardRef)((props, ref) => {
45
45
  const context = (0, import_useEngineContext.default)();
46
46
  const { utils } = context.appHelper || {};
@@ -103,11 +103,9 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
103
103
  const resources = ((_b = (_a = data == null ? void 0 : data.origin) == null ? void 0 : _a.product_resource) == null ? void 0 : _b.resources) || [];
104
104
  const activeStatus = resources.find((item2) => item2.status === 1);
105
105
  if (!activeStatus) {
106
- return (0, import_materials.PisellToast)({
107
- content: import_utils.locales.getText(
108
- "pisell2.appointment.no.available.service"
109
- )
110
- });
106
+ return (0, import_utils2.Toast)(
107
+ import_utils.locales.getText("pisell2.appointment.no.available.service")
108
+ );
111
109
  }
112
110
  appointmentBooking.storeProduct(product);
113
111
  if (type === "duration") {
@@ -59,7 +59,7 @@ var VoucherCard = (props) => {
59
59
  const context = (0, import_useEngineContext.default)();
60
60
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
61
61
  const shopDiscount = (0, import_hooks.useShopDiscount)();
62
- const [showDetail, setShowDetail] = (0, import_react.useState)(true);
62
+ const [showDetail, setShowDetail] = (0, import_react.useState)(false);
63
63
  const { pisellos, action, token, store } = (_a = context.appHelper) == null ? void 0 : _a.utils;
64
64
  const { utils } = context.appHelper || {};
65
65
  const [code, setCode] = (0, import_react.useState)("");
@@ -204,9 +204,7 @@ var VoucherCard = (props) => {
204
204
  discountId: val.id,
205
205
  isSelected: val.isSelected
206
206
  });
207
- batchUpdateCart(
208
- detail.productList
209
- );
207
+ batchUpdateCart(detail.productList);
210
208
  }
211
209
  }
212
210
  ) : null,
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { TasksManager } from '../../utils/tasks';
2
3
  interface AppointmentBookingContextType {
3
4
  appointmentBooking: any;
4
5
  times: any[];
@@ -19,7 +20,10 @@ interface AppointmentBookingContextType {
19
20
  setSelectedTime: (val: any) => void;
20
21
  isAgreeDepositPolicy: boolean;
21
22
  setIsAgreeDepositPolicy: (val: boolean) => void;
22
- setStepParams: (val: any) => void;
23
+ isLastStep: boolean;
24
+ tasksManager: TasksManager;
25
+ policyParams: any;
26
+ setPolicyParams: (val: any) => void;
23
27
  [key: string]: any;
24
28
  }
25
29
  export declare const AppointmentBookingProvider: ({ children, }: {
@@ -36,11 +36,12 @@ module.exports = __toCommonJS(context_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_hooks = require("./hooks");
38
38
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
39
+ var import_tasks = require("../../utils/tasks");
39
40
  var AppointmentBookingContext = (0, import_react.createContext)(void 0);
40
41
  var AppointmentBookingProvider = ({
41
42
  children
42
43
  }) => {
43
- var _a;
44
+ var _a, _b, _c, _d, _e;
44
45
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
45
46
  const [summary, setSummary] = (0, import_react.useState)({});
46
47
  const [times, setTimes] = (0, import_react.useState)([]);
@@ -51,15 +52,24 @@ var AppointmentBookingProvider = ({
51
52
  const [selectedTime, setSelectedTime] = (0, import_react.useState)(null);
52
53
  const [isAgreeDepositPolicy, setIsAgreeDepositPolicy] = (0, import_react.useState)(false);
53
54
  const [currentResource, setCurrentResource] = (0, import_react.useState)(null);
54
- const [stepParams, setStepParams] = (0, import_react.useState)({});
55
55
  const [loading, setLoading] = (0, import_react.useState)(false);
56
56
  const [isErrorHolder, setIsErrorHolder] = (0, import_react.useState)(false);
57
+ const [tasksManager] = (0, import_react.useState)(() => new import_tasks.TasksManager());
58
+ const [policyParams, setPolicyParams] = (0, import_react.useState)(null);
57
59
  const { appHelper } = (0, import_useEngineContext.default)();
58
60
  const symbolic = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.getSymbolic();
59
61
  (0, import_react.useEffect)(() => {
60
62
  const currentStep2 = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
61
63
  setCurrentStep(currentStep2);
62
64
  }, []);
65
+ const isLastStep = (0, import_react.useMemo)(() => {
66
+ var _a2;
67
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
68
+ return key === "confirm-information";
69
+ }, [
70
+ (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key,
71
+ (_e = (_d = (_c = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _c.step) == null ? void 0 : _d.store) == null ? void 0 : _e.stepList
72
+ ]);
63
73
  const value = {
64
74
  appointmentBooking,
65
75
  times,
@@ -82,12 +92,14 @@ var AppointmentBookingProvider = ({
82
92
  setIsAgreeDepositPolicy,
83
93
  currentResource,
84
94
  setCurrentResource,
85
- setStepParams,
86
- stepParams,
87
95
  loading,
88
96
  setLoading,
89
97
  isErrorHolder,
90
- setIsErrorHolder
98
+ setIsErrorHolder,
99
+ isLastStep,
100
+ tasksManager,
101
+ policyParams,
102
+ setPolicyParams
91
103
  };
92
104
  return /* @__PURE__ */ import_react.default.createElement(AppointmentBookingContext.Provider, { value }, children);
93
105
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const DepositModal: (props: any) => JSX.Element;
3
4
  export default DepositModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: (props: any) => JSX.Element;
3
4
  export default Deposit;
@@ -66,17 +66,11 @@ var contextUtils = () => {
66
66
  var useAppointmentBookingStep = () => {
67
67
  var _a, _b, _c;
68
68
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
69
- const { appointmentBooking, setCurrentStep, setStepParams, stepParams } = (0, import_context.useAppointmentBookingContext)();
69
+ const { appointmentBooking, setCurrentStep } = (0, import_context.useAppointmentBookingContext)();
70
70
  const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
71
71
  const getCurrentAndLastStep = () => {
72
72
  const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
73
- console.log("appointmentBooking_step:changed", currentStep);
74
73
  setCurrentStep(currentStep);
75
- setStepParams({
76
- ...stepParams,
77
- isLastStep: (currentStep == null ? void 0 : currentStep.index) === stepList.length - 1,
78
- isTwoLastStep: (currentStep == null ? void 0 : currentStep.index) === stepList.length - 2
79
- });
80
74
  };
81
75
  (0, import_react.useEffect)(() => {
82
76
  getCurrentAndLastStep();
@@ -84,7 +78,6 @@ var useAppointmentBookingStep = () => {
84
78
  "appointmentBooking_step:changed",
85
79
  async (res) => {
86
80
  if (res.path === "currentStep") {
87
- console.log("appointmentBooking_step:changed", res);
88
81
  getCurrentAndLastStep();
89
82
  }
90
83
  }
@@ -158,7 +151,6 @@ var useAppointmentBookingCart = () => {
158
151
  const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
159
152
  const getCartAndSummary = async () => {
160
153
  const carts = await appointmentBooking.getCart();
161
- console.log(carts, appointmentBooking, utils, "3khhsdjf");
162
154
  const newCarts = carts == null ? void 0 : carts.map((item) => {
163
155
  return {
164
156
  ...item,
@@ -171,7 +163,6 @@ var useAppointmentBookingCart = () => {
171
163
  if (!carts.length) {
172
164
  setIsAgreeDepositPolicy(false);
173
165
  }
174
- console.log(carts, summary, "appointmentBooking_cart:changed");
175
166
  };
176
167
  (0, import_react.useEffect)(() => {
177
168
  getCartAndSummary();
@@ -187,7 +178,6 @@ var useAppointmentBookingLogin = () => {
187
178
  var _a, _b;
188
179
  const utils = contextUtils();
189
180
  const isLogin = !!((_b = (_a = utils == null ? void 0 : utils.token) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a));
190
- console.log(isLogin, "isLogin");
191
181
  const openLoginModal = (params) => {
192
182
  const { callback } = params || {};
193
183
  utils.action({
@@ -270,7 +260,6 @@ var useAppointmentBookingResource = () => {
270
260
  const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
271
261
  const resourceCodes = _resources.map((item) => item.code);
272
262
  setResources(resources || []);
273
- console.log(resourceCodes, resources, "getResourceList");
274
263
  return { resources, resourceCodes };
275
264
  };
276
265
  const getResourceTimeSlot = async (index) => {
@@ -102,6 +102,7 @@ declare const _default: {
102
102
  'pisell2.appointment.select.time': string;
103
103
  'pisell2.appointment.unselect.time': string;
104
104
  'pisell2.appointment.unselect.date': string;
105
+ 'pisell2.appointment.unuse.date': string;
105
106
  'pisell2.appointment.add-guests': string;
106
107
  'pisell2.text.apply': string;
107
108
  'pisell2.text.goodpass': string;
@@ -216,6 +217,7 @@ declare const _default: {
216
217
  'pisell2.appointment.select.time': string;
217
218
  'pisell2.appointment.unselect.time': string;
218
219
  'pisell2.appointment.unselect.date': string;
220
+ 'pisell2.appointment.unuse.date': string;
219
221
  'pisell2.appointment.add-guests': string;
220
222
  'pisell2.text.apply': string;
221
223
  'pisell2.text.goodpass': string;
@@ -330,6 +332,7 @@ declare const _default: {
330
332
  'pisell2.appointment.select.time': string;
331
333
  'pisell2.appointment.unselect.time': string;
332
334
  'pisell2.appointment.unselect.date': string;
335
+ 'pisell2.appointment.unuse.date': string;
333
336
  'pisell2.appointment.add-guests': string;
334
337
  'pisell2.text.apply': string;
335
338
  'pisell2.text.goodpass': string;
@@ -23,7 +23,7 @@ __export(locales_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(locales_exports);
25
25
  var locales_default = {
26
- "en": {
26
+ en: {
27
27
  "pisell2.event.calendar.limit.unavailable": "Unavailable",
28
28
  "pisell2.event.calendar.limit.sold.out": "Sold out",
29
29
  "pisell2.event.calendar.limit.call.to.book": "Call to book",
@@ -126,6 +126,7 @@ var locales_default = {
126
126
  "pisell2.appointment.select.time": "Select time",
127
127
  "pisell2.appointment.unselect.time": "No times available. Go back",
128
128
  "pisell2.appointment.unselect.date": "Please select date",
129
+ "pisell2.appointment.unuse.date": "This date is not available, please change the date.",
129
130
  "pisell2.appointment.add-guests": "Add guests",
130
131
  "pisell2.text.apply": "Apply",
131
132
  "pisell2.text.goodpass": "GoodPass",
@@ -240,6 +241,7 @@ var locales_default = {
240
241
  "pisell2.appointment.select.time": "选择时间",
241
242
  "pisell2.appointment.unselect.time": "无可用时间,请返回",
242
243
  "pisell2.appointment.unselect.date": "请选择日期",
244
+ "pisell2.appointment.unuse.date": "此日期不可用,请更换日期。",
243
245
  "pisell2.appointment.add-guests": "添加预约人",
244
246
  "pisell2.text.apply": "应用",
245
247
  "pisell2.text.goodpass": "商品券",
@@ -354,6 +356,7 @@ var locales_default = {
354
356
  "pisell2.appointment.select.time": "選擇時間",
355
357
  "pisell2.appointment.unselect.time": "無可用時間,請返回",
356
358
  "pisell2.appointment.unselect.date": "請選擇日期",
359
+ "pisell2.appointment.unuse.date": "此日期不可用,請更換日期。",
357
360
  "pisell2.appointment.add-guests": "添加預約人",
358
361
  "pisell2.text.apply": "應用",
359
362
  "pisell2.text.goodpass": "商品券",
@@ -279,7 +279,8 @@ var Toast = (text) => {
279
279
  }
280
280
  };
281
281
  var checkHasFormStep = ({ isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
282
- var _a, _b, _c, _d, _e, _f;
282
+ var _a, _b, _c;
283
+ let isNext = false;
283
284
  if (hasResourceFormId2) {
284
285
  const index = (currentStep == null ? void 0 : currentStep.index) + 1;
285
286
  const description = locales2.getText("pisell2.appointment.fill-form");
@@ -290,6 +291,17 @@ var checkHasFormStep = ({ isSkip, checkHolder, checkAccount, carts, setCarts, ha
290
291
  }
291
292
  const stepLists = (_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList;
292
293
  if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepLists == null ? void 0 : stepLists.length)) {
294
+ const _checkHolder = () => {
295
+ const result = checkHolder({
296
+ isFormSubject,
297
+ checkAccount,
298
+ carts
299
+ });
300
+ if (result) {
301
+ setCarts(result);
302
+ }
303
+ if (!!result) return true;
304
+ };
293
305
  if (!isLogin) {
294
306
  utils.action({
295
307
  type: "pisell1.login",
@@ -308,30 +320,24 @@ var checkHasFormStep = ({ isSkip, checkHolder, checkAccount, carts, setCarts, ha
308
320
  getHolders();
309
321
  }
310
322
  if (isSkip) {
311
- appointmentBooking.next();
323
+ isNext = true;
312
324
  }
313
325
  }
314
326
  }
315
327
  });
316
- return true;
317
328
  } else {
318
- appointmentBooking.next();
329
+ isNext = true;
319
330
  }
320
- const result = checkHolder({
321
- isFormSubject,
322
- checkAccount,
323
- carts
324
- });
325
- if (result) {
326
- setCarts(result);
331
+ if (isNext && !_checkHolder()) {
332
+ appointmentBooking.next();
333
+ } else {
334
+ return true;
327
335
  }
328
- if (!!result) return true;
329
336
  } else {
330
337
  if (isSkip) {
331
338
  appointmentBooking.next();
332
339
  }
333
340
  }
334
- console.log(appointmentBooking, (_f = (_e = (_d = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _d.step) == null ? void 0 : _e.store) == null ? void 0 : _f.stepList, currentStep, "appointmentBooking444");
335
341
  };
336
342
  // Annotate the CommonJS export names for ESM import in node:
337
343
  0 && (module.exports = {
@@ -326,6 +326,7 @@ var CustomSelect = (props, ref) => {
326
326
  }
327
327
  ),
328
328
  onClick: () => {
329
+ if ((item == null ? void 0 : item.status) === "expired") return;
329
330
  handleSelectItem(item);
330
331
  },
331
332
  id: item[rowKey]
@@ -342,6 +343,7 @@ var CustomSelect = (props, ref) => {
342
343
  ) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__custom-select-card-list-item-content" }, mode === "multiple" && /* @__PURE__ */ import_react.default.createElement(
343
344
  import_antd.Checkbox,
344
345
  {
346
+ disabled: (item == null ? void 0 : item.status) === "expired",
345
347
  className: "custom-select-checkbox",
346
348
  checked: (0, import_utils.getItemByArray)(_value, item, rowKey)
347
349
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -274,6 +274,9 @@ var Footer = (props) => {
274
274
  const isHasDayProducts = handleDaySubmit();
275
275
  if (isHasDayProducts) return;
276
276
  }
277
+ if ((0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils4.checkHolderIsError)(state)) {
278
+ return;
279
+ }
277
280
  let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
278
281
  _setLoading(true);
279
282
  const { createBooking, editBooking } = getApis();
@@ -300,7 +303,6 @@ var Footer = (props) => {
300
303
  );
301
304
  }
302
305
  }
303
- debugger;
304
306
  state == null ? void 0 : state.callback(callbackData);
305
307
  _setLoading(false);
306
308
  return callbackData || values;
@@ -28,3 +28,4 @@ export interface ResourceItem {
28
28
  */
29
29
  export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
30
30
  export declare const formatValues: (state: any) => any;
31
+ export declare const checkHolderIsError: (state: any) => any;