@pisell/private-materials 3.0.119 → 3.0.121

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 (76) 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 +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
  13. package/es/components/booking/components/TabProduct/productItem/index.js +8 -7
  14. package/es/components/booking/forms/index.d.ts +1 -1
  15. package/es/components/booking/index.d.ts +1 -1
  16. package/es/components/booking/info/header/index.d.ts +2 -2
  17. package/es/components/booking/info/header/index.js +436 -44
  18. package/es/components/booking/info/header/index.less +110 -1
  19. package/es/components/booking/info/service/addService/index.js +3 -1
  20. package/es/components/booking/info/service/editService/index.js +3 -1
  21. package/es/components/booking/locales.d.ts +63 -0
  22. package/es/components/booking/locales.js +78 -6
  23. package/es/components/booking/payments/index.d.ts +1 -1
  24. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +12 -0
  25. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +40 -0
  26. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.less +38 -0
  27. package/es/components/schedules/components/ScheduleList/index.d.ts +5 -4
  28. package/es/components/schedules/components/ScheduleList/index.js +53 -43
  29. package/es/components/schedules/hooks/useSchedulesDataSource.js +5 -3
  30. package/es/components/schedules/products/list/index.d.ts +2 -2
  31. package/es/components/schedules/products/list/index.js +8 -8
  32. package/es/components/schedules/schedules/AllSchedules/index.d.ts +3 -3
  33. package/es/components/schedules/schedules/AllSchedules/index.js +9 -6
  34. package/es/components/schedules/schedules/AllSchedules/index.less +11 -3
  35. package/es/components/schedules/schedules/serve.d.ts +7 -0
  36. package/es/components/schedules/schedules/serve.js +24 -3
  37. package/es/components/schedules/schedules/utils.d.ts +22 -0
  38. package/es/components/schedules/schedules/utils.js +143 -1
  39. package/es/components/schedules/type.d.ts +7 -0
  40. package/es/components/tabProduct/index.d.ts +3 -2
  41. package/es/components/tabProduct/index.js +27 -18
  42. package/es/components/tabProduct/tabs/index.d.ts +3 -3
  43. package/es/components/tabProduct/tabs/index.js +34 -21
  44. package/lib/components/booking/addons/index.d.ts +1 -1
  45. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
  46. package/lib/components/booking/components/TabProduct/productItem/index.js +2 -1
  47. package/lib/components/booking/forms/index.d.ts +1 -1
  48. package/lib/components/booking/index.d.ts +1 -1
  49. package/lib/components/booking/info/header/index.d.ts +2 -2
  50. package/lib/components/booking/info/header/index.js +212 -11
  51. package/lib/components/booking/info/header/index.less +110 -1
  52. package/lib/components/booking/info/service/addService/index.js +3 -1
  53. package/lib/components/booking/info/service/editService/index.js +3 -1
  54. package/lib/components/booking/locales.d.ts +63 -0
  55. package/lib/components/booking/locales.js +72 -6
  56. package/lib/components/booking/payments/index.d.ts +1 -1
  57. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +12 -0
  58. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +77 -0
  59. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.less +38 -0
  60. package/lib/components/schedules/components/ScheduleList/index.d.ts +5 -4
  61. package/lib/components/schedules/components/ScheduleList/index.js +38 -31
  62. package/lib/components/schedules/hooks/useSchedulesDataSource.js +8 -2
  63. package/lib/components/schedules/products/list/index.d.ts +2 -2
  64. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +3 -3
  65. package/lib/components/schedules/schedules/AllSchedules/index.js +3 -2
  66. package/lib/components/schedules/schedules/AllSchedules/index.less +11 -3
  67. package/lib/components/schedules/schedules/serve.d.ts +7 -0
  68. package/lib/components/schedules/schedules/serve.js +5 -2
  69. package/lib/components/schedules/schedules/utils.d.ts +22 -0
  70. package/lib/components/schedules/schedules/utils.js +98 -0
  71. package/lib/components/schedules/type.d.ts +7 -0
  72. package/lib/components/tabProduct/index.d.ts +3 -2
  73. package/lib/components/tabProduct/index.js +15 -6
  74. package/lib/components/tabProduct/tabs/index.d.ts +3 -3
  75. package/lib/components/tabProduct/tabs/index.js +10 -6
  76. package/package.json +4 -4
