@pisell/private-materials 6.6.94 → 6.6.96
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/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/utils.d.ts +67 -0
- package/es/components/booking/components/footer/utils.js +0 -13
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/components/voucher/index.js +3 -42
- package/es/components/booking/dashboard/index.js +15 -14
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info2/service/editService/index.d.ts +8 -0
- package/es/components/booking/info2/service/editService/index.js +11 -31
- package/es/components/booking/info2/service/editService/utils.d.ts +41 -0
- package/es/components/booking/info2/service/editService/utils.js +19 -128
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/ticketBooking/utils/index.d.ts +103 -0
- package/es/components/ticketBooking/utils/index.js +4 -4
- package/es/plus/clinetSearch/Add/index.d.ts +18 -0
- package/es/plus/clinetSearch/Add/index.js +4 -2
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/utils.d.ts +67 -0
- package/lib/components/booking/components/footer/utils.js +1 -8
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/components/voucher/index.js +3 -43
- package/lib/components/booking/dashboard/index.js +14 -14
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info2/service/editService/index.d.ts +8 -0
- package/lib/components/booking/info2/service/editService/index.js +12 -38
- package/lib/components/booking/info2/service/editService/utils.d.ts +41 -0
- package/lib/components/booking/info2/service/editService/utils.js +12 -94
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/ticketBooking/utils/index.d.ts +103 -0
- package/lib/components/ticketBooking/utils/index.js +2 -2
- package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
- package/lib/plus/clinetSearch/Add/index.js +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -175,10 +175,10 @@ export declare const getProductOriginTotalPrice: (item: any) => number;
|
|
|
175
175
|
export declare const getDuration: (duration: number | {
|
|
176
176
|
type: string;
|
|
177
177
|
value: number;
|
|
178
|
-
}) => number | {
|
|
178
|
+
}) => number | "flexible" | {
|
|
179
179
|
type: string;
|
|
180
180
|
value: number;
|
|
181
|
-
}
|
|
181
|
+
};
|
|
182
182
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
183
183
|
export declare const getIsEdit: (state: any) => boolean;
|
|
184
184
|
export {};
|
|
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
|
|
|
17
17
|
cardData: any;
|
|
18
18
|
handleSelectWallet: (value: number[]) => void;
|
|
19
19
|
selectedWalletIds: any[];
|
|
20
|
-
expiredWalletIds: any
|
|
20
|
+
expiredWalletIds: any;
|
|
21
21
|
expiredWalletData: any;
|
|
22
22
|
disabledWalletData: any[];
|
|
23
23
|
clearAllSelectedWallet: () => void;
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "page" | "success" | "
|
|
11
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "page" | "success" | "
|
|
14
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -299,20 +299,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
299
299
|
name?: string | undefined;
|
|
300
300
|
symbol?: string | undefined;
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
|
-
mode?: "
|
|
302
|
+
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat" | undefined;
|
|
305
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
|
309
309
|
subTitle?: string | undefined;
|
|
310
|
-
type?: "
|
|
310
|
+
type?: "unset" | "step" | undefined;
|
|
311
311
|
render?: boolean | undefined;
|
|
312
312
|
net?: boolean | undefined;
|
|
313
313
|
component?: string | undefined;
|
|
314
314
|
form?: string | undefined;
|
|
315
|
-
status?: "loading" | "success" | "warn" | "
|
|
315
|
+
status?: "loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
316
316
|
warn?: string | undefined;
|
|
317
317
|
steps?: {
|
|
318
318
|
/** 用于重置当前步骤 */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -29,4 +30,11 @@ export interface PayGroup {
|
|
|
29
30
|
_order: any;
|
|
30
31
|
front_order_uuid?: string;
|
|
31
32
|
}
|
|
32
|
-
export declare const Provider: any, Context:
|
|
33
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
34
|
+
state: FormState;
|
|
35
|
+
} & {
|
|
36
|
+
dispatch: (params: {
|
|
37
|
+
type: string;
|
|
38
|
+
payload: any;
|
|
39
|
+
}) => void;
|
|
40
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
/** dayjs对象格式化为字符串时间 */
|
|
3
|
+
export declare const formatDateToStr: (date: Dayjs[]) => string | string[];
|
|
4
|
+
export declare const getDefaultStartParam: () => string | string[];
|
|
5
|
+
export declare const formatBookingList: (bookingList: any[]) => any[];
|
|
6
|
+
export declare const getNextTimeSlice: (sliceMinutes: number) => Dayjs;
|
|
7
|
+
export declare const getDisabledEdit: ({ shop_discount, bookings, payment_status }: any) => boolean;
|
|
8
|
+
export declare const formatOptions: (detail: any) => any;
|
|
9
|
+
export declare const formatHolder: (detail: any) => any;
|
|
10
|
+
export declare const restoreProductOtherData: (data: any) => {
|
|
11
|
+
product_id: any;
|
|
12
|
+
option: any;
|
|
13
|
+
bundle: any;
|
|
14
|
+
product_variant_id: any;
|
|
15
|
+
quantity: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export declare const isSameProduct: (a: any, b: any) => boolean;
|
|
18
|
+
export declare const addService: (list: any[], addItem: any, state: any, isMultiDay?: boolean) => {
|
|
19
|
+
list: any[];
|
|
20
|
+
count: number;
|
|
21
|
+
quantity?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
list: any[];
|
|
24
|
+
quantity: any;
|
|
25
|
+
count?: undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
28
|
+
export declare const getCartProductOverlay: (state: any) => any;
|
|
29
|
+
export declare const getIsOverlayProduct: (item: any, state: any) => any;
|
|
30
|
+
export declare const getIsShowNumber: (item: any, state: any) => any;
|
|
31
|
+
export declare const genServiceKey: (item: any) => string;
|
|
32
|
+
export declare const genHolderKey: (item: any) => string;
|
|
33
|
+
export declare const getIsParallelResourcesBooking: (record: any) => boolean;
|
|
34
|
+
declare type ScanData = {
|
|
35
|
+
type: string;
|
|
36
|
+
status: 'success' | 'failed';
|
|
37
|
+
scanType: 'nfc' | 'scanner';
|
|
38
|
+
scanCode: string;
|
|
39
|
+
result: {
|
|
40
|
+
searchType: 'customer' | 'wallet' | 'walletPass' | 'product' | 'local_product';
|
|
41
|
+
response: {
|
|
42
|
+
status: boolean;
|
|
43
|
+
code: number;
|
|
44
|
+
message: string;
|
|
45
|
+
data: any;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
+
searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
|
|
51
|
+
data: any;
|
|
52
|
+
scanCode: string;
|
|
53
|
+
} | null;
|
|
54
|
+
export declare const formatScanGlobal: (data: ScanData) => {
|
|
55
|
+
searchType: "wallet";
|
|
56
|
+
data: any;
|
|
57
|
+
scanCode: string;
|
|
58
|
+
} | {
|
|
59
|
+
searchType: "walletPass";
|
|
60
|
+
data: any;
|
|
61
|
+
scanCode: string;
|
|
62
|
+
} | {
|
|
63
|
+
searchType: "product" | "local_product";
|
|
64
|
+
data: any;
|
|
65
|
+
scanCode: string;
|
|
66
|
+
} | null | undefined;
|
|
67
|
+
export declare const createSimpleCacheItem: (item: any, e: any, state: any) => any;
|
|
68
|
+
export declare const getBookingTicketKey: (osKey: string) => string;
|
|
69
|
+
export declare const getShopDiscountKey: (osKey: string) => string;
|
|
70
|
+
export declare const rulesHooks: {
|
|
71
|
+
getProduct(product: Record<string, any>): {
|
|
72
|
+
booking_id: any;
|
|
73
|
+
id: any;
|
|
74
|
+
_id: any;
|
|
75
|
+
price: any;
|
|
76
|
+
total: any;
|
|
77
|
+
discount_list: any;
|
|
78
|
+
origin_total: any;
|
|
79
|
+
num: any;
|
|
80
|
+
quantity: any;
|
|
81
|
+
vouchersApplicable: any;
|
|
82
|
+
holder_id: any;
|
|
83
|
+
isNormalProduct: any;
|
|
84
|
+
startDate: any;
|
|
85
|
+
bundle: any;
|
|
86
|
+
options: any;
|
|
87
|
+
main_product_selling_price: any;
|
|
88
|
+
};
|
|
89
|
+
setProduct(product: Record<string, any>, values: {
|
|
90
|
+
total: number;
|
|
91
|
+
discount_list: any[];
|
|
92
|
+
price: number;
|
|
93
|
+
quantity: number;
|
|
94
|
+
_id?: string;
|
|
95
|
+
}): {
|
|
96
|
+
_id: any;
|
|
97
|
+
discount_list: any[];
|
|
98
|
+
_extend: any;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export declare const clearCacheProductDetail: () => void;
|
|
102
|
+
export { getCache, setCache, clearCache, clearAllCache, clearAllCacheByOsKey, getProductCache, setProductCache, clearProductCache, clearAllProductCache, getBoardConfigCache, setBoardConfigCache, clearBoardConfigCache, } from './productCache';
|
|
103
|
+
export type { CacheType } from './productCache';
|
|
@@ -161,18 +161,18 @@ export var addService = function addService(list, addItem, state, isMultiDay) {
|
|
|
161
161
|
var isSetCount = false;
|
|
162
162
|
value = list.map(function (item) {
|
|
163
163
|
var _item$_extend;
|
|
164
|
-
//
|
|
164
|
+
// 是否商品券折扣的商品
|
|
165
165
|
var isGoodPassDiscountProduct = (item.discount_list || []).some(function (item) {
|
|
166
|
-
return
|
|
166
|
+
return item.type === 'good_pass';
|
|
167
167
|
});
|
|
168
168
|
var isEdit = item === null || item === void 0 ? void 0 : item.edit;
|
|
169
|
-
//
|
|
169
|
+
// 子商品是否有商品券折扣的商品
|
|
170
170
|
var bundleDiscountList = [];
|
|
171
171
|
((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle) || []).forEach(function (item) {
|
|
172
172
|
bundleDiscountList.push.apply(bundleDiscountList, _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []));
|
|
173
173
|
});
|
|
174
174
|
var isGoodPassBundleProduct = bundleDiscountList.some(function (item) {
|
|
175
|
-
return
|
|
175
|
+
return item.type === 'good_pass';
|
|
176
176
|
});
|
|
177
177
|
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct && !isEdit && !isGoodPassBundleProduct) {
|
|
178
178
|
var _item$_extend2, _addItem$_extend, _item$_extend3;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface AddClientProps {
|
|
4
|
+
onChange: (value: any, isChecked: boolean) => void;
|
|
5
|
+
phone?: string;
|
|
6
|
+
containerProps: {
|
|
7
|
+
className?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
width?: string | number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface AddClientRef {
|
|
15
|
+
reset: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const AddClient: React.ForwardRefExoticComponent<AddClientProps & React.RefAttributes<unknown>>;
|
|
18
|
+
export default AddClient;
|
|
@@ -67,7 +67,9 @@ var AddClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
67
67
|
message.info(locales.getText('pisell2.text.add-client.confirm'));
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
_addClient.run({
|
|
70
|
+
_addClient.run(_objectSpread(_objectSpread({}, values.is_checked ? {
|
|
71
|
+
sync_voucher_issuance: true
|
|
72
|
+
} : {}), {}, {
|
|
71
73
|
customer: _objectSpread(_objectSpread({
|
|
72
74
|
accepts_marketing: 0,
|
|
73
75
|
register_channel: 'pos',
|
|
@@ -95,7 +97,7 @@ var AddClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
95
97
|
country_calling_code: '+61'
|
|
96
98
|
},
|
|
97
99
|
tags: []
|
|
98
|
-
});
|
|
100
|
+
}));
|
|
99
101
|
};
|
|
100
102
|
var renderContent = function renderContent() {
|
|
101
103
|
return /*#__PURE__*/React.createElement(Form, {
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Capacity: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true |
|
|
5
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
6
6
|
export default Capacity;
|
|
@@ -3,5 +3,5 @@ import { SkuStatusOverlayConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const CardMask: ({ props }: {
|
|
5
5
|
props: SkuStatusOverlayConfig;
|
|
6
|
-
}) => string | number | true |
|
|
6
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
7
7
|
export default CardMask;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const Countdown: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true |
|
|
6
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
7
7
|
export default Countdown;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Duration: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true |
|
|
5
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
6
6
|
export default Duration;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const MemberPrice: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true |
|
|
6
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
7
7
|
export default MemberPrice;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Resource: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true |
|
|
5
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
6
6
|
export default Resource;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Stock: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true |
|
|
5
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
6
6
|
export default Stock;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Time: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true |
|
|
5
|
+
}) => string | number | true | JSX.Element | React.ReactFragment | null;
|
|
6
6
|
export default Time;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 套餐单规格信息
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {any} option
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: zhiwei.Wang
|
|
7
|
+
* @Date: 2024-02-19 09:26
|
|
8
|
+
*/
|
|
9
|
+
export declare const formatProductOption: (option: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
* @title: 套餐信息
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {any} bundle
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @Author: zhiwei.Wang
|
|
16
|
+
* @Date: 2024-02-19 09:26
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatProductBundle: (bundle: any) => any;
|
|
19
|
+
/**
|
|
20
|
+
* 获取子商品折扣信息
|
|
21
|
+
* @param item
|
|
22
|
+
*/
|
|
23
|
+
export declare const getBundleDiscountList: (bundle: any[]) => any[];
|
|
24
|
+
export interface ResourceItem {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
|
|
29
|
+
* @description:
|
|
30
|
+
* @param {object} resource
|
|
31
|
+
* @return {*}
|
|
32
|
+
* @Author: jinglin.tan
|
|
33
|
+
*/
|
|
34
|
+
export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
|
|
35
|
+
export declare const checkResourcesFormat: (resources: any[], service: any, isChild?: boolean) => any[];
|
|
36
|
+
/**
|
|
37
|
+
* @title: 格式化商品单价
|
|
38
|
+
* @description:
|
|
39
|
+
* @param {any} item
|
|
40
|
+
* @return {*}
|
|
41
|
+
* @Author: WangHan
|
|
42
|
+
* @Date: 2024-12-23 12:05
|
|
43
|
+
*/
|
|
44
|
+
export declare const formatProductPrice: (item: any) => number;
|
|
45
|
+
/**
|
|
46
|
+
* checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
|
|
47
|
+
* @param item
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
export declare const formatOriginalPrice: (item: any) => number;
|
|
51
|
+
/**
|
|
52
|
+
* checkout2.0: 商品维度折扣后价格, original_price - 商品折扣金额(商品手动折扣等等)
|
|
53
|
+
* @param item
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
export declare const formatSellingPrice: (item: any) => number;
|
|
57
|
+
export declare const getSourceProductPrice: (item: any) => number;
|
|
58
|
+
export declare const getMainProductSellingPrice: (item: any) => number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* @title: 是否包含跨日预约商品
|
|
61
|
+
* @description:
|
|
62
|
+
* @param {any} data
|
|
63
|
+
* @return {*}
|
|
64
|
+
*/
|
|
65
|
+
export declare const getHasMultiDayProduct: (data: any) => any;
|
|
66
|
+
export declare const formatValues: (state: any) => any;
|
|
67
|
+
export declare const checkHolderIsError: (state: any) => any;
|
|
@@ -400,14 +400,7 @@ var formatProducts = (item, quantity) => {
|
|
|
400
400
|
});
|
|
401
401
|
const notManualDiscount = discount_list.filter(
|
|
402
402
|
(item2) => item2.type !== "product"
|
|
403
|
-
)
|
|
404
|
-
var _a2, _b2;
|
|
405
|
-
if (quantity === void 0 || (discount.tag || discount.type) !== "entitlement_pass" || ((_a2 = discount.metadata) == null ? void 0 : _a2.custom_product_bundle_map_id)) {
|
|
406
|
-
return discount;
|
|
407
|
-
}
|
|
408
|
-
const num = Math.min(Number(((_b2 = discount.metadata) == null ? void 0 : _b2.num) ?? item._extend.quantity), quantity);
|
|
409
|
-
return { ...discount, _num: num, metadata: { ...discount.metadata, num } };
|
|
410
|
-
});
|
|
403
|
+
);
|
|
411
404
|
if (item.isCustomItem) {
|
|
412
405
|
item.product_id = 0;
|
|
413
406
|
}
|
|
@@ -87,14 +87,6 @@ var VoucherCard = (props) => {
|
|
|
87
87
|
const { selectCustomer } = (0, import_pisellos.useCustomer)({
|
|
88
88
|
changeCustomerToGlobalState
|
|
89
89
|
});
|
|
90
|
-
(0, import_react.useEffect)(() => {
|
|
91
|
-
var _a2;
|
|
92
|
-
(_a2 = shopDiscount == null ? void 0 : shopDiscount.setEntitlementPassEnabled) == null ? void 0 : _a2.call(shopDiscount, isBooking4Shop);
|
|
93
|
-
return () => {
|
|
94
|
-
var _a3;
|
|
95
|
-
return (_a3 = shopDiscount == null ? void 0 : shopDiscount.setEntitlementPassEnabled) == null ? void 0 : _a3.call(shopDiscount, false);
|
|
96
|
-
};
|
|
97
|
-
}, [shopDiscount, isBooking4Shop]);
|
|
98
90
|
(0, import_ahooks.useDebounceEffect)(
|
|
99
91
|
() => {
|
|
100
92
|
if (isBooking4Shop) {
|
|
@@ -340,44 +332,12 @@ var VoucherCard = (props) => {
|
|
|
340
332
|
};
|
|
341
333
|
const availableData = (0, import_react.useMemo)(() => {
|
|
342
334
|
if (!isBooking4Shop) return [];
|
|
343
|
-
return discountList.filter((item) => !!item.isAvailable).
|
|
344
|
-
|
|
345
|
-
const currentRow = {
|
|
335
|
+
return discountList.filter((item) => !!item.isAvailable).map((discount) => {
|
|
336
|
+
return {
|
|
346
337
|
...discount,
|
|
347
|
-
|
|
348
|
-
isSelected: discount.tag === "entitlement_pass" && !discount.isDisabled ? !!discount.isSelected && (((_a2 = discount.appliedProductDetails) == null ? void 0 : _a2.length) || 0) > (((_b2 = discount.committedAppliedProductDetails) == null ? void 0 : _b2.length) || 0) : discount.isSelected,
|
|
349
|
-
isDisabled: discount.isDisabled || (discount.tag === "entitlement_pass" ? !discount.isAvailable : discount.isDisabledForProductUsed) || disabled,
|
|
338
|
+
isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
|
|
350
339
|
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
|
|
351
340
|
};
|
|
352
|
-
const committedDetails = discount.tag === "entitlement_pass" ? discount.committedAppliedProductDetails || [] : [];
|
|
353
|
-
if (!committedDetails.length) return [currentRow];
|
|
354
|
-
const historyRow = {
|
|
355
|
-
...discount,
|
|
356
|
-
displayKey: `${discount.id}-last-settlement`,
|
|
357
|
-
isEditMode: true,
|
|
358
|
-
isSelected: true,
|
|
359
|
-
isDisabled: true,
|
|
360
|
-
appliedProductDetails: committedDetails,
|
|
361
|
-
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice({
|
|
362
|
-
...discount,
|
|
363
|
-
savedAmount: 0,
|
|
364
|
-
appliedProductDetails: committedDetails
|
|
365
|
-
})
|
|
366
|
-
};
|
|
367
|
-
const currentDetails = (discount.appliedProductDetails || []).slice(committedDetails.length);
|
|
368
|
-
const canApplyToNewProducts = !discount.isDisabled && (((_c2 = discount.applicableProductDetails) == null ? void 0 : _c2.length) || 0) > 0;
|
|
369
|
-
if (!currentDetails.length && !canApplyToNewProducts) return [historyRow];
|
|
370
|
-
return [historyRow, {
|
|
371
|
-
...currentRow,
|
|
372
|
-
displayKey: `${discount.id}-current`,
|
|
373
|
-
isEditMode: false,
|
|
374
|
-
appliedProductDetails: currentDetails,
|
|
375
|
-
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice({
|
|
376
|
-
...discount,
|
|
377
|
-
savedAmount: 0,
|
|
378
|
-
appliedProductDetails: currentDetails
|
|
379
|
-
})
|
|
380
|
-
}];
|
|
381
341
|
});
|
|
382
342
|
}, [discountList, isBooking4Shop, disabled]);
|
|
383
343
|
if (!isBooking4Shop) return null;
|
|
@@ -142,22 +142,22 @@ var BookingDashboard = (0, import_react.forwardRef)((props, ref) => {
|
|
|
142
142
|
statistics_time: statisticsTime
|
|
143
143
|
});
|
|
144
144
|
setStatisticData(res);
|
|
145
|
-
calcBookingDataCount();
|
|
145
|
+
calcBookingDataCount(res);
|
|
146
146
|
};
|
|
147
|
-
const calcBookingDataCount = () => {
|
|
147
|
+
const calcBookingDataCount = (currentStatisticData = statisticData) => {
|
|
148
148
|
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
149
|
-
let groupsOnSiteNow =
|
|
150
|
-
let peopleOnSiteNow =
|
|
151
|
-
let totalVisitorsToday = ((_a2 =
|
|
152
|
-
let totalVisitorsTodayChildren = ((_b2 =
|
|
153
|
-
let ongoing = ((_c =
|
|
154
|
-
let ongoingChildren = ((_d =
|
|
155
|
-
let upcoming = ((_e =
|
|
156
|
-
let upcomingChildren = ((_f =
|
|
157
|
-
let overdue =
|
|
158
|
-
let completed = ((_g =
|
|
159
|
-
let completedChildren = ((_h =
|
|
160
|
-
let departed =
|
|
149
|
+
let groupsOnSiteNow = currentStatisticData.groups_today_num || 0;
|
|
150
|
+
let peopleOnSiteNow = currentStatisticData.people_on_site_now_num || (hasTurnstileApp ? 0 : "-");
|
|
151
|
+
let totalVisitorsToday = ((_a2 = currentStatisticData.total_visitors_today) == null ? void 0 : _a2.num) || 0;
|
|
152
|
+
let totalVisitorsTodayChildren = ((_b2 = currentStatisticData.total_visitors_today) == null ? void 0 : _b2.statistics) || [];
|
|
153
|
+
let ongoing = ((_c = currentStatisticData.ongoing_visitors) == null ? void 0 : _c.num) || 0;
|
|
154
|
+
let ongoingChildren = ((_d = currentStatisticData.ongoing_visitors) == null ? void 0 : _d.statistics) || [];
|
|
155
|
+
let upcoming = ((_e = currentStatisticData.upcoming_visitors) == null ? void 0 : _e.num) || 0;
|
|
156
|
+
let upcomingChildren = ((_f = currentStatisticData.upcoming_visitors) == null ? void 0 : _f.statistics) || [];
|
|
157
|
+
let overdue = currentStatisticData.overdue_visitors_num || (hasTurnstileApp ? 0 : "-");
|
|
158
|
+
let completed = ((_g = currentStatisticData.completed_visitors) == null ? void 0 : _g.num) || 0;
|
|
159
|
+
let completedChildren = ((_h = currentStatisticData.completed_visitors) == null ? void 0 : _h.statistics) || [];
|
|
160
|
+
let departed = currentStatisticData.departed_visitors_num || (hasTurnstileApp ? 0 : "-");
|
|
161
161
|
onDataChange == null ? void 0 : onDataChange(
|
|
162
162
|
{
|
|
163
163
|
groupsOnSiteNow,
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface EditServiceRef {
|
|
5
|
+
init: (cacheItem?: any) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
8
|
+
export default _default;
|