@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
@@ -15,6 +15,7 @@ export interface AddButtonProps {
15
15
  style?: React.CSSProperties;
16
16
  disabled?: boolean;
17
17
  loading?: boolean;
18
+ showDisabledMessage?: boolean;
18
19
  }
19
20
  declare const AddButton: React.FC<AddButtonProps>;
20
21
  export default AddButton;
@@ -20,11 +20,15 @@ var AddButton = function AddButton(_ref) {
20
20
  subTitle = _ref.subTitle,
21
21
  style = _ref.style,
22
22
  disabled = _ref.disabled,
23
- loading = _ref.loading;
23
+ loading = _ref.loading,
24
+ _ref$showDisabledMess = _ref.showDisabledMessage,
25
+ showDisabledMessage = _ref$showDisabledMess === void 0 ? true : _ref$showDisabledMess;
24
26
  var _onClick = function _onClick() {
25
27
  // 禁止点击则 提示先创建客户
26
28
  if (disabled) {
27
- message.warning(locales.getText("pisell2.text.please-select-the-customer-first"));
29
+ if (showDisabledMessage) {
30
+ message.warning(locales.getText("pisell2.text.please-select-the-customer-first"));
31
+ }
28
32
  } else {
29
33
  onClick === null || onClick === void 0 ? void 0 : onClick();
30
34
  }
@@ -68,7 +68,9 @@ var CustomSelect = function CustomSelect(props, ref) {
68
68
  loadMore = props.loadMore,
69
69
  modalOpen = props.modalOpen,
70
70
  closeCallback = props.closeCallback,
71
- autoFocus = props.autoFocus;
71
+ autoFocus = props.autoFocus,
72
+ _props$showDropDown = props.showDropDown,
73
+ showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown;
72
74
  var searchRef = useRef();
73
75
 
74
76
  // 当前选择的值
@@ -356,7 +358,7 @@ var CustomSelect = function CustomSelect(props, ref) {
356
358
  return /*#__PURE__*/React.createElement("div", {
357
359
  className: classNames("pisell-lowcode__custom-select-card", previewItemClassName),
358
360
  key: d[rowKey]
359
- }, previewItemRender === null || previewItemRender === void 0 ? void 0 : previewItemRender(d), /*#__PURE__*/React.createElement("div", {
361
+ }, previewItemRender === null || previewItemRender === void 0 ? void 0 : previewItemRender(d), showDropDown && /*#__PURE__*/React.createElement("div", {
360
362
  onClick: function onClick(e) {
361
363
  e.preventDefault();
362
364
  e.stopPropagation();
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import "./index.less";
3
- declare const FooterMenus: ({ state, source }: any) => React.JSX.Element | null;
3
+ declare const FooterMenus: ({ state, menuChange, items }: any) => React.JSX.Element | null;
4
4
  export default FooterMenus;
@@ -1,29 +1,75 @@
1
- import React, { useMemo } from "react";
1
+ import React from "react";
2
2
  import MenuButton from "../../../components/menuButton";
3
3
  import "./index.less";
4
- import { locales } from "@pisell/utils";
5
4
  var FooterMenus = function FooterMenus(_ref) {
6
5
  var state = _ref.state,
7
- source = _ref.source;
8
- var items = useMemo(function () {
9
- var list = [];
10
- if (source === "info" && state.bookingId && state.renderType !== "eventBooking") {
11
- list.push({
12
- label: locales.getText("pisell2.text.rebook"),
13
- key: "rebook"
14
- });
15
- }
16
- return list;
17
- }, [state, source]);
18
- var handleRebook = function handleRebook() {
19
- var _state$onRebook;
20
- (_state$onRebook = state.onRebook) === null || _state$onRebook === void 0 ? void 0 : _state$onRebook.call(state);
21
- };
22
- var menuChange = function menuChange(e) {
23
- if (e.key === "rebook") {
24
- handleRebook();
25
- }
26
- };
6
+ menuChange = _ref.menuChange,
7
+ items = _ref.items;
8
+ // const items = useMemo(() => {
9
+ // return [
10
+ // {
11
+ // label: "Payment link",
12
+ // key: "payment",
13
+ // children: [
14
+ // {
15
+ // label: "Send email",
16
+ // key: "sendEmail",
17
+ // },
18
+ // {
19
+ // label: "Copy to clipboard",
20
+ // key: "copyToClipboard",
21
+ // },
22
+ // ],
23
+ // },
24
+ // {
25
+ // label: "Sale",
26
+ // key: "sale",
27
+ // },
28
+ // {
29
+ // label: "Print",
30
+ // key: "print",
31
+ // },
32
+ // {
33
+ // label: "Order detail",
34
+ // key: "orderDetail",
35
+ // },
36
+ // {
37
+ // label: "Refund",
38
+ // key: "refund",
39
+ // },
40
+ // {
41
+ // label: "Rebook",
42
+ // key: "rebook",
43
+ // },
44
+ // {
45
+ // label: "Cancel order",
46
+ // key: "cancelOrder",
47
+ // },
48
+ // ];
49
+ // let list = [];
50
+ // if (
51
+ // source === "info" &&
52
+ // state.bookingId &&
53
+ // state.renderType !== "eventBooking"
54
+ // ) {
55
+ // list.push({
56
+ // label: locales.getText("pisell2.text.rebook"),
57
+ // key: "rebook",
58
+ // });
59
+ // }
60
+
61
+ // return list;
62
+ // }, [state, source]);
63
+
64
+ // const handleRebook = () => {
65
+ // state.onRebook?.();
66
+ // };
67
+
68
+ // const menuChange = (e: any) => {
69
+ // if (e.key === "rebook") {
70
+ // handleRebook();
71
+ // }
72
+ // };
27
73
  return items.length ? /*#__PURE__*/React.createElement("div", {
28
74
  className: "pisell-lowcode__booking-footer-buttons-item-rebook"
29
75
  }, /*#__PURE__*/React.createElement(MenuButton, {
@@ -31,6 +77,9 @@ var FooterMenus = function FooterMenus(_ref) {
31
77
  dropdownProps: {
32
78
  placement: "bottomLeft",
33
79
  menu: {
80
+ style: {
81
+ minWidth: 200
82
+ },
34
83
  items: items,
35
84
  onClick: menuChange
36
85
  }
@@ -20,7 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
  import React, { useEffect, useMemo, useState } from "react";
21
21
  import ChevronDown from "@pisell/icon/es/ChevronDown";
22
22
  import classNames from "classnames";
23
- import { Skeleton, message, Dropdown, Space } from "antd";
23
+ import { Skeleton, message, Dropdown, Space, Modal } from "antd";
24
24
  import { formatAmount, locales } from "@pisell/utils";
25
25
  import { Button } from "antd";
26
26
  import { formatProducts } from "../../addons";
@@ -40,7 +40,7 @@ import { DownOutlined } from "@ant-design/icons";
40
40
  * @Date: 2024-01-30 16:51
41
41
  */
42
42
  var Footer = function Footer(props) {
43
- var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$addons2, _state$addons4, _state$bookingDetail11;
43
+ var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$bookingConfig8, _state$bookingConfig9, _state$addons2, _state$addons4, _state$bookingDetail11;
44
44
  var state = props.state,
45
45
  buttons = props.buttons,
46
46
  dispatch = props.dispatch,
@@ -66,6 +66,58 @@ var Footer = function Footer(props) {
66
66
  interaction = _context$appHelper$ut.interaction,
67
67
  store = _context$appHelper$ut.store;
68
68
  var isShowPaymentLink = store === null || store === void 0 ? void 0 : (_store$getState = store.getState) === null || _store$getState === void 0 ? void 0 : (_store$getState$call = _store$getState.call(store)) === null || _store$getState$call === void 0 ? void 0 : (_store$getState$call$ = _store$getState$call.global) === null || _store$getState$call$ === void 0 ? void 0 : _store$getState$call$.paymentLinkBtnShow;
69
+ var _Modal$useModal = Modal.useModal(),
70
+ _Modal$useModal2 = _slicedToArray(_Modal$useModal, 2),
71
+ modal = _Modal$useModal2[0],
72
+ contextHolder = _Modal$useModal2[1];
73
+ var setActiveTab = state.setActiveTab;
74
+ var actionMap = {
75
+ sale: {
76
+ label: locales.getText("pisell2.text.addons"),
77
+ key: "sale"
78
+ },
79
+ paymentLink: {
80
+ label: locales.getText("pisell2.text.payment-link"),
81
+ key: "payment",
82
+ children: [{
83
+ label: locales.getText("pisell2.text.send-mail"),
84
+ key: "sendMail"
85
+ }, {
86
+ label: locales.getText("pisell2.text.copy-to-clipboard"),
87
+ key: "copy"
88
+ }]
89
+ },
90
+ print: {
91
+ label: "Print",
92
+ key: "print"
93
+ },
94
+ orderDetail: {
95
+ label: locales.getText("pisell2.text.deposit-order-detail"),
96
+ key: "orderDetail"
97
+ },
98
+ refund: {
99
+ label: locales.getText("pisell2.text.refund"),
100
+ key: "refund"
101
+ },
102
+ rebook: {
103
+ label: locales.getText("pisell2.text.rebook"),
104
+ key: "rebook"
105
+ },
106
+ cancelOrder: {
107
+ label: "Cancel order",
108
+ key: "cancelOrder"
109
+ }
110
+ };
111
+ useEffect(function () {
112
+ if (state.bookingDetail) {
113
+ state.action({
114
+ type: "pisell1.registerPlugin",
115
+ data: {
116
+ pluginList: ["RefundPlugin"]
117
+ }
118
+ });
119
+ }
120
+ }, [state.bookingDetail]);
69
121
  useEffect(function () {
70
122
  store === null || store === void 0 ? void 0 : store.dispatch({
71
123
  type: "global/_getPaymentLinkBtnShow"
@@ -77,6 +129,13 @@ var Footer = function Footer(props) {
77
129
  var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
78
130
  return (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : _state$bookingConfig$2.appointment_subject) || {};
79
131
  }, [state === null || state === void 0 ? void 0 : (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : (_state$bookingConfig3 = _state$bookingConfig2.config) === null || _state$bookingConfig3 === void 0 ? void 0 : (_state$bookingConfig4 = _state$bookingConfig3.basic) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.appointment_subject]);
132
+ var transaction_habit_selection = useMemo(function () {
133
+ var _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7;
134
+ return (state === null || state === void 0 ? void 0 : (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : (_state$bookingConfig6 = _state$bookingConfig5.config) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.information_tab) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.transaction_habit_selection) || {
135
+ type: "service_now_pay_later",
136
+ button_rows: 1
137
+ };
138
+ }, [state === null || state === void 0 ? void 0 : (_state$bookingConfig8 = state.bookingConfig) === null || _state$bookingConfig8 === void 0 ? void 0 : (_state$bookingConfig9 = _state$bookingConfig8.config) === null || _state$bookingConfig9 === void 0 ? void 0 : _state$bookingConfig9.information_tab]);
80
139
 
81
140
  // addons 是否有编辑
82
141
  var addonsEdit = useMemo(function () {
@@ -415,7 +474,8 @@ var Footer = function Footer(props) {
415
474
  key: "booking_refund",
416
475
  data: {
417
476
  order_id: state.bookingId
418
- }
477
+ },
478
+ origin: "/booking"
419
479
  });
420
480
  }
421
481
  state.action({
@@ -440,11 +500,21 @@ var Footer = function Footer(props) {
440
500
  * @Date: 2024-01-30 16:57
441
501
  */
442
502
  var checkoutButton = useMemo(function () {
503
+ var buttonType = "primary";
504
+ if (transaction_habit_selection.type === "service_now_pay_later") {
505
+ buttonType = "default";
506
+ }
507
+ if (source === "payment") {
508
+ buttonType = "primary";
509
+ }
510
+ if (!isEdit) {
511
+ buttonType = "primary";
512
+ }
443
513
  return /*#__PURE__*/React.createElement(Button, {
444
514
  className: "pisell-lowcode__booking-footer-buttons-item"
445
515
  // payment页面为主按钮 info页面 编辑时默认按钮 否则是主按钮
446
516
  ,
447
- type: source === "payment" ? "primary" : isEdit ? "default" : "primary",
517
+ type: buttonType,
448
518
  loading: checkoutLoading,
449
519
  onClick: function onClick() {
450
520
  handleCheckout();
@@ -477,6 +547,7 @@ var Footer = function Footer(props) {
477
547
  } : state.bookingDetail.customer;
478
548
  case 8:
479
549
  if (e.key === "sendMail") {
550
+ console.log(e);
480
551
  state.action({
481
552
  type: "pisell1.sendPayLinkEmail",
482
553
  data: {
@@ -508,6 +579,59 @@ var Footer = function Footer(props) {
508
579
  return _ref7.apply(this, arguments);
509
580
  };
510
581
  }();
582
+
583
+ // 重新预约
584
+ var handleRebook = function handleRebook() {
585
+ var _state$onRebook;
586
+ (_state$onRebook = state.onRebook) === null || _state$onRebook === void 0 ? void 0 : _state$onRebook.call(state);
587
+ };
588
+ // 销售
589
+ var handleSale = function handleSale() {
590
+ if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
591
+ var _interaction$utils3, _interaction$utils3$p;
592
+ return interaction === null || interaction === void 0 ? void 0 : (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 ? void 0 : (_interaction$utils3$p = _interaction$utils3.postMessageToApp) === null || _interaction$utils3$p === void 0 ? void 0 : _interaction$utils3$p.call(_interaction$utils3, {
593
+ module: "booking",
594
+ key: "edit_order",
595
+ data: {
596
+ order_id: state.bookingId
597
+ }
598
+ });
599
+ }
600
+ if (state.channelDisabledEdit) {
601
+ modal.warning({
602
+ okText: locales.getText("pisell2.text.ok"),
603
+ content: locales.getText("pisell2.text.terminal-edit-message")
604
+ });
605
+ return;
606
+ }
607
+ setActiveTab === null || setActiveTab === void 0 ? void 0 : setActiveTab("addons");
608
+ };
609
+ // 打印
610
+ var handlePrint = function handlePrint() {};
611
+ // 订单详情
612
+ var handleOrderDetail = function handleOrderDetail() {
613
+ if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
614
+ return interaction.utils.postMessageToApp({
615
+ module: "booking",
616
+ key: "view_order",
617
+ data: {
618
+ order_id: state.bookingId
619
+ },
620
+ origin: "/booking"
621
+ });
622
+ }
623
+ state.action({
624
+ type: "pisell1.goOrderDetail",
625
+ data: {
626
+ orderId: state.bookingId
627
+ },
628
+ callback: function callback() {
629
+ state === null || state === void 0 ? void 0 : state.callback();
630
+ }
631
+ });
632
+ };
633
+ // 取消订单
634
+ var handleCancel = function handleCancel() {};
511
635
  var paymentLinkButton = useMemo(function () {
512
636
  var items = [{
513
637
  label: locales.getText("pisell2.text.send-mail"),
@@ -535,9 +659,13 @@ var Footer = function Footer(props) {
535
659
  * @Date: 2024-01-30 16:58
536
660
  */
537
661
  var saveButton = useMemo(function () {
662
+ var buttonType = "default";
663
+ if (transaction_habit_selection.type === "service_now_pay_later") {
664
+ buttonType = "primary";
665
+ }
538
666
  return /*#__PURE__*/React.createElement(Button, {
539
667
  className: "pisell-lowcode__booking-footer-buttons-item",
540
- type: "primary",
668
+ type: buttonType,
541
669
  onClick: function onClick() {
542
670
  handleSave({
543
671
  type: "save"
@@ -565,6 +693,21 @@ var Footer = function Footer(props) {
565
693
  }, locales.getText("pisell2.text.status.completed"));
566
694
  }, [state.appointment_status]);
567
695
 
696
+ /**
697
+ * @title: Rebook按钮
698
+ * @description:
699
+ * @param {*} useMemo
700
+ * @return {*}
701
+ * @Author: zhiwei.Wang
702
+ * @Date: 2024-01-30 16:58
703
+ */
704
+ var rebookButton = useMemo(function () {
705
+ return /*#__PURE__*/React.createElement(Button, {
706
+ className: "pisell-lowcode__booking-footer-buttons-item",
707
+ onClick: handleRebook
708
+ }, locales.getText("pisell2.text.rebook"));
709
+ }, [state === null || state === void 0 ? void 0 : state.onRebook]);
710
+
568
711
  /**
569
712
  * @title: 退款按钮
570
713
  * @description:
@@ -585,7 +728,8 @@ var Footer = function Footer(props) {
585
728
  save: saveButton,
586
729
  complete: completeButton,
587
730
  refund: refundButton,
588
- paymentLink: paymentLinkButton
731
+ paymentLink: paymentLinkButton,
732
+ rebook: rebookButton
589
733
  };
590
734
 
591
735
  /**
@@ -609,10 +753,57 @@ var Footer = function Footer(props) {
609
753
  return false;
610
754
  }
611
755
  }, [state.bookingDetail, total.notPaidAmount]);
756
+ var moreButton = useMemo(function () {
757
+ var arr = [];
758
+ if (!state.bookingId) {
759
+ return [];
760
+ }
761
+ if (source !== "info") {
762
+ return [];
763
+ }
764
+ if (state.renderType === "eventBooking") {
765
+ return [];
766
+ }
767
+ // 支付链接
768
+ if (state.bookingId && isShowPaymentLink) {
769
+ arr.push(actionMap.paymentLink);
770
+ }
771
+ if (transaction_habit_selection.button_rows == 1) {
772
+ if (state.appointment_status !== "cancelled") {
773
+ if (!state.disabledEdit) {
774
+ arr.push(actionMap.sale);
775
+ }
776
+ }
777
+ }
778
+
779
+ // if (transaction_habit_selection.button_rows == 1) {
780
+ // if (isTerminal?.()) {
781
+ // arr.push(actionMap.print);
782
+ // }
783
+ // }
784
+
785
+ if (transaction_habit_selection.button_rows == 1) {
786
+ arr.push(actionMap.orderDetail);
787
+ }
788
+
789
+ // 退款
790
+ if (total.paidAmount > 0) {
791
+ arr.push(actionMap.refund);
792
+ }
793
+
794
+ // 重新预约
795
+ if (state.appointment_status !== "cancelled") {
796
+ arr.push(actionMap.rebook);
797
+ }
798
+
799
+ // 取消订单
800
+ // arr.push(actionMap.cancelOrder);
801
+ return arr;
802
+ }, [state, total, isShowPaymentLink, source]);
612
803
  var _buttons = useMemo(function () {
613
804
  // 如果预约是取消状态,则不展示任何按钮
614
805
  if (state.appointment_status === "cancelled") {
615
- return [];
806
+ return [buttonMap.rebook];
616
807
  }
617
808
 
618
809
  // addons 默认为新增按钮, 如果有新增数据 则添加save按钮
@@ -650,9 +841,9 @@ var Footer = function Footer(props) {
650
841
  // info
651
842
  if (source === "info") {
652
843
  var _arr3 = [];
653
- if (state.bookingId && isShowPaymentLink) {
654
- _arr3.push(buttonMap.paymentLink);
655
- }
844
+ // if (state.bookingId && isShowPaymentLink) {
845
+ // arr.push(buttonMap.paymentLink);
846
+ // }
656
847
  // 有未支付金额 展示checkout
657
848
  if (isCheckout) {
658
849
  _arr3.push(buttonMap.checkout);
@@ -669,7 +860,7 @@ var Footer = function Footer(props) {
669
860
  return _arr3;
670
861
  }
671
862
  return [];
672
- }, [buttons, total, isEdit, checkoutLoading, isDisabled, state.bookingId, source, state.appointment_status, buttonMap, loading, isCheckout]);
863
+ }, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state]);
673
864
 
674
865
  /**
675
866
  * 是否只有定金支付
@@ -788,6 +979,37 @@ var Footer = function Footer(props) {
788
979
  }
789
980
  return false;
790
981
  }, [state.bookingId, state.bookingDetail, (_state$addons4 = state.addons) === null || _state$addons4 === void 0 ? void 0 : _state$addons4.load, state.renderType]);
982
+ var menuChange = function menuChange(e) {
983
+ console.log("e.key", e.key);
984
+ switch (e.key) {
985
+ case "sendMail":
986
+ handleMenuClick(e);
987
+ break;
988
+ case "copy":
989
+ handleMenuClick(e);
990
+ break;
991
+ case "rebook":
992
+ handleRebook();
993
+ break;
994
+ case "sale":
995
+ handleSale();
996
+ break;
997
+ case "print":
998
+ handlePrint();
999
+ break;
1000
+ case "orderDetail":
1001
+ handleOrderDetail();
1002
+ break;
1003
+ case "refund":
1004
+ handleRefund();
1005
+ break;
1006
+ case "cancelOrder":
1007
+ handleCancel();
1008
+ break;
1009
+ default:
1010
+ break;
1011
+ }
1012
+ };
791
1013
  return /*#__PURE__*/React.createElement(Skeleton, {
792
1014
  title: false,
793
1015
  round: true,
@@ -882,12 +1104,31 @@ var Footer = function Footer(props) {
882
1104
  className: "order-total-item-label order-total-item-label-bold"
883
1105
  }, locales.getText("pisell2.text.refunded-amount")), /*#__PURE__*/React.createElement("span", {
884
1106
  className: "order-total-item-value"
885
- }, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))) : null) : null), /*#__PURE__*/React.createElement("div", {
1107
+ }, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))) : null) : null), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
886
1108
  className: "pisell-lowcode__booking-footer-buttons"
887
1109
  }, /*#__PURE__*/React.createElement(FooterMenus, {
1110
+ items: moreButton,
888
1111
  state: state,
889
1112
  dispatch: dispatch,
890
- source: source
891
- }), _buttons));
1113
+ source: source,
1114
+ menuChange: menuChange
1115
+ }), _buttons), source === "info" && state.bookingId && !state.disabledEdit && (transaction_habit_selection === null || transaction_habit_selection === void 0 ? void 0 : transaction_habit_selection.button_rows) == 2 ? /*#__PURE__*/React.createElement("div", {
1116
+ className: "pisell-lowcode__booking-footer-buttons",
1117
+ style: {
1118
+ marginTop: 12
1119
+ }
1120
+ }, state.appointment_status !== "cancelled" ? /*#__PURE__*/React.createElement(Button, {
1121
+ onClick: function onClick() {
1122
+ return handleSale();
1123
+ },
1124
+ size: "large",
1125
+ className: "pisell-lowcode__booking-footer-buttons-item"
1126
+ }, actionMap.sale.label) : null, /*#__PURE__*/React.createElement(Button, {
1127
+ onClick: function onClick() {
1128
+ return handleOrderDetail();
1129
+ },
1130
+ size: "large",
1131
+ className: "pisell-lowcode__booking-footer-buttons-item"
1132
+ }, actionMap.orderDetail.label)) : null, contextHolder);
892
1133
  };
893
1134
  export default Footer;
@@ -367,7 +367,7 @@ var Info = function Info() {
367
367
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
368
368
  className: "pisell-lowcode__booking-client",
369
369
  onClick: function onClick() {
370
- if (!isWalkIn) {
370
+ if (!isWalkIn || state !== null && state !== void 0 && state.disableEventBookingEdit) {
371
371
  return;
372
372
  }
373
373
  handleOpenClientModal();
@@ -390,7 +390,7 @@ var Info = function Info() {
390
390
  className: "pisell-lowcode__booking-client-info-email"
391
391
  }, (_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.email) : null, (_state$client$value6 = state.client.value) !== null && _state$client$value6 !== void 0 && _state$client$value6.phone ? /*#__PURE__*/React.createElement("div", {
392
392
  className: "pisell-lowcode__booking-client-info-phone"
393
- }, (_state$client$value7 = state.client.value) === null || _state$client$value7 === void 0 ? void 0 : _state$client$value7.phone) : null)), /*#__PURE__*/React.createElement("div", {
393
+ }, (_state$client$value7 = state.client.value) === null || _state$client$value7 === void 0 ? void 0 : _state$client$value7.phone) : null)), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
394
394
  className: "pisell-lowcode__booking-client-info-right"
395
395
  }, isWalkIn ? /*#__PURE__*/React.createElement(PlusCircle, {
396
396
  className: "pisell-lowcode__booking-client-add-icon"
@@ -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;
@@ -30,7 +30,7 @@ var defaultModules = {
30
30
  };
31
31
  locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
32
32
  var Info = Provider(function (props) {
33
- var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper3, _context$appHelper3$u, _modal$state5, _React$createElement;
33
+ var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
34
34
  // return <Payments {...props} />;
35
35
  var style = props.style,
36
36
  globalState = props.globalState,
@@ -61,7 +61,7 @@ var Info = Provider(function (props) {
61
61
  }
62
62
  }, []);
63
63
  useEffect(function () {
64
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2;
64
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
65
65
  var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
66
66
  modal.dispatch({
67
67
  type: "setState",
@@ -69,7 +69,8 @@ var Info = Provider(function (props) {
69
69
  setGlobalState: props.setGlobalState
70
70
  }, globalState), {}, {
71
71
  isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
72
- isFranchisee: isFranchisee
72
+ isFranchisee: isFranchisee,
73
+ timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
73
74
  })
74
75
  });
75
76
  }, [globalState]);
@@ -84,7 +85,7 @@ var Info = Provider(function (props) {
84
85
  };
85
86
  var header = useMemo(function () {
86
87
  if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === "eventBooking") {
87
- return locales.getText("pisell2.text.enroll");
88
+ return locales.getText("pisell2.text.enroll.detail");
88
89
  }
89
90
  return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
90
91
  state: modal.state,
@@ -115,7 +116,7 @@ var Info = Provider(function (props) {
115
116
  source: "info"
116
117
  })
117
118
  }, _defineProperty(_React$createElement, "style", {
118
- height: context !== null && context !== void 0 && (_context$appHelper3 = context.appHelper) !== null && _context$appHelper3 !== void 0 && (_context$appHelper3$u = _context$appHelper3.utils) !== null && _context$appHelper3$u !== void 0 && _context$appHelper3$u.isMobile ? "100%" : "100vh"
119
+ height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? "100%" : "100vh"
119
120
  }), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
120
121
  className: "booking-info"
121
122
  }, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === "form" ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
@@ -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;
@@ -63,6 +63,9 @@ var Notes = function Notes() {
63
63
  });
64
64
  }
65
65
  };
66
+ if (orderNote.length === 0 && modal.state.disableEventBookingEdit) {
67
+ return null;
68
+ }
66
69
  return /*#__PURE__*/React.createElement(NoteBlock, {
67
70
  noteType: "order",
68
71
  maxLength: 1,
@@ -71,7 +74,7 @@ var Notes = function Notes() {
71
74
  notes: orderNote,
72
75
  apis: modal === null || modal === void 0 ? void 0 : (_modal$state6 = modal.state) === null || _modal$state6 === void 0 ? void 0 : _modal$state6.apis,
73
76
  placeholder: locales.getText("pisell2.text.add-order-notes"),
74
- isEdit: true,
77
+ isEdit: false,
75
78
  onChange: function onChange(e, type, noteType) {
76
79
  noteChange({
77
80
  note: e,