@@ -163,6 +163,13 @@ declare const _default: {
163
163
  'pisell2.text.terminal-edit-message': string;
164
164
  "pisell2.text.actions": string;
165
165
  "pisell2.text.add-client": string;
166
+ "pisell2.schedule.tab.all": string;
167
+ "pisell2.schedule.tab.surcharge": string;
168
+ "pisell2.schedule.tab.resources": string;
169
+ "pisell2.schedule.tab.products": string;
170
+ "pisell2.schedule.tab.events": string;
171
+ "pisell2.schedule.tab.quotation": string;
172
+ "pisell2.schedule.tab.open-hours": string;
166
173
  'pisell2.text.variant-client-change': string;
167
174
  'pisell2.text.variant-client-no-data': string;
168
175
  'page.event.booking.text.duplicate-enrollment': string;
@@ -172,6 +179,20 @@ declare const _default: {
172
179
  list: any[];
173
180
  }) => string;
174
181
  'page.event.booking.text.duplicate-enrollment-confirm': string;
182
+ 'page.booking.text.unconfirmed-payements': string;
183
+ 'page.booking.text.unconfirmed-payements.msg': string;
184
+ 'page.booking.text.go-to-payments': string;
185
+ 'page.booking.text.cancel-only': string;
186
+ 'page.booking.text.refund': string;
187
+ 'page.booking.text.confirm': string;
188
+ 'page.booking.text.go-back': string;
189
+ 'page.booking.text.cancel-booking': string;
190
+ 'page.booking.text.cancel-booking.msg': string;
191
+ 'page.booking.text.disabled-tickets': string;
192
+ 'page.booking.text.paid.msg': (x: string) => string;
193
+ 'page.booking.text.please-choose-an-option': string;
194
+ 'page.booking.text.please-choose-an-option-1': string;
195
+ 'page.booking.text.please-choose-an-option-2': string;
175
196
  };
176
197
  'zh-CN': {
177
198
  'pisell2.text.refunded-amount': string;
@@ -337,6 +358,13 @@ declare const _default: {
337
358
  'page.booking.text.unlimited': string;
338
359
  "pisell2.text.actions": string;
339
360
  "pisell2.text.add-client": string;
361
+ "pisell2.schedule.tab.all": string;
362
+ "pisell2.schedule.tab.surcharge": string;
363
+ "pisell2.schedule.tab.resources": string;
364
+ "pisell2.schedule.tab.products": string;
365
+ "pisell2.schedule.tab.events": string;
366
+ "pisell2.schedule.tab.quotation": string;
367
+ "pisell2.schedule.tab.open-hours": string;
340
368
  'pisell2.text.variant-client-change': string;
341
369
  'pisell2.text.variant-client-no-data': string;
342
370
  'page.event.booking.text.duplicate-enrollment': string;
@@ -346,6 +374,20 @@ declare const _default: {
346
374
  list: any[];
347
375
  }) => string;
348
376
  'page.event.booking.text.duplicate-enrollment-confirm': string;
377
+ 'page.booking.text.unconfirmed-payements': string;
378
+ 'page.booking.text.unconfirmed-payements.msg': string;
379
+ 'page.booking.text.go-to-payments': string;
380
+ 'page.booking.text.cancel-only': string;
381
+ 'page.booking.text.refund': string;
382
+ 'page.booking.text.confirm': string;
383
+ 'page.booking.text.go-back': string;
384
+ 'page.booking.text.cancel-booking': string;
385
+ 'page.booking.text.cancel-booking.msg': string;
386
+ 'page.booking.text.disabled-tickets': string;
387
+ 'page.booking.text.paid.msg': (x: string) => string;
388
+ 'page.booking.text.please-choose-an-option': string;
389
+ 'page.booking.text.please-choose-an-option-1': string;
390
+ 'page.booking.text.please-choose-an-option-2': string;
349
391
  };
