@pisell/private-materials 3.0.69 → 3.0.71

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 (49) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +9 -9
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +7 -7
  9. package/es/components/booking/components/addButton/index.d.ts +1 -0
  10. package/es/components/booking/components/addButton/index.js +6 -2
  11. package/es/components/booking/components/customSelect/index.js +4 -2
  12. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -1
  13. package/es/components/booking/components/footer/FooterMenus/index.js +71 -22
  14. package/es/components/booking/components/footer/index.js +255 -14
  15. package/es/components/booking/info/client/index.js +2 -2
  16. package/es/components/booking/info/header/index.less +7 -1
  17. package/es/components/booking/info/index.js +6 -5
  18. package/es/components/booking/info/notes/index.d.ts +1 -1
  19. package/es/components/booking/info/notes/index.js +4 -1
  20. package/es/components/booking/info/pet/index.js +3 -0
  21. package/es/components/booking/info/service/addService/index.js +12 -7
  22. package/es/components/booking/info/service/editService/index.js +19 -4
  23. package/es/components/booking/info/service/serviceList/index.js +1 -1
  24. package/es/components/booking/locales.d.ts +3 -3
  25. package/es/components/booking/locales.js +13 -13
  26. package/es/components/booking/model.d.ts +1 -0
  27. package/es/components/booking/payments/index.js +0 -6
  28. package/es/components/booking/utils.js +1 -1
  29. package/lib/components/booking/components/addButton/index.d.ts +1 -0
  30. package/lib/components/booking/components/addButton/index.js +7 -4
  31. package/lib/components/booking/components/customSelect/index.js +3 -2
  32. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -1
  33. package/lib/components/booking/components/footer/FooterMenus/index.js +4 -21
  34. package/lib/components/booking/components/footer/index.js +243 -16
  35. package/lib/components/booking/info/client/index.js +2 -2
  36. package/lib/components/booking/info/header/index.less +7 -1
  37. package/lib/components/booking/info/index.js +4 -3
  38. package/lib/components/booking/info/notes/index.d.ts +1 -1
  39. package/lib/components/booking/info/notes/index.js +4 -1
  40. package/lib/components/booking/info/pet/index.js +3 -0
  41. package/lib/components/booking/info/service/addService/index.js +11 -7
  42. package/lib/components/booking/info/service/editService/index.js +21 -6
  43. package/lib/components/booking/info/service/serviceList/index.js +1 -1
  44. package/lib/components/booking/locales.d.ts +3 -3
  45. package/lib/components/booking/locales.js +13 -13
  46. package/lib/components/booking/model.d.ts +1 -0
  47. package/lib/components/booking/payments/index.js +0 -6
  48. package/lib/components/booking/utils.js +1 -1
  49. package/package.json +3 -3
@@ -46,7 +46,7 @@ var import_index = require("./index.less");
46
46
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
47
47
  var import_icons = require("@ant-design/icons");
