@pisell/private-materials 3.2.17 → 3.2.19

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 (144) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +19 -10
  12. package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +10 -20
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +73 -0
  14. package/es/components/appointmentBooking/components/Content/index.js +29 -15
  15. package/es/components/appointmentBooking/components/Date/index.js +77 -12
  16. package/es/components/appointmentBooking/components/Date/index.less +1 -0
  17. package/es/components/appointmentBooking/components/Footer/index.js +3 -3
  18. package/es/components/appointmentBooking/components/Guest/index.d.ts +3 -0
  19. package/es/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +50 -59
  20. package/es/components/appointmentBooking/components/Header/index.js +6 -4
  21. package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  22. package/es/components/appointmentBooking/components/Resource/index.js +62 -29
  23. package/es/components/appointmentBooking/components/Resource/index.less +6 -0
  24. package/es/components/appointmentBooking/components/Services/index.js +25 -135
  25. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  26. package/es/components/appointmentBooking/components/TimeSlicing/index.js +57 -755
  27. package/es/components/appointmentBooking/context.d.ts +23 -0
  28. package/es/components/appointmentBooking/context.js +71 -0
  29. package/es/components/appointmentBooking/hooks.d.ts +6 -8
  30. package/es/components/appointmentBooking/hooks.js +119 -62
  31. package/es/components/appointmentBooking/index.js +2 -3
  32. package/es/components/appointmentBooking/locales.d.ts +12 -0
  33. package/es/components/appointmentBooking/locales.js +21 -3
  34. package/es/components/appointmentBooking/utils.d.ts +12 -0
  35. package/es/components/appointmentBooking/utils.js +70 -0
  36. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +18 -16
  37. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +7 -11
  38. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.js +22 -21
  39. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +1 -1
  40. package/lib/components/appointmentBooking/components/Content/index.js +26 -14
  41. package/lib/components/appointmentBooking/components/Date/index.js +53 -16
  42. package/lib/components/appointmentBooking/components/Date/index.less +1 -0
  43. package/lib/components/appointmentBooking/components/Footer/index.js +3 -3
  44. package/lib/components/appointmentBooking/components/Guest/index.d.ts +3 -0
  45. package/lib/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +43 -52
  46. package/lib/components/appointmentBooking/components/Header/index.js +2 -3
  47. package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  48. package/lib/components/appointmentBooking/components/Resource/index.js +55 -41
  49. package/lib/components/appointmentBooking/components/Resource/index.less +6 -0
  50. package/lib/components/appointmentBooking/components/Services/index.js +15 -155
  51. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  52. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +27 -940
  53. package/lib/components/appointmentBooking/context.d.ts +23 -0
  54. package/lib/components/appointmentBooking/context.js +85 -0
  55. package/lib/components/appointmentBooking/hooks.d.ts +6 -8
  56. package/lib/components/appointmentBooking/hooks.js +44 -20
  57. package/lib/components/appointmentBooking/index.js +2 -5
  58. package/lib/components/appointmentBooking/locales.d.ts +12 -0
  59. package/lib/components/appointmentBooking/locales.js +15 -3
  60. package/lib/components/appointmentBooking/utils.d.ts +12 -0
  61. package/lib/components/appointmentBooking/utils.js +62 -2
  62. package/package.json +2 -2
  63. package/es/components/appointmentBooking/components/Information/index.d.ts +0 -3
  64. package/es/components/appointmentBooking/components/Information/index.js +0 -178
  65. package/es/components/appointmentBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  66. package/es/components/appointmentBooking/components/Provider/Cart/Item/index.js +0 -68
  67. package/es/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
  68. package/es/components/appointmentBooking/components/Provider/Content/index.js +0 -64
  69. package/es/components/appointmentBooking/components/Provider/Content/index.less +0 -31
  70. package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
  71. package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -34
  72. package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
  73. package/es/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
  74. package/es/components/appointmentBooking/components/Provider/Event/index.js +0 -93
  75. package/es/components/appointmentBooking/components/Provider/Event/index.less +0 -20
  76. package/es/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
  77. package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
  78. package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -34
  79. package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
  80. package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
  81. package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -27
  82. package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
  83. package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
  84. package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -31
  85. package/es/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
  86. package/es/components/appointmentBooking/components/Provider/Resource/index.js +0 -79
  87. package/es/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
  88. package/es/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
  89. package/es/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -90
  90. package/es/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  91. package/es/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -77
  92. package/es/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
  93. package/es/components/booking/info/service2/utils.d.ts +0 -240
  94. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  95. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  96. package/lib/components/appointmentBooking/components/Information/index.d.ts +0 -3
  97. package/lib/components/appointmentBooking/components/Information/index.js +0 -151
  98. package/lib/components/appointmentBooking/components/Information/index.less +0 -92
  99. package/lib/components/appointmentBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  100. package/lib/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
  101. package/lib/components/appointmentBooking/components/Provider/Content/index.js +0 -90
  102. package/lib/components/appointmentBooking/components/Provider/Content/index.less +0 -31
  103. package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
  104. package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -60
  105. package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
  106. package/lib/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
  107. package/lib/components/appointmentBooking/components/Provider/Event/index.js +0 -100
  108. package/lib/components/appointmentBooking/components/Provider/Event/index.less +0 -20
  109. package/lib/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
  110. package/lib/components/appointmentBooking/components/Provider/Information/index.less +0 -92
  111. package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
  112. package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -67
  113. package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
  114. package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
  115. package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -57
  116. package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
  117. package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
  118. package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -62
  119. package/lib/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
  120. package/lib/components/appointmentBooking/components/Provider/Resource/index.js +0 -90
  121. package/lib/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
  122. package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
  123. package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -97
  124. package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  125. package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -69
  126. package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
  127. package/lib/components/booking/info/service2/utils.d.ts +0 -240
  128. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  129. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  130. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
  131. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
  132. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
  133. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
  134. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
  135. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +0 -0
  136. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
  137. /package/es/components/appointmentBooking/components/{Information → Guest}/index.less +0 -0
  138. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
  139. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
  140. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
  141. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
  142. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
  143. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
  144. /package/{es/components/appointmentBooking/components/Provider/Information → lib/components/appointmentBooking/components/Guest}/index.less +0 -0
