@pisell/private-materials 6.6.101 → 6.6.102
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/Sales/Summary/utils.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/utils.js +13 -0
- package/es/components/booking/components/voucher/index.js +42 -3
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +8 -5
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- 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/info2/service/editService/index.js +31 -11
- package/es/components/booking/info2/service/editService/utils.d.ts +3 -0
- package/es/components/booking/info2/service/editService/utils.js +128 -19
- 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/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/ticketBooking/utils/index.js +4 -4
- 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/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/utils.js +8 -1
- package/lib/components/booking/components/voucher/index.js +43 -3
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -5
- package/lib/components/booking/info/clientVariant/vertical/index.js +1 -1
- 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/info2/service/editService/index.js +38 -12
- package/lib/components/booking/info2/service/editService/utils.d.ts +3 -0
- package/lib/components/booking/info2/service/editService/utils.js +94 -12
- 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/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/ticketBooking/utils/index.js +2 -2
- 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 +4 -4
|
@@ -31,20 +31,100 @@ var utils_exports = {};
|
|
|
31
31
|
__export(utils_exports, {
|
|
32
32
|
getAutoAllocationStorage: () => getAutoAllocationStorage,
|
|
33
33
|
getProductAllDiscountList: () => getProductAllDiscountList,
|
|
34
|
+
hasEntitlementDiscount: () => hasEntitlementDiscount,
|
|
34
35
|
mergeBundleWithOriginalPrice: () => mergeBundleWithOriginalPrice,
|
|
35
36
|
setAutoAllocationStorage: () => setAutoAllocationStorage,
|
|
36
|
-
setProductPrice: () => setProductPrice
|
|
37
|
+
setProductPrice: () => setProductPrice,
|
|
38
|
+
updateEntitlementQuantity: () => updateEntitlementQuantity
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(utils_exports);
|
|
39
41
|
var import_utils = require("@pisell/utils");
|
|
40
|
-
var import_utils2 = require("@pisell/utils");
|
|
41
42
|
var import_decimal = __toESM(require("decimal.js"));
|
|
42
|
-
var
|
|
43
|
+
var import_lodash = require("lodash");
|
|
44
|
+
var import_utils2 = require("../../../components/footer/utils");
|
|
45
|
+
var import_utils3 = require("../../../utils");
|
|
46
|
+
var isEntitlementDiscount = (discount) => ((discount == null ? void 0 : discount.tag) || (discount == null ? void 0 : discount.type)) === "entitlement_pass";
|
|
47
|
+
var getServiceDiscounts = (item) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return [
|
|
50
|
+
...(item == null ? void 0 : item.discount_list) || [],
|
|
51
|
+
...(((_b = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []).flatMap((bundle) => bundle.discount_list || [])
|
|
52
|
+
];
|
|
53
|
+
};
|
|
54
|
+
var hasEntitlementDiscount = (item) => getServiceDiscounts(item).some(isEntitlementDiscount);
|
|
55
|
+
var updateEntitlementQuantity = (previous, next) => {
|
|
56
|
+
var _a, _b, _c, _d;
|
|
57
|
+
const discounts = getServiceDiscounts(previous);
|
|
58
|
+
const persisted = [previous == null ? void 0 : previous.booking_id, previous == null ? void 0 : previous.order_detail_id, (_a = previous == null ? void 0 : previous._extend) == null ? void 0 : _a.order_detail_id].some((value) => Number(value) > 0) || discounts.some((discount) => isEntitlementDiscount(discount) && discount.id);
|
|
59
|
+
const previousQuantity = Number(((_b = previous == null ? void 0 : previous._extend) == null ? void 0 : _b.quantity) || 1);
|
|
60
|
+
const nextQuantity = Number(next._extend.quantity || 1);
|
|
61
|
+
if (!persisted || !hasEntitlementDiscount(previous) || nextQuantity === previousQuantity) {
|
|
62
|
+
return [next];
|
|
63
|
+
}
|
|
64
|
+
if (nextQuantity < previousQuantity) {
|
|
65
|
+
return [{
|
|
66
|
+
...previous,
|
|
67
|
+
_extend: {
|
|
68
|
+
...previous._extend,
|
|
69
|
+
quantity: nextQuantity,
|
|
70
|
+
...Array.isArray(next._extend.holder_id) ? { holder_id: next._extend.holder_id.slice(0, nextQuantity) } : {},
|
|
71
|
+
other: { ...previous._extend.other, quantity: nextQuantity }
|
|
72
|
+
},
|
|
73
|
+
discount_list: (previous.discount_list || []).map((discount) => {
|
|
74
|
+
var _a2, _b2;
|
|
75
|
+
if (!isEntitlementDiscount(discount) || ((_a2 = discount.metadata) == null ? void 0 : _a2.custom_product_bundle_map_id)) return discount;
|
|
76
|
+
const num = Math.min(Number(((_b2 = discount.metadata) == null ? void 0 : _b2.num) ?? previousQuantity), nextQuantity);
|
|
77
|
+
return { ...discount, _num: num, metadata: { ...discount.metadata, num } };
|
|
78
|
+
})
|
|
79
|
+
}];
|
|
80
|
+
}
|
|
81
|
+
const appended = (0, import_lodash.cloneDeep)(next);
|
|
82
|
+
const uid = (0, import_utils.getUniqueId)();
|
|
83
|
+
appended._id = uid;
|
|
84
|
+
appended.booking_id = 0;
|
|
85
|
+
appended.order_detail_id = 0;
|
|
86
|
+
appended.new = 0;
|
|
87
|
+
appended.discount_list = [];
|
|
88
|
+
appended.discount_amount = 0;
|
|
89
|
+
appended.metadata = { ...appended.metadata, unique_identification_number: uid };
|
|
90
|
+
delete appended.metadata.entitlement_source_identity;
|
|
91
|
+
delete appended.metadata.entitlement_source_product_uid;
|
|
92
|
+
if (appended._origin) delete appended._origin.booking_id;
|
|
93
|
+
const extend = appended._extend;
|
|
94
|
+
extend.order_detail_id = 0;
|
|
95
|
+
extend.unique_identification_number = uid;
|
|
96
|
+
extend.quantity = nextQuantity - previousQuantity;
|
|
97
|
+
if (Array.isArray(extend.holder_id)) {
|
|
98
|
+
const holders = extend.holder_id.slice(previousQuantity, nextQuantity);
|
|
99
|
+
extend.holder_id = holders.length ? holders : void 0;
|
|
100
|
+
}
|
|
101
|
+
extend.other = { ...extend.other, quantity: extend.quantity };
|
|
102
|
+
extend.other.bundle = (extend.other.bundle || []).map((bundle) => {
|
|
103
|
+
var _a2, _b2, _c2;
|
|
104
|
+
const price = bundle.original_price ?? ((_c2 = (_b2 = (_a2 = bundle.discount_list) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.discount) == null ? void 0 : _c2.original_amount) ?? bundle.product_price ?? bundle.price;
|
|
105
|
+
const bundleUid = (0, import_utils.getUniqueId)();
|
|
106
|
+
const metadata = { ...bundle.metadata, custom_product_bundle_map_id: bundleUid, unique_identification_number: bundleUid };
|
|
107
|
+
delete metadata.entitlement_source_identity;
|
|
108
|
+
return { ...bundle, _id: bundleUid, price, bundle_selling_price: price, discount_list: [], metadata };
|
|
109
|
+
});
|
|
110
|
+
const mainDiscount = (next.discount_list || []).find((discount) => {
|
|
111
|
+
var _a2, _b2;
|
|
112
|
+
return !((_a2 = discount.metadata) == null ? void 0 : _a2.custom_product_bundle_map_id) && ((_b2 = discount.discount) == null ? void 0 : _b2.original_amount) != null;
|
|
113
|
+
});
|
|
114
|
+
if (mainDiscount && ((_d = (_c = previous == null ? void 0 : previous._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.product_variant_id) === extend.other.product_variant_id) {
|
|
115
|
+
extend.price = Number(mainDiscount.discount.original_amount);
|
|
116
|
+
if (extend.other.product_variant_id) extend.other.price = extend.price;
|
|
117
|
+
}
|
|
118
|
+
extend.main_product_selling_price = (0, import_utils3.getMainPrice)(appended);
|
|
119
|
+
extend.total = (0, import_utils3.getProductTotalPrice)(appended);
|
|
120
|
+
extend.origin_total = extend.total;
|
|
121
|
+
return [previous, appended];
|
|
122
|
+
};
|
|
43
123
|
var getAutoAllocationStorage = (id) => {
|
|
44
124
|
const value = localStorage.getItem("resource-auto-allocation");
|
|
45
125
|
if (value) {
|
|
46
126
|
const valueObj = JSON.parse(value);
|
|
47
|
-
return (0,
|
|
127
|
+
return (0, import_utils.isBoolean)(valueObj[id]) ? valueObj[id] : true;
|
|
48
128
|
}
|
|
49
129
|
return true;
|
|
50
130
|
};
|
|
@@ -58,8 +138,8 @@ var setAutoAllocationStorage = (data) => {
|
|
|
58
138
|
}
|
|
59
139
|
};
|
|
60
140
|
var setProductPrice = (cacheItem, { newTotal, origin_total }) => {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
62
|
-
if ((
|
|
141
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
142
|
+
if (hasEntitlementDiscount(cacheItem) || ((cacheItem == null ? void 0 : cacheItem.discount_list) || []).some((item) => ["good_pass", "discount_card", "product_discount_card"].includes(
|
|
63
143
|
item.type
|
|
64
144
|
))) {
|
|
65
145
|
return cacheItem;
|
|
@@ -69,16 +149,16 @@ var setProductPrice = (cacheItem, { newTotal, origin_total }) => {
|
|
|
69
149
|
}
|
|
70
150
|
const discountRatio = new import_decimal.default(newTotal).div(new import_decimal.default(origin_total));
|
|
71
151
|
let subTotal = new import_decimal.default(0);
|
|
72
|
-
if (((
|
|
73
|
-
(
|
|
152
|
+
if (((_a = cacheItem._extend.other) == null ? void 0 : _a.bundle) && (0, import_utils.isArr)((_b = cacheItem._extend.other) == null ? void 0 : _b.bundle)) {
|
|
153
|
+
(_d = (_c = cacheItem._extend.other) == null ? void 0 : _c.bundle) == null ? void 0 : _d.forEach((bundle) => {
|
|
74
154
|
const newPrice = new import_decimal.default(bundle.original_price || bundle.price).mul(discountRatio).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
|
|
75
155
|
const quantity = bundle.num ?? bundle.quantity ?? 1;
|
|
76
156
|
subTotal = subTotal.add(new import_decimal.default(newPrice).mul(quantity));
|
|
77
157
|
bundle.price = newPrice;
|
|
78
158
|
});
|
|
79
159
|
}
|
|
80
|
-
if (((
|
|
81
|
-
(
|
|
160
|
+
if (((_e = cacheItem._extend.other) == null ? void 0 : _e.option) && (0, import_utils.isArr)((_f = cacheItem._extend.other) == null ? void 0 : _f.option)) {
|
|
161
|
+
(_h = (_g = cacheItem._extend.other) == null ? void 0 : _g.option) == null ? void 0 : _h.forEach((option) => {
|
|
82
162
|
const newPrice = new import_decimal.default(option.price).mul(discountRatio).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
|
|
83
163
|
const quantity = option.num ?? option.quantity ?? 1;
|
|
84
164
|
subTotal = subTotal.add(new import_decimal.default(newPrice).mul(quantity));
|
|
@@ -91,7 +171,7 @@ var setProductPrice = (cacheItem, { newTotal, origin_total }) => {
|
|
|
91
171
|
var getProductAllDiscountList = (cacheItem) => {
|
|
92
172
|
var _a, _b;
|
|
93
173
|
const discountList = [...cacheItem.discount_list || []];
|
|
94
|
-
const bundleDiscountList = (0,
|
|
174
|
+
const bundleDiscountList = (0, import_utils2.getBundleDiscountList)(((_b = (_a = cacheItem._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []) || [];
|
|
95
175
|
discountList.push(...bundleDiscountList);
|
|
96
176
|
return discountList;
|
|
97
177
|
};
|
|
@@ -113,7 +193,9 @@ var mergeBundleWithOriginalPrice = (other, originalOther) => {
|
|
|
113
193
|
0 && (module.exports = {
|
|
114
194
|
getAutoAllocationStorage,
|
|
115
195
|
getProductAllDiscountList,
|
|
196
|
+
hasEntitlementDiscount,
|
|
116
197
|
mergeBundleWithOriginalPrice,
|
|
117
198
|
setAutoAllocationStorage,
|
|
118
|
-
setProductPrice
|
|
199
|
+
setProductPrice,
|
|
200
|
+
updateEntitlementQuantity
|
|
119
201
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -110,11 +109,4 @@ export declare const walkInData: {
|
|
|
110
109
|
id: number;
|
|
111
110
|
nickname: string;
|
|
112
111
|
};
|
|
113
|
-
export declare const Provider:
|
|
114
|
-
state: FormState;
|
|
115
|
-
} & {
|
|
116
|
-
dispatch: (params: {
|
|
117
|
-
type: string;
|
|
118
|
-
payload: any;
|
|
119
|
-
}) => void;
|
|
120
|
-
}>;
|
|
112
|
+
export declare const Provider: any, Context: any;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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 | {
|
|
179
179
|
type: string;
|
|
180
180
|
value: number;
|
|
181
|
-
};
|
|
181
|
+
} | "flexible";
|
|
182
182
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
183
183
|
export declare const getIsEdit: (state: any) => boolean;
|
|
184
184
|
export {};
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
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<"tyro" | "mx51" | "payo" | "windcave" | "stripe" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -299,15 +299,15 @@ 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?: "refund" | "fullPay" | "pay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "tyro" | "mx51" | "payo" | "windcave" | "stripe" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat" | undefined;
|
|
305
|
+
action?: "amount" | "pay" | "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?: "step" | "unset" | undefined;
|
|
311
311
|
render?: boolean | undefined;
|
|
312
312
|
net?: boolean | undefined;
|
|
313
313
|
component?: string | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
export declare const Provider: any, Context: any;
|
|
@@ -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;
|
|
@@ -47,7 +47,7 @@ declare type ScanData = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
-
searchType: "
|
|
50
|
+
searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
|
|
51
51
|
data: any;
|
|
52
52
|
scanCode: string;
|
|
53
53
|
} | null;
|
|
@@ -190,13 +190,13 @@ var addService = (list, addItem, state, isMultiDay) => {
|
|
|
190
190
|
let isSetCount = false;
|
|
191
191
|
value = list.map((item) => {
|
|
192
192
|
var _a, _b, _c, _d, _e;
|
|
193
|
-
const isGoodPassDiscountProduct = (item.discount_list || []).some((item2) => item2.
|
|
193
|
+
const isGoodPassDiscountProduct = (item.discount_list || []).some((item2) => ["good_pass", "entitlement_pass"].includes(item2.tag || item2.type));
|
|
194
194
|
const isEdit = item == null ? void 0 : item.edit;
|
|
195
195
|
const bundleDiscountList = [];
|
|
196
196
|
(((_b = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []).forEach((item2) => {
|
|
197
197
|
bundleDiscountList.push(...(item2 == null ? void 0 : item2.discount_list) || []);
|
|
198
198
|
});
|
|
199
|
-
const isGoodPassBundleProduct = bundleDiscountList.some((item2) => item2.
|
|
199
|
+
const isGoodPassBundleProduct = bundleDiscountList.some((item2) => ["good_pass", "entitlement_pass"].includes(item2.tag || item2.type));
|
|
200
200
|
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct && !isEdit && !isGoodPassBundleProduct) {
|
|
201
201
|
isNotSame = false;
|
|
202
202
|
const quantity = (((_c = item == null ? void 0 : item._extend) == null ? void 0 : _c.quantity) || 1) + (((_d = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _d.quantity) || 1);
|
|
@@ -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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | 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 | React.ReactFragment | JSX.Element | null;
|
|
6
6
|
export default Time;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.102",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@react-spring/web": "^9.6.1",
|
|
65
65
|
"@use-gesture/react": "^10.3.1",
|
|
66
66
|
"@pisell/utils": "3.0.2",
|
|
67
|
-
"@pisell/
|
|
68
|
-
"@pisell/materials": "6.6.
|
|
69
|
-
"@pisell/
|
|
67
|
+
"@pisell/icon": "0.0.11",
|
|
68
|
+
"@pisell/materials": "6.6.25",
|
|
69
|
+
"@pisell/date-picker": "3.0.7"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18.0.0",
|