@pisell/private-materials 3.2.33 → 3.2.35
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Event/index.js +7 -7
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +86 -41
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +3 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +34 -16
- package/es/components/appointmentBooking/components/Cart/Item/index.less +15 -9
- package/es/components/appointmentBooking/components/Cart/index.js +2 -7
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +16 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
- package/es/components/appointmentBooking/components/Content/index.js +42 -6
- package/es/components/appointmentBooking/components/Date/index.js +86 -24
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
- package/es/components/appointmentBooking/components/Deposit/index.less +16 -0
- package/es/components/appointmentBooking/components/Form/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Form/index.js +110 -0
- package/es/components/appointmentBooking/components/Form/index.less +3 -0
- package/es/components/appointmentBooking/components/Header/index.js +3 -2
- package/es/components/appointmentBooking/components/Resource/index.js +4 -1
- package/es/components/appointmentBooking/components/Services/index.js +103 -9
- package/es/components/appointmentBooking/context.d.ts +3 -0
- package/es/components/appointmentBooking/context.js +19 -3
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +101 -0
- package/es/components/appointmentBooking/deposit/index.less +53 -0
- package/es/components/appointmentBooking/hooks.d.ts +16 -0
- package/es/components/appointmentBooking/hooks.js +138 -53
- package/es/components/appointmentBooking/index.js +8 -0
- package/es/components/appointmentBooking/locales.d.ts +36 -3
- package/es/components/appointmentBooking/locales.js +42 -3
- package/es/components/appointmentBooking/utils.d.ts +23 -1
- package/es/components/appointmentBooking/utils.js +112 -27
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.js +6 -4
- package/es/components/booking/components/voucher/index.js +13 -15
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/index.js +2 -8
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +3 -2
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +4 -2
- package/es/components/booking/info2/service/editService/index.js +4 -11
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- 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 +4 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +16 -3
- package/es/components/shoppingCart/status.js +4 -1
- package/es/components/shoppingCart/type.d.ts +3 -0
- package/es/components/wallet/Detail/index.js +1 -1
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Event/index.js +5 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +56 -20
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +31 -11
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +15 -9
- package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +42 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
- package/lib/components/appointmentBooking/components/Content/index.js +31 -3
- package/lib/components/appointmentBooking/components/Date/index.js +27 -8
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
- package/lib/components/appointmentBooking/components/Deposit/index.less +16 -0
- package/lib/components/appointmentBooking/components/Form/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Form/index.js +108 -0
- package/lib/components/appointmentBooking/components/Form/index.less +3 -0
- package/lib/components/appointmentBooking/components/Header/index.js +9 -6
- package/lib/components/appointmentBooking/components/Resource/index.js +2 -0
- package/lib/components/appointmentBooking/components/Services/index.js +48 -7
- package/lib/components/appointmentBooking/context.d.ts +3 -0
- package/lib/components/appointmentBooking/context.js +12 -4
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +109 -0
- package/lib/components/appointmentBooking/deposit/index.less +53 -0
- package/lib/components/appointmentBooking/hooks.d.ts +16 -0
- package/lib/components/appointmentBooking/hooks.js +49 -6
- package/lib/components/appointmentBooking/index.js +5 -0
- package/lib/components/appointmentBooking/locales.d.ts +36 -3
- package/lib/components/appointmentBooking/locales.js +36 -3
- package/lib/components/appointmentBooking/utils.d.ts +23 -1
- package/lib/components/appointmentBooking/utils.js +84 -26
- package/lib/components/booking/components/footer/index.js +8 -6
- package/lib/components/booking/components/voucher/index.js +11 -15
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/index.js +4 -6
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +4 -3
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -1
- package/lib/components/booking/info2/service/editService/index.js +4 -11
- package/lib/components/booking/utils.d.ts +2 -2
- 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 +4 -4
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
- package/lib/components/shoppingCart/status.js +4 -1
- package/lib/components/shoppingCart/type.d.ts +3 -0
- package/lib/components/wallet/Detail/index.js +1 -1
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/appointment-deposit/meta.ts +58 -0
- package/package.json +4 -4
- package/es/components/ticketBooking/data.d.ts +0 -0
- package/es/components/ticketBooking/data.js +0 -82
- package/es/components/ticketBooking/index.d.ts +0 -2
- package/es/components/ticketBooking/index.js +0 -6
- package/lib/components/ticketBooking/data.d.ts +0 -0
- package/lib/components/ticketBooking/data.js +0 -0
- package/lib/components/ticketBooking/index.d.ts +0 -2
- package/lib/components/ticketBooking/index.js +0 -28
|
@@ -9,6 +9,7 @@ export declare const useShopDiscount: () => any;
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const useAppointmentBookingStep: () => {
|
|
11
11
|
getStepIndex: (type: string, skipNumber?: number) => any;
|
|
12
|
+
stepList: any;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* @title: 获取商品数据
|
|
@@ -48,6 +49,7 @@ export declare const useAppointmentBookingLogin: () => {
|
|
|
48
49
|
*/
|
|
49
50
|
export declare const useAppointmentBookingAccount: () => {
|
|
50
51
|
accountLists: any;
|
|
52
|
+
getHolders: () => Promise<any>;
|
|
51
53
|
};
|
|
52
54
|
/**
|
|
53
55
|
* @title: 获取资源数据
|
|
@@ -74,3 +76,17 @@ export declare const useAppointmentBookingResource: () => {
|
|
|
74
76
|
export declare const useIsSkipResourceStep: () => {
|
|
75
77
|
checkSkipResourceStep: () => Promise<boolean>;
|
|
76
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* @title: 获取预约配置
|
|
81
|
+
* @description:
|
|
82
|
+
* @return {*}
|
|
83
|
+
* @Author: WangHan
|
|
84
|
+
* @Date: 2025-04-24 18:15
|
|
85
|
+
*/
|
|
86
|
+
export declare const useAppointmentBookingSetting: () => {
|
|
87
|
+
isDateSelectedFirst: boolean;
|
|
88
|
+
isFormSubject: boolean;
|
|
89
|
+
customPageId: any;
|
|
90
|
+
getLoadAllSchedule: () => void;
|
|
91
|
+
bookingSubject: any;
|
|
92
|
+
};
|
|
@@ -35,6 +35,7 @@ __export(hooks_exports, {
|
|
|
35
35
|
useAppointmentBookingLogin: () => useAppointmentBookingLogin,
|
|
36
36
|
useAppointmentBookingProduct: () => useAppointmentBookingProduct,
|
|
37
37
|
useAppointmentBookingResource: () => useAppointmentBookingResource,
|
|
38
|
+
useAppointmentBookingSetting: () => useAppointmentBookingSetting,
|
|
38
39
|
useAppointmentBookingStep: () => useAppointmentBookingStep,
|
|
39
40
|
useIsSkipResourceStep: () => useIsSkipResourceStep,
|
|
40
41
|
useShopDiscount: () => useShopDiscount
|
|
@@ -59,9 +60,9 @@ var useAppointmentBookingStep = () => {
|
|
|
59
60
|
const { appointmentBooking, setCurrentStep, setIsLastStep } = (0, import_context.useAppointmentBookingContext)();
|
|
60
61
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
61
62
|
const getCurrentAndLastStep = () => {
|
|
62
|
-
const
|
|
63
|
-
setCurrentStep(
|
|
64
|
-
setIsLastStep((
|
|
63
|
+
const currentStep = appointmentBooking.getCurrentStep();
|
|
64
|
+
setCurrentStep(currentStep);
|
|
65
|
+
setIsLastStep((currentStep == null ? void 0 : currentStep.index) === stepList.length - 1);
|
|
65
66
|
};
|
|
66
67
|
(0, import_react.useEffect)(() => {
|
|
67
68
|
getCurrentAndLastStep();
|
|
@@ -86,7 +87,7 @@ var useAppointmentBookingStep = () => {
|
|
|
86
87
|
return prevIndex < 1 ? 1 : prevIndex;
|
|
87
88
|
}
|
|
88
89
|
};
|
|
89
|
-
return { getStepIndex };
|
|
90
|
+
return { getStepIndex, stepList };
|
|
90
91
|
};
|
|
91
92
|
var useAppointmentBookingProduct = () => {
|
|
92
93
|
const { appointmentBooking, setProducts } = (0, import_context.useAppointmentBookingContext)();
|
|
@@ -99,12 +100,15 @@ var useAppointmentBookingProduct = () => {
|
|
|
99
100
|
};
|
|
100
101
|
var useAppointmentBookingCart = () => {
|
|
101
102
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
102
|
-
const { appointmentBooking, setCarts, setSummary } = (0, import_context.useAppointmentBookingContext)();
|
|
103
|
+
const { appointmentBooking, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
|
|
103
104
|
const getCartAndSummary = async () => {
|
|
104
105
|
const carts = await appointmentBooking.getCart();
|
|
105
106
|
setCarts(carts || []);
|
|
106
107
|
const summary = await appointmentBooking.getSummary();
|
|
107
108
|
setSummary(summary || {});
|
|
109
|
+
if (!carts.length) {
|
|
110
|
+
setIsAgreeDepositPolicy(false);
|
|
111
|
+
}
|
|
108
112
|
console.log(carts, summary, "appointmentBooking_cart:changed");
|
|
109
113
|
};
|
|
110
114
|
(0, import_react.useEffect)(() => {
|
|
@@ -143,6 +147,24 @@ var useAppointmentBookingAccount = () => {
|
|
|
143
147
|
console.log("appointmentBooking_accountList:changed", data);
|
|
144
148
|
setAccountLists(data || []);
|
|
145
149
|
};
|
|
150
|
+
const getHolders = async () => {
|
|
151
|
+
const params = {
|
|
152
|
+
url: "/form/data/v1",
|
|
153
|
+
query: {
|
|
154
|
+
customer_id: 13215,
|
|
155
|
+
form_id: 866,
|
|
156
|
+
shop_id: 9
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const data = await appointmentBooking.fetchHolderAccountsAsync(params);
|
|
160
|
+
const newData = data == null ? void 0 : data.map((item) => {
|
|
161
|
+
return {
|
|
162
|
+
id: item == null ? void 0 : item.form_record_id,
|
|
163
|
+
label: item == null ? void 0 : item.main_field
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
return newData || [];
|
|
167
|
+
};
|
|
146
168
|
(0, import_react.useEffect)(() => {
|
|
147
169
|
getAccountLists();
|
|
148
170
|
pisellOS.effects.on(
|
|
@@ -155,7 +177,7 @@ var useAppointmentBookingAccount = () => {
|
|
|
155
177
|
}
|
|
156
178
|
);
|
|
157
179
|
}, []);
|
|
158
|
-
return { accountLists };
|
|
180
|
+
return { accountLists, getHolders };
|
|
159
181
|
};
|
|
160
182
|
var useAppointmentBookingResource = () => {
|
|
161
183
|
const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
@@ -172,6 +194,7 @@ var useAppointmentBookingResource = () => {
|
|
|
172
194
|
const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
|
|
173
195
|
const resourceCodes = _resources.map((item) => item.code);
|
|
174
196
|
setResources(resources || []);
|
|
197
|
+
console.log(resourceCodes, resources, "getResourceList");
|
|
175
198
|
return { resources, resourceCodes };
|
|
176
199
|
};
|
|
177
200
|
const getResourceTimeSlot = async (index) => {
|
|
@@ -217,6 +240,25 @@ var useIsSkipResourceStep = () => {
|
|
|
217
240
|
};
|
|
218
241
|
return { checkSkipResourceStep };
|
|
219
242
|
};
|
|
243
|
+
var useAppointmentBookingSetting = () => {
|
|
244
|
+
var _a;
|
|
245
|
+
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
246
|
+
console.log(appointmentBooking, "appointmentBooking---");
|
|
247
|
+
const { bookingProcess, bookingSubject, customPageId } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
248
|
+
const getLoadAllSchedule = () => {
|
|
249
|
+
const res = appointmentBooking.loadAllSchedule();
|
|
250
|
+
console.log(res, "loadAllSchedule");
|
|
251
|
+
};
|
|
252
|
+
return {
|
|
253
|
+
// 是否先选择日期
|
|
254
|
+
isDateSelectedFirst: bookingProcess === "date_first",
|
|
255
|
+
// 主体是否是表单
|
|
256
|
+
isFormSubject: (bookingSubject == null ? void 0 : bookingSubject.type) === "form",
|
|
257
|
+
customPageId,
|
|
258
|
+
getLoadAllSchedule,
|
|
259
|
+
bookingSubject
|
|
260
|
+
};
|
|
261
|
+
};
|
|
220
262
|
// Annotate the CommonJS export names for ESM import in node:
|
|
221
263
|
0 && (module.exports = {
|
|
222
264
|
useAppointmentBooking,
|
|
@@ -225,6 +267,7 @@ var useIsSkipResourceStep = () => {
|
|
|
225
267
|
useAppointmentBookingLogin,
|
|
226
268
|
useAppointmentBookingProduct,
|
|
227
269
|
useAppointmentBookingResource,
|
|
270
|
+
useAppointmentBookingSetting,
|
|
228
271
|
useAppointmentBookingStep,
|
|
229
272
|
useIsSkipResourceStep,
|
|
230
273
|
useShopDiscount
|
|
@@ -49,6 +49,11 @@ var AppointmentBooking = () => {
|
|
|
49
49
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
50
50
|
const currentUser = (0, import_utils2.formatCurrentUser)();
|
|
51
51
|
(0, import_react.useEffect)(() => {
|
|
52
|
+
var _a2;
|
|
53
|
+
const { bookingSubject } = ((_a2 = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a2.productModuleParams) || {};
|
|
54
|
+
if ((bookingSubject == null ? void 0 : bookingSubject.type) === "form") {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
52
57
|
appointmentBooking.getAccounts().then((data) => {
|
|
53
58
|
if (!data.length) {
|
|
54
59
|
appointmentBooking.addAccount([currentUser]);
|
|
@@ -12,7 +12,7 @@ declare const _default: {
|
|
|
12
12
|
'pisell2.event.close.tip': string;
|
|
13
13
|
'pisell2.event.close.continue': string;
|
|
14
14
|
'pisell2.event.close.exit': string;
|
|
15
|
-
'pisell2.
|
|
15
|
+
'pisell2.appointment.step': (step: number) => string;
|
|
16
16
|
'pisell2.event.select.category': (val: string) => string;
|
|
17
17
|
'pisell2.event.select.campus': (val: string) => string;
|
|
18
18
|
'pisell2.event.select.event': string;
|
|
@@ -70,6 +70,7 @@ declare const _default: {
|
|
|
70
70
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
72
|
'pisell2.appointment.booking.empty.service': string;
|
|
73
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
73
74
|
'pisell2.appointment.booking.empty.time': string;
|
|
74
75
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
75
76
|
'pisell2.appointment.add.guest': string;
|
|
@@ -87,6 +88,16 @@ declare const _default: {
|
|
|
87
88
|
'pisell2.appointment.sunday': string;
|
|
88
89
|
'pisell2.appointment.any.professional': string;
|
|
89
90
|
'pisell2.appointment.for.maximum.availability': string;
|
|
91
|
+
'pisell2.appointment.deposit': string;
|
|
92
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
93
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
94
|
+
'pisell2.appointment.deposit.and': string;
|
|
95
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
96
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
97
|
+
'pisell2.appointment.deposit.close': string;
|
|
98
|
+
'pisell2.appointment.tips': string;
|
|
99
|
+
'pisell2.appointment.tips.content': (x: string) => string;
|
|
100
|
+
'pisell2.appointment.fill-form': string;
|
|
90
101
|
'pisell2.text.apply': string;
|
|
91
102
|
'pisell2.text.goodpass': string;
|
|
92
103
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -110,7 +121,7 @@ declare const _default: {
|
|
|
110
121
|
'pisell2.event.close.tip': string;
|
|
111
122
|
'pisell2.event.close.continue': string;
|
|
112
123
|
'pisell2.event.close.exit': string;
|
|
113
|
-
'pisell2.
|
|
124
|
+
'pisell2.appointment.step': (step: number) => string;
|
|
114
125
|
'pisell2.event.select.category': (val: string) => string;
|
|
115
126
|
'pisell2.event.select.event': string;
|
|
116
127
|
'pisell2.event.select.campus': (val: string) => string;
|
|
@@ -168,6 +179,7 @@ declare const _default: {
|
|
|
168
179
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
169
180
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
170
181
|
'pisell2.appointment.booking.empty.service': string;
|
|
182
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
171
183
|
'pisell2.appointment.booking.empty.time': string;
|
|
172
184
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
173
185
|
'pisell2.appointment.add.guest': string;
|
|
@@ -185,6 +197,16 @@ declare const _default: {
|
|
|
185
197
|
'pisell2.appointment.sunday': string;
|
|
186
198
|
'pisell2.appointment.any.professional': string;
|
|
187
199
|
'pisell2.appointment.for.maximum.availability': string;
|
|
200
|
+
'pisell2.appointment.deposit': string;
|
|
201
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
202
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
203
|
+
'pisell2.appointment.deposit.and': string;
|
|
204
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
205
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
206
|
+
'pisell2.appointment.deposit.close': string;
|
|
207
|
+
'pisell2.appointment.tips': string;
|
|
208
|
+
'pisell2.appointment.tips.content': (x: string) => string;
|
|
209
|
+
'pisell2.appointment.fill-form': string;
|
|
188
210
|
'pisell2.text.apply': string;
|
|
189
211
|
'pisell2.text.goodpass': string;
|
|
190
212
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -208,7 +230,7 @@ declare const _default: {
|
|
|
208
230
|
'pisell2.event.close.tip': string;
|
|
209
231
|
'pisell2.event.close.continue': string;
|
|
210
232
|
'pisell2.event.close.exit': string;
|
|
211
|
-
'pisell2.
|
|
233
|
+
'pisell2.appointment.step': (step: number) => string;
|
|
212
234
|
'pisell2.event.select.category': (val: string) => string;
|
|
213
235
|
'pisell2.event.select.event': string;
|
|
214
236
|
'pisell2.event.select.campus': (val: string) => string;
|
|
@@ -266,6 +288,7 @@ declare const _default: {
|
|
|
266
288
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
267
289
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
268
290
|
'pisell2.appointment.booking.empty.service': string;
|
|
291
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
269
292
|
'pisell2.appointment.booking.empty.time': string;
|
|
270
293
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
271
294
|
'pisell2.appointment.add.guest': string;
|
|
@@ -283,6 +306,16 @@ declare const _default: {
|
|
|
283
306
|
'pisell2.appointment.sunday': string;
|
|
284
307
|
'pisell2.appointment.any.professional': string;
|
|
285
308
|
'pisell2.appointment.for.maximum.availability': string;
|
|
309
|
+
'pisell2.appointment.deposit': string;
|
|
310
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
311
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
312
|
+
'pisell2.appointment.deposit.and': string;
|
|
313
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
314
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
315
|
+
'pisell2.appointment.deposit.close': string;
|
|
316
|
+
'pisell2.appointment.tips': string;
|
|
317
|
+
'pisell2.appointment.tips.content': (x: string) => string;
|
|
318
|
+
'pisell2.appointment.fill-form': string;
|
|
286
319
|
'pisell2.text.apply': string;
|
|
287
320
|
'pisell2.text.goodpass': string;
|
|
288
321
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -36,7 +36,7 @@ var locales_default = {
|
|
|
36
36
|
"pisell2.event.close.tip": "All entered information will be lost. Are you sure you want to exit?",
|
|
37
37
|
"pisell2.event.close.continue": "Continue",
|
|
38
38
|
"pisell2.event.close.exit": "Exit",
|
|
39
|
-
"pisell2.
|
|
39
|
+
"pisell2.appointment.step": (step) => `Step ${step}`,
|
|
40
40
|
"pisell2.event.select.category": (val) => `Select ${val || "resource"}`,
|
|
41
41
|
"pisell2.event.select.campus": (val) => `Please select ${val || "resource"}`,
|
|
42
42
|
"pisell2.event.select.event": "Select service",
|
|
@@ -94,6 +94,7 @@ var locales_default = {
|
|
|
94
94
|
"pisell2.event.capacity.limit.reached.title": "Capacity limit reached",
|
|
95
95
|
"pisell2.event.capacity.limit.reached.tip": "One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.",
|
|
96
96
|
"pisell2.appointment.booking.empty.service": "No service",
|
|
97
|
+
"pisell2.appointment.booking.empty.data": "No data",
|
|
97
98
|
"pisell2.appointment.booking.empty.time": "No time",
|
|
98
99
|
"pisell2.appointment.service.title": (val) => `${val} ${val > 1 ? "services" : "service"}`,
|
|
99
100
|
"pisell2.appointment.add.guest": "Add guest",
|
|
@@ -111,6 +112,16 @@ var locales_default = {
|
|
|
111
112
|
"pisell2.appointment.sunday": "Sun",
|
|
112
113
|
"pisell2.appointment.any.professional": "Any professional",
|
|
113
114
|
"pisell2.appointment.for.maximum.availability": "for maximum availability",
|
|
115
|
+
"pisell2.appointment.deposit": "Deposit",
|
|
116
|
+
"pisell2.appointment.deposit.agreed": "I have read and agree to the ",
|
|
117
|
+
"pisell2.appointment.deposit.agree.policy": "You need to agree the policy to proceed",
|
|
118
|
+
"pisell2.appointment.deposit.and": " & ",
|
|
119
|
+
"pisell2.appointment.deposit.amount.tip1": " needs to be paid as deposit.",
|
|
120
|
+
"pisell2.appointment.deposit.amount.tip2": "",
|
|
121
|
+
"pisell2.appointment.deposit.close": "Close",
|
|
122
|
+
"pisell2.appointment.tips": "Tips",
|
|
123
|
+
"pisell2.appointment.tips.content": (x) => `Please carefully review the items in your shopping cart and click the '${x}' button below to proceed with the payment.`,
|
|
124
|
+
"pisell2.appointment.fill-form": "Enter your details",
|
|
114
125
|
"pisell2.text.apply": "Apply",
|
|
115
126
|
"pisell2.text.goodpass": "GoodPass",
|
|
116
127
|
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
@@ -134,7 +145,7 @@ var locales_default = {
|
|
|
134
145
|
"pisell2.event.close.tip": "退出后将丢失所有已填写的信息,确定要退出吗?",
|
|
135
146
|
"pisell2.event.close.continue": "继续",
|
|
136
147
|
"pisell2.event.close.exit": "退出",
|
|
137
|
-
"pisell2.
|
|
148
|
+
"pisell2.appointment.step": (step) => `步骤 ${step}`,
|
|
138
149
|
"pisell2.event.select.category": (val) => `选择${val || "资源"}`,
|
|
139
150
|
"pisell2.event.select.event": "选择服务",
|
|
140
151
|
"pisell2.event.select.campus": (val) => `请选择${val || "资源"}`,
|
|
@@ -192,6 +203,7 @@ var locales_default = {
|
|
|
192
203
|
"pisell2.event.capacity.limit.reached.title": "活动名额已满",
|
|
193
204
|
"pisell2.event.capacity.limit.reached.tip": "购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。",
|
|
194
205
|
"pisell2.appointment.booking.empty.service": "暂无服务",
|
|
206
|
+
"pisell2.appointment.booking.empty.data": "暂无数据",
|
|
195
207
|
"pisell2.appointment.booking.empty.time": "暂无时间",
|
|
196
208
|
"pisell2.appointment.service.title": (val) => `${val}个服务`,
|
|
197
209
|
"pisell2.appointment.add.guest": "添加预约人",
|
|
@@ -209,6 +221,16 @@ var locales_default = {
|
|
|
209
221
|
"pisell2.appointment.sunday": "周日",
|
|
210
222
|
"pisell2.appointment.any.professional": "随机分配",
|
|
211
223
|
"pisell2.appointment.for.maximum.availability": "立即匹配",
|
|
224
|
+
"pisell2.appointment.deposit": "定金",
|
|
225
|
+
"pisell2.appointment.deposit.agreed": "我已阅读并同意 ",
|
|
226
|
+
"pisell2.appointment.deposit.agree.policy": "您需要同意协议才能继续",
|
|
227
|
+
"pisell2.appointment.deposit.and": " 和 ",
|
|
228
|
+
"pisell2.appointment.deposit.amount.tip1": "请支付 ",
|
|
229
|
+
"pisell2.appointment.deposit.amount.tip2": " 定金。",
|
|
230
|
+
"pisell2.appointment.deposit.close": "关闭",
|
|
231
|
+
"pisell2.appointment.tips": "提示",
|
|
232
|
+
"pisell2.appointment.tips.content": (x) => `请仔细查看购物车中的商品,然后点击下面的“${x}”按钮继续付款。`,
|
|
233
|
+
"pisell2.appointment.fill-form": "填写信息",
|
|
212
234
|
"pisell2.text.apply": "应用",
|
|
213
235
|
"pisell2.text.goodpass": "商品券",
|
|
214
236
|
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
@@ -232,7 +254,7 @@ var locales_default = {
|
|
|
232
254
|
"pisell2.event.close.tip": "退出後將丟失所有已填寫的信息,確定要退出嗎?",
|
|
233
255
|
"pisell2.event.close.continue": "繼續",
|
|
234
256
|
"pisell2.event.close.exit": "退出",
|
|
235
|
-
"pisell2.
|
|
257
|
+
"pisell2.appointment.step": (step) => `步驟 ${step}`,
|
|
236
258
|
"pisell2.event.select.category": (val) => `選擇${val || "資源"}`,
|
|
237
259
|
"pisell2.event.select.event": "選擇服務",
|
|
238
260
|
"pisell2.event.select.campus": (val) => `請選擇${val || "資源"}`,
|
|
@@ -290,6 +312,7 @@ var locales_default = {
|
|
|
290
312
|
"pisell2.event.capacity.limit.reached.title": "活動名額已滿",
|
|
291
313
|
"pisell2.event.capacity.limit.reached.tip": "購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。",
|
|
292
314
|
"pisell2.appointment.booking.empty.service": "暫無服務",
|
|
315
|
+
"pisell2.appointment.booking.empty.data": "暫無數據",
|
|
293
316
|
"pisell2.appointment.booking.empty.time": "暫無時間",
|
|
294
317
|
"pisell2.appointment.service.title": (val) => `${val}个服務`,
|
|
295
318
|
"pisell2.appointment.add.guest": "添加預約人",
|
|
@@ -307,6 +330,16 @@ var locales_default = {
|
|
|
307
330
|
"pisell2.appointment.sunday": "周日",
|
|
308
331
|
"pisell2.appointment.any.professional": "隨機分配",
|
|
309
332
|
"pisell2.appointment.for.maximum.availability": "立即匹配",
|
|
333
|
+
"pisell2.appointment.deposit": "定金",
|
|
334
|
+
"pisell2.appointment.deposit.agreed": "我已閱讀並同意 ",
|
|
335
|
+
"pisell2.appointment.deposit.agree.policy": "您需要同意協議才能繼續",
|
|
336
|
+
"pisell2.appointment.deposit.and": " 和 ",
|
|
337
|
+
"pisell2.appointment.deposit.amount.tip1": "請支付 ",
|
|
338
|
+
"pisell2.appointment.deposit.amount.tip2": " 定金。",
|
|
339
|
+
"pisell2.appointment.deposit.close": "关闭",
|
|
340
|
+
"pisell2.appointment.tips": "提示",
|
|
341
|
+
"pisell2.appointment.tips.content": (x) => `請仔細查看購物車中的商品,然後點擊下面的“${x}”按鈕繼續付款。`,
|
|
342
|
+
"pisell2.appointment.fill-form": "填寫資訊",
|
|
310
343
|
"pisell2.text.apply": "應用",
|
|
311
344
|
"pisell2.text.goodpass": "商品券",
|
|
312
345
|
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
@@ -45,7 +45,7 @@ export declare const formatMonthDisplay: (dateString: string) => string;
|
|
|
45
45
|
export declare const resourceTitle: (data: any) => any;
|
|
46
46
|
export declare const formatHolder: (data: any[]) => any[];
|
|
47
47
|
export declare const formatGuest: (data: any[], products: any) => any[];
|
|
48
|
-
export declare const formatCarts: (data: any[], resources: any[]) => any[];
|
|
48
|
+
export declare const formatCarts: (data: any[], resources: any[], accountLists?: any) => any[];
|
|
49
49
|
/**
|
|
50
50
|
* @title: 对资源进行排序
|
|
51
51
|
* @description:
|
|
@@ -84,3 +84,25 @@ export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
|
|
|
84
84
|
* @Date: 2025-04-15 21:51
|
|
85
85
|
*/
|
|
86
86
|
export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @title: 定金合并的标点符号
|
|
89
|
+
* @description:
|
|
90
|
+
* @return {*}
|
|
91
|
+
* @Author: WangHan
|
|
92
|
+
* @Date: 2025-04-21 17:52
|
|
93
|
+
*/
|
|
94
|
+
export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
|
|
95
|
+
/**
|
|
96
|
+
* @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
|
|
97
|
+
* @description:
|
|
98
|
+
* @param {any} array
|
|
99
|
+
* @param {any} resources
|
|
100
|
+
* @return {*}
|
|
101
|
+
* @Author: WangHan
|
|
102
|
+
* @Date: 2025-04-25 19:05
|
|
103
|
+
*/
|
|
104
|
+
export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
|
|
105
|
+
export declare const formatForms: (array: any[]) => ({
|
|
106
|
+
form_id: any;
|
|
107
|
+
policy_id: any;
|
|
108
|
+
} | null)[];
|
|
@@ -33,12 +33,15 @@ __export(utils_exports, {
|
|
|
33
33
|
formatCarts: () => formatCarts,
|
|
34
34
|
formatCurrentUser: () => formatCurrentUser,
|
|
35
35
|
formatCustomer: () => formatCustomer,
|
|
36
|
+
formatForms: () => formatForms,
|
|
36
37
|
formatGuest: () => formatGuest,
|
|
37
38
|
formatHolder: () => formatHolder,
|
|
38
39
|
formatMonthDisplay: () => formatMonthDisplay,
|
|
39
40
|
getMeAccount: () => getMeAccount,
|
|
41
|
+
getPunctuationMark: () => getPunctuationMark,
|
|
40
42
|
getScheduleColors: () => getScheduleColors,
|
|
41
43
|
getUsableSchedules: () => getUsableSchedules,
|
|
44
|
+
hasResourceFormId: () => hasResourceFormId,
|
|
42
45
|
isEmptyCartsResourceId: () => isEmptyCartsResourceId,
|
|
43
46
|
isEmptyGuest: () => isEmptyGuest,
|
|
44
47
|
resourceTitle: () => resourceTitle,
|
|
@@ -115,35 +118,38 @@ var formatGuest = (data, products) => {
|
|
|
115
118
|
};
|
|
116
119
|
});
|
|
117
120
|
};
|
|
118
|
-
var formatCarts = (data, resources) => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
var formatCarts = (data, resources, accountLists) => {
|
|
122
|
+
try {
|
|
123
|
+
const locale = "en-US";
|
|
124
|
+
const symbol = "$";
|
|
125
|
+
console.log(data, resources, "formatCartsformatCarts");
|
|
126
|
+
return data == null ? void 0 : data.map((d) => {
|
|
127
|
+
var _a, _b, _c;
|
|
128
|
+
const currentResource = resources == null ? void 0 : resources.find((r) => (d == null ? void 0 : d._id) === (r == null ? void 0 : r._id));
|
|
129
|
+
let currentResources = (_b = (_a = currentResource == null ? void 0 : currentResource.resources) == null ? void 0 : _a[0]) == null ? void 0 : _b.renderList;
|
|
130
|
+
currentResources = currentResources == null ? void 0 : currentResources.map((d2) => {
|
|
131
|
+
return {
|
|
132
|
+
...d2,
|
|
133
|
+
label: (d2 == null ? void 0 : d2.main_field) || (d2 == null ? void 0 : d2.id)
|
|
134
|
+
};
|
|
135
|
+
});
|
|
130
136
|
return {
|
|
131
|
-
...
|
|
132
|
-
|
|
137
|
+
...d,
|
|
138
|
+
format: ["HH:mm", "HH:mm"],
|
|
139
|
+
show_time: true,
|
|
140
|
+
duration_type: ((_c = d == null ? void 0 : d.duration) == null ? void 0 : _c.type) || "minutes",
|
|
141
|
+
locale,
|
|
142
|
+
symbol,
|
|
143
|
+
resources: currentResources,
|
|
144
|
+
is_hide_like: true,
|
|
145
|
+
holder_title: "",
|
|
146
|
+
holders: formatHolder(accountLists)
|
|
133
147
|
};
|
|
134
148
|
});
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
duration_type: d.duration.type,
|
|
140
|
-
locale,
|
|
141
|
-
symbol,
|
|
142
|
-
resources: currentResources,
|
|
143
|
-
is_hide_like: true,
|
|
144
|
-
holder_title: ""
|
|
145
|
-
};
|
|
146
|
-
});
|
|
149
|
+
} catch (error) {
|
|
150
|
+
console.log(error, "formatCarts");
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
147
153
|
};
|
|
148
154
|
var sortResources = (resources, resourceSort) => {
|
|
149
155
|
try {
|
|
@@ -209,18 +215,70 @@ var isEmptyCartsResourceId = (carts) => {
|
|
|
209
215
|
console.log(isEmptyResourceId, "isEmptyResourceId");
|
|
210
216
|
return isEmptyResourceId;
|
|
211
217
|
};
|
|
218
|
+
var getPunctuationMark = (index, totalLength, isEn) => {
|
|
219
|
+
const isLastItem = index === totalLength - 1;
|
|
220
|
+
const isSecondLastItem = index === totalLength - 2;
|
|
221
|
+
if (isLastItem) {
|
|
222
|
+
return isEn ? "." : "。";
|
|
223
|
+
}
|
|
224
|
+
if (isSecondLastItem) {
|
|
225
|
+
return import_utils.locales.getText("pisell2.appointment.deposit.and");
|
|
226
|
+
}
|
|
227
|
+
return isEn ? ", " : "、";
|
|
228
|
+
};
|
|
229
|
+
var hasResourceFormId = (array) => {
|
|
230
|
+
try {
|
|
231
|
+
if (!(array == null ? void 0 : array.length)) {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
return array.some((item) => {
|
|
235
|
+
var _a;
|
|
236
|
+
const resourceId = item.resource_id;
|
|
237
|
+
const foundResource = (_a = item == null ? void 0 : item.resources) == null ? void 0 : _a.find((resource) => resource.id === resourceId);
|
|
238
|
+
console.log(foundResource, item, "foundResource");
|
|
239
|
+
return foundResource && foundResource.resource_form_id;
|
|
240
|
+
});
|
|
241
|
+
} catch (error) {
|
|
242
|
+
console.log(error, "hasResourceFormId");
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
var formatForms = (array) => {
|
|
246
|
+
try {
|
|
247
|
+
if (!(array == null ? void 0 : array.length)) {
|
|
248
|
+
return [];
|
|
249
|
+
}
|
|
250
|
+
const mappedResources = array.map((item) => {
|
|
251
|
+
var _a;
|
|
252
|
+
const foundResource = (_a = item == null ? void 0 : item.resources) == null ? void 0 : _a.find((resource) => resource.id === item.resource_id);
|
|
253
|
+
if (foundResource && ((foundResource == null ? void 0 : foundResource.resource_form_id) || (foundResource == null ? void 0 : foundResource.policy_id))) {
|
|
254
|
+
return {
|
|
255
|
+
form_id: foundResource.resource_form_id,
|
|
256
|
+
policy_id: foundResource.policy_id
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
return null;
|
|
260
|
+
}).filter(Boolean);
|
|
261
|
+
return mappedResources;
|
|
262
|
+
} catch (error) {
|
|
263
|
+
console.log(error, "hasResourceFormId");
|
|
264
|
+
return [];
|
|
265
|
+
}
|
|
266
|
+
};
|
|
212
267
|
// Annotate the CommonJS export names for ESM import in node:
|
|
213
268
|
0 && (module.exports = {
|
|
214
269
|
formatBackgroundColors,
|
|
215
270
|
formatCarts,
|
|
216
271
|
formatCurrentUser,
|
|
217
272
|
formatCustomer,
|
|
273
|
+
formatForms,
|
|
218
274
|
formatGuest,
|
|
219
275
|
formatHolder,
|
|
220
276
|
formatMonthDisplay,
|
|
221
277
|
getMeAccount,
|
|
278
|
+
getPunctuationMark,
|
|
222
279
|
getScheduleColors,
|
|
223
280
|
getUsableSchedules,
|
|
281
|
+
hasResourceFormId,
|
|
224
282
|
isEmptyCartsResourceId,
|
|
225
283
|
isEmptyGuest,
|
|
226
284
|
resourceTitle,
|
|
@@ -51,7 +51,7 @@ var import_serve2 = require("./serve");
|
|
|
51
51
|
var import_utils4 = require("./utils");
|
|
52
52
|
var import_voucher = __toESM(require("../voucher"));
|
|
53
53
|
var Footer = (props) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
55
55
|
const { state, buttons, dispatch, source } = props;
|
|
56
56
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
57
57
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
@@ -189,8 +189,10 @@ var Footer = (props) => {
|
|
|
189
189
|
}
|
|
190
190
|
return false;
|
|
191
191
|
}, [state, params]);
|
|
192
|
-
const hasGoodPassApp =
|
|
193
|
-
|
|
192
|
+
const hasGoodPassApp = (0, import_react.useMemo)(() => {
|
|
193
|
+
var _a2;
|
|
194
|
+
return !!((_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "goodpass"));
|
|
195
|
+
}, []);
|
|
194
196
|
const goCheckout = async (order_id) => {
|
|
195
197
|
var _a2, _b2;
|
|
196
198
|
if (isTerminal == null ? void 0 : isTerminal()) {
|
|
@@ -751,7 +753,7 @@ var Footer = (props) => {
|
|
|
751
753
|
}, [
|
|
752
754
|
state.bookingId,
|
|
753
755
|
state.bookingDetail,
|
|
754
|
-
(
|
|
756
|
+
(_h = state.addons) == null ? void 0 : _h.load,
|
|
755
757
|
state.renderType
|
|
756
758
|
]);
|
|
757
759
|
const menuChange = (e) => {
|
|
@@ -785,7 +787,7 @@ var Footer = (props) => {
|
|
|
785
787
|
break;
|
|
786
788
|
}
|
|
787
789
|
};
|
|
788
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, hasGoodPassApp
|
|
790
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, hasGoodPassApp ? /* @__PURE__ */ import_react.default.createElement(import_voucher.default, { state, dispatch }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
|
|
789
791
|
"span",
|
|
790
792
|
{
|
|
791
793
|
className: "pisell-lowcode__booking-footer-right",
|
|
@@ -812,7 +814,7 @@ var Footer = (props) => {
|
|
|
812
814
|
},
|
|
813
815
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-border" }),
|
|
814
816
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, import_utils.locales.getText("pisell1.text.subtotal")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.productAmount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))),
|
|
815
|
-
(((
|
|
817
|
+
(((_i = state.bookingDetail) == null ? void 0 : _i.surcharge) || []).map((d) => {
|
|
816
818
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item", key: d.id }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, d.name[state.locale]), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(d.amount, 2, (state == null ? void 0 : state.amountSymbol) || "$")));
|
|
817
819
|
}),
|
|
818
820
|
state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("pisell1.text.tax")), /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { fontSize: 14 } }, taxText)), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.tax, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
|