48
48
  var Footer = (props) => {
49
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
49
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
50
50
  const { state, buttons, dispatch, source } = props;
51
51
  const [showDetail, setShowDetail] = (0, import_react.useState)(false);
52
52
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -54,6 +54,58 @@ var Footer = (props) => {
54
54
  const context = (0, import_useEngineContext.default)();
55
55
  const { isTerminal, interaction, store } = (_a = context.appHelper) == null ? void 0 : _a.utils;
56
56
  const isShowPaymentLink = (_d = (_c = (_b = store == null ? void 0 : store.getState) == null ? void 0 : _b.call(store)) == null ? void 0 : _c.global) == null ? void 0 : _d.paymentLinkBtnShow;
57
+ const [modal, contextHolder] = import_antd.Modal.useModal();
58
+ const { setActiveTab } = state;
59
+ const actionMap = {
60
+ sale: {
61
+ label: import_utils.locales.getText("pisell2.text.addons"),
62
+ key: "sale"
63
+ },
64
+ paymentLink: {
65
+ label: import_utils.locales.getText("pisell2.text.payment-link"),
66
+ key: "payment",
67
+ children: [
68
+ {
69
+ label: import_utils.locales.getText("pisell2.text.send-mail"),
70
+ key: "sendMail"
71
+ },
72
+ {
73
+ label: import_utils.locales.getText("pisell2.text.copy-to-clipboard"),
74
+ key: "copy"
75
+ }
76
+ ]
77
+ },
78
+ print: {
79
+ label: "Print",
80
+ key: "print"
81
+ },
82
+ orderDetail: {
83
+ label: import_utils.locales.getText("pisell2.text.deposit-order-detail"),
84
+ key: "orderDetail"
85
+ },
86
+ refund: {
87
+ label: import_utils.locales.getText("pisell2.text.refund"),
88
+ key: "refund"
89
+ },
90
+ rebook: {
91
+ label: import_utils.locales.getText("pisell2.text.rebook"),
92
+ key: "rebook"
93
+ },
94
+ cancelOrder: {
95
+ label: "Cancel order",
96
+ key: "cancelOrder"
97
+ }
98
+ };
99
+ (0, import_react.useEffect)(() => {
100
+ if (state.bookingDetail) {
101
+ state.action({
102
+ type: "pisell1.registerPlugin",
103
+ data: {
104
+ pluginList: ["RefundPlugin"]
105
+ }
106
+ });
107
+ }
108
+ }, [state.bookingDetail]);
57
109
  (0, import_react.useEffect)(() => {
58
110
  store == null ? void 0 : store.dispatch({
59
111
  type: "global/_getPaymentLinkBtnShow"
@@ -63,13 +115,20 @@ var Footer = (props) => {
63
115
  var _a2, _b2, _c2;
64
116
  return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
65
117
  }, [(_g = (_f = (_e = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.appointment_subject]);
118
+ const transaction_habit_selection = (0, import_react.useMemo)(() => {
119
+ var _a2, _b2, _c2;
120
+ return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.information_tab) == null ? void 0 : _c2.transaction_habit_selection) || {
121
+ type: "service_now_pay_later",
122
+ button_rows: 1
123
+ };
124
+ }, [(_i = (_h = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _h.config) == null ? void 0 : _i.information_tab]);
66
125
  const addonsEdit = (0, import_react.useMemo)(() => {
67
126
  var _a2;
68
127
  if ((_a2 = state.addons) == null ? void 0 : _a2.edit) {
69
128
  return true;
70
129
  }
71
130
  return false;
72
- }, [(_h = state.addons) == null ? void 0 : _h.edit]);
131
+ }, [(_j = state.addons) == null ? void 0 : _j.edit]);
73
132
  const infoEdit = (0, import_react.useMemo)(() => {
74
133
  var _a2, _b2, _c2, _d2, _e2, _f2;
75
134
  if (!state.bookingId) {
@@ -222,7 +281,8 @@ var Footer = (props) => {
222
281
  key: "booking_refund",
223
282
  data: {
224
283
  order_id: state.bookingId
225
- }
284
+ },
285
+ origin: "/booking"
226
286
  });
227
287
  }
228
288
  state.action({
@@ -236,11 +296,21 @@ var Footer = (props) => {
236
296
  });
237
297
  };
238
298
  const checkoutButton = (0, import_react.useMemo)(() => {
299
+ let buttonType = "primary";
300
+ if (transaction_habit_selection.type === "service_now_pay_later") {
301
+ buttonType = "default";
302
+ }
303
+ if (source === "payment") {
304
+ buttonType = "primary";
305
+ }
306
+ if (!isEdit) {
307
+ buttonType = "primary";
308
+ }
239
309
  return /* @__PURE__ */ import_react.default.createElement(
240
310
  import_antd2.Button,
241
311
  {
242
312
  className: "pisell-lowcode__booking-footer-buttons-item",
243
- type: source === "payment" ? "primary" : isEdit ? "default" : "primary",
313
+ type: buttonType,
244
314
  loading: checkoutLoading,
245
315
  onClick: () => {
246
316
  handleCheckout();
@@ -260,6 +330,7 @@ var Footer = (props) => {
260
330
  customer = (res == null ? void 0 : res.customer_id) ? { id: res == null ? void 0 : res.customer_id } : state.bookingDetail.customer;
261
331
  }
262
332
  if (e.key === "sendMail") {
333
+ console.log(e);
263
334
  state.action({
264
335
  type: "pisell1.sendPayLinkEmail",
265
336
  data: {
@@ -284,6 +355,55 @@ var Footer = (props) => {
284
355
  });
285
356
  }
286
357
  };
358
+ const handleRebook = () => {
359
+ var _a2;
360
+ (_a2 = state.onRebook) == null ? void 0 : _a2.call(state);
361
+ };
362
+ const handleSale = () => {
363
+ var _a2, _b2;
364
+ if (isTerminal == null ? void 0 : isTerminal()) {
365
+ return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
366
+ module: "booking",
367
+ key: "edit_order",
368
+ data: {
369
+ order_id: state.bookingId
370
+ }
371
+ });
372
+ }
373
+ if (state.channelDisabledEdit) {
374
+ modal.warning({
375
+ okText: import_utils.locales.getText("pisell2.text.ok"),
376
+ content: import_utils.locales.getText("pisell2.text.terminal-edit-message")
377
+ });
378
+ return;
379
+ }
380
+ setActiveTab == null ? void 0 : setActiveTab("addons");
381
+ };
382
+ const handlePrint = () => {
383
+ };
384
+ const handleOrderDetail = () => {
385
+ if (isTerminal == null ? void 0 : isTerminal()) {
386
+ return interaction.utils.postMessageToApp({
387
+ module: "booking",
388
+ key: "view_order",
389
+ data: {
390
+ order_id: state.bookingId
391
+ },
392
+ origin: "/booking"
393
+ });
394
+ }
395
+ state.action({
396
+ type: "pisell1.goOrderDetail",
397
+ data: {
398
+ orderId: state.bookingId
399
+ },
400
+ callback: () => {
401
+ state == null ? void 0 : state.callback();
402
+ }
403
+ });
404
+ };
405
+ const handleCancel = () => {
406
+ };
287
407
  const paymentLinkButton = (0, import_react.useMemo)(() => {
288
408
  const items = [
289
409
  { label: import_utils.locales.getText("pisell2.text.send-mail"), key: "sendMail" },
@@ -292,11 +412,15 @@ var Footer = (props) => {
292
412
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items, onClick: handleMenuClick } }, /* @__PURE__ */ import_react.default.createElement(import_antd2.Button, { className: "pisell-lowcode__booking-footer-buttons-item" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, import_utils.locales.getText("pisell2.text.payment-link"), /* @__PURE__ */ import_react.default.createElement(import_icons.DownOutlined, null))));
293
413
  }, [handleMenuClick]);
294
414
  const saveButton = (0, import_react.useMemo)(() => {
415
+ let buttonType = "default";
416
+ if (transaction_habit_selection.type === "service_now_pay_later") {
417
+ buttonType = "primary";
418
+ }
295
419
  return /* @__PURE__ */ import_react.default.createElement(
296
420
  import_antd2.Button,
297
421
  {
298
422
  className: "pisell-lowcode__booking-footer-buttons-item",
299
- type: "primary",
423
+ type: buttonType,
300
424
  onClick: () => {
301
425
  handleSave({ type: "save" });
302
426
  },
@@ -318,6 +442,16 @@ var Footer = (props) => {
318
442
  import_utils.locales.getText("pisell2.text.status.completed")
319
443
  );
320
444
  }, [state.appointment_status]);
445
+ const rebookButton = (0, import_react.useMemo)(() => {
446
+ return /* @__PURE__ */ import_react.default.createElement(
447
+ import_antd2.Button,
448
+ {
449
+ className: "pisell-lowcode__booking-footer-buttons-item",
450
+ onClick: handleRebook
451
+ },
452
+ import_utils.locales.getText("pisell2.text.rebook")
453
+ );
454
+ }, [state == null ? void 0 : state.onRebook]);
321
455
  const refundButton = (0, import_react.useMemo)(() => {
322
456
  return /* @__PURE__ */ import_react.default.createElement(
323
457
  import_antd2.Button,
@@ -334,7 +468,8 @@ var Footer = (props) => {
334
468
  save: saveButton,
335
469
  complete: completeButton,
336
470
  refund: refundButton,
337
- paymentLink: paymentLinkButton
471
+ paymentLink: paymentLinkButton,
472
+ rebook: rebookButton
338
473
  };
339
474
  const isCheckout = (0, import_react.useMemo)(() => {
340
475
  var _a2, _b2, _c2;
@@ -353,9 +488,41 @@ var Footer = (props) => {
353
488
  return false;
354
489
  }
355
490
  }, [state.bookingDetail, total.notPaidAmount]);
491
+ const moreButton = (0, import_react.useMemo)(() => {
492
+ let arr = [];
493
+ if (!state.bookingId) {
494
+ return [];
495
+ }
496
+ if (source !== "info") {
497
+ return [];
498
+ }
499
+ if (state.renderType === "eventBooking") {
500
+ return [];
501
+ }
502
+ if (state.bookingId && isShowPaymentLink) {
503
+ arr.push(actionMap.paymentLink);
504
+ }
505
+ if (transaction_habit_selection.button_rows == 1) {
506
+ if (state.appointment_status !== "cancelled") {
507
+ if (!state.disabledEdit) {
508
+ arr.push(actionMap.sale);
509
+ }
510
+ }
511
+ }
512
+ if (transaction_habit_selection.button_rows == 1) {
513
+ arr.push(actionMap.orderDetail);
514
+ }
515
+ if (total.paidAmount > 0) {
516
+ arr.push(actionMap.refund);
517
+ }
518
+ if (state.appointment_status !== "cancelled") {
519
+ arr.push(actionMap.rebook);
520
+ }
521
+ return arr;
522
+ }, [state, total, isShowPaymentLink, source]);
356
523
  const _buttons = (0, import_react.useMemo)(() => {
357
524
  if (state.appointment_status === "cancelled") {
358
- return [];
525
+ return [buttonMap.rebook];
359
526
  }
360
527
  if (source === "addons") {
361
528
  let arr = [];
@@ -380,9 +547,6 @@ var Footer = (props) => {
380
547
  }
381
548
  if (source === "info") {
382
549
  let arr = [];
383
- if (state.bookingId && isShowPaymentLink) {
384
- arr.push(buttonMap.paymentLink);
385
- }
386
550
  if (isCheckout) {
387
551
  arr.push(buttonMap.checkout);
388
552
  } else {
@@ -402,12 +566,11 @@ var Footer = (props) => {
402
566
  isEdit,
403
567
  checkoutLoading,
404
568
  isDisabled,
405
- state.bookingId,
406
569
  source,
407
- state.appointment_status,
408
570
  buttonMap,
409
571
  loading,
410
- isCheckout
572
+ isCheckout,
573
+ state
411
574
  ]);
412
575
  const isOnlyDeposit = (0, import_react.useMemo)(() => {
413
576
  var _a2, _b2, _c2, _d2;
@@ -499,9 +662,40 @@ var Footer = (props) => {
499
662
  }, [
500
663
  state.bookingId,
501
664
  state.bookingDetail,
502
- (_i = state.addons) == null ? void 0 : _i.load,
665
+ (_k = state.addons) == null ? void 0 : _k.load,
503
666
  state.renderType
504
667
  ]);
668
+ const menuChange = (e) => {
669
+ console.log("e.key", e.key);
670
+ switch (e.key) {
671
+ case "sendMail":
672
+ handleMenuClick(e);
673
+ break;
674
+ case "copy":
675
+ handleMenuClick(e);
676
+ break;
677
+ case "rebook":
678
+ handleRebook();
679
+ break;
680
+ case "sale":
681
+ handleSale();
682
+ break;
683
+ case "print":
684
+ handlePrint();
685
+ break;
686
+ case "orderDetail":
687
+ handleOrderDetail();
688
+ break;
689
+ case "refund":
690
+ handleRefund();
691
+ break;
692
+ case "cancelOrder":
693
+ handleCancel();
694
+ break;
695
+ default:
696
+ break;
697
+ }
698
+ };
505
699
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
506
700
  "span",
507
701
  {
@@ -529,7 +723,7 @@ var Footer = (props) => {
529
723
  },
530
724
  /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-border" }),
531
725
  /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, import_utils.locales.getText("pisell1.text.subtotal")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.productAmount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))),
532
- (((_j = state.bookingDetail) == null ? void 0 : _j.surcharge) || []).map((d) => {
726
+ (((_l = state.bookingDetail) == null ? void 0 : _l.surcharge) || []).map((d) => {
533
727
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item", key: d.id }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, d.name[state.locale]), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(d.amount, 2, (state == null ? void 0 : state.amountSymbol) || "$")));
534
728
  }),
535
729
  state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("pisell1.text.tax")), /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { fontSize: 14 } }, taxText)), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.tax, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
@@ -554,6 +748,39 @@ var Footer = (props) => {
554
748
  2,
555
749
  (state == null ? void 0 : state.amountSymbol) || "$"
556
750
  ))) : null) : null
557
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-buttons" }, /* @__PURE__ */ import_react.default.createElement(import_FooterMenus.default, { state, dispatch, source }), _buttons));
751
+ ), !(state == null ? void 0 : state.disableEventBookingEdit) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-buttons" }, /* @__PURE__ */ import_react.default.createElement(
752
+ import_FooterMenus.default,
753
+ {
754
+ items: moreButton,
755
+ state,
756
+ dispatch,
757
+ source,
758
+ menuChange
759
+ }
760
+ ), _buttons), source === "info" && state.bookingId && !state.disabledEdit && (transaction_habit_selection == null ? void 0 : transaction_habit_selection.button_rows) == 2 ? /* @__PURE__ */ import_react.default.createElement(
761
+ "div",
762
+ {
763
+ className: "pisell-lowcode__booking-footer-buttons",
764
+ style: { marginTop: 12 }
765
+ },
766
+ state.appointment_status !== "cancelled" ? /* @__PURE__ */ import_react.default.createElement(
767
+ import_antd2.Button,
768
+ {
769
+ onClick: () => handleSale(),
770
+ size: "large",
771
+ className: "pisell-lowcode__booking-footer-buttons-item"
772
+ },
773
+ actionMap.sale.label
774
+ ) : null,
775
+ /* @__PURE__ */ import_react.default.createElement(
776
+ import_antd2.Button,
777
+ {
778
+ onClick: () => handleOrderDetail(),
779
+ size: "large",
780
+ className: "pisell-lowcode__booking-footer-buttons-item"
781
+ },
782
+ actionMap.orderDetail.label
783
+ )
784
+ ) : null, contextHolder);
558
785
  };
559
786
  var footer_default = Footer;
@@ -272,7 +272,7 @@ var Info = () => {
272
272
  {
273
273
  className: "pisell-lowcode__booking-client",
274
274
  onClick: () => {
275
- if (!isWalkIn) {
275
+ if (!isWalkIn || (state == null ? void 0 : state.disableEventBookingEdit)) {
276
276
  return;
277
277
  }
278
278
  handleOpenClientModal();
@@ -286,7 +286,7 @@ var Info = () => {
286
286
  icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
287
287
  }
288
288
  ),
289
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = state.client.value) == null ? void 0 : _c.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_d = state.client.value) == null ? void 0 : _d.email) : null, ((_e = state.client.value) == null ? void 0 : _e.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_f = state.client.value) == null ? void 0 : _f.phone) : null)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-right" }, isWalkIn ? /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__booking-client-add-icon" }) : /* @__PURE__ */ import_react.default.createElement(
289
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = state.client.value) == null ? void 0 : _c.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_d = state.client.value) == null ? void 0 : _d.email) : null, ((_e = state.client.value) == null ? void 0 : _e.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_f = state.client.value) == null ? void 0 : _f.phone) : null)), !(state == null ? void 0 : state.disableEventBookingEdit) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-right" }, isWalkIn ? /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__booking-client-add-icon" }) : /* @__PURE__ */ import_react.default.createElement(
290
290
  import_antd.Dropdown,
291
291
  {
292
292
  menu: {
@@ -25,7 +25,8 @@
25
25
  font-size: 14px;
26
26
  font-style: normal;
27
27
  font-weight: 400;
28
- line-height: 20px; /* 142.857% */
28
+ line-height: 20px;
29
+ /* 142.857% */
29
30
  }
30
31
 
31
32
  .booking-header-line-2 {
@@ -34,6 +35,7 @@
34
35
  align-items: center;
35
36
  justify-content: space-between;
36
37
  }
38
+
37
39
  .booking-header-left {
38
40
  color: var(--Base-White, #FFF);
39
41
  font-size: 18px;
@@ -51,6 +53,10 @@
51
53
  font-style: normal;
52
54
  font-weight: 400;
53
55
  cursor: pointer;
56
+ border: 1px solid #fff;
57
+ padding: 4px 12px;
58
+ border-radius: 24px;
59
+
54
60
 
55
61
  .booking-header-right-status-icon {
56
62
  font-size: 20px;
@@ -83,7 +83,7 @@ var Info = (0, import_model.Provider)((props) => {
83
83
  }
84
84
  }, []);
85
85
  (0, import_react.useEffect)(() => {
86
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
86
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _k, _l, _m;
87
87
  const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
88
88
  modal.dispatch({
89
89
  type: "setState",
@@ -91,7 +91,8 @@ var Info = (0, import_model.Provider)((props) => {
91
91
  setGlobalState: props.setGlobalState,
92
92
  ...globalState,
93
93
  isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
94
- isFranchisee
94
+ isFranchisee,
95
+ timezone: (_m = (_l = (_k = (_j = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j.getState()) == null ? void 0 : _k.global) == null ? void 0 : _l.globalConfig) == null ? void 0 : _m.timezone
95
96
  }
96
97
  });
97
98
  }, [globalState]);
@@ -106,7 +107,7 @@ var Info = (0, import_model.Provider)((props) => {
106
107
  };
107
108
  const header = (0, import_react.useMemo)(() => {
108
109
  if ((globalState == null ? void 0 : globalState.renderType) === "eventBooking") {
109
- return import_utils.locales.getText("pisell2.text.enroll");
110
+ return import_utils.locales.getText("pisell2.text.enroll.detail");
110
111
  }
111
112
  return (globalState == null ? void 0 : globalState.bookingId) ? /* @__PURE__ */ import_react.default.createElement(import_header.default, { state: modal.state, dispatch: modal.dispatch }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { height: 20 } });
112
113
  }, [
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- declare const Notes: () => React.JSX.Element;
2
+ declare const Notes: () => React.JSX.Element | null;
3
3
  export default Notes;
@@ -88,6 +88,9 @@ var Notes = () => {
88
88
  });
89
89
  }
90
90
  };
91
+ if (orderNote.length === 0 && modal.state.disableEventBookingEdit) {
92
+ return null;
93
+ }
91
94
  return /* @__PURE__ */ import_react.default.createElement(
92
95
  import_NoteBlock.default,
93
96
  {
@@ -98,7 +101,7 @@ var Notes = () => {
98
101
  notes: orderNote,
99
102
  apis: (_c = modal == null ? void 0 : modal.state) == null ? void 0 : _c.apis,
100
103
  placeholder: import_utils.locales.getText("pisell2.text.add-order-notes"),
101
- isEdit: true,
104
+ isEdit: false,
102
105
  onChange: (e, type, noteType) => {
103
106
  noteChange({
104
107
  note: e,
@@ -322,6 +322,7 @@ var Pet = () => {
322
322
  closeCallback: () => {
323
323
  searchChange("");
324
324
  },
325
+ showDropDown: !state.disableEventBookingEdit,
325
326
  searchChange,
326
327
  searchValue: params.search,
327
328
  loadMore,
@@ -363,6 +364,8 @@ var Pet = () => {
363
364
  },
364
365
  addButtonProps: {
365
366
  style: { margin: 0 },
367
+ disabled: state.disableEventBookingEdit,
368
+ showDisabledMessage: !state.disableEventBookingEdit,
366
369
  addCallback: async () => {
367
370
  addCallback();
368
371
  }
@@ -49,7 +49,7 @@ var import_utils4 = require("@pisell/utils");
49
49
  var import_ahooks = require("ahooks");
50
50
  var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080];
51
51
  var Info = () => {
52
- var _a, _b, _c;
52
+ var _a, _b, _c, _d;
53
53
  const [search, setSearch] = (0, import_react.useState)("");
54
54
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
55
55
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -186,7 +186,11 @@ var Info = () => {
186
186
  cacheItem.new = 0;
187
187
  }
188
188
  cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
189
- cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_b2 = state.service) == null ? void 0 : _b2.resourcesOrigin) || []).length === 1);
189
+ if (state.renderType === "eventBooking") {
190
+ cacheItem.autoClose = false;
191
+ } else {
192
+ cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_b2 = state.service) == null ? void 0 : _b2.resourcesOrigin) || []).length === 1);
193
+ }
190
194
  dispatch({
191
195
  type: "setService",
192
196
  payload: {
@@ -214,16 +218,16 @@ var Info = () => {
214
218
  return state.service.value.length > 0;
215
219
  }, [state.service.value]);
216
220
  (0, import_react.useEffect)(() => {
217
- var _a2, _b2, _c2, _d, _e;
221
+ var _a2, _b2, _c2, _d2, _e, _f, _g;
218
222
  if (shopList.includes(
219
- (_e = (_d = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d.globalConfig) == null ? void 0 : _e.id
223
+ (_e = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e.id
220
224
  )) {
221
225
  return;
222
226
  }
223
- if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking") {
227
+ if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f = state.service) == null ? void 0 : _f.value) == null ? void 0 : _g.length) === 0) {
224
228
  handleSelectService();
225
229
  }
226
- }, [state.modalOpen, state.bookingId]);
230
+ }, [state.modalOpen, state.bookingId, (_b = state.service) == null ? void 0 : _b.value]);
227
231
  const showAddButton = (0, import_react.useMemo)(() => {
228
232
  return !state.disabledEdit && !state.channelDisabledEdit;
229
233
  }, [state.disabledEdit, state.channelDisabledEdit]);
@@ -267,7 +271,7 @@ var Info = () => {
267
271
  state.service.value,
268
272
  loading
269
273
  ]);
270
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = (_b = state.service) == null ? void 0 : _b.cacheItem) == null ? void 0 : _c.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
274
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_d = (_c = state.service) == null ? void 0 : _c.cacheItem) == null ? void 0 : _d.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
271
275
  import_drawer.default,