350
392
  'zh-HK': {
351
393
  'pisell2.text.refunded-amount': string;
@@ -511,6 +553,13 @@ declare const _default: {
511
553
  'page.booking.text.unlimited': string;
512
554
  "pisell2.text.actions": string;
513
555
  "pisell2.text.add-client": string;
556
+ "pisell2.schedule.tab.all": string;
557
+ "pisell2.schedule.tab.surcharge": string;
558
+ "pisell2.schedule.tab.resources": string;
559
+ "pisell2.schedule.tab.products": string;
560
+ "pisell2.schedule.tab.events": string;
561
+ "pisell2.schedule.tab.quotation": string;
562
+ "pisell2.schedule.tab.open-hours": string;
514
563
  'pisell2.text.variant-client-change': string;
515
564
  'pisell2.text.variant-client-no-data': string;
516
565
  'page.event.booking.text.duplicate-enrollment': string;
@@ -520,6 +569,20 @@ declare const _default: {
520
569
  list: any[];
521
570
  }) => string;
522
571
  'page.event.booking.text.duplicate-enrollment-confirm': string;
572
+ 'page.booking.text.unconfirmed-payements': string;
573
+ 'page.booking.text.unconfirmed-payements.msg': string;
574
+ 'page.booking.text.go-to-payments': string;
575
+ 'page.booking.text.cancel-only': string;
576
+ 'page.booking.text.refund': string;
577
+ 'page.booking.text.confirm': string;
578
+ 'page.booking.text.go-back': string;
579
+ 'page.booking.text.cancel-booking': string;
580
+ 'page.booking.text.cancel-booking.msg': string;
581
+ 'page.booking.text.disabled-tickets': string;
582
+ 'page.booking.text.paid.msg': (x: string) => string;
583
+ 'page.booking.text.please-choose-an-option': string;
584
+ 'page.booking.text.please-choose-an-option-1': string;
585
+ 'page.booking.text.please-choose-an-option-2': string;
523
586
  };
524
587
  };
525
588
  export default _default;
@@ -92,7 +92,7 @@ var locales_default = {
92
92
  "pisell2.text.status.confirmed": "Confirmed",
93
93
  "pisell2.text.status.arrived": "Arrived",
94
94
  "pisell2.text.status.started": "Started",
95
- "pisell2.text.status.cancelled": "Cancelled",
95
+ "pisell2.text.status.cancelled": "Cancel",
96
96
  "pisell2.text.status.no_show": "No show",
97
97
  "pisell2.text.status.completed": "Completed",
98
98
  "pisell2.text.status.booking_id": "Booking ID",
@@ -207,6 +207,14 @@ var locales_default = {
207
207
  "pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Pisell Terminal.",
208
208
  "pisell2.text.actions": "Actions",
209
209
  "pisell2.text.add-client": "Add customer",
210
+ // 日称tab
211
+ "pisell2.schedule.tab.all": "All",
212
+ "pisell2.schedule.tab.surcharge": "Surcharge",
213
+ "pisell2.schedule.tab.resources": "Resources",
214
+ "pisell2.schedule.tab.products": "Products",
215
+ "pisell2.schedule.tab.events": "Events",
216
+ "pisell2.schedule.tab.quotation": "Quotation",
217
+ "pisell2.schedule.tab.open-hours": "Open hours",
210
218
  "pisell2.text.variant-client-change": "Change",
211
219
  "pisell2.text.variant-client-no-data": "No record",
212
220
  "page.event.booking.text.duplicate-enrollment": "Duplicate Enrollment",
@@ -226,7 +234,21 @@ var locales_default = {
226
234
  });
227
235
  return `${customerName || ""} has already enrolled in the ${title} ${listStr.join(",")}, Are you sure you want to enroll again?`;
228
236
  },
229
- "page.event.booking.text.duplicate-enrollment-confirm": "Confirm"
237
+ "page.event.booking.text.duplicate-enrollment-confirm": "Confirm",
238
+ "page.booking.text.unconfirmed-payements": "Unconfirmed payements",
239
+ "page.booking.text.unconfirmed-payements.msg": "There are unconfirmed payments, please confirm or void the payments first.",
240
+ "page.booking.text.go-to-payments": "Go to payments",
241
+ "page.booking.text.cancel-only": "Cancel only",
242
+ "page.booking.text.refund": "Refund",
243
+ "page.booking.text.confirm": "Confirm",
244
+ "page.booking.text.go-back": "Go back",
245
+ "page.booking.text.cancel-booking": "Cancel Booking",
246
+ "page.booking.text.cancel-booking.msg": "The action is irreversible. Please proceed with caution. ",
247
+ "page.booking.text.disabled-tickets": "All tickets will be disabled.",
248
+ "page.booking.text.paid.msg": (x) => `The related order is ${x === "paid" ? "paid" : "partially paid"}.`,
249
+ "page.booking.text.please-choose-an-option": "Please choose an option:",
250
+ "page.booking.text.please-choose-an-option-1": "Refund: Cancel the appointment and process a refund.",
251
+ "page.booking.text.please-choose-an-option-2": "Cancel only: Cancel the appointment without processing a refund. (You can still process a refund after cancellation if needed)"
230
252
  },
