@pisell/private-materials 6.6.32 → 6.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/voucher/index.js +4 -6
- package/es/components/booking/components/voucher/utils.d.ts +1 -0
- package/es/components/booking/components/voucher/utils.js +8 -0
- 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/service2/Group/utils.js +8 -6
- package/es/components/booking/info2/service/editService/DiscountChangeModal/index.d.ts +25 -0
- package/es/components/booking/info2/service/editService/DiscountChangeModal/index.js +61 -0
- package/es/components/booking/info2/service/editService/DiscountChangeModal/index.less +41 -0
- package/es/components/booking/info2/service/editService/index.js +144 -35
- package/es/components/booking/info2/service/editService/utils.d.ts +6 -0
- package/es/components/booking/info2/service/editService/utils.js +21 -0
- package/es/components/booking/locales.d.ts +36 -0
- package/es/components/booking/locales.js +42 -3
- 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/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/voucher/index.js +3 -3
- package/lib/components/booking/components/voucher/utils.d.ts +1 -0
- package/lib/components/booking/components/voucher/utils.js +10 -2
- 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/service2/Group/utils.js +3 -2
- package/lib/components/booking/info2/service/editService/DiscountChangeModal/index.d.ts +25 -0
- package/lib/components/booking/info2/service/editService/DiscountChangeModal/index.js +64 -0
- package/lib/components/booking/info2/service/editService/DiscountChangeModal/index.less +41 -0
- package/lib/components/booking/info2/service/editService/index.js +95 -13
- package/lib/components/booking/info2/service/editService/utils.d.ts +6 -0
- package/lib/components/booking/info2/service/editService/utils.js +11 -0
- package/lib/components/booking/locales.d.ts +36 -0
- package/lib/components/booking/locales.js +42 -3
- 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/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/package.json +3 -3
|
@@ -314,6 +314,18 @@ declare const _default: {
|
|
|
314
314
|
'pisell2.booking.text.search-placeholder': string;
|
|
315
315
|
'pisell-select-holder-please-select': string;
|
|
316
316
|
'pisell-select-holder-selected': string;
|
|
317
|
+
'pisell2.discount-change.title': string;
|
|
318
|
+
'pisell2.discount-change.desc': string;
|
|
319
|
+
'pisell2.discount-change.reason': string;
|
|
320
|
+
'pisell2.discount-change.options-title': string;
|
|
321
|
+
'pisell2.discount-change.keep-original': string;
|
|
322
|
+
'pisell2.discount-change.keep-original-desc': string;
|
|
323
|
+
'pisell2.discount-change.continue': string;
|
|
324
|
+
'pisell2.discount-change.continue-desc': string;
|
|
325
|
+
'pisell2.discount-change.remove': string;
|
|
326
|
+
'pisell2.discount-change.remove-desc': string;
|
|
327
|
+
'pisell2.discount-change.cancel': string;
|
|
328
|
+
'pisell2.text.edit-service-success': string;
|
|
317
329
|
};
|
|
318
330
|
'zh-CN': {
|
|
319
331
|
'pisell2.text.refunded-amount': string;
|
|
@@ -630,6 +642,18 @@ declare const _default: {
|
|
|
630
642
|
'pisell2.booking.text.search-placeholder': string;
|
|
631
643
|
'pisell-select-holder-please-select': string;
|
|
632
644
|
'pisell-select-holder-selected': string;
|
|
645
|
+
'pisell2.discount-change.title': string;
|
|
646
|
+
'pisell2.discount-change.desc': string;
|
|
647
|
+
'pisell2.discount-change.reason': string;
|
|
648
|
+
'pisell2.discount-change.options-title': string;
|
|
649
|
+
'pisell2.discount-change.keep-original': string;
|
|
650
|
+
'pisell2.discount-change.keep-original-desc': string;
|
|
651
|
+
'pisell2.discount-change.continue': string;
|
|
652
|
+
'pisell2.discount-change.continue-desc': string;
|
|
653
|
+
'pisell2.discount-change.remove': string;
|
|
654
|
+
'pisell2.discount-change.remove-desc': string;
|
|
655
|
+
'pisell2.discount-change.cancel': string;
|
|
656
|
+
'pisell2.text.edit-service-success': string;
|
|
633
657
|
};
|
|
634
658
|
'zh-HK': {
|
|
635
659
|
'pisell2.text.refunded-amount': string;
|
|
@@ -946,6 +970,18 @@ declare const _default: {
|
|
|
946
970
|
'pisell2.booking.text.search-placeholder': string;
|
|
947
971
|
'pisell-select-holder-please-select': string;
|
|
948
972
|
'pisell-select-holder-selected': string;
|
|
973
|
+
'pisell2.discount-change.title': string;
|
|
974
|
+
'pisell2.discount-change.desc': string;
|
|
975
|
+
'pisell2.discount-change.reason': string;
|
|
976
|
+
'pisell2.discount-change.options-title': string;
|
|
977
|
+
'pisell2.discount-change.keep-original': string;
|
|
978
|
+
'pisell2.discount-change.keep-original-desc': string;
|
|
979
|
+
'pisell2.discount-change.continue': string;
|
|
980
|
+
'pisell2.discount-change.continue-desc': string;
|
|
981
|
+
'pisell2.discount-change.remove': string;
|
|
982
|
+
'pisell2.discount-change.remove-desc': string;
|
|
983
|
+
'pisell2.discount-change.cancel': string;
|
|
984
|
+
'pisell2.text.edit-service-success': string;
|
|
949
985
|
};
|
|
950
986
|
};
|
|
951
987
|
export default _default;
|
|
@@ -369,7 +369,20 @@ export default {
|
|
|
369
369
|
'pisell2.booking.text.contact-info.title': 'Contact info',
|
|
370
370
|
'pisell2.booking.text.search-placeholder': 'Customers / Contacts / Holder',
|
|
371
371
|
'pisell-select-holder-please-select': 'Please Select',
|
|
372
|
-
'pisell-select-holder-selected': 'Selected: '
|
|
372
|
+
'pisell-select-holder-selected': 'Selected: ',
|
|
373
|
+
// 折扣变更弹窗
|
|
374
|
+
'pisell2.discount-change.title': 'Discount No Longer Available — Choose How to Handle',
|
|
375
|
+
'pisell2.discount-change.desc': 'The discount previously applied to this order is no longer valid because:',
|
|
376
|
+
'pisell2.discount-change.reason': 'The discount has expired, been deactivated, or no longer meets its conditions',
|
|
377
|
+
'pisell2.discount-change.options-title': 'Please choose how you would like to continue:',
|
|
378
|
+
'pisell2.discount-change.keep-original': 'Keep Original Discount',
|
|
379
|
+
'pisell2.discount-change.keep-original-desc': 'Keep the existing discount amount. New or modified items will be charged at full price.',
|
|
380
|
+
'pisell2.discount-change.continue': 'Continue Discount',
|
|
381
|
+
'pisell2.discount-change.continue-desc': 'Continue using the original discount rate (e.g. 20% off) for this order, even if the campaign has ended.',
|
|
382
|
+
'pisell2.discount-change.remove': 'Remove Discount',
|
|
383
|
+
'pisell2.discount-change.remove-desc': 'Remove all discounts. All items will be charged at full price.',
|
|
384
|
+
'pisell2.discount-change.cancel': 'Cancel',
|
|
385
|
+
'pisell2.text.edit-service-success': 'Price updated. Discount recalculated automatically.'
|
|
373
386
|
},
|
|
374
387
|
'zh-CN': {
|
|
375
388
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -745,7 +758,20 @@ export default {
|
|
|
745
758
|
'pisell2.booking.text.contact-info.title': '联系信息',
|
|
746
759
|
'pisell2.booking.text.search-placeholder': '搜索客户/联系信息/持有人',
|
|
747
760
|
'pisell-select-holder-please-select': '请选择',
|
|
748
|
-
'pisell-select-holder-selected': '已选择:'
|
|
761
|
+
'pisell-select-holder-selected': '已选择:',
|
|
762
|
+
// 折扣变更弹窗
|
|
763
|
+
'pisell2.discount-change.title': '商品折扣无法继续使用,请选择处理方式',
|
|
764
|
+
'pisell2.discount-change.desc': '当前订单中使用的商品折扣已失效,可能是因为:',
|
|
765
|
+
'pisell2.discount-change.reason': '折扣已过期、被停用,或条件不再符合',
|
|
766
|
+
'pisell2.discount-change.options-title': '您可以选择以下方式继续:',
|
|
767
|
+
'pisell2.discount-change.keep-original': '保留原折扣',
|
|
768
|
+
'pisell2.discount-change.keep-original-desc': '旧部分保持优惠,新商品按原价。',
|
|
769
|
+
'pisell2.discount-change.continue': '延续折扣',
|
|
770
|
+
'pisell2.discount-change.continue-desc': '可用商品继续按原折扣比例计算(如8折)。',
|
|
771
|
+
'pisell2.discount-change.remove': '移除折扣',
|
|
772
|
+
'pisell2.discount-change.remove-desc': '删除折扣,按原价结算。',
|
|
773
|
+
'pisell2.discount-change.cancel': '取消',
|
|
774
|
+
'pisell2.text.edit-service-success': '价格已调整,折扣已自动重算'
|
|
749
775
|
},
|
|
750
776
|
'zh-HK': {
|
|
751
777
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -1121,6 +1147,19 @@ export default {
|
|
|
1121
1147
|
'pisell2.booking.text.contact-info.title': '聯繫信息',
|
|
1122
1148
|
'pisell2.booking.text.search-placeholder': '搜索客戶/聯系信息/持有人',
|
|
1123
1149
|
'pisell-select-holder-please-select': '請選擇',
|
|
1124
|
-
'pisell-select-holder-selected': '已選擇:'
|
|
1150
|
+
'pisell-select-holder-selected': '已選擇:',
|
|
1151
|
+
// 折扣變更彈窗
|
|
1152
|
+
'pisell2.discount-change.title': '商品折扣無法繼續使用,請選擇處理方式',
|
|
1153
|
+
'pisell2.discount-change.desc': '當前訂單中使用的商品折扣已失效,可能是因為:',
|
|
1154
|
+
'pisell2.discount-change.reason': '折扣已過期、被停用,或條件不再符合',
|
|
1155
|
+
'pisell2.discount-change.options-title': '您可以選擇以下方式繼續:',
|
|
1156
|
+
'pisell2.discount-change.keep-original': '保留原折扣',
|
|
1157
|
+
'pisell2.discount-change.keep-original-desc': '舊部分保持優惠,新商品按原價。',
|
|
1158
|
+
'pisell2.discount-change.continue': '延續折扣',
|
|
1159
|
+
'pisell2.discount-change.continue-desc': '可用商品繼續按原折扣比例計算(如8折)。',
|
|
1160
|
+
'pisell2.discount-change.remove': '移除折扣',
|
|
1161
|
+
'pisell2.discount-change.remove-desc': '刪除折扣,按原價結算。',
|
|
1162
|
+
'pisell2.discount-change.cancel': '取消',
|
|
1163
|
+
'pisell2.text.edit-service-success': '价格已调整,折扣已自动重算'
|
|
1125
1164
|
}
|
|
1126
1165
|
};
|
|
@@ -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;
|
|
@@ -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<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
302
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "stripe" | "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
|
|
305
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: 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;
|
|
@@ -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;
|
|
@@ -160,7 +160,7 @@ var VoucherCard = (props) => {
|
|
|
160
160
|
return val;
|
|
161
161
|
}, [state.addons.value]);
|
|
162
162
|
const holdersMemo = (0, import_react.useMemo)(() => {
|
|
163
|
-
var _a2;
|
|
163
|
+
var _a2, _b2;
|
|
164
164
|
if (isBooking4Shop) {
|
|
165
165
|
let list = [];
|
|
166
166
|
if ((_a2 = state.pet) == null ? void 0 : _a2.value) {
|
|
@@ -169,7 +169,7 @@ var VoucherCard = (props) => {
|
|
|
169
169
|
list = entries[0][1];
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
shopDiscount.setHolders(list);
|
|
172
|
+
(_b2 = shopDiscount == null ? void 0 : shopDiscount.setHolders) == null ? void 0 : _b2.call(shopDiscount, list);
|
|
173
173
|
holderChangedRef.current = true;
|
|
174
174
|
return list || [];
|
|
175
175
|
}
|
|
@@ -186,7 +186,7 @@ var VoucherCard = (props) => {
|
|
|
186
186
|
var _a2;
|
|
187
187
|
if (["paid", "partially_paid"].includes(
|
|
188
188
|
(_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_status
|
|
189
|
-
) && [...
|
|
189
|
+
) && (0, import_utils2.hasEveryBookingId)([...state.addons.value || [], ...state.service.value || []])) {
|
|
190
190
|
return true;
|
|
191
191
|
}
|
|
192
192
|
return false;
|
|
@@ -19,7 +19,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/booking/components/voucher/utils.ts
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
|
-
getServiceAddons: () => getServiceAddons
|
|
22
|
+
getServiceAddons: () => getServiceAddons,
|
|
23
|
+
hasEveryBookingId: () => hasEveryBookingId
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(utils_exports);
|
|
25
26
|
var getServiceAddons = (list) => {
|
|
@@ -37,7 +38,14 @@ var getServiceAddons = (list) => {
|
|
|
37
38
|
addonsList
|
|
38
39
|
};
|
|
39
40
|
};
|
|
41
|
+
var hasEveryBookingId = (list) => {
|
|
42
|
+
return list.every((item) => {
|
|
43
|
+
var _a, _b, _c, _d;
|
|
44
|
+
return item.booking_id && ((_d = (_c = (_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) == null ? void 0 : _c.every) == null ? void 0 : _d.call(_c, (bundle) => bundle.booking_id));
|
|
45
|
+
});
|
|
46
|
+
};
|
|
40
47
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
48
|
0 && (module.exports = {
|
|
42
|
-
getServiceAddons
|
|
49
|
+
getServiceAddons,
|
|
50
|
+
hasEveryBookingId
|
|
43
51
|
});
|
|
@@ -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,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -68,7 +68,7 @@ var concatBookings = (items) => {
|
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
var createBookingItemsByGroup = (item, isBatchEdit) => {
|
|
71
|
-
var _a, _b;
|
|
71
|
+
var _a, _b, _c, _d, _e, _f;
|
|
72
72
|
const groupId = item._extend.groupId || (0, import_utils.getUniqueId)("bookingGroup_");
|
|
73
73
|
let bookings = [];
|
|
74
74
|
for (let i = 0; i < item._extend.duration; i++) {
|
|
@@ -96,8 +96,9 @@ var createBookingItemsByGroup = (item, isBatchEdit) => {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
const totalPrice = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
|
99
|
+
const origin_total = (_f = (_e = (_d = (_c = item._extend) == null ? void 0 : _c.items) == null ? void 0 : _d[0]) == null ? void 0 : _e._extend) == null ? void 0 : _f.origin_total;
|
|
99
100
|
cacheItem._extend.total = totalPrice;
|
|
100
|
-
cacheItem._extend.origin_total = totalPrice;
|
|
101
|
+
cacheItem._extend.origin_total = origin_total ?? totalPrice;
|
|
101
102
|
cacheItem._extend.items = void 0;
|
|
102
103
|
cacheItem._serviceKey = (0, import_utils3.genServiceKey)(cacheItem);
|
|
103
104
|
bookings.push(cacheItem);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
/**
|
|
4
|
+
* 折扣变更弹窗 Props
|
|
5
|
+
*/
|
|
6
|
+
export interface DiscountChangeModalProps {
|
|
7
|
+
/** 弹窗是否可见 */
|
|
8
|
+
open: boolean;
|
|
9
|
+
/** 保留原折扣回调 */
|
|
10
|
+
onKeepOriginal?: () => void;
|
|
11
|
+
/** 延续折扣回调 */
|
|
12
|
+
onContinue?: () => void;
|
|
13
|
+
/** 移除折扣回调 */
|
|
14
|
+
onRemove?: () => void;
|
|
15
|
+
/** 取消回调 */
|
|
16
|
+
onCancel?: () => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 折扣变更弹窗组件
|
|
20
|
+
*
|
|
21
|
+
* @description 当订单中使用的商品折扣已失效时,弹出此弹窗让用户选择处理方式
|
|
22
|
+
* @author Pisell Team
|
|
23
|
+
*/
|
|
24
|
+
declare const DiscountChangeModal: React.FC<DiscountChangeModalProps>;
|
|
25
|
+
export default DiscountChangeModal;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/info2/service/editService/DiscountChangeModal/index.tsx
|
|
30
|
+
var DiscountChangeModal_exports = {};
|
|
31
|
+
__export(DiscountChangeModal_exports, {
|
|
32
|
+
default: () => DiscountChangeModal_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DiscountChangeModal_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_materials = require("@pisell/materials");
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var DiscountChangeModal = ({
|
|
41
|
+
open,
|
|
42
|
+
onKeepOriginal,
|
|
43
|
+
onContinue,
|
|
44
|
+
onRemove,
|
|
45
|
+
onCancel
|
|
46
|
+
}) => {
|
|
47
|
+
const renderFooter = () => {
|
|
48
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "discount-change-modal__footer" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 12, wrap: true }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", onClick: onContinue }, import_utils.locales.getText("pisell2.discount-change.continue")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: onRemove }, import_utils.locales.getText("pisell2.discount-change.remove")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: onCancel }, import_utils.locales.getText("pisell2.discount-change.cancel"))));
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
51
|
+
import_materials.PisellModal,
|
|
52
|
+
{
|
|
53
|
+
open,
|
|
54
|
+
title: import_utils.locales.getText("pisell2.discount-change.title"),
|
|
55
|
+
onCancel,
|
|
56
|
+
footer: renderFooter(),
|
|
57
|
+
maskClosable: false,
|
|
58
|
+
width: 560,
|
|
59
|
+
destroyOnClose: true
|
|
60
|
+
},
|
|
61
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "discount-change-modal__content" }, /* @__PURE__ */ import_react.default.createElement("p", { className: "discount-change-modal__desc" }, import_utils.locales.getText("pisell2.discount-change.desc")), /* @__PURE__ */ import_react.default.createElement("ul", { className: "discount-change-modal__reasons" }, /* @__PURE__ */ import_react.default.createElement("li", null, import_utils.locales.getText("pisell2.discount-change.reason"))), /* @__PURE__ */ import_react.default.createElement("p", { className: "discount-change-modal__desc" }, import_utils.locales.getText("pisell2.discount-change.options-title")), /* @__PURE__ */ import_react.default.createElement("ul", { className: "discount-change-modal__options" }, /* @__PURE__ */ import_react.default.createElement("li", null, /* @__PURE__ */ import_react.default.createElement("strong", null, import_utils.locales.getText("pisell2.discount-change.continue")), ":", import_utils.locales.getText("pisell2.discount-change.continue-desc")), /* @__PURE__ */ import_react.default.createElement("li", null, /* @__PURE__ */ import_react.default.createElement("strong", null, import_utils.locales.getText("pisell2.discount-change.remove")), ":", import_utils.locales.getText("pisell2.discount-change.remove-desc"))))
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
var DiscountChangeModal_default = DiscountChangeModal;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.discount-change-modal {
|
|
2
|
+
&__content {
|
|
3
|
+
padding: 8px 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&__desc {
|
|
7
|
+
margin-bottom: 8px;
|
|
8
|
+
color: var(--Gray-900, #101828);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
line-height: 1.6;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__reasons,
|
|
14
|
+
&__options {
|
|
15
|
+
margin: 0 0 16px 0;
|
|
16
|
+
padding-left: 20px;
|
|
17
|
+
color: var(--Gray-600, #475467);
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
line-height: 1.8;
|
|
20
|
+
|
|
21
|
+
li {
|
|
22
|
+
margin-bottom: 4px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
strong {
|
|
26
|
+
color: var(--Gray-900, #101828);
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__options {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__footer {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: flex-end;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|