@pisell/private-materials 3.3.82 → 3.3.83

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 (261) 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 +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/businessModel/SalesModel/Sales/index.js +4 -37
  12. package/es/components/Sales/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +0 -7
  14. package/es/components/Sales/Resource/serve.js +0 -10
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  16. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  17. package/es/components/appointmentBooking/components/Header/index.js +14 -8
  18. package/es/components/appointmentBooking/components/Services/index.js +36 -38
  19. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  20. package/es/components/appointmentBooking/index.js +0 -14
  21. package/es/components/appointmentBooking/index.less +1 -1
  22. package/es/components/appointmentBooking/locales.d.ts +3 -0
  23. package/es/components/appointmentBooking/locales.js +3 -0
  24. package/es/components/booking/addons/model.d.ts +1 -10
  25. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  26. package/es/components/booking/components/browserSelect/index.js +1 -1
  27. package/es/components/booking/components/footer/utils.d.ts +0 -1
  28. package/es/components/booking/components/footer/utils.js +1 -1
  29. package/es/components/booking/components/voucher/index.js +2 -2
  30. package/es/components/booking/forms/model.d.ts +1 -10
  31. package/es/components/booking/forms/model.js +5 -5
  32. package/es/components/booking/info/model.d.ts +1 -10
  33. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  34. package/es/components/booking/info/service/like/index.js +1 -1
  35. package/es/components/booking/info/service2/utils.d.ts +1 -1
  36. package/es/components/booking/info/service2/utils.js +2 -3
  37. package/es/components/booking/info/utils.d.ts +50 -0
  38. package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
  39. package/es/components/booking/info2/service/addService/utils.js +13 -44
  40. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  41. package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
  42. package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
  43. package/es/components/booking/info2/utilsByBooking.js +0 -9
  44. package/es/components/booking/locales.d.ts +0 -3
  45. package/es/components/booking/locales.js +0 -3
  46. package/es/components/booking/materiels/startTime/index.js +1 -1
  47. package/es/components/booking/model.d.ts +1 -9
  48. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  49. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  50. package/es/components/booking/notes/model.d.ts +1 -10
  51. package/es/components/booking/notes/model.js +5 -5
  52. package/es/components/booking/payments/model.d.ts +1 -10
  53. package/es/components/booking/payments/model.js +5 -5
  54. package/es/components/eftposPay/amount.d.ts +1 -1
  55. package/es/components/eftposPay/device.d.ts +1 -1
  56. package/es/components/eftposPay/hooks.d.ts +2 -2
  57. package/es/components/eftposPay/store/index.d.ts +3 -3
  58. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  59. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
  60. package/es/components/eventBooking/index.js +7 -21
  61. package/es/components/eventBooking/locales.js +3 -3
  62. package/es/components/index.d.ts +1 -3
  63. package/es/components/index.js +1 -3
  64. package/es/components/listComponent/index.js +5 -5
  65. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  66. package/es/components/pay/toC/model.d.ts +1 -9
  67. package/es/components/productExtension/card/index.js +3 -3
  68. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  69. package/es/components/productExtension/fields/Forms/index.js +12 -12
  70. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  71. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  72. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  73. package/es/components/productExtension/server.js +2 -2
  74. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  75. package/es/components/schedules/calendar/index.js +4 -4
  76. package/es/components/schedules/calendar/serve.js +2 -2
  77. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  78. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  79. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  80. package/es/components/schedules/components/ResourceList/index.js +1 -1
  81. package/es/components/schedules/components/Search/index.js +5 -5
  82. package/es/components/schedules/model.d.ts +1 -9
  83. package/es/components/schedules/model.js +5 -5
  84. package/es/components/schedules/openHours/index.js +1 -1
  85. package/es/components/schedules/openHours/serve.js +2 -2
  86. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  87. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  88. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  89. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  90. package/es/components/schedules/products/serve.js +2 -2
  91. package/es/components/schedules/products/utils.js +5 -5
  92. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  93. package/es/components/schedules/resources/detail/index.js +10 -10
  94. package/es/components/schedules/resources/list/index.js +2 -2
  95. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  96. package/es/components/schedules/resources/serve.js +2 -2
  97. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  98. package/es/components/schedules/utils.d.ts +1 -1
  99. package/es/components/schedules/utils.js +4 -4
  100. package/es/components/selectModal/index.js +2 -2
  101. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  102. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  103. package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
  104. package/es/components/ticketBooking/locales.d.ts +146 -164
  105. package/es/components/ticketBooking/locales.js +147 -195
  106. package/es/components/wallet/Detail/model.d.ts +1 -13
  107. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  108. package/es/components/wallet/PointCard/model.d.ts +1 -13
  109. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  110. package/es/components/wallet/Voucher/model.d.ts +1 -13
  111. package/es/components/wallet/model.d.ts +1 -9
  112. package/es/hooks/useComponents.js +1 -1
  113. package/es/index.d.ts +0 -2
  114. package/es/index.js +1 -3
  115. package/es/utils/index.d.ts +1 -1
  116. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  117. package/lib/components/Sales/Resource/index.js +1 -1
  118. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  119. package/lib/components/Sales/Resource/serve.js +2 -9
  120. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  121. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  122. package/lib/components/appointmentBooking/components/Header/index.js +3 -2
  123. package/lib/components/appointmentBooking/components/Services/index.js +18 -19
  124. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
  125. package/lib/components/appointmentBooking/index.js +0 -11
  126. package/lib/components/appointmentBooking/index.less +1 -1
  127. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  128. package/lib/components/appointmentBooking/locales.js +3 -0
  129. package/lib/components/booking/addons/model.d.ts +1 -10
  130. package/lib/components/booking/components/footer/utils.d.ts +0 -1
  131. package/lib/components/booking/components/footer/utils.js +0 -2
  132. package/lib/components/booking/components/voucher/index.js +23 -11
  133. package/lib/components/booking/forms/model.d.ts +1 -10
  134. package/lib/components/booking/info/model.d.ts +1 -10
  135. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  136. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  137. package/lib/components/booking/info/service2/utils.js +2 -2
  138. package/lib/components/booking/info/utils.d.ts +50 -0
  139. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
  140. package/lib/components/booking/info2/service/addService/utils.js +4 -27
  141. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  142. package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
  143. package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
  144. package/lib/components/booking/info2/utilsByBooking.js +0 -6
  145. package/lib/components/booking/locales.d.ts +0 -3
  146. package/lib/components/booking/locales.js +0 -3
  147. package/lib/components/booking/model.d.ts +1 -9
  148. package/lib/components/booking/notes/model.d.ts +1 -10
  149. package/lib/components/booking/payments/model.d.ts +1 -10
  150. package/lib/components/eftposPay/amount.d.ts +1 -1
  151. package/lib/components/eftposPay/device.d.ts +1 -1
  152. package/lib/components/eftposPay/hooks.d.ts +2 -2
  153. package/lib/components/eftposPay/store/index.d.ts +3 -3
  154. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  155. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
  156. package/lib/components/eventBooking/index.js +7 -11
  157. package/lib/components/eventBooking/locales.js +3 -3
  158. package/lib/components/index.d.ts +1 -3
  159. package/lib/components/index.js +0 -6
  160. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  161. package/lib/components/pay/toC/model.d.ts +1 -9
  162. package/lib/components/schedules/model.d.ts +1 -9
  163. package/lib/components/schedules/utils.d.ts +1 -1
  164. package/lib/components/schedules/utils.js +1 -1
  165. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  166. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  167. package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
  168. package/lib/components/ticketBooking/locales.d.ts +146 -164
  169. package/lib/components/ticketBooking/locales.js +4 -22
  170. package/lib/components/wallet/Detail/model.d.ts +1 -13
  171. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  172. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  173. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  174. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  175. package/lib/components/wallet/model.d.ts +1 -9
  176. package/lib/index.d.ts +0 -2
  177. package/lib/index.js +0 -6
  178. package/lib/utils/index.d.ts +1 -1
  179. package/package.json +4 -4
  180. package/es/components/booking/editBookingModal/index.d.ts +0 -5
  181. package/es/components/booking/editBookingModal/index.js +0 -386
  182. package/es/components/booking/editBookingModal/index.less +0 -8
  183. package/es/components/booking/editBookingModal/locales.d.ts +0 -21
  184. package/es/components/booking/editBookingModal/locales.js +0 -20
  185. package/es/components/booking/editBookingModal/mock.d.ts +0 -807
  186. package/es/components/booking/editBookingModal/mock.js +0 -2993
  187. package/es/components/booking/editBookingModal/serve.d.ts +0 -51
  188. package/es/components/booking/editBookingModal/serve.js +0 -288
  189. package/es/components/booking/editBookingModal/type.d.ts +0 -12
  190. package/es/components/booking/editBookingModal/type.js +0 -1
  191. package/es/components/booking/editBookingModal/utils.d.ts +0 -12
  192. package/es/components/booking/editBookingModal/utils.js +0 -157
  193. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  194. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
  195. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  196. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
  197. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  198. package/es/components/stepController/components/Content/index.d.ts +0 -7
  199. package/es/components/stepController/components/Content/index.js +0 -9
  200. package/es/components/stepController/components/Content/index.less +0 -8
  201. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  202. package/es/components/stepController/components/Footer/index.js +0 -15
  203. package/es/components/stepController/components/Footer/index.less +0 -39
  204. package/es/components/stepController/components/Header/index.d.ts +0 -20
  205. package/es/components/stepController/components/Header/index.js +0 -97
  206. package/es/components/stepController/components/Header/index.less +0 -21
  207. package/es/components/stepController/index.d.ts +0 -5
  208. package/es/components/stepController/index.js +0 -64
  209. package/es/components/stepController/index.less +0 -11
  210. package/es/components/stepController/locales.d.ts +0 -27
  211. package/es/components/stepController/locales.js +0 -32
  212. package/es/components/stepController/types.d.ts +0 -23
  213. package/es/components/stepController/types.js +0 -1
  214. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  215. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  216. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  217. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  218. package/es/hooks/useWindowSize.d.ts +0 -5
  219. package/es/hooks/useWindowSize.js +0 -26
  220. package/lib/components/booking/editBookingModal/index.d.ts +0 -5
  221. package/lib/components/booking/editBookingModal/index.js +0 -363
  222. package/lib/components/booking/editBookingModal/index.less +0 -8
  223. package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
  224. package/lib/components/booking/editBookingModal/locales.js +0 -44
  225. package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
  226. package/lib/components/booking/editBookingModal/mock.js +0 -3314
  227. package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
  228. package/lib/components/booking/editBookingModal/serve.js +0 -178
  229. package/lib/components/booking/editBookingModal/type.d.ts +0 -12
  230. package/lib/components/booking/editBookingModal/type.js +0 -17
  231. package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
  232. package/lib/components/booking/editBookingModal/utils.js +0 -158
  233. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  234. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
  235. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  236. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
  237. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  238. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  239. package/lib/components/stepController/components/Content/index.js +0 -40
  240. package/lib/components/stepController/components/Content/index.less +0 -8
  241. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  242. package/lib/components/stepController/components/Footer/index.js +0 -49
  243. package/lib/components/stepController/components/Footer/index.less +0 -39
  244. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  245. package/lib/components/stepController/components/Header/index.js +0 -104
  246. package/lib/components/stepController/components/Header/index.less +0 -21
  247. package/lib/components/stepController/index.d.ts +0 -5
  248. package/lib/components/stepController/index.js +0 -89
  249. package/lib/components/stepController/index.less +0 -11
  250. package/lib/components/stepController/locales.d.ts +0 -27
  251. package/lib/components/stepController/locales.js +0 -50
  252. package/lib/components/stepController/types.d.ts +0 -23
  253. package/lib/components/stepController/types.js +0 -17
  254. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  255. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  256. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  257. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  258. package/lib/hooks/useWindowSize.d.ts +0 -5
  259. package/lib/hooks/useWindowSize.js +0 -51
  260. package/lowcode/edit-booking-modal/meta.ts +0 -53
  261. package/lowcode/step-controller/meta.ts +0 -88
