diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsx index f91e22c50f..af7b779dc8 100644 --- a/apps/web/pages/booking/[uid].tsx +++ b/apps/web/pages/booking/[uid].tsx @@ -115,6 +115,13 @@ export default function Success(props: SuccessProps) { const tz = props.tz ? props.tz : isSuccessBookingPage && attendeeTimeZone ? attendeeTimeZone : timeZone(); const location = props.bookingInfo.location as ReturnType; + let rescheduleLocation: string | undefined; + if ( + typeof props.bookingInfo.responses.location === "object" && + "optionValue" in props.bookingInfo.responses.location + ) { + rescheduleLocation = props.bookingInfo.responses.location.optionValue; + } const locationVideoCallUrl: string | undefined = bookingMetadataSchema.parse( props?.bookingInfo?.metadata || {} @@ -295,7 +302,14 @@ export default function Success(props: SuccessProps) { bookingInfo.status ); + const rescheduleLocationToDisplay = getSuccessPageLocationMessage( + rescheduleLocation ?? "", + t, + bookingInfo.status + ); + const providerName = guessEventLocationType(location)?.label; + const rescheduleProviderName = guessEventLocationType(rescheduleLocation)?.label; return (
@@ -467,18 +481,50 @@ export default function Success(props: SuccessProps) { <>
{t("where")}
- {locationToDisplay.startsWith("http") ? ( - - {providerName || "Link"} - - + {!rescheduleLocation || locationToDisplay === rescheduleLocationToDisplay ? ( + locationToDisplay.startsWith("http") ? ( + + {providerName || "Link"} + + + ) : ( + locationToDisplay + ) ) : ( - locationToDisplay + <> + {!!formerTime && + (locationToDisplay.startsWith("http") ? ( + + {providerName || "Link"} + + + ) : ( +

{locationToDisplay}

+ ))} + {rescheduleLocationToDisplay.startsWith("http") ? ( + + {rescheduleProviderName || "Link"} + + + ) : ( + rescheduleLocationToDisplay + )} + )}
diff --git a/packages/features/bookings/Booker/components/BookEventForm/BookingFields.tsx b/packages/features/bookings/Booker/components/BookEventForm/BookingFields.tsx index ab1505a787..a10cdae5b1 100644 --- a/packages/features/bookings/Booker/components/BookEventForm/BookingFields.tsx +++ b/packages/features/bookings/Booker/components/BookEventForm/BookingFields.tsx @@ -77,6 +77,13 @@ export const BookingFields = ({ return null; } + // Attendee location field can be edited during reschedule + if (field.name === SystemField.Enum.location) { + if (locationResponse?.value === "attendeeInPerson" || "phone") { + readOnly = false; + } + } + // Dynamically populate location field options if (field.name === SystemField.Enum.location && field.type === "radioInput") { if (!field.optionsInputs) {