@pisell/private-materials 3.0.89 → 3.0.91

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.
@@ -757,56 +757,6 @@ var Footer = function Footer(props) {
757
757
  return false;
758
758
  }
759
759
  }, [state.bookingDetail, total.notPaidAmount]);
760
- var moreButton = useMemo(function () {
761
- var arr = [];
762
- if (!state.bookingId) {
763
- return [];
764
- }
765
- if (source !== 'info') {
766
- return [];
767
- }
768
- if (state.renderType === 'eventBooking') {
769
- return [];
770
- }
771
- // 支付链接
772
- if (state.bookingId && isShowPaymentLink) {
773
- arr.push(actionMap.paymentLink);
774
- }
775
- if (transaction_habit_selection.button_rows == 1) {
776
- if (state.appointment_status !== 'cancelled') {
777
- if (!state.disabledEdit) {
778
- arr.push(actionMap.sale);
779
- }
780
- }
781
- }
782
-
783
- // if (transaction_habit_selection.button_rows == 1) {
784
- // if (isTerminal?.()) {
785
- // arr.push(actionMap.print);
786
- // }
787
- // }
788
- if (!isTeam) {
789
- if (transaction_habit_selection.button_rows == 1) {
790
- arr.push(actionMap.orderDetail);
791
- }
792
- }
793
-
794
- // 退款
795
- if (!isTeam) {
796
- if (total.paidAmount > 0) {
797
- arr.push(actionMap.refund);
798
- }
799
- }
800
-
801
- // 重新预约
802
- if (state.appointment_status !== 'cancelled') {
803
- arr.push(actionMap.rebook);
804
- }
805
-
806
- // 取消订单
807
- // arr.push(actionMap.cancelOrder);
808
- return arr;
809
- }, [state, total, isShowPaymentLink, source]);
810
760
  var _buttons = useMemo(function () {
811
761
  // 如果预约是取消状态,则不展示任何按钮
812
762
  if (state.appointment_status === 'cancelled') {
@@ -869,9 +819,12 @@ var Footer = function Footer(props) {
869
819
  if (isEdit) {
870
820
  _arr3.push(buttonMap.save);
871
821
  }
872
- if (_arr3.length === 0) {
873
- return [buttonMap.rebook];
874
- }
822
+ // if (isTeam) {
823
+ // if (arr.length === 0) {
824
+ // return [buttonMap.rebook];
825
+ // }
826
+ // }
827
+
875
828
  return _arr3;
876
829
  }
877
830
  if (source === 'addTime') {
@@ -881,6 +834,56 @@ var Footer = function Footer(props) {
881
834
  }
882
835
  return [];
883
836
  }, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state, isTeam]);
837
+ var moreButton = useMemo(function () {
838
+ var arr = [];
839
+ if (!state.bookingId) {
840
+ return [];
841
+ }
842
+ if (source !== 'info') {
843
+ return [];
844
+ }
845
+ if (state.renderType === 'eventBooking') {
846
+ return [];
847
+ }
848
+
849
+ // 如果外部没有按钮, 则rebook按钮放在外面
850
+ if (_buttons.length !== 0) {
851
+ // 支付链接
852
+ if (state.bookingId && isShowPaymentLink) {
853
+ arr.push(actionMap.paymentLink);
854
+ }
855
+ }
856
+ if (transaction_habit_selection.button_rows == 1) {
857
+ if (state.appointment_status !== 'cancelled') {
858
+ if (!state.disabledEdit) {
859
+ arr.push(actionMap.sale);
860
+ }
861
+ }
862
+ }
863
+
864
+ // if (transaction_habit_selection.button_rows == 1) {
865
+ // if (isTerminal?.()) {
866
+ // arr.push(actionMap.print);
867
+ // }
868
+ // }
869
+
870
+ if (!isTeam) {
871
+ if (transaction_habit_selection.button_rows == 1) {
872
+ arr.push(actionMap.orderDetail);
873
+ }
874
+ if (total.paidAmount > 0) {
875
+ arr.push(actionMap.refund);
876
+ }
877
+ }
878
+
879
+ // 重新预约
880
+ if (state.appointment_status !== 'cancelled') {
881
+ arr.push(actionMap.rebook);
882
+ }
883
+ // 取消订单
884
+ // arr.push(actionMap.cancelOrder);
885
+ return arr;
886
+ }, [state, total, isShowPaymentLink, source, _buttons.length]);
884
887
 
885
888
  /**
886
889
  * 是否只有定金支付
@@ -1138,7 +1141,7 @@ var Footer = function Footer(props) {
1138
1141
  dispatch: dispatch,
1139
1142
  source: source,
1140
1143
  menuChange: menuChange
1141
- }), _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", {
1144
+ }), _buttons.length ? _buttons : state.bookingId && isShowPaymentLink ? paymentLinkButton : null), 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", {
1142
1145
  className: "pisell-lowcode__booking-footer-buttons",
1143
1146
  style: {
1144
1147
  marginTop: 12
@@ -1149,7 +1152,7 @@ var Footer = function Footer(props) {
1149
1152
  },
1150
1153
  size: "large",
1151
1154
  className: "pisell-lowcode__booking-footer-buttons-item"
1152
- }, actionMap.sale.label) : null, /*#__PURE__*/React.createElement(Button, {
1155
+ }, actionMap.sale.label) : null, isTeam ? null : /*#__PURE__*/React.createElement(Button, {
1153
1156
  onClick: function onClick() {
1154
1157
  return handleOrderDetail();
1155
1158
  },
@@ -491,42 +491,6 @@ var Footer = (props) => {
491
491
  return false;
492
492
  }
493
493
  }, [state.bookingDetail, total.notPaidAmount]);
494
- const moreButton = (0, import_react.useMemo)(() => {
495
- let arr = [];
496
- if (!state.bookingId) {
497
- return [];
498
- }
499
- if (source !== "info") {
500
- return [];
501
- }
502
- if (state.renderType === "eventBooking") {
503
- return [];
504
- }
505
- if (state.bookingId && isShowPaymentLink) {
506
- arr.push(actionMap.paymentLink);
507
- }
508
- if (transaction_habit_selection.button_rows == 1) {
509
- if (state.appointment_status !== "cancelled") {
510
- if (!state.disabledEdit) {
511
- arr.push(actionMap.sale);
512
- }
513
- }
514
- }
515
- if (!isTeam) {
516
- if (transaction_habit_selection.button_rows == 1) {
517
- arr.push(actionMap.orderDetail);
518
- }
519
- }
520
- if (!isTeam) {
521
- if (total.paidAmount > 0) {
522
- arr.push(actionMap.refund);
523
- }
524
- }
525
- if (state.appointment_status !== "cancelled") {
526
- arr.push(actionMap.rebook);
527
- }
528
- return arr;
529
- }, [state, total, isShowPaymentLink, source]);
530
494
  const _buttons = (0, import_react.useMemo)(() => {
531
495
  if (state.appointment_status === "cancelled") {
532
496
  return [buttonMap.rebook];
@@ -568,9 +532,6 @@ var Footer = (props) => {
568
532
  if (isEdit) {
569
533
  arr.push(buttonMap.save);
570
534
  }
571
- if (arr.length === 0) {
572
- return [buttonMap.rebook];
573
- }
574
535
  return arr;
575
536
  }
576
537
  if (source === "addTime") {
@@ -592,6 +553,42 @@ var Footer = (props) => {
592
553
  state,
593
554
  isTeam
594
555
  ]);
556
+ const moreButton = (0, import_react.useMemo)(() => {
557
+ let arr = [];
558
+ if (!state.bookingId) {
559
+ return [];
560
+ }
561
+ if (source !== "info") {
562
+ return [];
563
+ }
564
+ if (state.renderType === "eventBooking") {
565
+ return [];
566
+ }
567
+ if (_buttons.length !== 0) {
568
+ if (state.bookingId && isShowPaymentLink) {
569
+ arr.push(actionMap.paymentLink);
570
+ }
571
+ }
572
+ if (transaction_habit_selection.button_rows == 1) {
573
+ if (state.appointment_status !== "cancelled") {
574
+ if (!state.disabledEdit) {
575
+ arr.push(actionMap.sale);
576
+ }
577
+ }
578
+ }
579
+ if (!isTeam) {
580
+ if (transaction_habit_selection.button_rows == 1) {
581
+ arr.push(actionMap.orderDetail);
582
+ }
583
+ if (total.paidAmount > 0) {
584
+ arr.push(actionMap.refund);
585
+ }
586
+ }
587
+ if (state.appointment_status !== "cancelled") {
588
+ arr.push(actionMap.rebook);
589
+ }
590
+ return arr;
591
+ }, [state, total, isShowPaymentLink, source, _buttons.length]);
595
592
  const isOnlyDeposit = (0, import_react.useMemo)(() => {
596
593
  var _a2, _b2, _c2, _d2;
597
594
  if (((_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.deposit_payment_time) && ((_d2 = (_c2 = (_b2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _b2.payment_types) == null ? void 0 : _c2.every) == null ? void 0 : _d2.call(
@@ -782,7 +779,7 @@ var Footer = (props) => {
782
779
  source,
783
780
  menuChange
784
781
  }
785
- ), _buttons), source === "info" && state.bookingId && !state.disabledEdit && (transaction_habit_selection == null ? void 0 : transaction_habit_selection.button_rows) == 2 ? /* @__PURE__ */ import_react.default.createElement(
782
+ ), _buttons.length ? _buttons : state.bookingId && isShowPaymentLink ? paymentLinkButton : null), source === "info" && state.bookingId && !state.disabledEdit && (transaction_habit_selection == null ? void 0 : transaction_habit_selection.button_rows) == 2 ? /* @__PURE__ */ import_react.default.createElement(
786
783
  "div",
787
784
  {
788
785
  className: "pisell-lowcode__booking-footer-buttons",
@@ -797,7 +794,7 @@ var Footer = (props) => {
797
794
  },
798
795
  actionMap.sale.label
799
796
  ) : null,
800
- /* @__PURE__ */ import_react.default.createElement(
797
+ isTeam ? null : /* @__PURE__ */ import_react.default.createElement(
801
798
  import_antd2.Button,
802
799
  {
803
800
  onClick: () => handleOrderDetail(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.89",
3
+ "version": "3.0.91",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -60,7 +60,7 @@
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "@pisell/utils": "1.0.25",
62
62
  "@pisell/icon": "0.0.11",
63
- "@pisell/date-picker": "1.0.86"
63
+ "@pisell/date-picker": "1.0.87"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^18.0.0",