diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsx index f27a2a36f4..a8f90b0f1b 100644 --- a/apps/web/components/booking/pages/BookingPage.tsx +++ b/apps/web/components/booking/pages/BookingPage.tsx @@ -143,6 +143,7 @@ const BookingPage = ({ isSuccessBookingPage: true, email: bookingForm.getValues("email"), eventTypeSlug: eventType.slug, + formerTime: booking?.startTime.toString(), }, }); }, @@ -158,6 +159,7 @@ const BookingPage = ({ allRemainingBookings: true, email: bookingForm.getValues("email"), eventTypeSlug: eventType.slug, + formerTime: booking?.startTime.toString(), }, }); }, diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsx index ce9f890cf3..6a39a2db20 100644 --- a/apps/web/pages/booking/[uid].tsx +++ b/apps/web/pages/booking/[uid].tsx @@ -168,6 +168,7 @@ const querySchema = z.object({ changes: stringToBoolean, reschedule: stringToBoolean, isSuccessBookingPage: z.string().optional(), + formerTime: z.string().optional(), }); export default function Success(props: SuccessProps) { @@ -179,6 +180,7 @@ export default function Success(props: SuccessProps) { isSuccessBookingPage, cancel: isCancellationMode, changes, + formerTime, } = querySchema.parse(router.query); if ((isCancellationMode || changes) && typeof window !== "undefined") { @@ -425,9 +427,11 @@ export default function Success(props: SuccessProps) {

{getTitle()}

- {isCancelled && cancellationReason && ( + {(isCancelled || reschedule) && cancellationReason && ( <> -
{t("reason")}
+
+ {isCancelled ? t("reason") : t("reschedule_reason_success_page")} +
{cancellationReason}
)} @@ -435,6 +439,19 @@ export default function Success(props: SuccessProps) {
{eventName}
{t("when")}
+ {reschedule && !!formerTime && ( +

+ +

+ )} (
- {dayjs.tz(dateStr, timeZone()).format("MMMM DD, YYYY")} + {dayjs.tz(dateStr, timeZone()).format("dddd, DD MMMM YYYY")}
- {formatTime(dateStr, is24h ? 24 : 12, timeZone())} -{" "} - {formatTime(dayjs(dateStr).add(duration, "m"), is24h ? 24 : 12, timeZone())}{" "} + {formatTime(dateStr, is24h ? 24 : 12, timeZone().toLowerCase())} -{" "} + {formatTime(dayjs(dateStr).add(duration, "m"), is24h ? 24 : 12, timeZone().toLowerCase())}{" "} ({timeZone()})
))} @@ -808,10 +825,10 @@ export function RecurringBookings({ {eventType.recurringEvent?.count && recurringBookingsSorted.slice(4).map((dateStr: string, idx: number) => (
- {dayjs.tz(dateStr, timeZone()).format("MMMM DD, YYYY")} + {dayjs.tz(dateStr, timeZone()).format("dddd, DD MMMM YYYY")}
- {formatTime(dateStr, is24h ? 24 : 12, timeZone())} -{" "} - {formatTime(dayjs(dateStr).add(duration, "m"), is24h ? 24 : 12, timeZone())}{" "} + {formatTime(dateStr, is24h ? 24 : 12, timeZone().toLowerCase())} -{" "} + {formatTime(dayjs(dateStr).add(duration, "m"), is24h ? 24 : 12, timeZone().toLowerCase())}{" "} ({timeZone()})
))} @@ -824,10 +841,10 @@ export function RecurringBookings({ return (
- {dayjs.tz(date, timeZone()).format("MMMM DD, YYYY")} + {dayjs.tz(date, timeZone()).format("dddd, DD MMMM YYYY")}
- {formatTime(date, is24h ? 24 : 12, timeZone())} -{" "} - {formatTime(dayjs(date).add(duration, "m"), is24h ? 24 : 12, timeZone())}{" "} + {formatTime(date, is24h ? 24 : 12, timeZone().toLowerCase())} -{" "} + {formatTime(dayjs(date).add(duration, "m"), is24h ? 24 : 12, timeZone().toLowerCase())}{" "} ({timeZone()})
); diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index 62f11e2a53..50536e5666 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -1395,6 +1395,7 @@ "attendee_email_info": "The person booking's email", "kbar_search_placeholder": "Type a command or search...", "invalid_credential": "Oh no! Looks like permission expired or was revoked. Please reinstall again.", + "reschedule_reason_success_page": "Reschedule reason", "choose_common_schedule_team_event": "Choose a common schedule", "choose_common_schedule_team_event_description": "Enable this if you want to use a common schedule between hosts. When disabled, each host will be booked based on their default schedule.", "reason": "Reason",