@@ -34,955 +34,42 @@ __export(TimeSlicing_exports, {
34
34
  module.exports = __toCommonJS(TimeSlicing_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_materials = require("@pisell/materials");
37
- var import_dayjs = __toESM(require("dayjs"));
37
+ var import_context = require("../../context");
38
38
  var import_index = require("./index.less");
39
- var Resource = () => {
39
+ var Resource = ({ params }) => {
40
40
  const [selectedResource, setSelectedResource] = (0, import_react.useState)("");
41
- const lists = [
42
- {
43
- start_time: "2025-04-11 13:10",
44
- end_time: "2025-04-11 13:40",
45
- sold_out: 0,
46
- order_count: 0,
47
- max_participants_limit: 0,
48
- max_participants_type: "no-limit",
49
- product_times: [
50
- {
51
- product_id: 60535,
52
- start_time: "2025-04-11 13:10",
53
- end_time: "2025-04-11 13:40"
54
- }
55
- ]
56
- },
57
- {
58
- start_time: "2025-04-11 13:20",
59
- end_time: "2025-04-11 13:50",
60
- sold_out: 0,
61
- order_count: 0,
62
- max_participants_limit: 0,
63
- max_participants_type: "no-limit",
64
- product_times: [
65
- {
66
- product_id: 60535,
67
- start_time: "2025-04-11 13:20",
68
- end_time: "2025-04-11 13:50"
69
- }
70
- ]
71
- },
72
- {
73
- start_time: "2025-04-11 13:30",
74
- end_time: "2025-04-11 14:00",
75
- sold_out: 0,
76
- order_count: 0,
77
- max_participants_limit: 0,
78
- max_participants_type: "no-limit",
79
- product_times: [
80
- {
81
- product_id: 60535,
82
- start_time: "2025-04-11 13:30",
83
- end_time: "2025-04-11 14:00"
84
- }
85
- ]
86
- },
87
- {
88
- start_time: "2025-04-11 13:40",
89
- end_time: "2025-04-11 14:10",
90
- sold_out: 0,
91
- order_count: 0,
92
- max_participants_limit: 0,
93
- max_participants_type: "no-limit",
94
- product_times: [
95
- {
96
- product_id: 60535,
97
- start_time: "2025-04-11 13:40",
98
- end_time: "2025-04-11 14:10"
99
- }
100
- ]
101
- },
102
- {
103
- start_time: "2025-04-11 13:50",
104
- end_time: "2025-04-11 14:20",
105
- sold_out: 0,
106
- order_count: 0,
107
- max_participants_limit: 0,
108
- max_participants_type: "no-limit",
109
- product_times: [
110
- {
111
- product_id: 60535,
112
- start_time: "2025-04-11 13:50",
113
- end_time: "2025-04-11 14:20"
114
- }
115
- ]
116
- },
117
- {
118
- start_time: "2025-04-11 14:00",
119
- end_time: "2025-04-11 14:30",
120
- sold_out: 0,
121
- order_count: 0,
122
- max_participants_limit: 0,
123
- max_participants_type: "no-limit",
124
- product_times: [
125
- {
126
- product_id: 60535,
127
- start_time: "2025-04-11 14:00",
128
- end_time: "2025-04-11 14:30"
129
- }
130
- ]
131
- },
132
- {
133
- start_time: "2025-04-11 14:10",
134
- end_time: "2025-04-11 14:40",
135
- sold_out: 0,
136
- order_count: 0,
137
- max_participants_limit: 0,
138
- max_participants_type: "no-limit",
139
- product_times: [
140
- {
141
- product_id: 60535,
142
- start_time: "2025-04-11 14:10",
143
- end_time: "2025-04-11 14:40"
144
- }
145
- ]
146
- },
147
- {
148
- start_time: "2025-04-11 14:20",
149
- end_time: "2025-04-11 14:50",
150
- sold_out: 0,
151
- order_count: 0,
152
- max_participants_limit: 0,
153
- max_participants_type: "no-limit",
154
- product_times: [
155
- {
156
- product_id: 60535,
157
- start_time: "2025-04-11 14:20",
158
- end_time: "2025-04-11 14:50"
159
- }
160
- ]
161
- },
162
- {
163
- start_time: "2025-04-11 14:30",
164
- end_time: "2025-04-11 15:00",
165
- sold_out: 0,
166
- order_count: 0,
167
- max_participants_limit: 0,
168
- max_participants_type: "no-limit",
169
- product_times: [
170
- {
171
- product_id: 60535,
172
- start_time: "2025-04-11 14:30",
173
- end_time: "2025-04-11 15:00"
174
- }
175
- ]
176
- },
177
- {
178
- start_time: "2025-04-11 14:40",
179
- end_time: "2025-04-11 15:10",
180
- sold_out: 0,
181
- order_count: 0,
182
- max_participants_limit: 0,
183
- max_participants_type: "no-limit",
184
- product_times: [
185
- {
186
- product_id: 60535,
187
- start_time: "2025-04-11 14:40",
188
- end_time: "2025-04-11 15:10"
189
- }
190
- ]
191
- },
192
- {
193
- start_time: "2025-04-11 14:50",
194
- end_time: "2025-04-11 15:20",
195
- sold_out: 0,
196
- order_count: 0,
197
- max_participants_limit: 0,
198
- max_participants_type: "no-limit",
199
- product_times: [
200
- {
201
- product_id: 60535,
202
- start_time: "2025-04-11 14:50",
203
- end_time: "2025-04-11 15:20"
204
- }
205
- ]
206
- },
207
- {
208
- start_time: "2025-04-11 15:00",
209
- end_time: "2025-04-11 15:30",
210
- sold_out: 0,
211
- order_count: 0,
212
- max_participants_limit: 0,
213
- max_participants_type: "no-limit",
214
- product_times: [
215
- {
216
- product_id: 60535,
217
- start_time: "2025-04-11 15:00",
218
- end_time: "2025-04-11 15:30"
219
- }
220
- ]
221
- },
222
- {
223
- start_time: "2025-04-11 15:10",
224
- end_time: "2025-04-11 15:40",
225
- sold_out: 0,
226
- order_count: 0,
227
- max_participants_limit: 0,
228
- max_participants_type: "no-limit",
229
- product_times: [
230
- {
231
- product_id: 60535,
232
- start_time: "2025-04-11 15:10",
233
- end_time: "2025-04-11 15:40"
234
- }
235
- ]
236
- },
237
- {
238
- start_time: "2025-04-11 15:20",
239
- end_time: "2025-04-11 15:50",
240
- sold_out: 0,
241
- order_count: 0,
242
- max_participants_limit: 0,
243
- max_participants_type: "no-limit",
244
- product_times: [
245
- {
246
- product_id: 60535,
247
- start_time: "2025-04-11 15:20",
248
- end_time: "2025-04-11 15:50"
249
- }
250
- ]
251
- },
252
- {
253
- start_time: "2025-04-11 15:30",
254
- end_time: "2025-04-11 16:00",
255
- sold_out: 0,
256
- order_count: 0,
257
- max_participants_limit: 0,
258
- max_participants_type: "no-limit",
259
- product_times: [
260
- {
261
- product_id: 60535,
262
- start_time: "2025-04-11 15:30",
263
- end_time: "2025-04-11 16:00"
264
- }
265
- ]
266
- },
267
- {
268
- start_time: "2025-04-11 15:40",
269
- end_time: "2025-04-11 16:10",
270
- sold_out: 0,
271
- order_count: 0,
272
- max_participants_limit: 0,
273
- max_participants_type: "no-limit",
274
- product_times: [
275
- {
276
- product_id: 60535,
277
- start_time: "2025-04-11 15:40",
278
- end_time: "2025-04-11 16:10"
279
- }
280
- ]
281
- },
282
- {
283
- start_time: "2025-04-11 15:50",
284
- end_time: "2025-04-11 16:20",
285
- sold_out: 0,
286
- order_count: 0,
287
- max_participants_limit: 0,
288
- max_participants_type: "no-limit",
289
- product_times: [
290
- {
291
- product_id: 60535,
292
- start_time: "2025-04-11 15:50",
293
- end_time: "2025-04-11 16:20"
294
- }
295
- ]
296
- },
297
- {
298
- start_time: "2025-04-11 16:00",
299
- end_time: "2025-04-11 16:30",
300
- sold_out: 0,
301
- order_count: 0,
302
- max_participants_limit: 0,
303
- max_participants_type: "no-limit",
304
- product_times: [
305
- {
306
- product_id: 60535,
307
- start_time: "2025-04-11 16:00",
308
- end_time: "2025-04-11 16:30"
309
- }
310
- ]
311
- },
312
- {
313
- start_time: "2025-04-11 16:10",
314
- end_time: "2025-04-11 16:40",
315
- sold_out: 0,
316
- order_count: 0,
317
- max_participants_limit: 0,
318
- max_participants_type: "no-limit",
319
- product_times: [
320
- {
321
- product_id: 60535,
322
- start_time: "2025-04-11 16:10",
323
- end_time: "2025-04-11 16:40"
324
- }
325
- ]
326
- },
327
- {
328
- start_time: "2025-04-11 16:20",
329
- end_time: "2025-04-11 16:50",
330
- sold_out: 0,
331
- order_count: 0,
332
- max_participants_limit: 0,
333
- max_participants_type: "no-limit",
334
- product_times: [
335
- {
336
- product_id: 60535,
337
- start_time: "2025-04-11 16:20",
338
- end_time: "2025-04-11 16:50"
339
- }
340
- ]
341
- },
342
- {
343
- start_time: "2025-04-11 16:30",
344
- end_time: "2025-04-11 17:00",
345
- sold_out: 0,
346
- order_count: 0,
347
- max_participants_limit: 0,
348
- max_participants_type: "no-limit",
349
- product_times: [
350
- {
351
- product_id: 60535,
352
- start_time: "2025-04-11 16:30",
353
- end_time: "2025-04-11 17:00"
354
- }
355
- ]
356
- },
357
- {
358
- start_time: "2025-04-11 16:40",
359
- end_time: "2025-04-11 17:10",
360
- sold_out: 0,
361
- order_count: 0,
362
- max_participants_limit: 0,
363
- max_participants_type: "no-limit",
364
- product_times: [
365
- {
366
- product_id: 60535,
367
- start_time: "2025-04-11 16:40",
368
- end_time: "2025-04-11 17:10"
369
- }
370
- ]
371
- },
372
- {
373
- start_time: "2025-04-11 16:50",
374
- end_time: "2025-04-11 17:20",
375
- sold_out: 0,
376
- order_count: 0,
377
- max_participants_limit: 0,
378
- max_participants_type: "no-limit",
379
- product_times: [
380
- {
381
- product_id: 60535,
382
- start_time: "2025-04-11 16:50",
383
- end_time: "2025-04-11 17:20"
384
- }
385
- ]
386
- },
387
- {
388
- start_time: "2025-04-11 17:00",
389
- end_time: "2025-04-11 17:30",
390
- sold_out: 0,
391
- order_count: 0,
392
- max_participants_limit: 0,
393
- max_participants_type: "no-limit",
394
- product_times: [
395
- {
396
- product_id: 60535,
397
- start_time: "2025-04-11 17:00",
398
- end_time: "2025-04-11 17:30"
399
- }
400
- ]
401
- },
402
- {
403
- start_time: "2025-04-11 17:10",
404
- end_time: "2025-04-11 17:40",
405
- sold_out: 0,
406
- order_count: 0,
407
- max_participants_limit: 0,
408
- max_participants_type: "no-limit",
409
- product_times: [
410
- {
411
- product_id: 60535,
412
- start_time: "2025-04-11 17:10",
413
- end_time: "2025-04-11 17:40"
414
- }
415
- ]
416
- },
417
- {
418
- start_time: "2025-04-11 17:20",
419
- end_time: "2025-04-11 17:50",
420
- sold_out: 0,
421
- order_count: 0,
422
- max_participants_limit: 0,
423
- max_participants_type: "no-limit",
424
- product_times: [
425
- {
426
- product_id: 60535,
427
- start_time: "2025-04-11 17:20",
428
- end_time: "2025-04-11 17:50"
429
- }
430
- ]
431
- },
432
- {
433
- start_time: "2025-04-11 17:30",
434
- end_time: "2025-04-11 18:00",
435
- sold_out: 0,
436
- order_count: 0,
437
- max_participants_limit: 0,
438
- max_participants_type: "no-limit",
439
- product_times: [
440
- {
441
- product_id: 60535,
442
- start_time: "2025-04-11 17:30",
443
- end_time: "2025-04-11 18:00"
444
- }
445
- ]
446
- },
447
- {
448
- start_time: "2025-04-11 17:40",
449
- end_time: "2025-04-11 18:10",
450
- sold_out: 0,
451
- order_count: 0,
452
- max_participants_limit: 0,
453
- max_participants_type: "no-limit",
454
- product_times: [
455
- {
456
- product_id: 60535,
457
- start_time: "2025-04-11 17:40",
458
- end_time: "2025-04-11 18:10"
459
- }
460
- ]
461
- },
462
- {
463
- start_time: "2025-04-11 17:50",
464
- end_time: "2025-04-11 18:20",
465
- sold_out: 0,
466
- order_count: 0,
467
- max_participants_limit: 0,
468
- max_participants_type: "no-limit",
469
- product_times: [
470
- {
471
- product_id: 60535,
472
- start_time: "2025-04-11 17:50",
473
- end_time: "2025-04-11 18:20"
474
- }
475
- ]
476
- },
477
- {
478
- start_time: "2025-04-11 18:00",
479
- end_time: "2025-04-11 18:30",
480
- sold_out: 0,
481
- order_count: 0,
482
- max_participants_limit: 0,
483
- max_participants_type: "no-limit",
484
- product_times: [
485
- {
486
- product_id: 60535,
487
- start_time: "2025-04-11 18:00",
488
- end_time: "2025-04-11 18:30"
489
- }
490
- ]
491
- },
492
- {
493
- start_time: "2025-04-11 18:10",
494
- end_time: "2025-04-11 18:40",
495
- sold_out: 0,
496
- order_count: 0,
497
- max_participants_limit: 0,
498
- max_participants_type: "no-limit",
499
- product_times: [
500
- {
501
- product_id: 60535,
502
- start_time: "2025-04-11 18:10",
503
- end_time: "2025-04-11 18:40"
504
- }
505
- ]
506
- },
507
- {
508
- start_time: "2025-04-11 18:20",
509
- end_time: "2025-04-11 18:50",
510
- sold_out: 0,
511
- order_count: 0,
512
- max_participants_limit: 0,
513
- max_participants_type: "no-limit",
514
- product_times: [
515
- {
516
- product_id: 60535,
517
- start_time: "2025-04-11 18:20",
518
- end_time: "2025-04-11 18:50"
519
- }
520
- ]
521
- },
522
- {
523
- start_time: "2025-04-11 18:30",
524
- end_time: "2025-04-11 19:00",
525
- sold_out: 0,
526
- order_count: 0,
527
- max_participants_limit: 0,
528
- max_participants_type: "no-limit",
529
- product_times: [
530
- {
531
- product_id: 60535,
532
- start_time: "2025-04-11 18:30",
533
- end_time: "2025-04-11 19:00"
534
- }
535
- ]
536
- },
537
- {
538
- start_time: "2025-04-11 18:40",
539
- end_time: "2025-04-11 19:10",
540
- sold_out: 0,
541
- order_count: 0,
542
- max_participants_limit: 0,
543
- max_participants_type: "no-limit",
544
- product_times: [
545
- {
546
- product_id: 60535,
547
- start_time: "2025-04-11 18:40",
548
- end_time: "2025-04-11 19:10"
549
- }
550
- ]
551
- },
552
- {
553
- start_time: "2025-04-11 18:50",
554
- end_time: "2025-04-11 19:20",
555
- sold_out: 0,
556
- order_count: 0,
557
- max_participants_limit: 0,
558
- max_participants_type: "no-limit",
559
- product_times: [
560
- {
561
- product_id: 60535,
562
- start_time: "2025-04-11 18:50",
563
- end_time: "2025-04-11 19:20"
564
- }
565
- ]
566
- },
567
- {
568
- start_time: "2025-04-11 19:00",
569
- end_time: "2025-04-11 19:30",
570
- sold_out: 0,
571
- order_count: 0,
572
- max_participants_limit: 0,
573
- max_participants_type: "no-limit",
574
- product_times: [
575
- {
576
- product_id: 60535,
577
- start_time: "2025-04-11 19:00",
578
- end_time: "2025-04-11 19:30"
579
- }
580
- ]
581
- },
582
- {
583
- start_time: "2025-04-11 19:10",
584
- end_time: "2025-04-11 19:40",
585
- sold_out: 0,
586
- order_count: 0,
587
- max_participants_limit: 0,
588
- max_participants_type: "no-limit",
589
- product_times: [
590
- {
591
- product_id: 60535,
592
- start_time: "2025-04-11 19:10",
593
- end_time: "2025-04-11 19:40"
594
- }
595
- ]
596
- },
597
- {
598
- start_time: "2025-04-11 19:20",
599
- end_time: "2025-04-11 19:50",
600
- sold_out: 0,
601
- order_count: 0,
602
- max_participants_limit: 0,
603
- max_participants_type: "no-limit",
604
- product_times: [
605
- {
606
- product_id: 60535,
607
- start_time: "2025-04-11 19:20",
608
- end_time: "2025-04-11 19:50"
609
- }
610
- ]
611
- },
612
- {
613
- start_time: "2025-04-11 19:30",
614
- end_time: "2025-04-11 20:00",
615
- sold_out: 0,
616
- order_count: 0,
617
- max_participants_limit: 0,
618
- max_participants_type: "no-limit",
619
- product_times: [
620
- {
621
- product_id: 60535,
622
- start_time: "2025-04-11 19:30",
623
- end_time: "2025-04-11 20:00"
624
- }
625
- ]
626
- },
627
- {
628
- start_time: "2025-04-11 19:40",
629
- end_time: "2025-04-11 20:10",
630
- sold_out: 0,
631
- order_count: 0,
632
- max_participants_limit: 0,
633
- max_participants_type: "no-limit",
634
- product_times: [
635
- {
636
- product_id: 60535,
637
- start_time: "2025-04-11 19:40",
638
- end_time: "2025-04-11 20:10"
639
- }
640
- ]
641
- },
642
- {
643
- start_time: "2025-04-11 19:50",
644
- end_time: "2025-04-11 20:20",
645
- sold_out: 0,
646
- order_count: 0,
647
- max_participants_limit: 0,
648
- max_participants_type: "no-limit",
649
- product_times: [
650
- {
651
- product_id: 60535,
652
- start_time: "2025-04-11 19:50",
653
- end_time: "2025-04-11 20:20"
654
- }
655
- ]
656
- },
657
- {
658
- start_time: "2025-04-11 20:00",
659
- end_time: "2025-04-11 20:30",
660
- sold_out: 0,
661
- order_count: 0,
662
- max_participants_limit: 0,
663
- max_participants_type: "no-limit",
664
- product_times: [
665
- {
666
- product_id: 60535,
667
- start_time: "2025-04-11 20:00",
668
- end_time: "2025-04-11 20:30"
669
- }
670
- ]
671
- },
672
- {
673
- start_time: "2025-04-11 20:10",
674
- end_time: "2025-04-11 20:40",
675
- sold_out: 0,
676
- order_count: 0,
677
- max_participants_limit: 0,
678
- max_participants_type: "no-limit",
679
- product_times: [
680
- {
681
- product_id: 60535,
682
- start_time: "2025-04-11 20:10",
683
- end_time: "2025-04-11 20:40"
684
- }
685
- ]
686
- },
687
- {
688
- start_time: "2025-04-11 20:20",
689
- end_time: "2025-04-11 20:50",
690
- sold_out: 0,
691
- order_count: 0,
692
- max_participants_limit: 0,
693
- max_participants_type: "no-limit",
694
- product_times: [
695
- {
696
- product_id: 60535,
697
- start_time: "2025-04-11 20:20",
698
- end_time: "2025-04-11 20:50"
699
- }
700
- ]
701
- },
702
- {
703
- start_time: "2025-04-11 20:30",
704
- end_time: "2025-04-11 21:00",
705
- sold_out: 0,
706
- order_count: 0,
707
- max_participants_limit: 0,
708
- max_participants_type: "no-limit",
709
- product_times: [
710
- {
711
- product_id: 60535,
712
- start_time: "2025-04-11 20:30",
713
- end_time: "2025-04-11 21:00"
714
- }
715
- ]
716
- },
717
- {
718
- start_time: "2025-04-11 20:40",
719
- end_time: "2025-04-11 21:10",
720
- sold_out: 0,
721
- order_count: 0,
722
- max_participants_limit: 0,
723
- max_participants_type: "no-limit",
724
- product_times: [
725
- {
726
- product_id: 60535,
727
- start_time: "2025-04-11 20:40",
728
- end_time: "2025-04-11 21:10"
729
- }
730
- ]
731
- },
732
- {
733
- start_time: "2025-04-11 20:50",
734
- end_time: "2025-04-11 21:20",
735
- sold_out: 0,
736
- order_count: 0,
737
- max_participants_limit: 0,
738
- max_participants_type: "no-limit",
739
- product_times: [
740
- {
741
- product_id: 60535,
742
- start_time: "2025-04-11 20:50",
743
- end_time: "2025-04-11 21:20"
744
- }
745
- ]
746
- },
747
- {
748
- start_time: "2025-04-11 21:00",
749
- end_time: "2025-04-11 21:30",
750
- sold_out: 0,
751
- order_count: 0,
752
- max_participants_limit: 0,
753
- max_participants_type: "no-limit",
754
- product_times: [
755
- {
756
- product_id: 60535,
757
- start_time: "2025-04-11 21:00",
758
- end_time: "2025-04-11 21:30"
759
- }
760
- ]
761
- },
762
- {
763
- start_time: "2025-04-11 21:10",
764
- end_time: "2025-04-11 21:40",
765
- sold_out: 0,
766
- order_count: 0,
767
- max_participants_limit: 0,
768
- max_participants_type: "no-limit",
769
- product_times: [
770
- {
771
- product_id: 60535,
772
- start_time: "2025-04-11 21:10",
773
- end_time: "2025-04-11 21:40"
774
- }
775
- ]
776
- },
777
- {
778
- start_time: "2025-04-11 21:20",
779
- end_time: "2025-04-11 21:50",
780
- sold_out: 0,
781
- order_count: 0,
782
- max_participants_limit: 0,
783
- max_participants_type: "no-limit",
784
- product_times: [
785
- {
786
- product_id: 60535,
787
- start_time: "2025-04-11 21:20",
788
- end_time: "2025-04-11 21:50"
789
- }
790
- ]
791
- },
792
- {
793
- start_time: "2025-04-11 21:30",
794
- end_time: "2025-04-11 22:00",
795
- sold_out: 0,
796
- order_count: 0,
797
- max_participants_limit: 0,
798
- max_participants_type: "no-limit",
799
- product_times: [
800
- {
801
- product_id: 60535,
802
- start_time: "2025-04-11 21:30",
803
- end_time: "2025-04-11 22:00"
804
- }
805
- ]
806
- },
807
- {
808
- start_time: "2025-04-11 21:40",
809
- end_time: "2025-04-11 22:10",
810
- sold_out: 0,
811
- order_count: 0,
812
- max_participants_limit: 0,
813
- max_participants_type: "no-limit",
814
- product_times: [
815
- {
816
- product_id: 60535,
817
- start_time: "2025-04-11 21:40",
818
- end_time: "2025-04-11 22:10"
819
- }
820
- ]
821
- },
822
- {
823
- start_time: "2025-04-11 21:50",
824
- end_time: "2025-04-11 22:20",
825
- sold_out: 0,
826
- order_count: 0,
827
- max_participants_limit: 0,
828
- max_participants_type: "no-limit",
829
- product_times: [
830
- {
831
- product_id: 60535,
832
- start_time: "2025-04-11 21:50",
833
- end_time: "2025-04-11 22:20"
834
- }
835
- ]
836
- },
837
- {
838
- start_time: "2025-04-11 22:00",
839
- end_time: "2025-04-11 22:30",
840
- sold_out: 0,
841
- order_count: 0,
842
- max_participants_limit: 0,
843
- max_participants_type: "no-limit",
844
- product_times: [
845
- {
846
- product_id: 60535,
847
- start_time: "2025-04-11 22:00",
848
- end_time: "2025-04-11 22:30"
849
- }
850
- ]
851
- },
852
- {
853
- start_time: "2025-04-11 22:10",
854
- end_time: "2025-04-11 22:40",
855
- sold_out: 0,
856
- order_count: 0,
857
- max_participants_limit: 0,
858
- max_participants_type: "no-limit",
859
- product_times: [
860
- {
861
- product_id: 60535,
862
- start_time: "2025-04-11 22:10",
863
- end_time: "2025-04-11 22:40"
864
- }
865
- ]
866
- },
867
- {
868
- start_time: "2025-04-11 22:20",
869
- end_time: "2025-04-11 22:50",
870
- sold_out: 0,
871
- order_count: 0,
872
- max_participants_limit: 0,
873
- max_participants_type: "no-limit",
874
- product_times: [
875
- {
876
- product_id: 60535,
877
- start_time: "2025-04-11 22:20",
878
- end_time: "2025-04-11 22:50"
879
- }
880
- ]
881
- },
882
- {
883
- start_time: "2025-04-11 22:30",
884
- end_time: "2025-04-11 23:00",
885
- sold_out: 0,
886
- order_count: 0,
887
- max_participants_limit: 0,
888
- max_participants_type: "no-limit",
889
- product_times: [
890
- {
891
- product_id: 60535,
892
- start_time: "2025-04-11 22:30",
893
- end_time: "2025-04-11 23:00"
894
- }
895
- ]
896
- },
897
- {
898
- start_time: "2025-04-11 22:40",
899
- end_time: "2025-04-11 23:10",
900
- sold_out: 0,
901
- order_count: 0,
902
- max_participants_limit: 0,
903
- max_participants_type: "no-limit",
904
- product_times: [
905
- {
906
- product_id: 60535,
907
- start_time: "2025-04-11 22:40",
908
- end_time: "2025-04-11 23:10"
909
- }
910
- ]
911
- },
912
- {
913
- start_time: "2025-04-11 22:50",
914
- end_time: "2025-04-11 23:20",
915
- sold_out: 0,
916
- order_count: 0,
917
- max_participants_limit: 0,
918
- max_participants_type: "no-limit",
919
- product_times: [
920
- {
921
- product_id: 60535,
922
- start_time: "2025-04-11 22:50",
923
- end_time: "2025-04-11 23:20"
924
- }
925
- ]
926
- },
927
- {
928
- start_time: "2025-04-11 23:00",
929
- end_time: "2025-04-11 23:30",
930
- sold_out: 0,
931
- order_count: 0,
932
- max_participants_limit: 0,
933
- max_participants_type: "no-limit",
934
- product_times: [
935
- {
936
- product_id: 60535,
937
- start_time: "2025-04-11 23:00",
938
- end_time: "2025-04-11 23:30"
939
- }
940
- ]
941
- },
942
- {
943
- start_time: "2025-04-11 23:10",
944
- end_time: "2025-04-11 23:40",
945
- sold_out: 0,
946
- order_count: 0,
947
- max_participants_limit: 0,
948
- max_participants_type: "no-limit",
949
- product_times: [
950
- {
951
- product_id: 60535,
952
- start_time: "2025-04-11 23:10",
953
- end_time: "2025-04-11 23:40"
954
- }
955
- ]
956
- },
957
- {
958
- start_time: "2025-04-11 23:20",
959
- end_time: "2025-04-11 23:50",
960
- sold_out: 0,
961
- order_count: 0,
962
- max_participants_limit: 0,
963
- max_participants_type: "no-limit",
964
- product_times: [
965
- {
966
- product_id: 60535,
967
- start_time: "2025-04-11 23:20",
968
- end_time: "2025-04-11 23:50"
969
- }
970
- ]
41
+ const { times, resources, appointmentBooking, carts } = (0, import_context.useAppointmentBookingContext)();
42
+ console.log(params, resources, times, "wh8765");
43
+ const onClick = async (e) => {
44
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
45
+ setSelectedResource(e == null ? void 0 : e.start_time);
46
+ const data = await appointmentBooking.autoSelectResource({
47
+ resourceProductData: resources == null ? void 0 : resources[0],
48
+ resources: (_c = (_b = (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[1]) == null ? void 0 : _c.renderList,
49
+ timeSlots: e
50
+ });
51
+ if (data) {
52
+ const _resources = [
53
+ (_g = (_f = (_e = (_d = resources == null ? void 0 : resources[0]) == null ? void 0 : _d.resources) == null ? void 0 : _e[0]) == null ? void 0 : _f.renderList) == null ? void 0 : _g[0],
54
+ (_k = (_j = (_i = (_h = resources == null ? void 0 : resources[0]) == null ? void 0 : _h.resources) == null ? void 0 : _i[1]) == null ? void 0 : _j.renderList) == null ? void 0 : _k[0]
55
+ ];
56
+ const aa = await appointmentBooking.submitTimeSlot({
57
+ resourceProductData: resources == null ? void 0 : resources[0],
58
+ resources: _resources,
59
+ timeSlots: e
60
+ });
61
+ console.log(data, _resources, aa, "wh9879676");
971
62
  }
972
- ];
973
- const onClick = (e) => {
974
- console.log(e);
975
- setSelectedResource(e.id);
976
63
  };
977
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, lists.map((item) => {
64
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, times.map((item, index) => {
978
65
  return /* @__PURE__ */ import_react.default.createElement(
979
66
  "div",
980
67
  {
981
- key: item.id,
68
+ key: index,
982
69
  onClick: () => onClick(item),
983
- className: `item ${selectedResource === item.id ? "active" : ""}`
70
+ className: `item ${selectedResource === (item == null ? void 0 : item.start_time) ? "active" : ""}`
984
71
  },
985
- /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_dayjs.default)(item.start_time).format("HH:mm")),
72
+ /* @__PURE__ */ import_react.default.createElement("span", null, item == null ? void 0 : item.start_time),
986
73
  /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-chevron-right", className: `icon` })
987
74
  );
988
75
  }));