272
276
  {
273
277
  open: state.service.addModal,
@@ -48,7 +48,7 @@ var import_like = __toESM(require("../like"));
48
48
  var import_mock = require("../../../mock");
49
49
  var import_utils4 = require("../addService/utils");
50
50
  var Info = () => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
52
52
  const [form] = import_antd.Form.useForm();
53
53
  const useTotal = import_antd.Form.useWatch("total", form);
54
54
  const useLikeStatus = import_antd.Form.useWatch("like_status", form);
@@ -331,12 +331,13 @@ var Info = () => {
331
331
  (0, import_react.useEffect)(() => {
332
332
  getResourcesData();
333
333
  }, [state.date.value]);
334
+ const SelectTime = (_j = window.BaseMaterials) == null ? void 0 : _j.SelectTime;
334
335
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
335
336
  import_drawer.default,
336
337
  {
337
338
  zIndex: 1e3,
338
339
  forceRender: true,
339
- open: state.service.editModal && !((_j = state.service.cacheItem) == null ? void 0 : _j.autoClose),
340
+ open: state.service.editModal && !((_k = state.service.cacheItem) == null ? void 0 : _k.autoClose),
340
341
  title: import_utils.locales.getText("pisell2.text.edit-service"),
341
342
  onClose: () => {
342
343
  dispatch({
@@ -365,7 +366,7 @@ var Info = () => {
365
366
  });
366
367
  }
367
368
  },
368
- /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.product_name) || "-"),
369
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.product_name) || "-"),
369
370
  /* @__PURE__ */ import_react.default.createElement(
370
371
  import_collapsibleList.default,
371
372
  {
@@ -390,8 +391,8 @@ var Info = () => {
390
391
  precision: 2,
391
392
  style: { width: "100%" },
392
393
  min: 0,
393
- max: ((_o = (_n = state.service.cacheItem) == null ? void 0 : _n._extend) == null ? void 0 : _o.origin_total) || 0,
394
- placeholder: ((_q = (_p = state.service.cacheItem) == null ? void 0 : _p._extend) == null ? void 0 : _q.origin_total) || "0"
394
+ max: ((_p = (_o = state.service.cacheItem) == null ? void 0 : _o._extend) == null ? void 0 : _p.origin_total) || 0,
395
+ placeholder: ((_r = (_q = state.service.cacheItem) == null ? void 0 : _q._extend) == null ? void 0 : _r.origin_total) || "0"
395
396
  }
396
397
  )
397
398
  )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