@@ -19,21 +19,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/components/Sales/Resource/serve.ts
20
20
  var serve_exports = {};
21
21
  __export(serve_exports, {
22
- getResourceListApi: () => getResourceListApi,
23
- getSpecialResourceListApi: () => getSpecialResourceListApi
22
+ getResourceListApi: () => getResourceListApi
24
23
  });
25
24
  module.exports = __toCommonJS(serve_exports);
26
25
  var import_utils = require("../../../utils");
27
26
  var getResourceListApi = (params) => {
28
27
  return import_utils.request.getRequest().get("/h5/form/data/v1", params, { useCache: true });
29
28
  };
30
- var getSpecialResourceListApi = (params) => {
31
- return import_utils.request.getRequest().get("/h5/eventbookingv2/item/specify-resources", params, {
32
- useCache: true
33
- });
34
- };
35
29
  // Annotate the CommonJS export names for ESM import in node:
36
30
  0 && (module.exports = {
37
- getResourceListApi,
38
- getSpecialResourceListApi
31
+ getResourceListApi
39
32
  });
@@ -1,5 +1,5 @@
1
1
  .appointment-cart-item-wrap {
2
- height: calc(var(--vh, 1vh) * 100 - 100px);
2
+ height: calc(100vh - 100px);
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
 
@@ -39,7 +39,7 @@
39
39
  flex-direction: column;
40
40
  align-items: start;
41
41
 
42
- > div {
42
+ >div {
43
43
  display: flex;
44
44
  align-items: center;
45
45
  justify-content: space-between;
@@ -105,4 +105,4 @@
105
105
  flex: none;
106
106
  z-index: 10;
107
107
  }
108
- }
108
+ }
@@ -107,7 +107,7 @@
107
107
  margin-top: 0;
