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 <adhabal2002@gmail.com>
This commit is contained in:
Praash
2025-07-14 15:15:38 +00:00
committed by GitHub
co-authored by Anik Dhabal Babu Kartik Saini cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> unknown
parent 96a659ae5a
commit a9172fd832
3 changed files with 10 additions and 0 deletions
@@ -558,6 +558,14 @@ export default function Success(props: PageProps) {
<div className="col-span-2 mb-6 last:mb-0">{cancellationReason}</div>
</>
)}
{isCancelled && bookingInfo?.cancelledBy && (
<>
<div className="font-medium">{t("cancelled_by")}</div>
<div className="col-span-2 mb-6 last:mb-0">
<p className="break-words">{bookingInfo?.cancelledBy}</p>
</div>
</>
)}
{previousBooking && (
<>
<div className="font-medium">{t("rescheduled_by")}</div>
@@ -19,6 +19,7 @@ const getUserBooking = async (uid: string) => {
status: true,
metadata: true,
cancellationReason: true,
cancelledBy: true,
responses: true,
rejectionReason: true,
userPrimaryEmail: true,
@@ -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",