231
253
  "zh-CN": {
232
254
  "pisell2.text.refunded-amount": "已退金额",
@@ -294,7 +316,7 @@ var locales_default = {
294
316
  "pisell2.text.status.confirmed": "已确认",
295
317
  "pisell2.text.status.arrived": "已到达",
296
318
  "pisell2.text.status.started": "已开始",
297
- "pisell2.text.status.cancelled": "已取消",
319
+ "pisell2.text.status.cancelled": "取消",
298
320
  "pisell2.text.status.no_show": "失约",
299
321
  "pisell2.text.status.completed": "已完成",
300
322
  "pisell2.text.status.booking_id": "预约 ID",
@@ -406,6 +428,14 @@ var locales_default = {
406
428
  "page.booking.text.unlimited": "无限制",
407
429
  "pisell2.text.actions": "操作选项",
408
430
  "pisell2.text.add-client": "添加客户",
431
+ // 日称tab
432
+ "pisell2.schedule.tab.all": "全部",
433
+ "pisell2.schedule.tab.surcharge": "附加费",
434
+ "pisell2.schedule.tab.resources": "资源",
435
+ "pisell2.schedule.tab.products": "商品",
436
+ "pisell2.schedule.tab.events": "活动",
437
+ "pisell2.schedule.tab.quotation": "报价单",
438
+ "pisell2.schedule.tab.open-hours": "营业时间",
409
439
  "pisell2.text.variant-client-change": "更改客户",
410
440
  "pisell2.text.variant-client-no-data": "暂无数据",
411
441
  "page.event.booking.text.duplicate-enrollment": "重复报名",
@@ -425,7 +455,21 @@ var locales_default = {
425
455
  });
426
456
  return `${customerName || ""}已报名${title} ${listStr.join(",")}, 确定要再次报名吗?`;
427
457
  },
428
- "page.event.booking.text.duplicate-enrollment-confirm": "确认"
458
+ "page.event.booking.text.duplicate-enrollment-confirm": "确认",
459
+ "page.booking.text.unconfirmed-payements": "未确认的付款",
460
+ "page.booking.text.unconfirmed-payements.msg": "存在未确认的付款,请先确认收款或作废。",
461
+ "page.booking.text.go-to-payments": "前往收款界面",
462
+ "page.booking.text.cancel-only": "仅取消",
463
+ "page.booking.text.refund": "退款",
464
+ "page.booking.text.confirm": "确认",
465
+ "page.booking.text.go-back": "返回",
466
+ "page.booking.text.cancel-booking": "取消预约",
467
+ "page.booking.text.cancel-booking.msg": "该操作不可撤销,请谨慎操作。",
468
+ "page.booking.text.disabled-tickets": "所有票单将被禁用。",
469
+ "page.booking.text.paid.msg": (x) => `关联订单${x === "paid" ? "已支付" : "部分支付"}。`,
470
+ "page.booking.text.please-choose-an-option": "请选择:",
471
+ "page.booking.text.please-choose-an-option-1": "退款:取消预约,同时处理退款。",
472
+ "page.booking.text.please-choose-an-option-2": "仅取消:仅取消预约,但不进行退款处理。(您仍然可以在取消后再进行退款操作)"
429
473
  },
