@pisell/private-materials 6.6.52 → 6.6.54
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.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
- package/es/components/booking/addons/index.js +2 -3
- package/es/components/booking/components/footer/amount.js +5 -4
- package/es/components/booking/components/footer/index.js +0 -7
- package/es/components/booking/components/footer/utils.d.ts +1 -1
- package/es/components/booking/components/footer/utils.js +15 -10
- package/es/components/booking/components/voucher/index.js +1 -7
- package/es/components/booking/components/voucher/index.less +1 -4
- package/es/components/booking/components/voucherModal/index.less +0 -1
- package/es/components/booking/info/service2/utils.js +46 -42
- package/es/components/booking/info2/service/editService/index.js +8 -10
- package/es/components/booking/info2/service/editService/utils.d.ts +1 -0
- package/es/components/booking/info2/service/editService/utils.js +16 -0
- package/es/components/booking/payments/index.js +1 -1
- package/es/components/checkout/components/WalletPassModule/index.js +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +192 -316
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/es/components/pay/toC/index.js +27 -66
- package/es/components/pay/toC/model.d.ts +0 -1
- package/es/components/pay/toC/serve.d.ts +0 -18
- package/es/components/pay/toC/serve.js +1 -29
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +0 -4
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
- package/lib/components/booking/addons/index.js +2 -3
- package/lib/components/booking/components/footer/amount.js +4 -4
- package/lib/components/booking/components/footer/index.js +0 -9
- package/lib/components/booking/components/footer/utils.d.ts +1 -1
- package/lib/components/booking/components/footer/utils.js +15 -10
- package/lib/components/booking/components/voucher/index.js +1 -7
- package/lib/components/booking/components/voucher/index.less +1 -4
- package/lib/components/booking/components/voucherModal/index.less +0 -1
- package/lib/components/booking/info/service2/utils.js +15 -13
- package/lib/components/booking/info2/service/editService/index.js +21 -24
- package/lib/components/booking/info2/service/editService/utils.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/utils.js +16 -0
- package/lib/components/booking/payments/index.js +1 -1
- package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +108 -157
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/lib/components/pay/toC/index.js +11 -52
- package/lib/components/pay/toC/model.d.ts +0 -1
- package/lib/components/pay/toC/serve.d.ts +0 -18
- package/lib/components/pay/toC/serve.js +0 -6
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +0 -4
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
- package/package.json +4 -4
|
@@ -25,7 +25,6 @@ var WalletPassModule = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
25
25
|
var _useWalletPass = useWalletPass({
|
|
26
26
|
onSelectChange: onSelectChange,
|
|
27
27
|
customAmount: customAmount,
|
|
28
|
-
totalAmount: Number(orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.totalAmount) || 0,
|
|
29
28
|
clientId: clientId
|
|
30
29
|
}),
|
|
31
30
|
handleSelectWallet = _useWalletPass.handleSelectWallet,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare type WalletPassDataType = Record<string, any>;
|
|
2
2
|
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => any;
|
|
3
3
|
export declare const voucherTime: (data: WalletPassDataType, key?: string) => any;
|
|
4
|
-
export declare const getVoucherAvailableStatus: (item: any) => boolean;
|
|
5
4
|
export declare const formatMachineCodeServer2CardList: (data: WalletPassDataType[], selectId?: number[], otherProps?: Record<string, any>) => any;
|
|
6
5
|
export declare const formatDiscountWalletData: (data: any, selectId?: number[]) => any;
|
|
7
6
|
export interface WalletPassUsageUnit {
|
|
@@ -11,15 +11,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
import React from 'react';
|
|
14
|
-
import { formatDate,
|
|
14
|
+
import { formatDate, locales } from '@pisell/utils';
|
|
15
15
|
import { globalConfig, PisellText } from "@pisell/materials";
|
|
16
16
|
import Decimal from 'decimal.js';
|
|
17
17
|
var Amount = PisellText.Amount;
|
|
18
18
|
// 获取walletPass可用最大金额
|
|
19
19
|
export var getAvailableMaxAmount = function getAvailableMaxAmount(data) {
|
|
20
|
-
if (isNumber(data._available_max_amount)) {
|
|
21
|
-
return data._available_max_amount;
|
|
22
|
-
}
|
|
23
20
|
return data.tag !== 'point_card' ? data.available_max_amount : data === null || data === void 0 ? void 0 : data.recommended_usage_amount;
|
|
24
21
|
};
|
|
25
22
|
export var voucherTime = function voucherTime(data) {
|
|
@@ -30,22 +27,11 @@ export var voucherTime = function voucherTime(data) {
|
|
|
30
27
|
}
|
|
31
28
|
return locales.getText('pisell2.text.walletPassPermanent');
|
|
32
29
|
};
|
|
33
|
-
export var getVoucherAvailableStatus = function getVoucherAvailableStatus(item) {
|
|
34
|
-
return item.unified_available_status === 1 && (isNumber(item._unified_available_status) ? !!item._unified_available_status : true);
|
|
35
|
-
};
|
|
36
30
|
export var formatMachineCodeServer2CardList = function formatMachineCodeServer2CardList(data) {
|
|
37
31
|
var selectId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
38
32
|
var otherProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
39
33
|
return (data || []).map(function (item) {
|
|
40
34
|
var _item$unified_message, _item$product;
|
|
41
|
-
var disabled = false;
|
|
42
|
-
if (item.unified_available_status === 0) {
|
|
43
|
-
disabled = true;
|
|
44
|
-
} else {
|
|
45
|
-
if (isNumber(item._unified_available_status)) {
|
|
46
|
-
disabled = !item._unified_available_status;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
35
|
return _objectSpread({
|
|
50
36
|
id: item.id,
|
|
51
37
|
name: item.product_name,
|
|
@@ -62,8 +48,8 @@ export var formatMachineCodeServer2CardList = function formatMachineCodeServer2C
|
|
|
62
48
|
showQrCode: false,
|
|
63
49
|
showStatus: true,
|
|
64
50
|
code: item.code,
|
|
65
|
-
disabled:
|
|
66
|
-
disabledReason:
|
|
51
|
+
disabled: !item.unified_available_status,
|
|
52
|
+
disabledReason: (_item$unified_message = item.unified_messages) === null || _item$unified_message === void 0 ? void 0 : _item$unified_message.title,
|
|
67
53
|
cover: (_item$product = item.product) === null || _item$product === void 0 ? void 0 : _item$product.cover,
|
|
68
54
|
qrCode: item.code,
|
|
69
55
|
validDate: voucherTime(item),
|
|
@@ -9,7 +9,6 @@ export declare const useWalletPass: (props: {
|
|
|
9
9
|
}[]) => void) | undefined;
|
|
10
10
|
customAmount?: string | undefined;
|
|
11
11
|
clientId?: number | undefined;
|
|
12
|
-
totalAmount?: number | undefined;
|
|
13
12
|
}) => {
|
|
14
13
|
walletRecommendList: any[];
|
|
15
14
|
userIdentificationCodes: any[];
|
|
@@ -30,6 +29,7 @@ export declare const useWalletPass: (props: {
|
|
|
30
29
|
selectedDiscountList: any;
|
|
31
30
|
handleSelectDiscount: (this: unknown, value: number[], option: any) => void;
|
|
32
31
|
customerName: any;
|
|
32
|
+
fetchWalletRecommendList: (this: unknown, params: any) => Promise<any>;
|
|
33
33
|
fetchUserIdentificationCodes: (this: unknown, params: any) => Promise<any>;
|
|
34
34
|
getCachedWalletRecommendList: (this: unknown) => any;
|
|
35
35
|
getCachedUserIdentificationCodes: (this: unknown) => any;
|