From 7dab1003822b3c5f4edaefb5a65e8d9e56692085 Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Wed, 19 Mar 2025 17:47:49 +0530 Subject: [PATCH] fix: unskip confirm step if there are multiple location (#20051) --- packages/features/bookings/Booker/Booker.tsx | 3 ++- .../bookings/Booker/components/hooks/useSkipConfirmStep.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/features/bookings/Booker/Booker.tsx b/packages/features/bookings/Booker/Booker.tsx index 0840ed04dc..cd5223826a 100644 --- a/packages/features/bookings/Booker/Booker.tsx +++ b/packages/features/bookings/Booker/Booker.tsx @@ -171,7 +171,8 @@ const BookerComponent = ({ bookerState, isInstantMeeting, layout == BookerLayouts.WEEK_VIEW, - event?.data?.bookingFields + event?.data?.bookingFields, + event?.data?.locations ); // Cloudflare Turnstile Captcha diff --git a/packages/features/bookings/Booker/components/hooks/useSkipConfirmStep.ts b/packages/features/bookings/Booker/components/hooks/useSkipConfirmStep.ts index d5aae56577..3218dc4e55 100644 --- a/packages/features/bookings/Booker/components/hooks/useSkipConfirmStep.ts +++ b/packages/features/bookings/Booker/components/hooks/useSkipConfirmStep.ts @@ -12,7 +12,8 @@ const useSkipConfirmStep = ( bookerState: BookerState, isInstantMeeting: boolean, isWeekView: boolean, - bookingFields?: BookerEvent["bookingFields"] + bookingFields?: BookerEvent["bookingFields"], + locations?: BookerEvent["locations"] ) => { const bookingFormValues = bookingForm.getValues(); @@ -21,7 +22,7 @@ const useSkipConfirmStep = ( useEffect(() => { const checkSkipStep = async () => { - if (!bookingFields) { + if (!bookingFields || (locations && locations.length > 1)) { setCanSkip(false); return; }