@pisell/private-materials 3.0.71 → 3.0.73

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.
@@ -71,6 +71,15 @@ export var formatProductBundle = function formatProductBundle(bundle) {
71
71
  };
72
72
  });
73
73
  };
74
+ var getSubType = function getSubType(item) {
75
+ var _item$duration;
76
+ var _type = (_item$duration = item.duration) === null || _item$duration === void 0 ? void 0 : _item$duration.type;
77
+ // 目前不支持跨天
78
+ if (_type && _type !== 'days') {
79
+ return _type;
80
+ }
81
+ return 'minutes';
82
+ };
74
83
 
75
84
  /**
76
85
  * @title: 预约商品信息
@@ -120,7 +129,7 @@ var formatBookings = function formatBookings(data) {
120
129
  "is_all": false,
121
130
  "schedule_id": item._extend.schedule_id,
122
131
  "end_time": end_time,
123
- "sub_type": 'days',
132
+ "sub_type": getSubType(item),
124
133
  "select_date": start_date,
125
134
  "start_time": start_time,
126
135
  "end_date": end_date,
@@ -46,7 +46,8 @@ var Deposit = function Deposit(props) {
46
46
  bookingId = globalState.bookingId,
47
47
  amountSymbol = globalState.amountSymbol,
48
48
  generatePaymentLink = globalState.generatePaymentLink,
49
- locale = globalState.locale;
49
+ locale = globalState.locale,
50
+ callback = globalState.callback;
50
51
  var sendEmail = function sendEmail(id) {
51
52
  action({
52
53
  type: 'pisell1.sendPayLinkEmail',
@@ -77,6 +78,10 @@ var Deposit = function Deposit(props) {
77
78
  deposit_amount: 0
78
79
  })
79
80
  });
81
+ callback === null || callback === void 0 ? void 0 : callback({
82
+ order_id: bookingId,
83
+ afterCloseUpdate: true
84
+ });
80
85
  });
81
86
  }
82
87
  });
@@ -130,6 +135,10 @@ var Deposit = function Deposit(props) {
130
135
  deposit_amount: amount
131
136
  })
132
137
  });
138
+ callback === null || callback === void 0 ? void 0 : callback({
139
+ order_id: bookingId,
140
+ afterCloseUpdate: true
141
+ });
133
142
  });
134
143
  };
135
144
  var handleGoOrderDetail = function handleGoOrderDetail() {
@@ -73,6 +73,14 @@ var formatProductBundle = (bundle) => {
73
73
  };
74
74
  });
75
75
  };
76
+ var getSubType = (item) => {
77
+ var _a;
78
+ const _type = (_a = item.duration) == null ? void 0 : _a.type;
79
+ if (_type && _type !== "days") {
80
+ return _type;
81
+ }
82
+ return "minutes";
83
+ };
76
84
  var formatBookings = (data) => {
77
85
  const list = data.service.value;
78
86
  const eventOtherParams = data.eventOtherParams;
@@ -112,7 +120,7 @@ var formatBookings = (data) => {
112
120
  "is_all": false,
113
121
  "schedule_id": item._extend.schedule_id,
114
122
  "end_time": end_time,
115
- "sub_type": "days",
123
+ "sub_type": getSubType(item),
116
124
  "select_date": start_date,
117
125
  "start_time": start_time,
118
126
  "end_date": end_date,
@@ -53,7 +53,7 @@ var Deposit = (props) => {
53
53
  const context = (0, import_useEngineContext.default)();
54
54
  const { isTerminal, interaction, action } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
55
55
  import_utils2.request.setRequest(context.appHelper.utils.request);
56
- const { bookingDetail, bookingId, amountSymbol, generatePaymentLink, locale } = globalState;
56
+ const { bookingDetail, bookingId, amountSymbol, generatePaymentLink, locale, callback } = globalState;
57
57
  const sendEmail = (id) => {
58
58
  action({
59
59
  type: "pisell1.sendPayLinkEmail",
@@ -86,6 +86,7 @@ var Deposit = (props) => {
86
86
  deposit_amount: 0
87
87
  }
88
88
  });
89
+ callback == null ? void 0 : callback({ order_id: bookingId, afterCloseUpdate: true });
89
90
  });
90
91
  }
91
92
  });
@@ -141,6 +142,7 @@ var Deposit = (props) => {
141
142
  deposit_amount: amount
142
143
  }
143
144
  });
145
+ callback == null ? void 0 : callback({ order_id: bookingId, afterCloseUpdate: true });
144
146
  });
145
147
  };
146
148
  const handleGoOrderDetail = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.71",
3
+ "version": "3.0.73",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -58,9 +58,9 @@
58
58
  "ahooks": "^3.7.6",
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
- "@pisell/utils": "1.0.24",
61
+ "@pisell/date-picker": "1.0.74",
62
62
  "@pisell/icon": "0.0.8",
63
- "@pisell/date-picker": "1.0.73"
63
+ "@pisell/utils": "1.0.25"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^18.0.0",