@pisell/private-materials 6.4.50 → 6.4.51
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 +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +36 -18
- package/es/components/appointmentBooking/hooks.js +6 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/index.js +12 -1
- package/es/components/booking/editBookingModal/index.js +8 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/checkout/PaymentModal.js +70 -62
- package/es/components/checkout/components/AmountSummary/index.js +4 -4
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +14 -10
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +25 -4
- package/es/components/eftposPay/serve.js +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/utils.js +1 -1
- package/es/components/pinModal/hooks.d.ts +7 -0
- package/es/components/pinModal/hooks.js +65 -0
- package/es/components/pinModal/index.d.ts +4 -0
- package/es/components/pinModal/index.js +98 -0
- package/es/components/pinModal/index.less +44 -0
- package/es/components/pinModal/locales.d.ts +27 -0
- package/es/components/pinModal/locales.js +26 -0
- package/es/components/pinModal/serve.d.ts +6 -0
- package/es/components/pinModal/serve.js +11 -0
- package/es/components/pinModal/types.d.ts +0 -0
- package/es/components/pinModal/types.js +0 -0
- package/es/components/pinVerifyModal/hooks.d.ts +7 -0
- package/es/components/pinVerifyModal/hooks.js +80 -0
- package/es/components/pinVerifyModal/index.d.ts +5 -0
- package/es/components/pinVerifyModal/index.js +218 -0
- package/es/components/pinVerifyModal/index.less +92 -0
- package/es/components/pinVerifyModal/locales.d.ts +24 -0
- package/es/components/pinVerifyModal/locales.js +23 -0
- package/es/components/pinVerifyModal/types.d.ts +33 -0
- package/es/components/pinVerifyModal/types.js +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +56 -10
- package/es/components/ticketBooking/components/timeBar/index.js +2 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/walletList/index.js +20 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/appointmentBooking/components/Services/index.js +13 -3
- package/lib/components/appointmentBooking/hooks.js +6 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.js +15 -2
- package/lib/components/booking/editBookingModal/index.js +6 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +6 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/checkout/PaymentModal.js +5 -4
- package/lib/components/checkout/components/AmountSummary/index.js +4 -4
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +6 -3
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +16 -4
- package/lib/components/eftposPay/serve.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/utils.js +1 -1
- package/lib/components/pinModal/hooks.d.ts +7 -0
- package/lib/components/pinModal/hooks.js +85 -0
- package/lib/components/pinModal/index.d.ts +4 -0
- package/lib/components/pinModal/index.js +88 -0
- package/lib/components/pinModal/index.less +44 -0
- package/lib/components/pinModal/locales.d.ts +27 -0
- package/lib/components/pinModal/locales.js +50 -0
- package/lib/components/pinModal/serve.d.ts +6 -0
- package/lib/components/pinModal/serve.js +37 -0
- package/lib/components/pinModal/types.d.ts +0 -0
- package/lib/components/pinModal/types.js +0 -0
- package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
- package/lib/components/pinVerifyModal/hooks.js +93 -0
- package/lib/components/pinVerifyModal/index.d.ts +5 -0
- package/lib/components/pinVerifyModal/index.js +230 -0
- package/lib/components/pinVerifyModal/index.less +92 -0
- package/lib/components/pinVerifyModal/locales.d.ts +24 -0
- package/lib/components/pinVerifyModal/locales.js +47 -0
- package/lib/components/pinVerifyModal/types.d.ts +33 -0
- package/lib/components/pinVerifyModal/types.js +17 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/ticketBooking/components/ticketBooking/index.js +52 -5
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/walletList/index.js +19 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/pin-modal/meta.ts +37 -0
- package/lowcode/pin-verify-modal/meta.ts +80 -0
- package/package.json +12 -12
@@ -0,0 +1,92 @@
|
|
1
|
+
.pin-verify-modal-content {
|
2
|
+
width: 100%;
|
3
|
+
height: 100%;
|
4
|
+
padding-bottom: 16px;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
align-items: center;
|
8
|
+
gap: 16px;
|
9
|
+
|
10
|
+
&-user {
|
11
|
+
min-width: 300px;
|
12
|
+
min-height: 60px;
|
13
|
+
padding: 8px;
|
14
|
+
display: flex;
|
15
|
+
align-items: center;
|
16
|
+
gap: 8px;
|
17
|
+
border-radius: 8px;
|
18
|
+
border: 1px solid #d0d5dd;
|
19
|
+
|
20
|
+
&-avatar {
|
21
|
+
width: 42px;
|
22
|
+
height: 42px;
|
23
|
+
display: flex;
|
24
|
+
align-items: center;
|
25
|
+
justify-content: center;
|
26
|
+
border-radius: 50%;
|
27
|
+
overflow: hidden;
|
28
|
+
|
29
|
+
&-img {
|
30
|
+
width: 100%;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
&-right {
|
35
|
+
display: flex;
|
36
|
+
flex-direction: column;
|
37
|
+
gap: 4px;
|
38
|
+
|
39
|
+
&-name {
|
40
|
+
font-size: 16px;
|
41
|
+
font-weight: 600;
|
42
|
+
color: #101828;
|
43
|
+
}
|
44
|
+
|
45
|
+
&-wallet {
|
46
|
+
color: #667085;
|
47
|
+
font-size: 14px;
|
48
|
+
font-weight: 400;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
&-keyboard {
|
54
|
+
display: flex;
|
55
|
+
flex-direction: column;
|
56
|
+
align-items: center;
|
57
|
+
gap: 8px;
|
58
|
+
|
59
|
+
&-title {
|
60
|
+
text-align: center;
|
61
|
+
color: #101828;
|
62
|
+
font-size: 16px;
|
63
|
+
font-weight: 500;
|
64
|
+
}
|
65
|
+
|
66
|
+
&-desc {
|
67
|
+
color: #667085;
|
68
|
+
font-size: 16px;
|
69
|
+
font-weight: 400;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
.virtual-keyboard-input-wrap {
|
74
|
+
height: 45px !important;
|
75
|
+
}
|
76
|
+
|
77
|
+
.virtual-keyboard-wrap .virtual-keyboard-content .virtual-keyboard-item {
|
78
|
+
padding-top: 50px !important;
|
79
|
+
}
|
80
|
+
|
81
|
+
.virtual-keyboard-wrap
|
82
|
+
.virtual-keyboard-content
|
83
|
+
.virtual-keyboard-item
|
84
|
+
.virtual-keyboard-item-button {
|
85
|
+
padding: 0 !important;
|
86
|
+
}
|
87
|
+
|
88
|
+
.virtual-keyboard-input-delete {
|
89
|
+
font-size: 30px;
|
90
|
+
color: #000;
|
91
|
+
}
|
92
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
en: {
|
3
|
+
'pisell2.pin.verify.modal.title': string;
|
4
|
+
'pisell2.pin.verify.modal.wallet': string;
|
5
|
+
'pisell2.pin.verify.modal.keyboard.title': string;
|
6
|
+
'pisell2.pin.verify.modal.keyboard.desc': string;
|
7
|
+
'pisell2.pin.verify.modal.keyboard.verify': string;
|
8
|
+
};
|
9
|
+
'zh-CN': {
|
10
|
+
'pisell2.pin.verify.modal.title': string;
|
11
|
+
'pisell2.pin.verify.modal.wallet': string;
|
12
|
+
'pisell2.pin.verify.modal.keyboard.title': string;
|
13
|
+
'pisell2.pin.verify.modal.keyboard.desc': string;
|
14
|
+
'pisell2.pin.verify.modal.keyboard.verify': string;
|
15
|
+
};
|
16
|
+
'zh-HK': {
|
17
|
+
'pisell2.pin.verify.modal.title': string;
|
18
|
+
'pisell2.pin.verify.modal.wallet': string;
|
19
|
+
'pisell2.pin.verify.modal.keyboard.title': string;
|
20
|
+
'pisell2.pin.verify.modal.keyboard.desc': string;
|
21
|
+
'pisell2.pin.verify.modal.keyboard.verify': string;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
export default _default;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default {
|
2
|
+
en: {
|
3
|
+
'pisell2.pin.verify.modal.title': 'Wallet Verification',
|
4
|
+
'pisell2.pin.verify.modal.wallet': 'Wallet : ',
|
5
|
+
'pisell2.pin.verify.modal.keyboard.title': 'Enter the 4-digit PIN to continue',
|
6
|
+
'pisell2.pin.verify.modal.keyboard.desc': 'Remaining attempts : ',
|
7
|
+
'pisell2.pin.verify.modal.keyboard.verify': 'Verify'
|
8
|
+
},
|
9
|
+
'zh-CN': {
|
10
|
+
'pisell2.pin.verify.modal.title': '钱包验证',
|
11
|
+
'pisell2.pin.verify.modal.wallet': '钱包 : ',
|
12
|
+
'pisell2.pin.verify.modal.keyboard.title': '请输入该钱包的4位PIN码以继续',
|
13
|
+
'pisell2.pin.verify.modal.keyboard.desc': '剩余验证次数 : ',
|
14
|
+
'pisell2.pin.verify.modal.keyboard.verify': '验证'
|
15
|
+
},
|
16
|
+
'zh-HK': {
|
17
|
+
'pisell2.pin.verify.modal.title': '錢包驗證',
|
18
|
+
'pisell2.pin.verify.modal.wallet': '錢包 : ',
|
19
|
+
'pisell2.pin.verify.modal.keyboard.title': '請輸入該錢包的4位PIN碼以繼續',
|
20
|
+
'pisell2.pin.verify.modal.keyboard.desc': '剩餘驗證次數 : ',
|
21
|
+
'pisell2.pin.verify.modal.keyboard.verify': '驗證'
|
22
|
+
}
|
23
|
+
};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
export interface PinVerifyModalProps {
|
2
|
+
onOpen?: () => void;
|
3
|
+
onClose?: () => void;
|
4
|
+
onSuccess?: (params?: VerifyPinSuccessParams) => void;
|
5
|
+
}
|
6
|
+
export interface PinVerifyModalRef {
|
7
|
+
open: (params: ModalParams) => void;
|
8
|
+
close: () => void;
|
9
|
+
}
|
10
|
+
export interface ModalParams {
|
11
|
+
wallet_code: string;
|
12
|
+
wallet_detail_id: string | number;
|
13
|
+
failed_count?: number;
|
14
|
+
check_max_count?: number;
|
15
|
+
customer?: {
|
16
|
+
display_name?: string;
|
17
|
+
nickname?: string;
|
18
|
+
cover?: string;
|
19
|
+
};
|
20
|
+
}
|
21
|
+
export interface VerifyInfo {
|
22
|
+
remaining_count?: number;
|
23
|
+
failed_count?: number;
|
24
|
+
check_max_count?: number;
|
25
|
+
}
|
26
|
+
export declare type TVerifyPin = (data: {
|
27
|
+
wallet_detail_id: string | number;
|
28
|
+
pin: string;
|
29
|
+
}, onSuccess: (params: VerifyPinSuccessParams) => void) => void;
|
30
|
+
export interface VerifyPinSuccessParams {
|
31
|
+
customer_id: string | number;
|
32
|
+
customer_pin_key: string;
|
33
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
3
2
|
import dayjs from "dayjs";
|
4
3
|
export interface FormState {
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
69
68
|
};
|
70
69
|
setGlobalState: Function | null;
|
71
70
|
}
|
72
|
-
export declare const Provider:
|
73
|
-
state: FormState;
|
74
|
-
} & {
|
75
|
-
dispatch: (params: {
|
76
|
-
type: string;
|
77
|
-
payload: any;
|
78
|
-
}) => void;
|
79
|
-
}>;
|
71
|
+
export declare const Provider: any, Context: any;
|
@@ -23,7 +23,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
23
23
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
24
24
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
25
25
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
26
|
-
import { locales } from '@pisell/utils';
|
26
|
+
import { locales, sendWarningLog } from '@pisell/utils';
|
27
27
|
import { message } from 'antd';
|
28
28
|
import { Iconfont, PisellModal, useToast } from '@pisell/materials';
|
29
29
|
import { getOrderInfoByCode, getBookingDetail, getEventBookingDetail, getBookingConfig, getServices } from "../../serve";
|
@@ -48,6 +48,7 @@ import { getBookingType } from "../bookingDataPanel/bookingList/utils";
|
|
48
48
|
import { useCustomer } from "../../hooks/pisellos";
|
49
49
|
import { useMemoizedFn } from 'ahooks';
|
50
50
|
import useScanManager from "../../hooks/pisellos/useScanManager";
|
51
|
+
import { useDebounceFn } from 'ahooks';
|
51
52
|
export var _formatBookingDetail = function _formatBookingDetail(data, modalState) {
|
52
53
|
var _bookings$list, _bookings$list2;
|
53
54
|
var customer_id = data.customer_id,
|
@@ -311,8 +312,54 @@ var TicketBooking = function TicketBooking() {
|
|
311
312
|
closeScan();
|
312
313
|
};
|
313
314
|
}, []);
|
315
|
+
var _useDebounceFn = useDebounceFn(function (type, orderId) {
|
316
|
+
// 支付成功后清空状态
|
317
|
+
try {
|
318
|
+
var _store$getState;
|
319
|
+
_initFn(function () {});
|
320
|
+
setState({
|
321
|
+
createCount: state.createCount + 1
|
322
|
+
});
|
323
|
+
sendWarningLog({
|
324
|
+
title: '清空购物车',
|
325
|
+
content: [{
|
326
|
+
key: '店铺id',
|
327
|
+
value: 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.globalConfig) === null || _store$getState === void 0 ? void 0 : _store$getState.id
|
328
|
+
}, {
|
329
|
+
key: '订单id',
|
330
|
+
value: orderId
|
331
|
+
}, {
|
332
|
+
key: '类型',
|
333
|
+
value: type
|
334
|
+
}]
|
335
|
+
});
|
336
|
+
} catch (err) {
|
337
|
+
var _store$getState2;
|
338
|
+
sendWarningLog({
|
339
|
+
title: '清空购物车失败',
|
340
|
+
content: [{
|
341
|
+
key: '店铺id',
|
342
|
+
value: store === null || store === void 0 || (_store$getState2 = store.getState) === null || _store$getState2 === void 0 || (_store$getState2 = _store$getState2.call(store)) === null || _store$getState2 === void 0 || (_store$getState2 = _store$getState2.global) === null || _store$getState2 === void 0 || (_store$getState2 = _store$getState2.globalConfig) === null || _store$getState2 === void 0 ? void 0 : _store$getState2.id
|
343
|
+
}, {
|
344
|
+
key: '订单id',
|
345
|
+
value: orderId
|
346
|
+
}, {
|
347
|
+
key: '类型',
|
348
|
+
value: type
|
349
|
+
}, {
|
350
|
+
key: 'error',
|
351
|
+
value: err === null || err === void 0 ? void 0 : err.message
|
352
|
+
}]
|
353
|
+
});
|
354
|
+
}
|
355
|
+
}, {
|
356
|
+
wait: 500,
|
357
|
+
leading: true,
|
358
|
+
trailing: false
|
359
|
+
}),
|
360
|
+
clearAllCart = _useDebounceFn.run;
|
314
361
|
useEffect(function () {
|
315
|
-
var _store$
|
362
|
+
var _store$getState3, _interaction$utils, _interaction$utils2;
|
316
363
|
// bellaswonderland.mypisell.com localStorage可能满了
|
317
364
|
localStorage.removeItem('bookingResourceList');
|
318
365
|
_persistentRef.current = storage.get("drawer-booking") === 'true' ? true : isTerminal();
|
@@ -373,7 +420,7 @@ var TicketBooking = function TicketBooking() {
|
|
373
420
|
};
|
374
421
|
} catch (error) {}
|
375
422
|
setState({
|
376
|
-
amountSymbol: (getData === null || getData === void 0 ? void 0 : getData('shop_symbol')) || (store === null || store === void 0 || (_store$
|
423
|
+
amountSymbol: (getData === null || getData === void 0 ? void 0 : getData('shop_symbol')) || (store === null || store === void 0 || (_store$getState3 = store.getState) === null || _store$getState3 === void 0 || (_store$getState3 = _store$getState3.call(store)) === null || _store$getState3 === void 0 || (_store$getState3 = _store$getState3.global) === null || _store$getState3 === void 0 ? void 0 : _store$getState3.symbol) || '$'
|
377
424
|
}, function () {
|
378
425
|
_initStateRef.current = JSON.parse(JSON.stringify(state));
|
379
426
|
_getBoardConfig();
|
@@ -387,6 +434,7 @@ var TicketBooking = function TicketBooking() {
|
|
387
434
|
console.log('bookingTicket.clearAllCart');
|
388
435
|
// 支付成功后清空状态
|
389
436
|
_initFn(function () {});
|
437
|
+
_setIntervalTime(true);
|
390
438
|
selectCustomer(null);
|
391
439
|
enableAllScanListeners();
|
392
440
|
setState({
|
@@ -633,8 +681,8 @@ var TicketBooking = function TicketBooking() {
|
|
633
681
|
}, 100);
|
634
682
|
};
|
635
683
|
var _setShopOpeningHours = function _setShopOpeningHours() {
|
636
|
-
var _getData, _store$
|
637
|
-
var time = (getData === null || getData === void 0 || (_getData = getData('operating_day_boundary')) === null || _getData === void 0 ? void 0 : _getData.time) || (store === null || store === void 0 || (_store$
|
684
|
+
var _getData, _store$getState4;
|
685
|
+
var time = (getData === null || getData === void 0 || (_getData = getData('operating_day_boundary')) === null || _getData === void 0 ? void 0 : _getData.time) || (store === null || store === void 0 || (_store$getState4 = store.getState) === null || _store$getState4 === void 0 || (_store$getState4 = _store$getState4.call(store)) === null || _store$getState4 === void 0 || (_store$getState4 = _store$getState4.global) === null || _store$getState4 === void 0 || (_store$getState4 = _store$getState4.shopDetail) === null || _store$getState4 === void 0 || (_store$getState4 = _store$getState4.operating_day_boundary) === null || _store$getState4 === void 0 ? void 0 : _store$getState4.time);
|
638
686
|
if (time) {
|
639
687
|
localStorage.setItem('shopOpeningHours', time);
|
640
688
|
}
|
@@ -653,11 +701,10 @@ var TicketBooking = function TicketBooking() {
|
|
653
701
|
});
|
654
702
|
case 2:
|
655
703
|
data = _context.sent;
|
656
|
-
console.log('wwww', data);
|
657
704
|
setState({
|
658
705
|
addTimeProducts: (data === null || data === void 0 ? void 0 : data.list) || []
|
659
706
|
});
|
660
|
-
case
|
707
|
+
case 4:
|
661
708
|
case "end":
|
662
709
|
return _context.stop();
|
663
710
|
}
|
@@ -822,9 +869,9 @@ var TicketBooking = function TicketBooking() {
|
|
822
869
|
// 储存参数, 添加服务商品时使用
|
823
870
|
sessionStorage.setItem('pisell2.booking.serviceParams', JSON.stringify(data));
|
824
871
|
} else {
|
825
|
-
var _store$
|
872
|
+
var _store$getState5;
|
826
873
|
// 当前时区的时间
|
827
|
-
var timezone = store === null || store === void 0 || (_store$
|
874
|
+
var timezone = store === null || store === void 0 || (_store$getState5 = store.getState) === null || _store$getState5 === void 0 || (_store$getState5 = _store$getState5.call(store)) === null || _store$getState5 === void 0 || (_store$getState5 = _store$getState5.global) === null || _store$getState5 === void 0 || (_store$getState5 = _store$getState5.globalConfig) === null || _store$getState5 === void 0 ? void 0 : _store$getState5.timezone;
|
828
875
|
initState.modalState.date.value = dayjs.tz(new Date(), timezone);
|
829
876
|
// 兜底, 没有传递则清空下
|
830
877
|
sessionStorage.removeItem('pisell2.booking.serviceParams');
|
@@ -1023,7 +1070,6 @@ var TicketBooking = function TicketBooking() {
|
|
1023
1070
|
isShowDeposit: state.isShowDeposit,
|
1024
1071
|
disableEventBookingEdit: state.disableEventBookingEdit,
|
1025
1072
|
list: state.list,
|
1026
|
-
intervalSetTime: state.intervalSetTime,
|
1027
1073
|
createCount: state.createCount,
|
1028
1074
|
bookingFunctions: state.bookingFunctions,
|
1029
1075
|
isParallelResourcesBooking: state.isParallelResourcesBooking
|
@@ -9,6 +9,7 @@ import { LeftOutlined, RightOutlined } from '@ant-design/icons';
|
|
9
9
|
import { DatePicker, SelectTime } from '@pisell/materials';
|
10
10
|
import { useMemoizedFn } from 'ahooks';
|
11
11
|
import { Button } from 'antd';
|
12
|
+
import dayjs from 'dayjs';
|
12
13
|
import classNames from 'classnames';
|
13
14
|
import { locales } from '@pisell/utils';
|
14
15
|
import "./index.less";
|
@@ -54,7 +55,7 @@ var TimeBar = function TimeBar(props) {
|
|
54
55
|
setGlobalState({
|
55
56
|
isTimeChange: true
|
56
57
|
});
|
57
|
-
(_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props,
|
58
|
+
(_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props, timeString === dayjs().format('HH:mm'));
|
58
59
|
});
|
59
60
|
return useMemo(function () {
|
60
61
|
var _state$modalState4, _state$modalState5;
|
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
interface RechargeState {
|
3
|
-
addWalletCard: any;
|
4
|
-
}
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
6
|
-
walletDetailState: RechargeState;
|
7
|
-
} & {
|
8
|
-
dispatch: (params: {
|
9
|
-
type: string;
|
10
|
-
payload: any;
|
11
|
-
}) => void;
|
12
|
-
}>;
|
13
|
-
export {};
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,14 +1 @@
|
|
1
|
-
|
2
|
-
interface RechargeState {
|
3
|
-
total: number;
|
4
|
-
setup?: 'menu' | 'list' | 'detail' | string;
|
5
|
-
}
|
6
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
7
|
-
state: RechargeState;
|
8
|
-
} & {
|
9
|
-
dispatch: (params: {
|
10
|
-
type: string;
|
11
|
-
payload: any;
|
12
|
-
}) => void;
|
13
|
-
}>;
|
14
|
-
export {};
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
interface RechargeState {
|
3
|
-
total: number;
|
4
|
-
}
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
6
|
-
state: RechargeState;
|
7
|
-
} & {
|
8
|
-
dispatch: (params: {
|
9
|
-
type: string;
|
10
|
-
payload: any;
|
11
|
-
}) => void;
|
12
|
-
}>;
|
13
|
-
export {};
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,29 +1 @@
|
|
1
|
-
|
2
|
-
interface RechargeState {
|
3
|
-
selectedGiftOptionId: string | null;
|
4
|
-
cardList: Array<{
|
5
|
-
id: string;
|
6
|
-
name: string;
|
7
|
-
price: number;
|
8
|
-
}>;
|
9
|
-
selectedItem: {
|
10
|
-
id?: string;
|
11
|
-
gift_price?: number;
|
12
|
-
price?: number;
|
13
|
-
name?: string;
|
14
|
-
variant_id?: string;
|
15
|
-
};
|
16
|
-
productId?: string;
|
17
|
-
detailId?: string;
|
18
|
-
total: string | number;
|
19
|
-
rechargeModalOpen: boolean;
|
20
|
-
}
|
21
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
22
|
-
state: RechargeState;
|
23
|
-
} & {
|
24
|
-
dispatch: (params: {
|
25
|
-
type: string;
|
26
|
-
payload: any;
|
27
|
-
}) => void;
|
28
|
-
}>;
|
29
|
-
export {};
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
interface RechargeState {
|
3
|
-
total: 0;
|
4
|
-
}
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
6
|
-
state: RechargeState;
|
7
|
-
} & {
|
8
|
-
dispatch: (params: {
|
9
|
-
type: string;
|
10
|
-
payload: any;
|
11
|
-
}) => void;
|
12
|
-
}>;
|
13
|
-
export {};
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { IWalletListItemProps } from './serve';
|
3
2
|
export interface WalletCardItemProps {
|
4
3
|
id: string;
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
27
26
|
currentSearchListItemCode?: string;
|
28
27
|
[key: string]: any;
|
29
28
|
}
|
30
|
-
export declare const Provider:
|
31
|
-
global_wallet: WalletListProps;
|
32
|
-
} & {
|
33
|
-
dispatch: (params: {
|
34
|
-
type: string;
|
35
|
-
payload: any;
|
36
|
-
}) => void;
|
37
|
-
}>;
|
29
|
+
export declare const Provider: any, Context: any;
|
@@ -30,6 +30,7 @@ import "./index.less";
|
|
30
30
|
import classNames from 'classnames';
|
31
31
|
// 导入所有类型
|
32
32
|
import { DEFAULT_CARD_CONFIG } from "./types";
|
33
|
+
import PinModal from "../pinModal";
|
33
34
|
|
34
35
|
// 添加 localStorage 相关的操作函数
|
35
36
|
var STORAGE_KEY = 'pisell_wallet_list_data';
|
@@ -174,6 +175,9 @@ var WalletList = Provider(function (props) {
|
|
174
175
|
var requestIdRef = useRef('');
|
175
176
|
var pubsub = utils === null || utils === void 0 ? void 0 : utils.pubsub;
|
176
177
|
|
178
|
+
// pinModal的ref
|
179
|
+
var pinModalRef = useRef(null);
|
180
|
+
|
177
181
|
//获取登录状态
|
178
182
|
var isUserLoggedIn = useMemo(function () {
|
179
183
|
var _utils$token, _utils$token$get;
|
@@ -584,6 +588,14 @@ var WalletList = Provider(function (props) {
|
|
584
588
|
return _ref3.apply(this, arguments);
|
585
589
|
};
|
586
590
|
}();
|
591
|
+
var _onViewPinClick = function onViewPinClick(card) {
|
592
|
+
if (card !== null && card !== void 0 && card.id) {
|
593
|
+
var _pinModalRef$current;
|
594
|
+
(_pinModalRef$current = pinModalRef.current) === null || _pinModalRef$current === void 0 || _pinModalRef$current.open(card === null || card === void 0 ? void 0 : card.id);
|
595
|
+
} else {
|
596
|
+
console.error('onViewPinClick方法需要传入wallet_detail_id');
|
597
|
+
}
|
598
|
+
};
|
587
599
|
var renderWalletCard = function renderWalletCard(item) {
|
588
600
|
var _dvaStore$core;
|
589
601
|
var code = item.code,
|
@@ -650,7 +662,11 @@ var WalletList = Provider(function (props) {
|
|
650
662
|
});
|
651
663
|
return /*#__PURE__*/React.createElement(WalletCard, _extends({
|
652
664
|
key: id
|
653
|
-
}, cardProps
|
665
|
+
}, cardProps, {
|
666
|
+
onViewPinClick: function onViewPinClick() {
|
667
|
+
return _onViewPinClick(item);
|
668
|
+
}
|
669
|
+
}));
|
654
670
|
};
|
655
671
|
var carouselProps = {
|
656
672
|
className: classNames('pisell-lowcode__walletList'),
|
@@ -809,7 +825,9 @@ var WalletList = Provider(function (props) {
|
|
809
825
|
fontSize: '24px',
|
810
826
|
color: currentIndex === list.length - 1 ? '#D0D5DD' : '#101828'
|
811
827
|
}
|
812
|
-
})))
|
828
|
+
}))), /*#__PURE__*/React.createElement(PinModal, {
|
829
|
+
ref: pinModalRef
|
830
|
+
}));
|
813
831
|
};
|
814
832
|
|
815
833
|
// 最终返回组件内容
|
package/es/index.d.ts
CHANGED
@@ -59,3 +59,5 @@ export { default as ProSkuDetailModal } from './pro/skuDetailModal';
|
|
59
59
|
export { default as SaasLogin } from './plus/saasLogin';
|
60
60
|
export { default as SaasRegister } from './plus/saasRegister';
|
61
61
|
export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
|
62
|
+
export { default as PinModal } from './components/pinModal';
|
63
|
+
export { default as PinVerifyModal } from './components/pinVerifyModal';
|
package/es/index.js
CHANGED
@@ -62,4 +62,6 @@ export { default as ProPriceRadio } from "./pro/pisellPriceRadio";
|
|
62
62
|
export { default as ProSkuDetailModal } from "./pro/skuDetailModal";
|
63
63
|
export { default as SaasLogin } from "./plus/saasLogin";
|
64
64
|
export { default as SaasRegister } from "./plus/saasRegister";
|
65
|
-
export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
|
65
|
+
export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
|
66
|
+
export { default as PinModal } from "./components/pinModal";
|
67
|
+
export { default as PinVerifyModal } from "./components/pinVerifyModal";
|
@@ -95,20 +95,27 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
95
95
|
delete product.option;
|
96
96
|
if (isRetailTemplate) {
|
97
97
|
if (data == null ? void 0 : data.isCancel) return;
|
98
|
-
appointmentBooking.storeProduct(product);
|
98
|
+
const res = appointmentBooking.storeProduct(product);
|
99
|
+
if (!res.success && res.errorCode === "not_enough_stock") {
|
100
|
+
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unuse.stock"));
|
101
|
+
}
|
99
102
|
return;
|
100
103
|
}
|
101
104
|
const session = data == null ? void 0 : data.session;
|
102
105
|
if (session) {
|
103
106
|
const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
|
104
107
|
const endDate = (0, import_dayjs.default)(session == null ? void 0 : session.end_at).format("YYYY-MM-DD");
|
105
|
-
appointmentBooking.addProductToCart({
|
108
|
+
const res = appointmentBooking.addProductToCart({
|
106
109
|
product: { ...product },
|
107
110
|
date: {
|
108
111
|
startTime: `${startDate} ${session == null ? void 0 : session.start_time}`,
|
109
112
|
endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
|
110
113
|
}
|
111
114
|
});
|
115
|
+
if (!res.success && res.errorCode === "not_enough_stock") {
|
116
|
+
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unuse.stock"));
|
117
|
+
}
|
118
|
+
appointmentBooking.closeProductDetail();
|
112
119
|
await appointmentBooking.getAvailableDate({
|
113
120
|
startDate,
|
114
121
|
endDate
|
@@ -121,7 +128,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
121
128
|
import_utils.locales.getText("pisell2.appointment.no.available.service")
|
122
129
|
);
|
123
130
|
}
|
124
|
-
appointmentBooking.storeProduct(product);
|
131
|
+
const res = appointmentBooking.storeProduct(product);
|
132
|
+
if (!res.success && res.errorCode === "not_enough_stock") {
|
133
|
+
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unuse.stock"));
|
134
|
+
}
|
125
135
|
if (type === "duration") {
|
126
136
|
await appointmentBooking.getAvailableDate();
|
127
137
|
}
|
@@ -189,6 +189,12 @@ var useAppointmentBookingStep = () => {
|
|
189
189
|
if (!result) {
|
190
190
|
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unuse.date"));
|
191
191
|
}
|
192
|
+
const capacityResult = appointmentBooking.checkMaxDurationCapacity();
|
193
|
+
if (!capacityResult.success) {
|
194
|
+
const getMessage = import_utils.locales.getText("pisell2.appointment.unuse.capacity");
|
195
|
+
const message = typeof getMessage === "function" ? getMessage(capacityResult.minAvailableCount) : getMessage;
|
196
|
+
return (0, import_utils2.Toast)(message);
|
197
|
+
}
|
192
198
|
}
|
193
199
|
if (!isRetailTemplate && (currentKey == null ? void 0 : currentKey.startsWith("select-resource"))) {
|
194
200
|
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(currentSelectedResources, appointmentBooking, utils);
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -593,7 +593,7 @@ var Footer = (props) => {
|
|
593
593
|
messageShow = true,
|
594
594
|
noSubmit = false
|
595
595
|
}) => {
|
596
|
-
var _a2;
|
596
|
+
var _a2, _b2, _c2, _d2, _e2;
|
597
597
|
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
598
598
|
if ((0, import_utils2.isDayBooking)(state)) {
|
599
599
|
const isHasDayProducts = handleDaySubmit();
|
@@ -652,7 +652,20 @@ var Footer = (props) => {
|
|
652
652
|
title: "saveBooking",
|
653
653
|
content: [
|
654
654
|
{ key: "下单前数据", value: JSON.stringify(values) },
|
655
|
-
{ key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") }
|
655
|
+
{ key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
|
656
|
+
{
|
657
|
+
key: "店铺id",
|
658
|
+
value: (_e2 = (_d2 = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
|
659
|
+
},
|
660
|
+
{
|
661
|
+
key: "shopApi",
|
662
|
+
value: JSON.stringify(window == null ? void 0 : window.shopApi, (key, value) => {
|
663
|
+
if (typeof value === "function") {
|
664
|
+
return "function";
|
665
|
+
}
|
666
|
+
return value;
|
667
|
+
})
|
668
|
+
}
|
656
669
|
]
|
657
670
|
});
|
658
671
|
if (addonsEdit) {
|
@@ -113,7 +113,12 @@ var EditBookingModal = (props, ref) => {
|
|
113
113
|
_cloned[_idx] = _targetResource;
|
114
114
|
}
|
115
115
|
} else {
|
116
|
-
_cloned.
|
116
|
+
const _targetIdx = _cloned.findIndex((rs) => {
|
117
|
+
return rs.relation_id == (_targetResource == null ? void 0 : _targetResource.relation_id);
|
118
|
+
});
|
119
|
+
if (_targetIdx === -1) {
|
120
|
+
_cloned.push(_targetResource);
|
121
|
+
}
|
117
122
|
}
|
118
123
|
_initResourceVal = {
|
119
124
|
..._initResourceVal,
|