@pisell/private-materials 3.2.21 → 3.2.23
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/assets/guests.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +83 -104
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +36 -17
- package/es/components/appointmentBooking/components/Cart/Item/index.less +7 -4
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +11 -11
- package/es/components/appointmentBooking/components/Date/index.js +49 -32
- package/es/components/appointmentBooking/components/Date/index.less +5 -0
- package/es/components/appointmentBooking/components/Guest/index.js +8 -21
- package/es/components/appointmentBooking/components/Header/index.js +44 -7
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +28 -20
- package/es/components/appointmentBooking/components/Resource/index.less +5 -0
- package/es/components/appointmentBooking/components/Services/index.js +20 -9
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +47 -32
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +238 -0
- package/es/components/appointmentBooking/components/Voucher/index.less +26 -0
- package/es/components/appointmentBooking/context.d.ts +2 -0
- package/es/components/appointmentBooking/context.js +7 -1
- package/es/components/appointmentBooking/hooks.d.ts +46 -9
- package/es/components/appointmentBooking/hooks.js +162 -121
- package/es/components/appointmentBooking/index.js +12 -7
- package/es/components/appointmentBooking/locales.d.ts +57 -0
- package/es/components/appointmentBooking/locales.js +60 -3
- package/es/components/appointmentBooking/utils.d.ts +19 -0
- package/es/components/appointmentBooking/utils.js +71 -2
- package/es/components/booking/addons/index.js +1 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +5 -1
- package/es/components/booking/components/footer/utils.js +18 -2
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/components/voucher/index.js +238 -0
- package/es/components/booking/components/voucher/index.less +88 -0
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +47 -0
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +115 -0
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +52 -0
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +9 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +18 -0
- package/es/components/booking/locales.js +21 -3
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/payments/index.js +1 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.js +3 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/wallet/Detail/index.js +20 -14
- package/es/components/wallet/Voucher/index.js +1 -0
- package/es/components/wallet/index.js +15 -1
- package/es/components/wallet/locales.d.ts +3 -0
- package/es/components/wallet/locales.js +3 -0
- package/es/components/wallet/model.d.ts +1 -1
- package/es/components/wallet/utils/formatUtils.js +1 -1
- package/es/components/walletList/index.js +5 -1
- package/lib/components/appointmentBooking/assets/guests.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +37 -27
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +24 -11
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +7 -4
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +3 -5
- package/lib/components/appointmentBooking/components/Date/index.js +53 -47
- package/lib/components/appointmentBooking/components/Date/index.less +5 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +6 -5
- package/lib/components/appointmentBooking/components/Header/index.js +25 -3
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +16 -17
- package/lib/components/appointmentBooking/components/Resource/index.less +5 -0
- package/lib/components/appointmentBooking/components/Services/index.js +21 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +23 -21
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +221 -0
- package/lib/components/appointmentBooking/components/Voucher/index.less +26 -0
- package/lib/components/appointmentBooking/context.d.ts +2 -0
- package/lib/components/appointmentBooking/context.js +4 -1
- package/lib/components/appointmentBooking/hooks.d.ts +46 -9
- package/lib/components/appointmentBooking/hooks.js +36 -43
- package/lib/components/appointmentBooking/index.js +11 -7
- package/lib/components/appointmentBooking/locales.d.ts +57 -0
- package/lib/components/appointmentBooking/locales.js +60 -3
- package/lib/components/appointmentBooking/utils.d.ts +19 -0
- package/lib/components/appointmentBooking/utils.js +42 -2
- package/lib/components/booking/addons/index.js +1 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +2 -1
- package/lib/components/booking/components/footer/utils.js +4 -1
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/components/voucher/index.js +222 -0
- package/lib/components/booking/components/voucher/index.less +88 -0
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +47 -0
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +109 -0
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +52 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +8 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +18 -0
- package/lib/components/booking/locales.js +21 -3
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/payments/index.js +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/wallet/Detail/index.js +6 -1
- package/lib/components/wallet/Voucher/index.js +1 -0
- package/lib/components/wallet/index.js +15 -1
- package/lib/components/wallet/locales.d.ts +3 -0
- package/lib/components/wallet/locales.js +3 -0
- package/lib/components/wallet/model.d.ts +1 -1
- package/lib/components/wallet/utils/formatUtils.js +1 -1
- package/lib/components/walletList/index.js +6 -2
- package/package.json +3 -3
|
@@ -55,8 +55,9 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
55
55
|
expire_date = _detail$expire_date === void 0 ? '' : _detail$expire_date,
|
|
56
56
|
_detail$product = detail.product,
|
|
57
57
|
product = _detail$product === void 0 ? {} : _detail$product;
|
|
58
|
-
var
|
|
59
|
-
description =
|
|
58
|
+
var _ref = product || {},
|
|
59
|
+
_ref$description = _ref.description,
|
|
60
|
+
description = _ref$description === void 0 ? '' : _ref$description;
|
|
60
61
|
var context = useEngineContext();
|
|
61
62
|
var utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
|
|
62
63
|
var dvaStore = utils === null || utils === void 0 || (_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 ? void 0 : _utils$getStore.getState();
|
|
@@ -174,6 +175,11 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
174
175
|
label: locales.getText('page.wallet.points'),
|
|
175
176
|
value: balance ? "".concat(Number(balance)) : ''
|
|
176
177
|
});
|
|
178
|
+
} else if (tag === 'good_pass') {
|
|
179
|
+
data.splice(2, 0, {
|
|
180
|
+
label: locales.getText('page.wallet.goodPass'),
|
|
181
|
+
value: balance ? "".concat(Number(balance)) : ''
|
|
182
|
+
});
|
|
177
183
|
} else {
|
|
178
184
|
data.splice(2, 0, {
|
|
179
185
|
label: locales.getText('page.wallet.balance'),
|
|
@@ -190,10 +196,10 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
190
196
|
locales.init(localeTexts, (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en');
|
|
191
197
|
// 注册请求
|
|
192
198
|
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
|
193
|
-
var
|
|
199
|
+
var _ref2 = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {
|
|
194
200
|
store: {}
|
|
195
201
|
},
|
|
196
|
-
store =
|
|
202
|
+
store = _ref2.store;
|
|
197
203
|
var platform = isMobile() ? 'h5' : 'pc';
|
|
198
204
|
var timezone = (store === null || store === void 0 || (_store$getState = store.getState) === null || _store$getState === void 0 || (_store$getState = _store$getState.call(store)) === null || _store$getState === void 0 || (_store$getState = _store$getState.global) === null || _store$getState === void 0 || (_store$getState = _store$getState.symbol) === null || _store$getState === void 0 ? void 0 : _store$getState.shop.timezone) || 'Asia/Shanghai';
|
|
199
205
|
var formatTimeLineDta = function formatTimeLineDta(data) {
|
|
@@ -224,7 +230,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
224
230
|
return isNegative ? "-".concat(tag !== 'point_card' ? symbol : '').concat(absAmount) : "".concat(tag !== 'point_card' ? symbol : '').concat(amount);
|
|
225
231
|
};
|
|
226
232
|
var getDetail = /*#__PURE__*/function () {
|
|
227
|
-
var
|
|
233
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
228
234
|
var _yield$getDetailApi, _yield$getDetailApi$a, apple_wallet_url, _yield$getDetailApi$g, google_wallet_url;
|
|
229
235
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
230
236
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -248,7 +254,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
248
254
|
}, _callee);
|
|
249
255
|
}));
|
|
250
256
|
return function getDetail() {
|
|
251
|
-
return
|
|
257
|
+
return _ref3.apply(this, arguments);
|
|
252
258
|
};
|
|
253
259
|
}();
|
|
254
260
|
useEffect(function () {
|
|
@@ -288,7 +294,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
288
294
|
}, amount && currency_symbol ? formatCurrencyAmount(amount, action === 'order_expend') : ''));
|
|
289
295
|
};
|
|
290
296
|
var getTimeTreeList = /*#__PURE__*/function () {
|
|
291
|
-
var
|
|
297
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
292
298
|
var _yield$getAssetList, _yield$getAssetList$l, list, filterList, i, _filterList$i, _filterList$i2, _filterList$i3, _filterList$i4;
|
|
293
299
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
294
300
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -340,7 +346,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
340
346
|
}, _callee2, null, [[1, 12, 15, 18]]);
|
|
341
347
|
}));
|
|
342
348
|
return function getTimeTreeList() {
|
|
343
|
-
return
|
|
349
|
+
return _ref4.apply(this, arguments);
|
|
344
350
|
};
|
|
345
351
|
}();
|
|
346
352
|
useEffect(function () {
|
|
@@ -355,7 +361,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
355
361
|
* @returns Promise<boolean> 是否添加成功
|
|
356
362
|
*/
|
|
357
363
|
var addWalletPass = /*#__PURE__*/function () {
|
|
358
|
-
var
|
|
364
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, type) {
|
|
359
365
|
var response, passData, blob, downloadUrl, a;
|
|
360
366
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
361
367
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -433,11 +439,11 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
433
439
|
}, _callee3, null, [[8, 30, 34, 37]]);
|
|
434
440
|
}));
|
|
435
441
|
return function addWalletPass(_x, _x2) {
|
|
436
|
-
return
|
|
442
|
+
return _ref5.apply(this, arguments);
|
|
437
443
|
};
|
|
438
444
|
}();
|
|
439
445
|
var onAppleClick = /*#__PURE__*/function () {
|
|
440
|
-
var
|
|
446
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
441
447
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
442
448
|
while (1) switch (_context4.prev = _context4.next) {
|
|
443
449
|
case 0:
|
|
@@ -450,11 +456,11 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
450
456
|
}, _callee4);
|
|
451
457
|
}));
|
|
452
458
|
return function onAppleClick() {
|
|
453
|
-
return
|
|
459
|
+
return _ref6.apply(this, arguments);
|
|
454
460
|
};
|
|
455
461
|
}();
|
|
456
462
|
var onGoogleClick = /*#__PURE__*/function () {
|
|
457
|
-
var
|
|
463
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
458
464
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
459
465
|
while (1) switch (_context5.prev = _context5.next) {
|
|
460
466
|
case 0:
|
|
@@ -467,7 +473,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
467
473
|
}, _callee5);
|
|
468
474
|
}));
|
|
469
475
|
return function onGoogleClick() {
|
|
470
|
-
return
|
|
476
|
+
return _ref7.apply(this, arguments);
|
|
471
477
|
};
|
|
472
478
|
}();
|
|
473
479
|
var isWechat = function isWechat() {
|
|
@@ -51,6 +51,7 @@ var Voucher = Provider(function (props) {
|
|
|
51
51
|
// 渲染卡片项
|
|
52
52
|
var renderItem = function renderItem(item) {
|
|
53
53
|
return /*#__PURE__*/React.createElement(WalletCard, {
|
|
54
|
+
balanceTitle: item.tag === 'good_pass' ? locales.getText('page.wallet.goodPass') : undefined,
|
|
54
55
|
item: item,
|
|
55
56
|
currentId: globalState.currentId,
|
|
56
57
|
onClick: function onClick() {
|
|
@@ -87,6 +87,12 @@ var Wallet = Provider(function () {
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
if (tag === 'good_pass') {
|
|
91
|
+
if (!result['product_voucher']) {
|
|
92
|
+
result['product_voucher'] = [];
|
|
93
|
+
}
|
|
94
|
+
result['product_voucher'].push(item);
|
|
95
|
+
}
|
|
90
96
|
result[tag].push(item);
|
|
91
97
|
});
|
|
92
98
|
return result;
|
|
@@ -651,8 +657,16 @@ var Wallet = Provider(function () {
|
|
|
651
657
|
}
|
|
652
658
|
});
|
|
653
659
|
};
|
|
660
|
+
var getBalanceTitle = function getBalanceTitle() {
|
|
661
|
+
if (global_wallet.currentTag === 'point_card') {
|
|
662
|
+
return locales.getText('page.wallet.points');
|
|
663
|
+
} else if (global_wallet.currentTag === 'good_pass') {
|
|
664
|
+
return locales.getText('page.wallet.goodPass');
|
|
665
|
+
}
|
|
666
|
+
return undefined;
|
|
667
|
+
};
|
|
654
668
|
return /*#__PURE__*/React.createElement(PisellWalletPassCard, {
|
|
655
|
-
balanceTitle:
|
|
669
|
+
balanceTitle: getBalanceTitle(),
|
|
656
670
|
showDetail: false,
|
|
657
671
|
showRedeem: false,
|
|
658
672
|
showQrCode: false,
|
|
@@ -19,6 +19,7 @@ declare const _default: {
|
|
|
19
19
|
'page.wallet.cardBalance': string;
|
|
20
20
|
'page.wallet.voucherBalance': string;
|
|
21
21
|
'page.wallet.points': string;
|
|
22
|
+
'page.wallet.goodPass': string;
|
|
22
23
|
'page.wallet.cardName': string;
|
|
23
24
|
'page.wallet.carNumber': string;
|
|
24
25
|
'page.wallet.balance': string;
|
|
@@ -61,6 +62,7 @@ declare const _default: {
|
|
|
61
62
|
'page.wallet.cardBalance': string;
|
|
62
63
|
'page.wallet.voucherBalance': string;
|
|
63
64
|
'page.wallet.points': string;
|
|
65
|
+
'page.wallet.goodPass': string;
|
|
64
66
|
'page.wallet.cardName': string;
|
|
65
67
|
'page.wallet.carNumber': string;
|
|
66
68
|
'page.wallet.balance': string;
|
|
@@ -103,6 +105,7 @@ declare const _default: {
|
|
|
103
105
|
'page.wallet.cardBalance': string;
|
|
104
106
|
'page.wallet.voucherBalance': string;
|
|
105
107
|
'page.wallet.points': string;
|
|
108
|
+
'page.wallet.goodPass': string;
|
|
106
109
|
'page.wallet.cardName': string;
|
|
107
110
|
'page.wallet.carNumber': string;
|
|
108
111
|
'page.wallet.balance': string;
|
|
@@ -20,6 +20,7 @@ export default {
|
|
|
20
20
|
'page.wallet.cardBalance': 'Card balance',
|
|
21
21
|
'page.wallet.voucherBalance': 'Voucher balance',
|
|
22
22
|
'page.wallet.points': 'Points',
|
|
23
|
+
'page.wallet.goodPass': 'Credits remaining',
|
|
23
24
|
'page.wallet.cardName': 'Card name',
|
|
24
25
|
'page.wallet.carNumber': 'Card number',
|
|
25
26
|
'page.wallet.balance': 'Balance',
|
|
@@ -65,6 +66,7 @@ export default {
|
|
|
65
66
|
'page.wallet.cardBalance': '卡余额',
|
|
66
67
|
'page.wallet.voucherBalance': '代金券余额',
|
|
67
68
|
'page.wallet.points': '积分',
|
|
69
|
+
'page.wallet.goodPass': '剩余额度',
|
|
68
70
|
'page.wallet.cardName': '卡片名称',
|
|
69
71
|
'page.wallet.carNumber': '卡号',
|
|
70
72
|
'page.wallet.balance': '余额',
|
|
@@ -109,6 +111,7 @@ export default {
|
|
|
109
111
|
'page.wallet.cardBalance': '卡餘額',
|
|
110
112
|
'page.wallet.voucherBalance': '代金券餘額',
|
|
111
113
|
'page.wallet.points': '積分',
|
|
114
|
+
'page.wallet.goodPass': '剩餘額度',
|
|
112
115
|
'page.wallet.cardName': '卡片名稱',
|
|
113
116
|
'page.wallet.carNumber': '卡號',
|
|
114
117
|
'page.wallet.balance': '餘額',
|
|
@@ -9,7 +9,7 @@ export interface WalletCardProps {
|
|
|
9
9
|
available: WalletCardItemProps[];
|
|
10
10
|
unavailable: WalletCardItemProps[];
|
|
11
11
|
}
|
|
12
|
-
export declare type WalletCardType = 'gift_card' | 'product_voucher' | 'point_card' | 'product_discount_card';
|
|
12
|
+
export declare type WalletCardType = 'gift_card' | 'product_voucher' | 'point_card' | 'product_discount_card' | 'good_pass';
|
|
13
13
|
export interface WalletListProps {
|
|
14
14
|
gift_card: IWalletListItemProps[];
|
|
15
15
|
product_voucher: IWalletListItemProps[];
|
|
@@ -30,7 +30,7 @@ export var formatDataToGroups = function formatDataToGroups(dataList) {
|
|
|
30
30
|
export var calculateTotalValue = function calculateTotalValue(dataList) {
|
|
31
31
|
var valueField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'balance';
|
|
32
32
|
var enabledCards = dataList.filter(function (item) {
|
|
33
|
-
return item.limit_status === 'enable';
|
|
33
|
+
return item.limit_status === 'enable' && item.tag !== 'good_pass';
|
|
34
34
|
});
|
|
35
35
|
return enabledCards.reduce(function (sum, item) {
|
|
36
36
|
return sum + Number(item[valueField] || 0);
|
|
@@ -596,11 +596,15 @@ var WalletList = Provider(function (props) {
|
|
|
596
596
|
value = _ref8[1];
|
|
597
597
|
return value === key;
|
|
598
598
|
})) === null || _Object$entries$find === void 0 ? void 0 : _Object$entries$find[0];
|
|
599
|
+
var value = balanceKey ? balance[balanceKey] || 0 : 0;
|
|
600
|
+
if (balanceKey === 'voucher_count') {
|
|
601
|
+
value += balance.good_pass_count;
|
|
602
|
+
}
|
|
599
603
|
return {
|
|
600
604
|
key: key,
|
|
601
605
|
label: key,
|
|
602
606
|
hidden: false,
|
|
603
|
-
value:
|
|
607
|
+
value: value
|
|
604
608
|
};
|
|
605
609
|
});
|
|
606
610
|
// 构建WalletCard的props
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M30.6 18.8a1 1 0 0 1-1.4-.2A6.45 6.45 0 0 0 24 16a1 1 0 0 1 0-2 3 3 0 1 0-2.905-3.75 1 1 0 0 1-1.937-.5 5 5 0 1 1 8.217 4.939 8.5 8.5 0 0 1 3.429 2.71A1 1 0 0 1 30.6 18.8m-6.735 7.7a1 1 0 1 1-1.73 1 7.125 7.125 0 0 0-12.27 0 1 1 0 1 1-1.73-1 9 9 0 0 1 4.217-3.74 6 6 0 1 1 7.296 0 9 9 0 0 1 4.217 3.74M16 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8m-7-7a1 1 0 0 0-1-1 3 3 0 1 1 2.905-3.75 1 1 0 0 0 1.938-.5 5 5 0 1 0-8.218 4.939 8.5 8.5 0 0 0-3.425 2.71A1 1 0 1 0 2.8 18.6 6.45 6.45 0 0 1 8 16a1 1 0 0 0 1-1"></path></svg>
|
|
@@ -35,55 +35,64 @@ module.exports = __toCommonJS(ContinueButton_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
|
-
var import_utils2 = require("../../../../Sales/Checkout/utils");
|
|
39
38
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
40
39
|
var import_hooks = require("../../../hooks");
|
|
41
40
|
var import_context = require("../../../context");
|
|
41
|
+
var import_utils2 = require("../../../utils");
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
43
|
var ContinueButton = () => {
|
|
44
|
+
var _a;
|
|
44
45
|
const context = (0, import_useEngineContext.default)();
|
|
45
46
|
const utils = context.appHelper.utils || {};
|
|
46
47
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
47
48
|
const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
48
|
-
const {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
content: ((_a = result == null ? void 0 : result.err) == null ? void 0 : _a.message) || ""
|
|
64
|
-
});
|
|
49
|
+
const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
50
|
+
const {
|
|
51
|
+
currentStep,
|
|
52
|
+
isLastStep,
|
|
53
|
+
carts,
|
|
54
|
+
appointmentBooking,
|
|
55
|
+
resourceOtherParams
|
|
56
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
57
|
+
const { getResourceTimeSlot } = (0, import_hooks.useAppointmentBookingResource)();
|
|
58
|
+
const disabled = (0, import_react.useMemo)(() => {
|
|
59
|
+
var _a2, _b;
|
|
60
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
61
|
+
if (!carts.length) return true;
|
|
62
|
+
if (key === "select-resource" && ((_b = resourceOtherParams == null ? void 0 : resourceOtherParams.errorList) == null ? void 0 : _b.length) > 0) {
|
|
63
|
+
return true;
|
|
65
64
|
}
|
|
66
|
-
|
|
65
|
+
return false;
|
|
66
|
+
}, [
|
|
67
|
+
(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key,
|
|
68
|
+
carts,
|
|
69
|
+
accountLists,
|
|
70
|
+
resourceOtherParams == null ? void 0 : resourceOtherParams.errorList
|
|
71
|
+
]);
|
|
67
72
|
const handleNextStep = async () => {
|
|
73
|
+
var _a2, _b;
|
|
68
74
|
if (isLastStep) {
|
|
69
75
|
setLoading(true);
|
|
70
76
|
try {
|
|
71
77
|
const res = await appointmentBooking.submitOrder();
|
|
72
|
-
console.log(isLastStep, isLogin, res, "wh9896788");
|
|
73
78
|
utils.action({
|
|
74
79
|
type: "pisell1.payment",
|
|
75
80
|
data: res == null ? void 0 : res.data,
|
|
76
81
|
callback: (e) => {
|
|
77
|
-
console.log(e, "wh9896788");
|
|
82
|
+
console.log(e, currentStep, "wh9896788");
|
|
78
83
|
}
|
|
79
84
|
});
|
|
80
85
|
setLoading(false);
|
|
81
86
|
} catch (error) {
|
|
82
|
-
console.log(isLastStep, isLogin, error, "wh9896788");
|
|
83
87
|
setLoading(false);
|
|
84
88
|
}
|
|
85
89
|
return;
|
|
86
90
|
}
|
|
91
|
+
if (((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key) === "select-resource") {
|
|
92
|
+
getResourceTimeSlot("resources");
|
|
93
|
+
}
|
|
94
|
+
if (((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-time") {
|
|
95
|
+
}
|
|
87
96
|
return appointmentBooking.next();
|
|
88
97
|
};
|
|
89
98
|
const handleContinue = async () => {
|
|
@@ -91,7 +100,12 @@ var ContinueButton = () => {
|
|
|
91
100
|
if (!isLogin) {
|
|
92
101
|
return openLoginModal({
|
|
93
102
|
callback: (status) => {
|
|
103
|
+
var _a2, _b, _c;
|
|
104
|
+
const user = (_c = (_b = (_a2 = utils.store) == null ? void 0 : _a2.getState()) == null ? void 0 : _b.global) == null ? void 0 : _c.userInfo;
|
|
105
|
+
const currentUser = (0, import_utils2.formatCustomer)(user);
|
|
106
|
+
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
94
107
|
if (status === "success") {
|
|
108
|
+
appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
|
|
95
109
|
handleNextStep();
|
|
96
110
|
}
|
|
97
111
|
}
|
|
@@ -107,14 +121,10 @@ var ContinueButton = () => {
|
|
|
107
121
|
return import_utils.locales.getText("pisell2.event.close.continue");
|
|
108
122
|
}
|
|
109
123
|
}, [isLastStep]);
|
|
110
|
-
const confirmLoading = (0, import_react.useMemo)(() => {
|
|
111
|
-
if (!isLastStep) return false;
|
|
112
|
-
return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading);
|
|
113
|
-
}, [isLastStep, createBooking == null ? void 0 : createBooking.loading, checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading]);
|
|
114
124
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
115
125
|
import_materials.Button,
|
|
116
126
|
{
|
|
117
|
-
disabled
|
|
127
|
+
disabled,
|
|
118
128
|
size: "large",
|
|
119
129
|
type: "primary",
|
|
120
130
|
onClick: () => handleContinue(),
|
|
@@ -41,6 +41,7 @@ var import_context = require("../../../context");
|
|
|
41
41
|
var Total = ({ className, isFooter }) => {
|
|
42
42
|
const { summary, symbolic } = (0, import_context.useAppointmentBookingContext)();
|
|
43
43
|
const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = summary;
|
|
44
|
+
console.log(summary, "summarysummary");
|
|
44
45
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `event-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
45
46
|
"div",
|
|
46
47
|
{
|
|
@@ -38,31 +38,42 @@ var import_shoppingCart = __toESM(require("../../../../shoppingCart"));
|
|
|
38
38
|
var import_ContinueButton = __toESM(require("../ContinueButton"));
|
|
39
39
|
var import_hooks = require("../../../hooks");
|
|
40
40
|
var import_context = require("../../../context");
|
|
41
|
-
var
|
|
41
|
+
var import_hooks2 = require("../../../hooks");
|
|
42
42
|
var import_utils2 = require("../../../utils");
|
|
43
|
+
var import_Voucher = __toESM(require("../../Voucher"));
|
|
44
|
+
var import_Total = __toESM(require("./Total"));
|
|
43
45
|
var import_index = require("./index.less");
|
|
44
46
|
var CartItem = () => {
|
|
45
47
|
var _a, _b;
|
|
46
48
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
47
|
-
const
|
|
48
|
-
const {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
const { carts, isLastStep, currentStep, resources } = (0, import_context.useAppointmentBookingContext)();
|
|
50
|
+
const { accountLists } = (0, import_hooks2.useAppointmentBookingAccount)();
|
|
51
|
+
console.log(accountLists, "wh97879678");
|
|
52
|
+
const currentUser = (0, import_utils2.formatCurrentUser)();
|
|
51
53
|
const holderIds = (0, import_react.useMemo)(() => {
|
|
52
54
|
return accountLists.map((item) => item.id);
|
|
53
55
|
}, [accountLists]);
|
|
54
56
|
const holders = (0, import_react.useMemo)(() => {
|
|
55
57
|
return (0, import_utils2.formatHolder)(accountLists);
|
|
56
58
|
}, [accountLists]);
|
|
57
|
-
const handleClickCard = (e, type,
|
|
58
|
-
console.log(e, type, key, "wh9988767");
|
|
59
|
+
const handleClickCard = (e, type, val) => {
|
|
59
60
|
if (type === "note") {
|
|
60
|
-
return appointmentBooking.updateCart(
|
|
61
|
+
return appointmentBooking.updateCart({
|
|
62
|
+
_id: e == null ? void 0 : e._id,
|
|
63
|
+
...val
|
|
64
|
+
});
|
|
61
65
|
}
|
|
62
66
|
if (type === "delete") {
|
|
67
|
+
return appointmentBooking.deleteCart(e == null ? void 0 : e._id);
|
|
63
68
|
}
|
|
64
69
|
if (type === "delete_holders") {
|
|
65
|
-
return appointmentBooking.removeAccount(
|
|
70
|
+
return appointmentBooking.removeAccount(val);
|
|
71
|
+
}
|
|
72
|
+
if (type === "change_resource") {
|
|
73
|
+
return appointmentBooking.updateCart({
|
|
74
|
+
_id: e == null ? void 0 : e._id,
|
|
75
|
+
resources: [val]
|
|
76
|
+
});
|
|
66
77
|
}
|
|
67
78
|
};
|
|
68
79
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -79,7 +90,8 @@ var CartItem = () => {
|
|
|
79
90
|
holders,
|
|
80
91
|
disabledEdit: isLastStep,
|
|
81
92
|
isShowChangeResource: ((_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key) === "select-resource",
|
|
82
|
-
isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.
|
|
93
|
+
isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-service",
|
|
94
|
+
isShowPackageNote: false
|
|
83
95
|
},
|
|
84
96
|
collapseParams: {
|
|
85
97
|
activeKey: holderIds,
|
|
@@ -88,10 +100,11 @@ var CartItem = () => {
|
|
|
88
100
|
platform: "h5",
|
|
89
101
|
emptyText: import_utils.locales.getText("pisell2.event.empty.service"),
|
|
90
102
|
isOpenGroup: !!(holderIds == null ? void 0 : holderIds.length),
|
|
103
|
+
isHideClearCart: true,
|
|
91
104
|
onChange: (e, type, key) => handleClickCard(e, type, key)
|
|
92
105
|
}
|
|
93
106
|
)),
|
|
94
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "
|
|
107
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
|
|
95
108
|
));
|
|
96
109
|
};
|
|
97
110
|
var Item_default = CartItem;
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
height: 100%;
|
|
3
3
|
.content {
|
|
4
4
|
background: #fff;
|
|
5
|
-
padding:
|
|
5
|
+
padding: 0 16px;
|
|
6
|
+
max-height: 60vh;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
|
|
6
9
|
.pisell-lowcode__shopping-cart-content {
|
|
7
10
|
.ant-card-body {
|
|
8
11
|
padding: 0;
|
|
@@ -10,9 +13,9 @@
|
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
.
|
|
16
|
+
.appointment-footer {
|
|
14
17
|
background: #fff;
|
|
15
|
-
padding:
|
|
18
|
+
padding: 10px 16px 0;
|
|
16
19
|
display: flex;
|
|
17
20
|
flex-direction: column;
|
|
18
21
|
gap: 14px;
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
overflow-y: auto;
|
|
75
78
|
padding: 0 0 140px;
|
|
76
79
|
}
|
|
77
|
-
.
|
|
80
|
+
.appointment-footer {
|
|
78
81
|
z-index: 10;
|
|
79
82
|
position: fixed;
|
|
80
83
|
bottom: 0;
|
|
@@ -42,18 +42,16 @@ var import_Date = __toESM(require("../Date"));
|
|
|
42
42
|
var import_Resource = __toESM(require("../Resource"));
|
|
43
43
|
var import_TimeSlicing = __toESM(require("../TimeSlicing"));
|
|
44
44
|
var import_Guest = __toESM(require("../Guest"));
|
|
45
|
-
var import_hooks = require("../../hooks");
|
|
46
45
|
var import_context = require("../../context");
|
|
46
|
+
var import_hooks = require("../../hooks");
|
|
47
47
|
var import_index = require("./index.less");
|
|
48
48
|
var Layout = () => {
|
|
49
49
|
var _a, _b, _c;
|
|
50
|
-
const appointmentBookingStep = (0, import_hooks.useAppointmentBookingStep)();
|
|
51
|
-
const appointmentBookingCart = (0, import_hooks.useAppointmentBookingCart)();
|
|
52
50
|
const { currentStep } = (0, import_context.useAppointmentBookingContext)();
|
|
51
|
+
(0, import_hooks.useAppointmentBookingCart)();
|
|
52
|
+
(0, import_hooks.useAppointmentBookingStep)();
|
|
53
53
|
const [params, setParams] = (0, import_react.useState)({});
|
|
54
54
|
(0, import_react.useEffect)(() => {
|
|
55
|
-
var _a2;
|
|
56
|
-
console.log((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key, "whcurrentStep?.step?.key");
|
|
57
55
|
window.scrollTo({
|
|
58
56
|
top: 0,
|
|
59
57
|
behavior: "smooth"
|