108
108
 
109
109
  .appointment-cart-item-wrap {
110
- height: calc(var(--vh, 1vh) * 100 - 16px) !important;
110
+ height: calc(100vh - 16px) !important;
111
111
  }
112
112
  }
113
113
  }
@@ -74,7 +74,7 @@ var Header = () => {
74
74
  return ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.description) || "";
75
75
  }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, currentSelectedResources]);
76
76
  const handleBack = async () => {
77
- var _a2;
77
+ var _a2, _b;
78
78
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
79
79
  const types = {
80
80
  "select-time": "time",
@@ -89,7 +89,8 @@ var Header = () => {
89
89
  }
90
90
  if (key === "select-service") {
91
91
  appointmentBooking.clearCart();
92
- if (appointmentBooking.isCartHasDurationProduct()) {
92
+ const type = await checkProductType((_b = carts == null ? void 0 : carts[0]) == null ? void 0 : _b.id);
93
+ if (type === "duration") {
93
94
  appointmentBooking.deleteCartItemInfo("time");
94
95
  }
95
96
  }
@@ -74,7 +74,9 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
74
74
  let type = "";
75
75
  if (!isRetailTemplate) {
76
76
  type = await checkProductType(item == null ? void 0 : item.id);
77
- appointmentBooking.openProductDetail(item.id);
77
+ if (type === "session") {
78
+ appointmentBooking.openProductDetail(item.id);
79
+ }
78
80
  }
79
81
  utils == null ? void 0 : utils.action({
80
82
  type: "pisell1.productDetail",
@@ -84,10 +86,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
84
86
  },
85
87
  callback: async (data) => {
86
88
  var _a, _b;
87
- if (data.isCancel) {
88
- appointmentBooking.closeProductDetail();
89
- return;
90
- }
91
89
  const product = {
92
90
  ...data,
93
91
  options: (data == null ? void 0 : data.option) || []
@@ -98,6 +96,13 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
98
96
  appointmentBooking.storeProduct(product);
99
97
  return;
100
98
  }
99
+ if (data == null ? void 0 : data.isCancel) {
100
+ if (type === "session") {
101
+ appointmentBooking.closeProductDetail();
102
+ appointmentBooking.getAvailableDate();
103
+ }
104
+ return;
105
+ }
101
106
  const session = data == null ? void 0 : data.session;
102
107
  if (session) {
103
108
  const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
@@ -109,6 +114,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
109
114
  endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
110
115
  }
111
116
  });
117
+ appointmentBooking.closeProductDetail();
112
118
  await appointmentBooking.getAvailableDate({
113
119
  startDate,
114
120
  endDate
@@ -126,23 +132,16 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
126
132
  await appointmentBooking.getAvailableDate();
127
133
  }
128
134
  }
129
- appointmentBooking.closeProductDetail();
130
135
  if (isDateSelectedFirst) {
131
136
  const index = (currentStep == null ? void 0 : currentStep.index) + 2;
132
- if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
133
- const { stepList } = (0, import_hooks.useAppointmentBookingStep)();
134
- const hasResourceStep = stepList == null ? void 0 : stepList.find(
135
- (item2) => (item2 == null ? void 0 : item2.key) === "select-resource"
137
+ if (type === "duration") {
138
+ const description = import_utils.locales.getText(
139
+ "pisell2.appointment.select.time"
140
+ );
141
+ appointmentBooking.addStep(
142
+ { index, key: "select-time", description },
143
+ "select-resource"
136
144
  );
137
- if (hasResourceStep) {
138
- const description = import_utils.locales.getText(
139
- "pisell2.appointment.select.time"
140
- );
141
- appointmentBooking.addStep(
142
- { index, key: "select-time", description },
143
- "select-resource"
144
- );
145
- }
146
145
  } else {
147
146
  removeStep("select-time");
148
147
  }
@@ -140,7 +140,7 @@ var VoucherCard = (props) => {
140
140
  setCode("");
141
141
  } else {
142
142
  (0, import_materials.PisellToast)({
143
- content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
143
+ content: val.type === "server" ? import_utils.locales.getText("pisell2.text.goodpass.code-invalid") : import_utils.locales.getText("pisell2.text.goodpass.code-invalid-cart")
144
144
  });
145
145
  }
146
146
  };
@@ -58,17 +58,6 @@ var AppointmentBooking = () => {
58
58
  }
59
59
  });
60
60
  }, []);
