Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added cancelled by to booking detail view #18521

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/web/modules/bookings/views/bookings-single-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export default function Success(props: PageProps) {
const status = bookingInfo?.status;
const reschedule = bookingInfo.status === BookingStatus.ACCEPTED;
const cancellationReason = bookingInfo.cancellationReason || bookingInfo.rejectionReason;
const cancelledBy = bookingInfo.cancelledBy || "Guest User";

const attendees = bookingInfo?.attendees;

Expand Down Expand Up @@ -534,6 +535,12 @@ export default function Success(props: PageProps) {
<div className="col-span-2 mb-6 last:mb-0">{cancellationReason}</div>
</>
)}
{isCancelled && (
<>
<div className="font-medium">{isCancelled && t("cancelled_by")}</div>
<div className="col-span-2 mb-6 last:mb-0">{cancelledBy}</div>
Praashh marked this conversation as resolved.
Show resolved Hide resolved
</>
)}
<div className="font-medium">{t("what")}</div>
<div className="col-span-2 mb-6 last:mb-0" data-testid="booking-title">
{isRoundRobin ? bookingInfo.title : eventName}
Expand Down
1 change: 1 addition & 0 deletions apps/web/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,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_placeholder": "Why are you cancelling?",
"rejection_reason_placeholder": "Why are you rejecting?",
"rejection_reason": "Reason for rejecting",
Expand Down
1 change: 1 addition & 0 deletions packages/features/bookings/lib/getUserBooking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const getUserBooking = async (uid: string) => {
status: true,
metadata: true,
cancellationReason: true,
cancelledBy: true,
responses: true,
rejectionReason: true,
userPrimaryEmail: true,
Expand Down
Loading