@pisell/private-materials 3.3.4 → 3.3.5
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
- package/es/components/appointmentBooking/hooks.js +11 -14
- package/es/components/appointmentBooking/index.js +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
- package/lib/components/appointmentBooking/hooks.js +0 -1
- package/lib/components/appointmentBooking/index.js +1 -0
- package/package.json +4 -4
|
@@ -93,7 +93,7 @@ var DepositModal = function DepositModal(props) {
|
|
|
93
93
|
onOk: onCancel
|
|
94
94
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
95
95
|
style: {
|
|
96
|
-
minHeight: '
|
|
96
|
+
minHeight: '200px'
|
|
97
97
|
},
|
|
98
98
|
spinning: loading
|
|
99
99
|
}, policy !== null && policy !== void 0 && policy.content ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -146,40 +146,37 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
|
|
|
146
146
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
147
147
|
while (1) switch (_context2.prev = _context2.next) {
|
|
148
148
|
case 0:
|
|
149
|
-
_context2.next = 2;
|
|
150
|
-
return appointmentBooking.loadAllSchedule();
|
|
151
|
-
case 2:
|
|
152
149
|
if (!(bookingProcess === 'date_first')) {
|
|
153
|
-
_context2.next =
|
|
150
|
+
_context2.next = 11;
|
|
154
151
|
break;
|
|
155
152
|
}
|
|
156
|
-
_context2.next =
|
|
153
|
+
_context2.next = 3;
|
|
157
154
|
return appointmentBooking.getDateRange();
|
|
158
|
-
case
|
|
155
|
+
case 3:
|
|
159
156
|
dates = _context2.sent;
|
|
160
157
|
if (!(!dates || !dates.length)) {
|
|
161
|
-
_context2.next =
|
|
158
|
+
_context2.next = 6;
|
|
162
159
|
break;
|
|
163
160
|
}
|
|
164
161
|
return _context2.abrupt("return");
|
|
165
|
-
case
|
|
162
|
+
case 6:
|
|
166
163
|
_ref5 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {}, _productModuleParams = _ref5.productModuleParams;
|
|
167
|
-
_context2.next =
|
|
164
|
+
_context2.next = 9;
|
|
168
165
|
return appointmentBooking.loadProductByScheduleDate(_objectSpread({
|
|
169
166
|
date: (_dates$ = dates[0]) === null || _dates$ === void 0 ? void 0 : _dates$.date
|
|
170
167
|
}, _productModuleParams));
|
|
171
|
-
case
|
|
168
|
+
case 9:
|
|
172
169
|
_productList = _context2.sent;
|
|
173
170
|
return _context2.abrupt("return", _productList);
|
|
174
|
-
case
|
|
171
|
+
case 11:
|
|
175
172
|
// 先选商品
|
|
176
173
|
_ref6 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {}, productModuleParams = _ref6.productModuleParams;
|
|
177
|
-
_context2.next =
|
|
174
|
+
_context2.next = 14;
|
|
178
175
|
return appointmentBooking.loadProducts(productModuleParams);
|
|
179
|
-
case
|
|
176
|
+
case 14:
|
|
180
177
|
productList = _context2.sent;
|
|
181
178
|
return _context2.abrupt("return", productList);
|
|
182
|
-
case
|
|
179
|
+
case 16:
|
|
183
180
|
case "end":
|
|
184
181
|
return _context2.stop();
|
|
185
182
|
}
|
|
@@ -12,6 +12,9 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
|
12
12
|
var context = useEngineContext();
|
|
13
13
|
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
|
|
14
14
|
var appointmentBooking = useAppointmentBooking();
|
|
15
|
+
|
|
16
|
+
// 初始化项目的时候,用于预加载 schedule 数据
|
|
17
|
+
appointmentBooking.loadAllSchedule();
|
|
15
18
|
var currentUser = formatCurrentUser();
|
|
16
19
|
useEffect(function () {
|
|
17
20
|
var _appointmentBooking$o;
|
|
@@ -74,7 +74,7 @@ var DepositModal = (props) => {
|
|
|
74
74
|
okText: import_utils.locales.getText("pisell2.appointment.deposit.close"),
|
|
75
75
|
onOk: onCancel
|
|
76
76
|
},
|
|
77
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { style: { minHeight: "
|
|
77
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { style: { minHeight: "200px" }, spinning: loading }, (policy == null ? void 0 : policy.content) ? /* @__PURE__ */ import_react.default.createElement(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
className: "policy-content",
|
|
@@ -119,7 +119,6 @@ var useAppointmentBookingProduct = () => {
|
|
|
119
119
|
const { bookingProcess, bookingSubject } = productModuleParams || {};
|
|
120
120
|
const getProducts = async () => {
|
|
121
121
|
var _a;
|
|
122
|
-
await appointmentBooking.loadAllSchedule();
|
|
123
122
|
if (bookingProcess === "date_first") {
|
|
124
123
|
const dates = await appointmentBooking.getDateRange();
|
|
125
124
|
if (!dates || !dates.length) return;
|
|
@@ -46,6 +46,7 @@ var AppointmentBooking = () => {
|
|
|
46
46
|
const context = (0, import_useEngineContext.default)();
|
|
47
47
|
import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
|
|
48
48
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
49
|
+
appointmentBooking.loadAllSchedule();
|
|
49
50
|
const currentUser = (0, import_utils2.formatCurrentUser)();
|
|
50
51
|
(0, import_react.useEffect)(() => {
|
|
51
52
|
var _a2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/
|
|
63
|
-
"@pisell/
|
|
62
|
+
"@pisell/utils": "1.0.42",
|
|
63
|
+
"@pisell/materials": "3.3.4",
|
|
64
64
|
"@pisell/icon": "0.0.11",
|
|
65
|
-
"@pisell/
|
|
65
|
+
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|