430
474
  "zh-HK": {
431
475
  "pisell2.text.refunded-amount": "已退金額",
@@ -491,7 +535,7 @@ var locales_default = {
491
535
  "pisell2.text.status.confirmed": "已确認",
492
536
  "pisell2.text.status.arrived": "已到達",
493
537
  "pisell2.text.status.started": "已開始",
494
- "pisell2.text.status.cancelled": "已取消",
538
+ "pisell2.text.status.cancelled": "取消",
495
539
  "pisell2.text.status.no_show": "失約",
496
540
  "pisell2.text.status.completed": "已完成",
497
541
  "pisell2.text.status.booking_id": "預約 ID",
@@ -605,6 +649,14 @@ var locales_default = {
605
649
  "page.booking.text.unlimited": "無限制",
606
650
  "pisell2.text.actions": "操作選項",
607
651
  "pisell2.text.add-client": "添加客戶",
652
+ // 日称tab
653
+ "pisell2.schedule.tab.all": "全部",
654
+ "pisell2.schedule.tab.surcharge": "附加費",
655
+ "pisell2.schedule.tab.resources": "資源",
656
+ "pisell2.schedule.tab.products": "商品",
657
+ "pisell2.schedule.tab.events": "活動",
658
+ "pisell2.schedule.tab.quotation": "報價單",
659
+ "pisell2.schedule.tab.open-hours": "營業時間",
608
660
  "pisell2.text.variant-client-change": "更改客戶",
609
661
  "pisell2.text.variant-client-no-data": "暫無數據",
610
662
  "page.event.booking.text.duplicate-enrollment": "重複報名",
@@ -624,6 +676,20 @@ var locales_default = {
624
676
  });
625
677
  return `${customerName || ""}已報名${title} ${listStr.join(",")}, 確定要再次報名嗎?`;
626
678
  },
627
- "page.event.booking.text.duplicate-enrollment-confirm": "確認"
679
+ "page.event.booking.text.duplicate-enrollment-confirm": "確認",
680
+ "page.booking.text.unconfirmed-payements": "未確認的付款",
681
+ "page.booking.text.unconfirmed-payements.msg": "存在未確認的付款,請先確認收款或作廢。",
682
+ "page.booking.text.go-to-payments": "前往收款界面",
683
+ "page.booking.text.cancel-only": "僅取消",
684
+ "page.booking.text.refund": "退款",
685
+ "page.booking.text.confirm": "確認",
686
+ "page.booking.text.go-back": "返回",
687
+ "page.booking.text.cancel-booking": "取消預約",
688
+ "page.booking.text.cancel-booking.msg": "該操作不可撤銷,請謹慎操作。",
689
+ "page.booking.text.disabled-tickets": "所有票單將被禁用。",
690
+ "page.booking.text.paid.msg": (x) => `關聯訂單${x === "paid" ? "已支付" : "部分支付"}。`,
691
+ "page.booking.text.please-choose-an-option": "請選擇:",
692
+ "page.booking.text.please-choose-an-option-1": "退款:取消預約,同時處理退款。",
693
+ "page.booking.text.please-choose-an-option-2": "僅取消:僅取消預約,但不進行退款處理。(您仍然可以在取消後再進行退款操作)"
628
694
  }
629
695
  };
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => JSX.Element;
8
+ declare const Payments: any;
9
9
  export default Payments;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { ScheduleItem } from '../../../type';