61
- (0, import_react.useEffect)(() => {
62
- const setRealVH = () => {
63
- const vh = window.innerHeight * 0.01;
64
- document.documentElement.style.setProperty("--vh", `${vh}px`);
65
- };
66
- setRealVH();
67
- window.addEventListener("resize", setRealVH);
68
- return () => {
69
- window.removeEventListener("resize", setRealVH);
70
- };
71
- }, []);
72
61
  return /* @__PURE__ */ import_react.default.createElement(
73
62
  "div",
74
63
  {
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  background: #ffffff;
6
- height: calc(var(--vh, 1vh) * 100);
6
+ height: 100vh;
7
7
  overflow-y: auto;
8
8
 
9
9
  .pisell-section-headers {
@@ -114,6 +114,7 @@ declare const _default: {
114
114
  'pisell2.text.goodpass.code': string;
115
115
  'pisell2.text.goodpass.enter-code': string;
116
116
  'pisell2.text.goodpass.code-invalid': string;
117
+ 'pisell2.text.goodpass.code-invalid-cart': string;
117
118
  'pisell2.text.goodpass.login': string;
118
119
  'pisell2.text.goodpass.login-tip': string;
119
120
  };
@@ -232,6 +233,7 @@ declare const _default: {
232
233
  'pisell2.text.goodpass.code': string;
233
234
  'pisell2.text.goodpass.enter-code': string;
234
235
  'pisell2.text.goodpass.code-invalid': string;
236
+ 'pisell2.text.goodpass.code-invalid-cart': string;
235
237
  'pisell2.text.goodpass.login': string;
236
238
  'pisell2.text.goodpass.login-tip': string;
237
239
  };
@@ -350,6 +352,7 @@ declare const _default: {
350
352
  'pisell2.text.goodpass.code': string;
351
353
  'pisell2.text.goodpass.enter-code': string;
352
354
  'pisell2.text.goodpass.code-invalid': string;
355
+ 'pisell2.text.goodpass.code-invalid-cart': string;
353
356
  'pisell2.text.goodpass.login': string;
354
357
  'pisell2.text.goodpass.login-tip': string;
355
358
  };
@@ -138,6 +138,7 @@ var locales_default = {
138
138
  "pisell2.text.goodpass.code": "Code",
139
139
  "pisell2.text.goodpass.enter-code": "Enter Code",
140
140
  "pisell2.text.goodpass.code-invalid": "Current code is invalid",
141
+ "pisell2.text.goodpass.code-invalid-cart": "No eligible items in the cart",
141
142
  "pisell2.text.goodpass.login": "Login",
142
143
  "pisell2.text.goodpass.login-tip": " for member benefit Or use account credit"
143
144
  },
@@ -256,6 +257,7 @@ var locales_default = {
256
257
  "pisell2.text.goodpass.code": "券码",
257
258
  "pisell2.text.goodpass.enter-code": "请输入券码",
258
259
  "pisell2.text.goodpass.code-invalid": "当前券码不可用",
260
+ "pisell2.text.goodpass.code-invalid-cart": "当前购物车中无可用商品",
259
261
  "pisell2.text.goodpass.login": "登录",
260
262
  "pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分"
261
263
  },
@@ -374,6 +376,7 @@ var locales_default = {
374
376
  "pisell2.text.goodpass.code": "券碼",
375
377
  "pisell2.text.goodpass.enter-code": "請輸入券碼",
376
378
  "pisell2.text.goodpass.code-invalid": "當前券碼不可用",
379
+ "pisell2.text.goodpass.code-invalid-cart": "當前購物車中無可用商品",
377
380
  "pisell2.text.goodpass.login": "登錄",
378
381
  "pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分"
379
382
  }
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -27,7 +27,6 @@ export interface ResourceItem {
27
27
  * @Author: jinglin.tan
28
28
  */
29
29
  export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
30
- export declare const checkResourcesFormat: (resources: any[], service: any, isChild?: boolean) => any[];
31
30
  /**
32
31
  * @title: 格式化商品单价
33
32
  * @description:
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var utils_exports = {};
31
31
  __export(utils_exports, {
32
32
  checkHolderIsError: () => checkHolderIsError,
33
- checkResourcesFormat: () => checkResourcesFormat,
34
33
  checkSubResourcesCapacity: () => checkSubResourcesCapacity,
35
34
  formatProductBundle: () => formatProductBundle,
36
35
  formatProductOption: () => formatProductOption,
@@ -477,7 +476,6 @@ var checkHolderIsError = (state) => {
477
476
  // Annotate the CommonJS export names for ESM import in node:
478
477
  0 && (module.exports = {
479
478
  checkHolderIsError,
480
- checkResourcesFormat,
481
479
  checkSubResourcesCapacity,
482
480
  formatProductBundle,
483
481
  formatProductOption,
@@ -41,8 +41,8 @@ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContex
41
41
  var import_materials = require("@pisell/materials");
42
42
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
43
43
  var import_index = require("./index.less");
44
- var import_ahooks = require("ahooks");
45
44
  var import_utils2 = require("./utils");
45
+ var import_ahooks = require("ahooks");
46
46
  var ShopDiscountHooks = {
47
47
  onInited: "shopDiscount:onInited",
48
48
  onDestroy: "shopDiscount:onDestroy",
@@ -67,13 +67,17 @@ var VoucherCard = (props) => {
67
67
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
68
68
  const shopDiscount = pisellos.getModule("shopDiscount");
69
69
  services = state.service;
70
- (0, import_ahooks.useDebounceEffect)(() => {
71
- if (isBooking4Shop) {
72
- shopDiscount.setCustomer(state.client.value);
70
+ (0, import_ahooks.useDebounceEffect)(
71
+ () => {
72
+ if (isBooking4Shop) {
73
+ shopDiscount.setCustomer(state.client.value);
74
+ }
75
+ },
76
+ [(_b = state.client.value) == null ? void 0 : _b.id, isBooking4Shop],
77
+ {
78
+ wait: 200
73
79
  }
74
- }, [(_b = state.client.value) == null ? void 0 : _b.id, isBooking4Shop], {
75
- wait: 200
76
- });
80
+ );
77
81
  (0, import_react.useEffect)(() => {
78
82
  if (isBooking4Shop) {
79
83
  shopDiscount.setProductList([
@@ -116,7 +120,9 @@ var VoucherCard = (props) => {
116
120
  }, [state.addons.value]);
117
121
  const disabled = (0, import_react.useMemo)(() => {
118
122
  var _a2;
119
- if (["paid", "partially_paid"].includes((_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_status) && [...addonsMemo, ...serviceMemo].every((item) => item.booking_id)) {
123
+ if (["paid", "partially_paid"].includes(
124
+ (_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_status
125
+ ) && [...addonsMemo, ...serviceMemo].every((item) => item.booking_id)) {
120
126
  return true;
121
127
  }
122
128
  return false;
@@ -173,9 +179,15 @@ var VoucherCard = (props) => {
173
179
  );
174
180
  return () => {
175
181
  shopDiscount.clear();
176
- pisellos.effects.off(ShopDiscountHooks.onCustomerChange, onScanCustomerChange);
182
+ pisellos.effects.off(
183
+ ShopDiscountHooks.onCustomerChange,
184
+ onScanCustomerChange
185
+ );
177
186
  pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
178
- pisellos.effects.off(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
187
+ pisellos.effects.off(
188
+ ShopDiscountHooks.onDiscountListChange,
189
+ onDiscountListChange
190
+ );
179
191
  };
180
192
  }, [state.bookingId, isBooking4Shop, fn]);
181
193
  const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
@@ -262,8 +274,8 @@ var VoucherCard = (props) => {
262
274
  import_materials.PisellGoodPassCard,
263
275
  {
264
276
  style: { width: "100%" },
265
- dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
266
277
  mixedSort,
278
+ dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
267
279
  onChange: (val) => {
268
280
  const shopDiscount2 = pisellos.getModule("shopDiscount");
269
281
  const detail = shopDiscount2.setDiscountSelected({
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
247
+ export declare const updateServicePrice: (state: any) => Promise<any> | never[];
@@ -422,7 +422,7 @@ var getErrorMessageInfo2 = (errorList) => {
422
422
  };
423
423
  var getAllErrorList = (item) => {
424
424
  const { resourceMaps } = item._data || {};
425
- const { resource = {} } = item._extend || {};
425
+ const { resource } = item._extend || {};
426
426
  const errorList = [];
427
427
  Object.entries(resource).forEach(([key, value]) => {
428
428
  value.forEach((val) => {
@@ -437,7 +437,7 @@ var getAllErrorList = (item) => {
437
437
  var mapListItems = (items) => items.map((item) => ({
438
438
  id: item.id || item.form_record_id,
439
439
  label: item.labelText,
440
- isError: !item.usable || item.unbound
440
+ isError: !item.usable
441
441
  }));
442
442
  var getIsSubjectRequire = (state) => {
443
443
  var _a, _b, _c, _d, _e, _f, _g;
@@ -0,0 +1,50 @@
1
+ export declare const getIsBundleOrCombination: (productDetail: any) => boolean;
2
+ export declare const uniqueByField: (arr: any[], field: string) => any[];
3
+ export declare const moveItemToFront: (arr: any[], targetId: string | number) => any[];
4
+ /**
5
+ * @title: 判断两个时间是否在同一个时间段内
6
+ * @description:
7
+ * @param {number} time1 开始时间
8
+ * @param {number} time2 结束时间
9
+ * @param {number} interval 时间间隔
10
+ * @return {*}
11
+ * @Author: zhiwei.Wang
12
+ * @Date: 2024-08-13 19:37
13
+ */
14
+ export declare const isInterval: (time1: number, time2: number, interval?: number) => boolean;
15
+ /**
16
+ * @title: 根据时间间隔格式化服务列表
17
+ * @description: 防止短时间内添加多个相同服务, 如果两个服务的时间间隔小于1秒,则合并为一个服务
18
+ * @param {any} list 服务列表
19
+ * @return {*}
20
+ * @Author: zhiwei.Wang
21
+ * @Date: 2024-08-13 19:36
22
+ */
23
+ export declare const formatServiceListByTime: (list: any[]) => any[];
24
+ export declare const isBooking4Shop: (shopId: number, renderType?: string) => boolean;
25
+ declare type DataEntry = {
26
+ total: number;
27
+ origin_total: number;
28
+ num: number;
29
+ quotation_id: number;
30
+ start_date: string;
31
+ end_date: string;
32
+ };
33
+ declare type ResultStructure = Record<string, Record<string, any>>;
34
+ export declare const getMultiDayPrices: (data: DataEntry[]) => ResultStructure;
35
+ /**
36
+ * @title: 是否是跨日预约
37
+ * @description:
38
+ * @param {number} shopId
39
+ * @return {*}
40
+ * @Author: WangHan
41
+ * @Date: 2024-11-29 11:19
42
+ */
43
+ export declare const isDayBooking: (shopId: number) => boolean;
44
+ export declare const isOpenAddTime: (state: any) => boolean;
45
+ export declare const isShowAddTime: (state: any, currentService: any) => boolean;
46
+ export declare const editSessionProduct: (cacheItem: any, session: any) => {
47
+ duration: any;
48
+ start_time: any;
49
+ } | undefined;
50
+ export {};
@@ -69,16 +69,6 @@ export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
69
69
  * @Date: 2024-09-19 20:26
70
70
  */
71
71
  export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any;
72
- /**
73
- * @title: 将商品内关联的资源id还原成数据
74
- * @description:
75
- * @param {any} resourcesOriginMap
76
- * @param {any} cacheItem
77
- * @return {*}
78
- * @Author: zhiwei.Wang
79
- * @Date: 2024-09-19 20:23
80
- */
81
- export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
82
72
  /**
83
73
  * @title: 预生成服务的 extend
84
74
  * @description:
@@ -33,7 +33,6 @@ __export(utils_exports, {
33
33
  getDurationProps: () => getDurationProps,
34
34
  getFlexibleOption: () => getFlexibleOption,
35
35
  getProductExtend: () => getProductExtend,
36
- getResourceByIds: () => getResourceByIds,
37
36
  getTimeObj: () => getTimeObj,
38
37
  getTimeSlices: () => getTimeSlices,
39
38
  getUsableTime: () => getUsableTime,
@@ -178,12 +177,8 @@ var formatResources = ({ cacheItem, resourcesOrigin, id }) => {
178
177
  let _item = (0, import_lodash.cloneDeep)(item);
179
178
  _item.renderList = _item.renderList.map((d) => {
180
179
  let res = (0, import_utilsByBooking.formatResource)(d, _cacheItem, (newData) => {
181
- let unbound = !item.optional_resource.includes(newData.id) && !item.default_resource.includes(newData.id) && newData.id !== 0;
182
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "resource-option-label-text" }, newData.labelText), (!newData.usable || unbound) && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
180
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), newData.labelText, !newData.usable && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
183
181
  });
184
- if (!item.optional_resource.includes(d.id) && !item.default_resource.includes(d.id) && d.id !== 0) {
185
- res.unbound = true;
186
- }
187
182
  renderListMaps[res.id] = res;
188
183
  return res;
189
184
  }).sort((a, b) => b.usable ? 1 : -1);
@@ -285,17 +280,12 @@ var setDefaultCapacitys = ({ capacitys, cacheItem }) => {
285
280
  }
286
281
  return [{ id: 0, value: 1, name: "" }];
287
282
  };
288
- var getResourceByIds = (resourcesOriginMap, cacheItem, extraParams) => {
283
+ var getResourceByIds = (resourcesOriginMap, cacheItem) => {
289
284
  var _a;
290
285
  let _resources = [...((_a = cacheItem == null ? void 0 : cacheItem.product_resource) == null ? void 0 : _a.resources) || []];
291
- const { extraResources = [] } = extraParams || {};
292
286
  _resources = _resources.filter((d) => d.status == 1);
293
287
  for (let item of _resources) {
294
288
  const form_id = item.id;
295
- let extraResourceIds = extraResources.filter((_extraItem) => {
296
- return _extraItem.form_id === form_id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
297
- }).map((_extraItem) => _extraItem.id);
298
- extraResourceIds = Array.from(new Set(extraResourceIds));
299
289
  item.optional_resource = (item.optional_resource || []).filter(
300
290
  (d) => item.default_resource.indexOf(d) == -1
301
291
  );
@@ -318,7 +308,7 @@ var getResourceByIds = (resourcesOriginMap, cacheItem, extraParams) => {
318
308
  }
319
309
  };
320
310
  };
321
- let optional_resource = [...item.optional_resource, ...extraResourceIds].map((d) => {
311
+ let optional_resource = item.optional_resource.map((d) => {
322
312
  if (!resourcesOriginMap[d]) {
323
313
  return null;
324
314
  }
@@ -427,21 +417,9 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
427
417
  _cacheItem._data.capacitys = cacheItem.capacity;
428
418
  }
429
419
  if (!_cacheItem._data.resourcesOrigin) {
430
- const extraResources = [];
431
- if (Array.isArray(_cacheItem._extend.event_resources)) {
432
- _cacheItem._extend.event_resources.forEach((_item) => {
433
- extraResources.push({
434
- form_id: _item.form_id,
435
- id: _item.relation_id
436
- });
437
- });
438
- }
439
420
  _cacheItem._data.resourcesOrigin = getResourceByIds(
440
421
  resourcesOriginMap,
441
- cacheItem,
442
- {
443
- extraResources
444
- }
422
+ cacheItem
445
423
  );
446
424
  }
447
425
  if (!_cacheItem._data.resources) {
@@ -480,7 +458,6 @@ var transServiceList = (list) => {
480
458
  getDurationProps,
481
459
  getFlexibleOption,
482
460
  getProductExtend,
483
- getResourceByIds,
484
461
  getTimeObj,
485
462
  getTimeSlices,
486
463
  getUsableTime,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../info/service/addTimeModal/index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;