From a9172fd832ab8fe5fe2bbf39115889cbd9224537 Mon Sep 17 00:00:00 2001 From: Praash <99237795+Praashh@users.noreply.github.com> Date: Mon, 14 Jul 2025 20:45:38 +0530 Subject: [PATCH] feat: added cancelled by to booking detail view (#18521) * feat: added cancelled by to booking detail view * fix: var naming * handled case for guest user * move cancelled by outside reason * Update bookings-single-view.tsx * Update apps/web/modules/bookings/views/bookings-single-view.tsx Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * fix --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Co-authored-by: Kartik Saini <41051387+kart1ka@users.noreply.github.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Co-authored-by: unknown --- apps/web/modules/bookings/views/bookings-single-view.tsx | 8 ++++++++ packages/features/bookings/lib/getUserBooking.ts | 1 + packages/lib/server/locales/en/common.json | 1 + 3 files changed, 10 insertions(+) diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx index f5372f603b..71c18e8792 100644 --- a/apps/web/modules/bookings/views/bookings-single-view.tsx +++ b/apps/web/modules/bookings/views/bookings-single-view.tsx @@ -558,6 +558,14 @@ export default function Success(props: PageProps) {
{cancellationReason}
)} + {isCancelled && bookingInfo?.cancelledBy && ( + <> +
{t("cancelled_by")}
+
+

{bookingInfo?.cancelledBy}

+
+ + )} {previousBooking && ( <>
{t("rescheduled_by")}
diff --git a/packages/features/bookings/lib/getUserBooking.ts b/packages/features/bookings/lib/getUserBooking.ts index 2c021bee3d..a337df39b4 100644 --- a/packages/features/bookings/lib/getUserBooking.ts +++ b/packages/features/bookings/lib/getUserBooking.ts @@ -19,6 +19,7 @@ const getUserBooking = async (uid: string) => { status: true, metadata: true, cancellationReason: true, + cancelledBy: true, responses: true, rejectionReason: true, userPrimaryEmail: true, diff --git a/packages/lib/server/locales/en/common.json b/packages/lib/server/locales/en/common.json index b9103f0d9a..547c8139bb 100644 --- a/packages/lib/server/locales/en/common.json +++ b/packages/lib/server/locales/en/common.json @@ -75,6 +75,7 @@ "you_can_view_booking_details_with_this_url": "You can view the booking details from this url {{url}} and add the event to your calendar", "no_options_available": "No options available", "cancellation_reason": "Reason for cancellation (optional)", + "cancelled_by":"Cancelled By", "cancellation_reason_host": "Reason for cancellation", "cancellation_reason_placeholder": "Why are you cancelling?", "notify_attendee_cancellation_reason_warning": "Cancellation reason will be shared with guests",