@pisell/private-materials 3.3.33 → 3.3.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 +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Cart/index.js +26 -13
- package/es/components/Sales/Cart/types.d.ts +12 -0
- package/es/components/Sales/Cart/utils.d.ts +23 -0
- package/es/components/Sales/Cart/utils.js +161 -0
- package/es/components/Sales/Checkout/utils.d.ts +9 -1
- package/es/components/Sales/Checkout/utils.js +25 -3
- package/es/components/Sales/Event/Detail.d.ts +2 -0
- package/es/components/Sales/Event/Detail.js +56 -13
- package/es/components/Sales/Event/serve.d.ts +10 -0
- package/es/components/Sales/Event/serve.js +26 -1
- package/es/components/Sales/Summary/utils.js +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +42 -20
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -29
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +156 -53
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
- package/es/components/appointmentBooking/components/Content/index.js +28 -44
- package/es/components/appointmentBooking/components/Content/index.less +23 -1
- 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/Footer/index.js +5 -5
- package/es/components/appointmentBooking/components/Form/index.js +161 -61
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +47 -61
- package/es/components/appointmentBooking/components/Resource/index.js +102 -119
- package/es/components/appointmentBooking/components/Services/index.js +50 -25
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/context.js +3 -43
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +3 -1
- package/es/components/appointmentBooking/hooks.js +215 -294
- package/es/components/appointmentBooking/utils.d.ts +2 -88
- package/es/components/appointmentBooking/utils.js +63 -325
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- 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 +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -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/Lists.d.ts +0 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- 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/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/booking/utils.js +19 -11
- 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 +1 -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.js +218 -73
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.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/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/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 +3 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/index.js +70 -13
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- 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/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -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/index.d.ts +0 -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/index.d.ts +0 -1
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.js +4 -2
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- 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/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/index.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/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Cart/index.js +30 -18
- package/lib/components/Sales/Cart/types.d.ts +12 -0
- package/lib/components/Sales/Cart/utils.d.ts +23 -0
- package/lib/components/Sales/Cart/utils.js +149 -0
- package/lib/components/Sales/Checkout/utils.d.ts +9 -1
- package/lib/components/Sales/Checkout/utils.js +18 -4
- package/lib/components/Sales/Event/Detail.d.ts +2 -0
- package/lib/components/Sales/Event/Detail.js +34 -10
- package/lib/components/Sales/Event/serve.d.ts +10 -0
- package/lib/components/Sales/Event/serve.js +5 -2
- package/lib/components/Sales/Summary/utils.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +7 -2
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +10 -34
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +43 -6
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
- package/lib/components/appointmentBooking/components/Content/index.js +28 -42
- package/lib/components/appointmentBooking/components/Content/index.less +23 -1
- 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 +98 -54
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +19 -36
- package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
- package/lib/components/appointmentBooking/components/Services/index.js +18 -10
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/context.js +4 -48
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +3 -1
- package/lib/components/appointmentBooking/hooks.js +62 -142
- package/lib/components/appointmentBooking/utils.d.ts +2 -88
- package/lib/components/appointmentBooking/utils.js +51 -191
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- 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 +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/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/Lists.d.ts +0 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/booking/utils.js +5 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- 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.js +128 -42
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.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/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/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 +3 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +79 -24
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/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/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/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/TabProduct/index.js +6 -2
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.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/lib/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
|
@@ -75,6 +75,7 @@ export declare const useAppointmentBookingResource: () => {
|
|
|
75
75
|
resources: any;
|
|
76
76
|
resourceCodes: any;
|
|
77
77
|
};
|
|
78
|
+
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
78
79
|
};
|
|
79
80
|
/**
|
|
80
81
|
* @title: 是否跳过资源选择步骤
|
|
@@ -84,7 +85,7 @@ export declare const useAppointmentBookingResource: () => {
|
|
|
84
85
|
* @Date: 2025-04-21 11:47
|
|
85
86
|
*/
|
|
86
87
|
export declare const useIsSkipResourceStep: () => {
|
|
87
|
-
checkSkipResourceStep: () => Promise<boolean>;
|
|
88
|
+
checkSkipResourceStep: (isSkipUpdateFormStep?: boolean) => Promise<boolean>;
|
|
88
89
|
};
|
|
89
90
|
/**
|
|
90
91
|
* @title: 获取预约配置
|
|
@@ -96,6 +97,7 @@ export declare const useIsSkipResourceStep: () => {
|
|
|
96
97
|
export declare const useAppointmentBookingSetting: () => {
|
|
97
98
|
isDateSelectedFirst: boolean;
|
|
98
99
|
isFormSubject: boolean;
|
|
100
|
+
isRetailTemplate: any;
|
|
99
101
|
customPageId: any;
|
|
100
102
|
channel: any;
|
|
101
103
|
bookingSubject: any;
|
|
@@ -48,7 +48,7 @@ var import_useEngineContext = require("../../hooks/useEngineContext");
|
|
|
48
48
|
var import_useEngineContext2 = __toESM(require("../../hooks/useEngineContext"));
|
|
49
49
|
var import_utils2 = require("./utils");
|
|
50
50
|
var import_context = require("./context");
|
|
51
|
-
var import_utils3 = require("./components/
|
|
51
|
+
var import_utils3 = require("./components/Cart/utils");
|
|
52
52
|
var useAppointmentBooking = () => {
|
|
53
53
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
54
54
|
return pisellOS.getModule("appointmentBooking");
|
|
@@ -66,13 +66,9 @@ var contextUtils = () => {
|
|
|
66
66
|
var useAppointmentBookingStep = () => {
|
|
67
67
|
var _a, _b, _c;
|
|
68
68
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
69
|
-
const { appointmentBooking, setCurrentStep,
|
|
69
|
+
const { appointmentBooking, setCurrentStep, policyIdsRef, openPolicy } = (0, import_context.useAppointmentBookingContext)();
|
|
70
|
+
const { isRetailTemplate } = useAppointmentBookingSetting();
|
|
70
71
|
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) || [];
|
|
71
|
-
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
72
|
-
const { isFormSubject } = useAppointmentBookingSetting();
|
|
73
|
-
const { accountLists, getHolders, checkAccount } = useAppointmentBookingAccount();
|
|
74
|
-
const { getResourceList } = useAppointmentBookingResource();
|
|
75
|
-
const utils = contextUtils();
|
|
76
72
|
const getCurrentAndLastStep = () => {
|
|
77
73
|
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
78
74
|
setCurrentStep(currentStep);
|
|
@@ -119,103 +115,27 @@ var useAppointmentBookingStep = () => {
|
|
|
119
115
|
});
|
|
120
116
|
};
|
|
121
117
|
const nextStep = () => {
|
|
122
|
-
var _a2, _b2, _c2, _d
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (currentKey == null ? void 0 : currentKey.startsWith("select-resource")) {
|
|
126
|
-
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)((currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) || [], appointmentBooking, utils);
|
|
127
|
-
if (hasError) {
|
|
128
|
-
(0, import_utils3.scrollToFirstErrorCard)();
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
(_a2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _a2.forEach((cart) => {
|
|
132
|
-
var _a3, _b3;
|
|
133
|
-
const selectedResource2 = cart == null ? void 0 : cart.currentSelectedResource;
|
|
134
|
-
const resourceItem = (selectedResource2 == null ? void 0 : selectedResource2.resourceItem) || {};
|
|
135
|
-
const formId = (_a3 = selectedResource2 == null ? void 0 : selectedResource2.renderItem) == null ? void 0 : _a3.resource_form_id;
|
|
136
|
-
const policyId = (_b3 = selectedResource2 == null ? void 0 : selectedResource2.renderItem) == null ? void 0 : _b3.policy_id;
|
|
137
|
-
const formKey = `fill-form_@${resourceItem == null ? void 0 : resourceItem.form_id}-${resourceItem == null ? void 0 : resourceItem.code}-${cart == null ? void 0 : cart._id}-${formId}-${policyId}`;
|
|
138
|
-
if (formId) {
|
|
139
|
-
const description = import_utils.locales.getText("pisell2.appointment.fill-form");
|
|
140
|
-
const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
|
|
141
|
-
appointmentBooking.addStep({ key: formKey, description }, beforeKey);
|
|
142
|
-
} else {
|
|
143
|
-
appointmentBooking.removeStep(formKey);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
const selectedResource = (_c2 = (_b2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.currentSelectedResource;
|
|
147
|
-
if (selectedResource) {
|
|
148
|
-
const originRenderLists = ((_d = selectedResource == null ? void 0 : selectedResource.resourceItem) == null ? void 0 : _d.originRenderLists) || [];
|
|
149
|
-
const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex((item) => {
|
|
150
|
-
var _a3;
|
|
151
|
-
return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
|
|
152
|
-
});
|
|
153
|
-
const nextResource = originRenderLists == null ? void 0 : originRenderLists[currentResourceIndex + 1];
|
|
154
|
-
const resourceKey = `select-resource_@${nextResource == null ? void 0 : nextResource.form_id}-${nextResource == null ? void 0 : nextResource.code}`;
|
|
155
|
-
if (nextResource) {
|
|
156
|
-
const beforeKey = (_e = stepList2[stepList2.length - 2]) == null ? void 0 : _e.key;
|
|
157
|
-
appointmentBooking.addStep({ key: resourceKey, description: "" }, beforeKey);
|
|
158
|
-
} else {
|
|
159
|
-
appointmentBooking.removeStep(resourceKey);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
118
|
+
var _a2, _b2, _c2, _d;
|
|
119
|
+
if (isRetailTemplate) {
|
|
120
|
+
return appointmentBooking.next();
|
|
162
121
|
}
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return appointmentBooking.next();
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
const checkLogin = () => {
|
|
184
|
-
if (!isLogin) {
|
|
185
|
-
return openLoginModal({
|
|
186
|
-
callback: (status) => {
|
|
187
|
-
var _a3;
|
|
188
|
-
if (status === "success") {
|
|
189
|
-
if (!isFormSubject) {
|
|
190
|
-
const user = JSON.parse(((_a3 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a3.get("customer")) || "{}");
|
|
191
|
-
const currentUser = (0, import_utils2.formatCustomer)(user);
|
|
192
|
-
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
193
|
-
appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
|
|
194
|
-
} else {
|
|
195
|
-
getHolders();
|
|
196
|
-
}
|
|
197
|
-
checkHolder();
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
} else {
|
|
202
|
-
return checkHolder();
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
if ((nextStep2 == null ? void 0 : nextStep2.key) !== "confirm-information") {
|
|
206
|
-
if (!(renderItem == null ? void 0 : renderItem.policy_id)) {
|
|
207
|
-
return appointmentBooking.next();
|
|
208
|
-
}
|
|
209
|
-
return openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
|
|
210
|
-
const cartItem = carts == null ? void 0 : carts[0];
|
|
211
|
-
appointmentBooking.updateCart({
|
|
212
|
-
_id: cartItem == null ? void 0 : cartItem._id,
|
|
213
|
-
...cartItem
|
|
214
|
-
});
|
|
215
|
-
appointmentBooking.next();
|
|
216
|
-
});
|
|
217
|
-
} else {
|
|
218
|
-
return checkLogin();
|
|
122
|
+
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
123
|
+
const stepList2 = ((_c2 = (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.step) == null ? void 0 : _b2.store) == null ? void 0 : _c2.stepList) || [];
|
|
124
|
+
if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepList2 == null ? void 0 : stepList2.length)) {
|
|
125
|
+
if ((_d = policyIdsRef == null ? void 0 : policyIdsRef.current) == null ? void 0 : _d.length) {
|
|
126
|
+
let idx = 0;
|
|
127
|
+
const showNextPolicy = () => {
|
|
128
|
+
if (idx < policyIdsRef.current.length) {
|
|
129
|
+
openPolicy({ id: policyIdsRef.current[idx] }, () => {
|
|
130
|
+
idx++;
|
|
131
|
+
showNextPolicy();
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
appointmentBooking.next();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
showNextPolicy();
|
|
138
|
+
return;
|
|
219
139
|
}
|
|
220
140
|
}
|
|
221
141
|
appointmentBooking.next();
|
|
@@ -254,29 +174,14 @@ var useAppointmentBookingCart = () => {
|
|
|
254
174
|
var _a;
|
|
255
175
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
256
176
|
const utils = contextUtils();
|
|
257
|
-
const { appointmentBooking,
|
|
177
|
+
const { appointmentBooking, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
|
|
258
178
|
const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
259
179
|
const getCartAndSummary = async () => {
|
|
260
|
-
var _a2;
|
|
261
|
-
const locale = ((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("umi_locale")) || "en-US";
|
|
262
|
-
const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
|
|
263
180
|
const carts = await appointmentBooking.getCart();
|
|
264
|
-
const accountLists = await appointmentBooking.getAccounts();
|
|
265
181
|
const newCarts = carts == null ? void 0 : carts.map((item) => {
|
|
266
|
-
var _a3;
|
|
267
182
|
return {
|
|
268
183
|
...item,
|
|
269
|
-
addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name)
|
|
270
|
-
format: ["HH:mm", "HH:mm"],
|
|
271
|
-
show_time: true,
|
|
272
|
-
duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
|
|
273
|
-
locale,
|
|
274
|
-
symbol,
|
|
275
|
-
holders: (0, import_utils2.formatHolder)(accountLists),
|
|
276
|
-
allowClearHolder: true,
|
|
277
|
-
allowClearResource: true,
|
|
278
|
-
isErrorHolder: isErrorHolder || false,
|
|
279
|
-
isMultipleResource: true
|
|
184
|
+
addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name)
|
|
280
185
|
};
|
|
281
186
|
});
|
|
282
187
|
setCarts(newCarts || []);
|
|
@@ -369,7 +274,7 @@ var useAppointmentBookingAccount = () => {
|
|
|
369
274
|
return { accountLists, getHolders, form_id, addAccount, checkAccount };
|
|
370
275
|
};
|
|
371
276
|
var useAppointmentBookingResource = () => {
|
|
372
|
-
const { appointmentBooking, setResources, setTimes } = (0, import_context.useAppointmentBookingContext)();
|
|
277
|
+
const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
373
278
|
const { resourceSort } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
374
279
|
const getResourceList = () => {
|
|
375
280
|
var _a;
|
|
@@ -391,47 +296,60 @@ var useAppointmentBookingResource = () => {
|
|
|
391
296
|
const data = await appointmentBooking.getTimeSlotByAllResources(code);
|
|
392
297
|
setTimes(data || []);
|
|
393
298
|
};
|
|
394
|
-
|
|
299
|
+
const autoSelectAllProductResources = async (index) => {
|
|
300
|
+
const { resourceCodes } = getResourceList();
|
|
301
|
+
const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
|
|
302
|
+
const data = await appointmentBooking.getTimeSlotByAllResources(code);
|
|
303
|
+
let res = await appointmentBooking.autoSelectAllProductResources(code);
|
|
304
|
+
setResourceOtherParams({
|
|
305
|
+
...resourceOtherParams,
|
|
306
|
+
...res,
|
|
307
|
+
resourceCodes
|
|
308
|
+
});
|
|
309
|
+
return res;
|
|
310
|
+
};
|
|
311
|
+
return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
|
|
395
312
|
};
|
|
396
313
|
var useIsSkipResourceStep = () => {
|
|
397
|
-
|
|
398
|
-
const {
|
|
314
|
+
var _a, _b, _c;
|
|
315
|
+
const { currentStep, setCarts, setPolicyIds } = (0, import_context.useAppointmentBookingContext)();
|
|
316
|
+
const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
|
|
399
317
|
const { isFormSubject } = useAppointmentBookingSetting();
|
|
400
318
|
const appointmentBooking = useAppointmentBooking();
|
|
319
|
+
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) || [];
|
|
320
|
+
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
321
|
+
const { getHolders, checkAccount } = useAppointmentBookingAccount();
|
|
401
322
|
const { nextStep } = useAppointmentBookingStep();
|
|
402
|
-
const
|
|
323
|
+
const utils = contextUtils();
|
|
324
|
+
const checkSkipResourceStep = async (isSkipUpdateFormStep) => {
|
|
325
|
+
var _a2, _b2, _c2, _d, _e;
|
|
403
326
|
try {
|
|
404
|
-
const { resources } = getResourceList();
|
|
405
327
|
const accountLists = await appointmentBooking.getAccounts();
|
|
406
|
-
const
|
|
407
|
-
if (isSystem) {
|
|
408
|
-
nextStep();
|
|
409
|
-
return true;
|
|
410
|
-
}
|
|
328
|
+
const carts = await appointmentBooking.getCart();
|
|
411
329
|
if ((accountLists == null ? void 0 : accountLists.length) === 1 || isFormSubject) {
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
if ((
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
if (_isSkip) {
|
|
420
|
-
nextStep();
|
|
330
|
+
const res = await autoSelectAllProductResources();
|
|
331
|
+
const { resources } = getResourceList();
|
|
332
|
+
if (!((_a2 = res == null ? void 0 : res.errorList) == null ? void 0 : _a2.length) && ((_e = (_d = (_c2 = (_b2 = resources == null ? void 0 : resources[0]) == null ? void 0 : _b2.resources) == null ? void 0 : _c2[0]) == null ? void 0 : _d.renderList) == null ? void 0 : _e.length) === 1) {
|
|
333
|
+
if (!isSkipUpdateFormStep) {
|
|
334
|
+
const resultCarts = (0, import_utils2.formatCartsResources)(carts, resources, setPolicyIds);
|
|
335
|
+
(0, import_utils2.checkHasFormStep)({ nextStep, isSkip: true, openLoginModal, utils, accountLists, getHolders, checkHolder: import_utils3.checkHolder, setCarts, checkAccount, carts, isFormSubject, hasResourceFormId: (resultCarts == null ? void 0 : resultCarts.length) > 0, currentStep, stepList, appointmentBooking, locales: import_utils.locales, isLogin });
|
|
336
|
+
}
|
|
421
337
|
return true;
|
|
338
|
+
} else {
|
|
339
|
+
return false;
|
|
422
340
|
}
|
|
423
|
-
return _isSkip;
|
|
424
341
|
} else {
|
|
425
342
|
return false;
|
|
426
343
|
}
|
|
427
344
|
} catch (error) {
|
|
345
|
+
console.log(error, "checkSkipResourceStep33");
|
|
428
346
|
return false;
|
|
429
347
|
}
|
|
430
348
|
};
|
|
431
349
|
return { checkSkipResourceStep };
|
|
432
350
|
};
|
|
433
351
|
var useAppointmentBookingSetting = () => {
|
|
434
|
-
var _a;
|
|
352
|
+
var _a, _b;
|
|
435
353
|
const utils = contextUtils();
|
|
436
354
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
437
355
|
const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
@@ -449,6 +367,8 @@ var useAppointmentBookingSetting = () => {
|
|
|
449
367
|
isDateSelectedFirst: bookingProcess === "date_first",
|
|
450
368
|
// 主体是否是表单
|
|
451
369
|
isFormSubject: (bookingSubject == null ? void 0 : bookingSubject.type) === "form",
|
|
370
|
+
// 是否是零售模版
|
|
371
|
+
isRetailTemplate: ((_b = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _b.isRetailTemplate) || false,
|
|
452
372
|
customPageId,
|
|
453
373
|
channel,
|
|
454
374
|
bookingSubject,
|
|
@@ -101,7 +101,7 @@ export declare function updateLists<T extends Record<string, any>>(list: T[], ke
|
|
|
101
101
|
* @Author: WangHan
|
|
102
102
|
* @Date: 2025-04-27 17:27
|
|
103
103
|
*/
|
|
104
|
-
export declare const updateBookingFormStorage: (bookingForm: any, id: number
|
|
104
|
+
export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
|
|
105
105
|
export declare const Toast: (text: string) => void;
|
|
106
106
|
/**
|
|
107
107
|
* @title: 添加或移除表单步骤
|
|
@@ -111,90 +111,4 @@ export declare const Toast: (text: string) => void;
|
|
|
111
111
|
* @Author: WangHan
|
|
112
112
|
* @Date: 2025-05-06 21:51
|
|
113
113
|
*/
|
|
114
|
-
export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) =>
|
|
115
|
-
export declare const getCartCurrentResourceData: (cart: any, currentKey: any, resources: any[]) => any;
|
|
116
|
-
/**
|
|
117
|
-
* @title: 获取购物车资源列表
|
|
118
|
-
* @description:
|
|
119
|
-
* @return {*}
|
|
120
|
-
* @Author: WangHan
|
|
121
|
-
* @Date: 2025-05-25 13:56
|
|
122
|
-
*/
|
|
123
|
-
export declare const getMultiResources: (cart: any, resourceItem: any, currentKey: string) => any[];
|
|
124
|
-
export declare const getCurrentBoard: (appointmentBooking: any, code: string) => any;
|
|
125
|
-
/**
|
|
126
|
-
* @title:
|
|
127
|
-
* @description: 根据资源code获取资源标题
|
|
128
|
-
* @param {any} appointmentBooking
|
|
129
|
-
* @param {string} code
|
|
130
|
-
* @return {*}
|
|
131
|
-
* @Author: WangHan
|
|
132
|
-
* @Date: 2025-05-24 18:51
|
|
133
|
-
*/
|
|
134
|
-
export declare const getResourceTitle: (appointmentBooking: any, code: string, utils: any, originResource: any) => string;
|
|
135
|
-
/**
|
|
136
|
-
* @title: 监测购物车中是否有没有选择资源的
|
|
137
|
-
* @description:
|
|
138
|
-
* @param {any} carts
|
|
139
|
-
* @return {*}
|
|
140
|
-
* @Author: WangHan
|
|
141
|
-
* @Date: 2025-05-24 18:47
|
|
142
|
-
*/
|
|
143
|
-
export declare const checkAndMarkCartRenderError: (carts: any, appointmentBooking?: any, utils?: any) => {
|
|
144
|
-
hasError: boolean;
|
|
145
|
-
updatedCartList: any;
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* @title: 查表表单步骤插入到哪个步骤的后面的key
|
|
149
|
-
* @description:
|
|
150
|
-
* @param {string} currentKey
|
|
151
|
-
* @param {any} stepList
|
|
152
|
-
* @return {*}
|
|
153
|
-
* @Author: WangHan
|
|
154
|
-
* @Date: 2025-05-24 19:05
|
|
155
|
-
*/
|
|
156
|
-
export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[]) => any;
|
|
157
|
-
/**
|
|
158
|
-
* @title: 监测holder数据
|
|
159
|
-
* @description:
|
|
160
|
-
* @param {any} isFormSubject
|
|
161
|
-
* @param {any} checkAccount
|
|
162
|
-
* @param {any} carts
|
|
163
|
-
* @return {*}
|
|
164
|
-
* @Author: WangHan
|
|
165
|
-
* @Date: 2025-05-24 22:46
|
|
166
|
-
*/
|
|
167
|
-
export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
|
|
168
|
-
hasError: boolean;
|
|
169
|
-
updatedCartList: any[];
|
|
170
|
-
};
|
|
171
|
-
export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
|
|
172
|
-
isRequired: boolean;
|
|
173
|
-
isSystem: boolean;
|
|
174
|
-
isSkip: boolean;
|
|
175
|
-
form_id: number;
|
|
176
|
-
form_code: any;
|
|
177
|
-
cart_id: string;
|
|
178
|
-
resource_form_id: string;
|
|
179
|
-
policy_id: string;
|
|
180
|
-
} | {
|
|
181
|
-
isRequired?: undefined;
|
|
182
|
-
isSystem?: undefined;
|
|
183
|
-
isSkip?: undefined;
|
|
184
|
-
form_id?: undefined;
|
|
185
|
-
form_code?: undefined;
|
|
186
|
-
cart_id?: undefined;
|
|
187
|
-
resource_form_id?: undefined;
|
|
188
|
-
policy_id?: undefined;
|
|
189
|
-
};
|
|
190
|
-
export declare const currentRenderLists: (resources: any[], code: any) => any;
|
|
191
|
-
/**
|
|
192
|
-
* @title: 更新购物车
|
|
193
|
-
* @description:
|
|
194
|
-
* @param {any} carts
|
|
195
|
-
* @param {any} value
|
|
196
|
-
* @return {*}
|
|
197
|
-
* @Author: WangHan
|
|
198
|
-
* @Date: 2025-05-25 23:17
|
|
199
|
-
*/
|
|
200
|
-
export declare const updateCartResources: (item: any, value: any) => any;
|
|
114
|
+
export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
|