feat: added rescheduled UI to Booking page and Booking Listing page (#20401)
* feat: add rescheduling to UI - Introduced displaying the original booking information. - Updated UI components to show rescheduling status and details. * fix: update link styling in booking single view - Changed link text size to small for better UI consistency in the booking details section. * refactor, type fixes * added missing margin * added rescheduled under other badges * optimised getting booking * updated namings and perf --------- Co-authored-by: amrit <[email protected]>
This commit is contained in:
1 parent
5ae50f8670
commit
d3d4a90776
7 files changed
+69
-1
No files matched your search
@@ -163,6 +163,7 @@ function BookingListItem(booking: BookingItemProps) {
|
||||
const isConfirmed = booking.status === BookingStatus.ACCEPTED;
|
||||
const isRejected = booking.status === BookingStatus.REJECTED;
|
||||
const isPending = booking.status === BookingStatus.PENDING;
|
||||
const isRescheduled = booking.fromReschedule !== null;
|
||||
const isRecurring = booking.recurringEventId !== null;
|
||||
const isTabRecurring = booking.listingStatus === "recurring";
|
||||
const isTabUnconfirmed = booking.listingStatus === "unconfirmed";
|
||||
@@ -730,6 +731,7 @@ function BookingListItem(booking: BookingItemProps) {
|
||||
recurringDates={recurringDates}
|
||||
userTimeFormat={userTimeFormat}
|
||||
userTimeZone={userTimeZone}
|
||||
isRescheduled={isRescheduled}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -750,12 +752,14 @@ const BookingItemBadges = ({
|
||||
recurringDates,
|
||||
userTimeFormat,
|
||||
userTimeZone,
|
||||
isRescheduled,
|
||||
}: {
|
||||
booking: BookingItemProps;
|
||||
isPending: boolean;
|
||||
recurringDates: Date[] | undefined;
|
||||
userTimeFormat: number | null | undefined;
|
||||
userTimeZone: string | undefined;
|
||||
isRescheduled: boolean;
|
||||
}) => {
|
||||
const { t } = useLocale();
|
||||
|
||||
@@ -766,6 +770,13 @@ const BookingItemBadges = ({
|
||||
{t("unconfirmed")}
|
||||
</Badge>
|
||||
)}
|
||||
{isRescheduled && (
|
||||
<Tooltip content={`${t("rescheduled_by")} ${booking.rescheduler}`}>
|
||||
<Badge variant="orange" className="ltr:mr-2 rtl:ml-2">
|
||||
{t("rescheduled")}
|
||||
</Badge>
|
||||
</Tooltip>
|
||||
)}
|
||||
{booking.eventType?.team && (
|
||||
<Badge className="ltr:mr-2 rtl:ml-2" variant="gray">
|
||||
{booking.eventType.team.name}
|
||||
|
||||
Reference in new issue
Block a user