4
+ declare type Item = any;
5
+ interface RenderScheduleItemProps {
6
+ item?: Item;
7
+ onItemClick?: (item: ScheduleItem) => void;
8
+ onDelete?: (item: ScheduleItem) => void;
9
+ showDeleteIcon?: boolean;
10
+ }
11
+ declare const RenderScheduleItem: ({ item, onItemClick, onDelete, showDeleteIcon, }: RenderScheduleItemProps) => React.JSX.Element;
12
+ export default RenderScheduleItem;
@@ -0,0 +1,77 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/schedules/components/ScheduleList/RenderScheduleItem/index.tsx
30
+ var RenderScheduleItem_exports = {};
31
+ __export(RenderScheduleItem_exports, {
32
+ default: () => RenderScheduleItem_default
33
+ });
34
+ module.exports = __toCommonJS(RenderScheduleItem_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_AlertCircle = __toESM(require("@pisell/icon/es/AlertCircle"));
37
+ var import_antd = require("antd");
38
+ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
39
+ var import_index = require("./index.less");
40
+ var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
41
+ var RenderScheduleItem = ({
42
+ item,
43
+ onItemClick,
44
+ onDelete,
45
+ showDeleteIcon
46
+ }) => {
47
+ var _a;
48
+ const { appHelper } = (0, import_useEngineContext.default)();
49
+ return /* @__PURE__ */ import_react.default.createElement(
50
+ "div",
51
+ {
52
+ key: item.id,
53
+ className: "pisell-lowcode__schedule-list-item",
54
+ onClick: () => onItemClick == null ? void 0 : onItemClick(item)
55
+ },
56
+ /* @__PURE__ */ import_react.default.createElement(
57
+ "div",
58
+ {
59
+ className: "pisell-lowcode__schedule-list-item-color",
60
+ style: { backgroundColor: item.color }
61
+ }
62
+ ),
63
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__schedule-list-item-content" }, (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.translationShop(item.name)),
64
+ item.conflict && /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "Days conflict with another schedule" }, /* @__PURE__ */ import_react.default.createElement(import_AlertCircle.default, { className: "pisell-lowcode__schedule-list-item-conflict" })),
65
+ showDeleteIcon && /* @__PURE__ */ import_react.default.createElement(
66
+ import_XClose.default,
67
+ {
68
+ className: "pisell-lowcode__schedule-list-item-delete",
69
+ onClick: (e) => {
70
+ e.stopPropagation();
71
+ onDelete == null ? void 0 : onDelete(item);
72
+ }
73
+ }
74
+ )
75
+ );
76
+ };
77
+ var RenderScheduleItem_default = RenderScheduleItem;
@@ -0,0 +1,38 @@
1
+ .pisell-lowcode__schedule-list {
2
+ &-item {
3
+ display: flex;
4
+ align-items: center;
5
+ padding: 10px 16px;
6
+ border-radius: 8px;
7
+ border: 1px solid var(--Gray-true-100, #F5F5F5);
8
+ margin-bottom: 16px;
9
+ cursor: pointer;
10
+
11
+ &-color {
12
+ width: 12px;
13
+ height: 12px;
14
+ margin: 8px;
15
+ border-radius: 50%;
16
+ }
17
+
18
+ &-content {
19
+ color: var(--Gray-true-900, #141414);
20
+ font-size: 14px;
21
+ font-style: normal;
22
+ font-weight: 600;
23
+ line-height: 20px;
24
+ flex: 1;
25
+ }
26
+
27
+ &-conflict {
28
+ color: #D92D20;
29
+ font-size: 16px;
30
+ }
31
+
32
+ &-delete {
33
+ margin-left: 8px;
34
+ font-size: 16px;
35
+ color: #141414;
36
+ }
37
+ }
38
+ }
@@ -1,7 +1,7 @@
1
- import React from "react";
2
- import { ButtonProps } from "antd";
3
- import { ScheduleItem } from "../../type";
4
- import "./index.less";
1
+ import React from 'react';
2
+ import { ButtonProps } from 'antd';
3
+ import { ScheduleItem } from '../../type';
4
+ import './index.less';
5
5
  declare type ScheduleListType = {
6
6
  dataSource: ScheduleItem[];
7
7
  onItemClick?: (item: ScheduleItem) => void;
@@ -10,6 +10,7 @@ declare type ScheduleListType = {
10
10
  loading?: boolean;
11
11
  className?: string;
12
12
  addButtonProps?: ButtonProps;
13
+ showTabs?: boolean;
13
14
  };
14
15
  /**
15
16
  * 日程列表 展示日程简略信息
@@ -35,10 +35,10 @@ module.exports = __toCommonJS(ScheduleList_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_classnames = __toESM(require("classnames"));
37
37
  var import_antd = require("antd");
38
- var import_AlertCircle = __toESM(require("@pisell/icon/es/AlertCircle"));
39
- var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
38
+ var import_tabProduct = __toESM(require("../../../tabProduct"));
40
39
  var import_utils = require("@pisell/utils");
41
- var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
+ var import_utils2 = require("../../schedules/utils");
41
+ var import_RenderScheduleItem = __toESM(require("./RenderScheduleItem"));
42
42
  var import_index = require("./index.less");
43
43
  var ScheduleList = (props) => {
44
44
  const {
@@ -48,9 +48,12 @@ var ScheduleList = (props) => {
48
48
  onDelete,
49
49
  loading,
50
50
  className,
51
- addButtonProps
51
+ addButtonProps,
52
+ showTabs
52
53
  } = props;
53
- const { appHelper } = (0, import_useEngineContext.default)();
54
+ const renderList = (0, import_react.useMemo)(() => {
55
+ return (0, import_utils2.formatScheduleListByTabs)(dataSource);
56
+ }, [dataSource]);
54
57
  const content = (0, import_react.useMemo)(() => {
55
58
  if (dataSource.length === 0) {
56
59
  return /* @__PURE__ */ import_react.default.createElement(
@@ -61,37 +64,41 @@ var ScheduleList = (props) => {
61
64
  }
62
65
  );
63
66
  }
64
- return dataSource.map((item) => {
65
- var _a;
67
+ if (showTabs) {
66
68
  return /* @__PURE__ */ import_react.default.createElement(
67
- "div",
69
+ import_tabProduct.default,
68
70
  {
69
- key: item.id,
70
- className: "pisell-lowcode__schedule-list-item",
71
- onClick: () => onItemClick == null ? void 0 : onItemClick(item)
72
- },
73
- /* @__PURE__ */ import_react.default.createElement(
74
- "div",
75
- {
76
- className: "pisell-lowcode__schedule-list-item-color",
77
- style: { backgroundColor: item.color }
71
+ scrollDom: ".pisell-lowcode__schedules-module-content-wrap",
72
+ list: renderList,
73
+ name: "schedule",
74
+ renderItem: (item) => {
75
+ return /* @__PURE__ */ import_react.default.createElement(
76
+ import_RenderScheduleItem.default,
77
+ {
78
+ item,
79
+ key: item.id,
80
+ showDeleteIcon,
81
+ onItemClick: () => onItemClick == null ? void 0 : onItemClick(item),
82
+ onDelete: () => onDelete == null ? void 0 : onDelete(item)
83
+ }
84
+ );
78
85
  }
79
- ),
80
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__schedule-list-item-content" }, (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.translationShop(item.name)),
81
- item.conflict && /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "Days conflict with another schedule" }, /* @__PURE__ */ import_react.default.createElement(import_AlertCircle.default, { className: "pisell-lowcode__schedule-list-item-conflict" })),
82
- showDeleteIcon && /* @__PURE__ */ import_react.default.createElement(
83
- import_XClose.default,
86
+ }
87
+ );
88
+ } else {
89
+ return dataSource.map((item) => {
90
+ return /* @__PURE__ */ import_react.default.createElement(
91
+ import_RenderScheduleItem.default,
84
92
  {
85
- className: "pisell-lowcode__schedule-list-item-delete",
86
- onClick: (e) => {
87
- e.stopPropagation();
88
- onDelete == null ? void 0 : onDelete(item);
89
- }
93
+ item,
94
+ showDeleteIcon,
95
+ onItemClick: () => onItemClick == null ? void 0 : onItemClick(item),
96
+ onDelete: () => onDelete == null ? void 0 : onDelete(item)
90
97
  }
91
- )
92
- );
93
- });
94
- }, [dataSource, showDeleteIcon]);
98
+ );
99
+ });
100
+ }
101
+ }, [dataSource, showDeleteIcon, showTabs]);
95
102
  return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__schedule-list", className) }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { active: true, round: true, loading }, content, addButtonProps ? /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { ...addButtonProps }) : null));