@@ -428,7 +429,21 @@ var Info = () => {
428
429
  name: "start_time",
429
430
  rules: [{ required: true }]
430
431
  },
431
- /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { size: "large" }, renderOptions(timeObj.timeSlices))
432
+ SelectTime ? /* @__PURE__ */ import_react.default.createElement(
433
+ SelectTime,
434
+ {
435
+ slice: (_v = (_u = (_t = (_s = state.bookingConfig) == null ? void 0 : _s.config) == null ? void 0 : _t.basic) == null ? void 0 : _u.service_time) == null ? void 0 : _v.value,
436
+ onChange: (e) => {
437
+ console.log("eeee", e);
438
+ },
439
+ timePickerProps: {
440
+ style: { width: "100%" }
441
+ },
442
+ timeProps: {
443
+ style: { zoom: 0.8 }
444
+ }
445
+ }
446
+ ) : null
432
447
  )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
433
448
  import_antd.Form.Item,
434
449
  {
@@ -47,7 +47,7 @@ var ServiceList = () => {
47
47
  maxLimit: import_utils.locales.getText("pisell2.text.status.service-error-3")
48
48
  };
49
49
  const handleEditService = (item) => {
50
- if (state.disabledEdit) {
50
+ if (state.disabledEdit || state.disableEventBookingEdit) {
51
51
  return;
52
52
  }
53
53
  dispatch({
@@ -40,7 +40,7 @@ declare const _default: {
40
40
  'pisell2.text.add-notes': string;
41
41
  'pisell2.text.notes': string;
42
42
  'pisell2.text.new-appointment': string;
43
- 'pisell2.text.enroll': string;
43
+ 'pisell2.text.enroll.detail': string;
44
44
  'pisell2.text.add-products-successfully': string;
45
45
  'pisell2.text.add': string;
46
46
  'pisell2.text.created-successfully': string;
@@ -194,7 +194,7 @@ declare const _default: {
194
194
  'pisell2.text.add-notes': string;
195
195
  'pisell2.text.notes': string;
196
196
  'pisell2.text.new-appointment': string;
197
- 'pisell2.text.enroll': string;
197
+ 'pisell2.text.enroll.detail': string;
198
198
  'pisell2.text.add-products-successfully': string;
199
199
  'pisell2.text.refund': string;
200
200
  'pisell2.text.refund-amount': string;
@@ -343,7 +343,7 @@ declare const _default: {
343
343
  'pisell2.text.add-notes': string;
344
344
  'pisell2.text.notes': string;
345
345
  'pisell2.text.new-appointment': string;
346
- 'pisell2.text.enroll': string;
346
+ 'pisell2.text.enroll.detail': string;
347
347
  'pisell2.text.add-products-successfully': string;
348
348
  'pisell2.text.add': string;
349
349
  'pisell2.text.created-successfully': string;