@pisell/private-materials 3.3.18 → 3.3.20
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.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +3 -2
- package/es/components/appointmentBooking/components/Content/index.js +19 -22
- package/es/components/appointmentBooking/components/Date/index.js +66 -42
- package/es/components/appointmentBooking/components/Date/state.d.ts +1 -0
- package/es/components/appointmentBooking/components/Date/state.js +5 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Form/index.js +12 -4
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/index.js +4 -2
- package/es/components/appointmentBooking/components/Resource/index.js +7 -4
- package/es/components/appointmentBooking/components/Services/index.js +3 -2
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +4 -2
- package/es/components/appointmentBooking/context.d.ts +3 -1
- package/es/components/appointmentBooking/context.js +63 -6
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +35 -11
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +48 -8
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/locales.d.ts +6 -0
- package/es/components/appointmentBooking/locales.js +6 -0
- package/es/components/appointmentBooking/utils.d.ts +2 -2
- package/es/components/appointmentBooking/utils.js +10 -4
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/deposit/index.js +1 -1
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/payo/config.js +14 -3
- package/es/components/eftposPay/payo/hooks.js +12 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +1 -0
- package/lib/components/appointmentBooking/components/Content/index.js +11 -11
- package/lib/components/appointmentBooking/components/Date/index.js +29 -12
- package/lib/components/appointmentBooking/components/Date/state.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Date/state.js +7 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Form/index.js +6 -3
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/index.js +2 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +6 -4
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +2 -1
- package/lib/components/appointmentBooking/context.d.ts +3 -1
- package/lib/components/appointmentBooking/context.js +28 -7
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +39 -4
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +29 -5
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/locales.d.ts +6 -0
- package/lib/components/appointmentBooking/locales.js +6 -0
- package/lib/components/appointmentBooking/utils.d.ts +2 -2
- package/lib/components/appointmentBooking/utils.js +8 -4
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.js +1 -1
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.js +12 -1
- package/lib/components/eftposPay/payo/hooks.js +10 -0
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/package.json +3 -3
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "success" | "
|
|
177
|
+
status: "success" | "warn" | "loading" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -298,7 +298,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
|
|
301
|
-
action?: "amount" | "
|
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "success" | "
|
|
311
|
+
status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -25,7 +25,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
25
25
|
* @return {*}
|
|
26
26
|
* @Author: xiangfeng.xue
|
|
27
27
|
*/
|
|
28
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
|
28
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
|
29
29
|
/**
|
|
30
30
|
* 计算所有价格明细
|
|
31
31
|
* @param items - 购物车商品数组
|
|
@@ -58,15 +58,15 @@ var Layout = () => {
|
|
|
58
58
|
resourceOtherParams,
|
|
59
59
|
setIsAgreeDepositPolicy,
|
|
60
60
|
appointmentBooking,
|
|
61
|
-
setLoading
|
|
61
|
+
setLoading,
|
|
62
|
+
policyParams,
|
|
63
|
+
closePolicy
|
|
62
64
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
63
65
|
const { getLoadAllSchedule, isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
64
66
|
const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
65
67
|
const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
66
68
|
const { removeStep, stepList } = (0, import_hooks.useAppointmentBookingStep)();
|
|
67
69
|
const { shopDiscount } = (0, import_hooks.useShopDiscount)();
|
|
68
|
-
const [showAgreement, setShowAgreement] = (0, import_react.useState)(false);
|
|
69
|
-
const [agreementContent, setAgreementContent] = (0, import_react.useState)({});
|
|
70
70
|
(0, import_hooks.useAppointmentBookingCart)();
|
|
71
71
|
(0, import_hooks.useAppointmentBookingStep)();
|
|
72
72
|
const [params, setParams] = (0, import_react.useState)({});
|
|
@@ -172,9 +172,6 @@ var Layout = () => {
|
|
|
172
172
|
if (isDateSelectedFirst && key === "select-date") return false;
|
|
173
173
|
return key !== "confirm-information";
|
|
174
174
|
}, [isDateSelectedFirst, (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key]);
|
|
175
|
-
const handleAgreementOk = () => {
|
|
176
|
-
setShowAgreement(false);
|
|
177
|
-
};
|
|
178
175
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, null), /* @__PURE__ */ import_react.default.createElement(
|
|
179
176
|
"div",
|
|
180
177
|
{
|
|
@@ -190,13 +187,16 @@ var Layout = () => {
|
|
|
190
187
|
return (_b2 = (_a2 = stepRef == null ? void 0 : stepRef.current) == null ? void 0 : _a2.next) == null ? void 0 : _b2.call(_a2);
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
|
-
) : null,
|
|
190
|
+
) : null, (policyParams == null ? void 0 : policyParams.open) ? /* @__PURE__ */ import_react.default.createElement(
|
|
194
191
|
import_PolicyModal.default,
|
|
195
192
|
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
key: policyParams == null ? void 0 : policyParams._ts,
|
|
194
|
+
open: policyParams == null ? void 0 : policyParams.open,
|
|
195
|
+
onCancel: () => closePolicy(false),
|
|
196
|
+
onConfirm: () => closePolicy(true),
|
|
197
|
+
item: policyParams == null ? void 0 : policyParams.content,
|
|
198
|
+
onChange: () => setLoading(false),
|
|
199
|
+
isHideCheckout: false
|
|
200
200
|
}
|
|
201
201
|
) : null);
|
|
202
202
|
};
|
|
@@ -41,25 +41,37 @@ var import_utils = require("@pisell/utils");
|
|
|
41
41
|
var import_icons = require("@ant-design/icons");
|
|
42
42
|
var import_context = require("../../context");
|
|
43
43
|
var import_utils2 = require("../../utils");
|
|
44
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
44
45
|
var import_hooks = require("../../hooks");
|
|
46
|
+
var import_state = require("./state");
|
|
45
47
|
var import_index = require("./index.less");
|
|
46
48
|
import_dayjs.default.extend(import_isSameOrBefore.default);
|
|
47
49
|
var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
50
|
+
var _a, _b, _c;
|
|
48
51
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
49
52
|
const [currentDate, setCurrentDate] = (0, import_react.useState)();
|
|
50
53
|
const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
|
|
51
54
|
const [currentMonth, setCurrentMonth] = (0, import_react.useState)();
|
|
52
55
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
53
56
|
const { isDateSelectedFirst, customPageId, getLoadAllSchedule, channel } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
57
|
+
const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
58
|
+
const context = (0, import_useEngineContext.default)();
|
|
54
59
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
55
|
-
next:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
next: handleNext
|
|
61
|
+
}));
|
|
62
|
+
const handleNext = async () => {
|
|
63
|
+
const data = await appointmentBooking.getDateRange();
|
|
64
|
+
if (!(data == null ? void 0 : data.length)) {
|
|
65
|
+
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unselect.date"));
|
|
66
|
+
}
|
|
67
|
+
if (!isDateSelectedFirst) {
|
|
68
|
+
const result = appointmentBooking.checkResourceListForDate();
|
|
69
|
+
if (!result) {
|
|
70
|
+
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unuse.date"));
|
|
59
71
|
}
|
|
60
|
-
appointmentBooking.next();
|
|
61
72
|
}
|
|
62
|
-
|
|
73
|
+
nextStep();
|
|
74
|
+
};
|
|
63
75
|
const weekListText = [
|
|
64
76
|
import_utils.locales.getText("pisell2.appointment.sunday"),
|
|
65
77
|
import_utils.locales.getText("pisell2.appointment.monday"),
|
|
@@ -76,12 +88,17 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
76
88
|
);
|
|
77
89
|
(0, import_react.useEffect)(() => {
|
|
78
90
|
const getCurrentMonthData = async () => {
|
|
79
|
-
var
|
|
91
|
+
var _a2;
|
|
80
92
|
const data = await appointmentBooking.getDateRange();
|
|
81
|
-
setCurrentMonth((0, import_dayjs.default)((
|
|
93
|
+
setCurrentMonth((0, import_dayjs.default)((_a2 = data == null ? void 0 : data[0]) == null ? void 0 : _a2.date) || (0, import_dayjs.default)());
|
|
82
94
|
};
|
|
83
95
|
getCurrentMonthData();
|
|
84
96
|
}, []);
|
|
97
|
+
const locale = (0, import_react.useMemo)(() => {
|
|
98
|
+
var _a2, _b2;
|
|
99
|
+
const currentLocale = (_b2 = (_a2 = context == null ? void 0 : context.engine) == null ? void 0 : _a2.props) == null ? void 0 : _b2.locale;
|
|
100
|
+
return import_state.localeTypes[currentLocale] || "en";
|
|
101
|
+
}, [(_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale]);
|
|
85
102
|
const getMonthData = (date) => {
|
|
86
103
|
const firstDay = (0, import_dayjs.default)(`${date}-01`);
|
|
87
104
|
const startDay = firstDay.day();
|
|
@@ -119,7 +136,7 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
119
136
|
return await appointmentBooking.getAvailableDate(params);
|
|
120
137
|
};
|
|
121
138
|
const getDates = async (date) => {
|
|
122
|
-
var
|
|
139
|
+
var _a2;
|
|
123
140
|
try {
|
|
124
141
|
const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
|
|
125
142
|
const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
|
|
@@ -131,7 +148,7 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
131
148
|
const selected = await appointmentBooking.getDateRange();
|
|
132
149
|
console.log(data, selected, customPageId, "getDates");
|
|
133
150
|
if ((selected == null ? void 0 : selected.length) > 0) {
|
|
134
|
-
setCurrentDate((
|
|
151
|
+
setCurrentDate((_a2 = selected == null ? void 0 : selected[0]) == null ? void 0 : _a2.date);
|
|
135
152
|
} else if (!isDateSelectedFirst) {
|
|
136
153
|
if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
|
|
137
154
|
const firstAvailableDate = (data || []).find(
|
|
@@ -183,7 +200,7 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
183
200
|
setCurrentDate(date);
|
|
184
201
|
appointmentBooking.setDateRange([day]);
|
|
185
202
|
if (isDateSelectedFirst) {
|
|
186
|
-
|
|
203
|
+
handleNext();
|
|
187
204
|
}
|
|
188
205
|
};
|
|
189
206
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -203,7 +220,7 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
203
220
|
}
|
|
204
221
|
},
|
|
205
222
|
/* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
|
|
206
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth == null ? void 0 :
|
|
223
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, (_c = (0, import_dayjs.default)(currentMonth).locale(locale)) == null ? void 0 : _c.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
|
|
207
224
|
const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
|
|
208
225
|
const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
|
|
209
226
|
currentMonth,
|
|
@@ -33,6 +33,7 @@ __export(state_exports, {
|
|
|
33
33
|
getCallToBookStatus: () => getCallToBookStatus,
|
|
34
34
|
getNextSevenDaysList: () => getNextSevenDaysList,
|
|
35
35
|
getStatus: () => getStatus,
|
|
36
|
+
localeTypes: () => localeTypes,
|
|
36
37
|
statusColor: () => statusColor,
|
|
37
38
|
weekListText: () => weekListText
|
|
38
39
|
});
|
|
@@ -184,12 +185,18 @@ var getCallToBookStatus = (currentDate, dateLimitData, cutTime) => {
|
|
|
184
185
|
}
|
|
185
186
|
return isShowCallToBook;
|
|
186
187
|
};
|
|
188
|
+
var localeTypes = {
|
|
189
|
+
"en-US": "en",
|
|
190
|
+
"zh-CN": "zh-cn",
|
|
191
|
+
"zh-TW": "zh-tw"
|
|
192
|
+
};
|
|
187
193
|
// Annotate the CommonJS export names for ESM import in node:
|
|
188
194
|
0 && (module.exports = {
|
|
189
195
|
ShowDayOnly,
|
|
190
196
|
getCallToBookStatus,
|
|
191
197
|
getNextSevenDaysList,
|
|
192
198
|
getStatus,
|
|
199
|
+
localeTypes,
|
|
193
200
|
statusColor,
|
|
194
201
|
weekListText
|
|
195
202
|
});
|
|
@@ -50,6 +50,7 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
|
|
|
50
50
|
const { carts, appointmentBooking, setLoading } = (0, import_context.useAppointmentBookingContext)();
|
|
51
51
|
const { getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
|
|
52
52
|
const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
53
|
+
const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
53
54
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
54
55
|
next: () => {
|
|
55
56
|
var _a, _b;
|
|
@@ -90,7 +91,7 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
|
|
|
90
91
|
setLoading(false);
|
|
91
92
|
}
|
|
92
93
|
} else {
|
|
93
|
-
|
|
94
|
+
nextStep();
|
|
94
95
|
}
|
|
95
96
|
};
|
|
96
97
|
const updateFormStatus = (status) => {
|
|
@@ -166,9 +167,11 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
|
|
|
166
167
|
import_PolicyModal.default,
|
|
167
168
|
{
|
|
168
169
|
open: showAgreement,
|
|
169
|
-
onCancel:
|
|
170
|
+
onCancel: () => setShowAgreement(false),
|
|
171
|
+
onConfirm: () => handleAgreementOk(),
|
|
170
172
|
item: agreementContent,
|
|
171
|
-
onChange: () => setLoading(false)
|
|
173
|
+
onChange: () => setLoading(false),
|
|
174
|
+
isHideCheckout: false
|
|
172
175
|
}
|
|
173
176
|
) : null);
|
|
174
177
|
});
|
|
@@ -46,9 +46,10 @@ var Guest = (0, import_react.forwardRef)((props, ref) => {
|
|
|
46
46
|
const [holderItem, setHolderItem] = (0, import_react.useState)(null);
|
|
47
47
|
const { carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
48
48
|
const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
49
|
+
const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
49
50
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
50
51
|
next: () => {
|
|
51
|
-
|
|
52
|
+
nextStep();
|
|
52
53
|
}
|
|
53
54
|
}));
|
|
54
55
|
const lists = (0, import_react.useMemo)(() => {
|