96
103
  };
97
104
  var ScheduleList_default = ScheduleList;
@@ -28,7 +28,7 @@ var import_serve = require("../schedules/serve");
28
28
  var useSchedulesDataSource = (params) => {
29
29
  const { scheduleIds } = params || {};
30
30
  const [dataSource, setDataSource] = (0, import_react.useState)([]);
31
- const { loading, run, refresh } = (0, import_ahooks.useRequest)(import_serve.getScheduleList, {
31
+ const { loading, run, refresh } = (0, import_ahooks.useRequest)(import_serve.postScheduleList, {
32
32
  manual: true,
33
33
  onSuccess: (result, params2) => {
34
34
  if (result.status) {
@@ -37,7 +37,13 @@ var useSchedulesDataSource = (params) => {
37
37
  }
38
38
  });
39
39
  (0, import_react.useEffect)(() => {
40
- run({ ids: scheduleIds, skip: 1, num: 1e3 });
40
+ run({
41
+ ids: scheduleIds,
42
+ skip: 1,
43
+ num: 500,
44
+ with: ["relation", "timeSlot"],
45
+ with_count: ["relation", "order"]
46
+ });
41
47
  }, [scheduleIds]);
42
48
  return {
43
49
  loading,
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  interface ProductListProps {
4
4
  loading: boolean;
5
5
  list: any[];
@@ -1,6 +1,6 @@
1
- import React from "react";
2
- import { ScheduleItem } from "../../type";
3
- import "./index.less";
1
+ import React from 'react';
2
+ import { ScheduleItem } from '../../type';
3
+ import './index.less';
4
4
  declare type AllSchedulesPropsType = {
5
5
  onOpenDetail?: (id?: number) => void;
6
6
  dataSource: ScheduleItem[];
@@ -51,9 +51,10 @@ var AllSchedules = (props) => {
51
51
  {
52
52
  loading,
53
53
  dataSource: showDataSource,
54
- onItemClick: (item) => onOpenDetail == null ? void 0 : onOpenDetail(item.id)
54
+ onItemClick: (item) => onOpenDetail == null ? void 0 : onOpenDetail(item.id),
55
+ showTabs: true
55
56
  }
56
- )), /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
57
+ )), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__schedules-module-add-button-wrap" }, /* @__PURE__ */ import_react.default.createElement(
57
58
  import_antd.Button,
58
59
  {
59
60
  className: "pisell-lowcode__schedules-module-add-button",
@@ -2,13 +2,21 @@
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
+ overflow-y: auto;
6
+ padding: 0 32px;
5
7
  .pisell-lowcode__schedules-module-header {
6
- padding: 16px 32px;
8
+ padding: 16px 0 0;
7
9
  }
8
10
  .pisell-lowcode__schedules-module-content {
9
- padding: 20px 32px;
11
+ padding: 0;
10
12
  flex: 1;
11
- overflow: auto;
13
+ overflow:initial;
14
+ }
15
+ .pisell-lowcode__schedules-module-add-button-wrap{
16
+ position: sticky;
17
+ bottom: 0;
18
+ z-index: 1;
19
+ background: #fff
12
20
  }
13
21
  .pisell-lowcode__schedules-module-add-button {
14
22
  margin: 24px 32px;
@@ -4,6 +4,13 @@ export declare const getScheduleList: (params: {
4
4
  num: number;
5
5
  ids?: number[];
6
6
  }) => Promise<ResponseListData<ScheduleItem[]>>;
7
+ export declare const postScheduleList: (params: {
8
+ skip: number;
9
+ num: number;
10
+ ids?: number[];
11
+ with?: Array<string>;
12
+ with_count?: Array<string>;
13
+ }) => Promise<ResponseListData<ScheduleItem[]>>;
7
14
  export declare const deleteSchedule: (params: {
8
15
  id: number;
9
16
  }) => Promise<ResponseListData<ScheduleItem[]>>;
@@ -20,14 +20,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var serve_exports = {};
21
21
  __export(serve_exports, {
22
22
  deleteSchedule: () => deleteSchedule,
23
- getScheduleList: () => getScheduleList
23
+ getScheduleList: () => getScheduleList,
24
+ postScheduleList: () => postScheduleList
24
25
  });
25
26
  module.exports = __toCommonJS(serve_exports);
26
27
  var import_utils = require("../utils");
27
28
  var getScheduleList = async (params) => await import_utils.request.getRequest().get("/shop/schedule", params);
29
+ var postScheduleList = async (params) => await import_utils.request.getRequest().post("/shop/schedule/v2", params);
28
30
  var deleteSchedule = async (params) => await import_utils.request.getRequest().remove(`/shop/schedule/${params.id}`);
29
31
  // Annotate the CommonJS export names for ESM import in node:
30
32
  0 && (module.exports = {
31
33
  deleteSchedule,
32
- getScheduleList
34
+ getScheduleList,
35
+ postScheduleList
33
36
  });
@@ -48,3 +48,25 @@ export declare const formatScheduleResult: (schedule: ScheduleItem) => {
48
48
  export declare const calcScheduleDateRange: (schedule: ScheduleItem) => any[];
49
49
  export declare const calcCalendarDataBySchedules: (schedules: ScheduleItem[]) => unknown[];
50
50
  export declare const calcMinTimeMaxTimeBySchedules: (schedules: ScheduleItem[], scheduleAllMap: FormState["schedules"]["scheduleAllMap"], selectDate?: string) => {};
51
+ /**
52
+ * @title: 格式化日程数据
53
+ * @description:
54
+ * @param {Array} relation 资源列表
55
+ * @param {string} table_type 关联表类型
56
+ * @param {string} item_type 资源类型
57
+ * @param {boolean} isExcluded 是否排除
58
+ * @return {*}
59
+ * @Author: WangHan
60
+ * @Date: 2024-09-04 11:54
61
+ */
62
+ export declare const formatScheduleData: (relation: Array<any>, table_type?: string, item_type?: string, isExcluded?: boolean) => any;
63
+ /**
64
+ * @title: 格式化日程为二维结构
65
+ * @description:
66
+ * @param {any} list
67
+ * @param {any} filterItem
68
+ * @return {*}
69
+ * @Author: WangHan
70
+ * @Date: 2024-07-29 19:28
71
+ */
72
+ export declare const formatScheduleListByTabs: (list: any, filterItem?: any) => unknown[];