diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx
index 53a5b228e4..1117883f9d 100644
--- a/apps/web/components/booking/BookingListItem.tsx
+++ b/apps/web/components/booking/BookingListItem.tsx
@@ -117,8 +117,7 @@ function BookingListItem(booking: BookingItemProps) {
},
{
id: "edit_booking",
- label: t("edit_booking"),
- icon: Icon.FiEdit,
+ label: t("edit"),
actions: [
{
id: "reschedule",
@@ -262,7 +261,7 @@ function BookingListItem(booking: BookingItemProps) {
-
+
{startTime}
@@ -270,65 +269,81 @@ function BookingListItem(booking: BookingItemProps) {
{dayjs(booking.startTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")} -{" "}
{dayjs(booking.endTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")}
-
- {booking.recurringBookings &&
- booking.eventType?.recurringEvent?.freq &&
- (booking.listingStatus === "recurring" || booking.listingStatus === "cancelled") && (
-
-
- (
- {aDate}
- ))}>
-
-
-
- {booking.status === BookingStatus.ACCEPTED
- ? `${t("event_remaining", {
- count: recurringDates.length,
- })}`
- : getEveryFreqFor({
- t,
- recurringEvent: booking.eventType.recurringEvent,
- recurringCount: booking.recurringBookings.length,
- })}
-
-
-
-
-
- )}
+
+ {isPending && (
+
+ {t("unconfirmed")}
+
+ )}
+
+ {booking.eventType?.team && (
+
+ {booking.eventType.team.name}
+
+ )}
+ {!!booking?.eventType?.price && !booking.paid && (
+
+ {t("pending_payment")}
+
+ )}
+
+
+
|
-
+ {/* Time and Badges for mobile */}
+
+
+ {startTime}
+
+ {dayjs(booking.startTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")} -{" "}
+ {dayjs(booking.endTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")}
+
+
+
+ {isPending && (
+
+ {t("unconfirmed")}
+
+ )}
+ {booking.eventType?.team && (
+
+ {booking.eventType.team.name}
+
+ )}
{!!booking?.eventType?.price && !booking.paid && (
-
+
{t("pending_payment")}
)}
+
+
+
+
+
+
{booking.title}
- {booking.eventType?.team && {booking.eventType.team.name}}
{!!booking?.eventType?.price && !booking.paid && (
Pending payment
)}
- {isPending && (
-
- {t("unconfirmed")}
-
- )}
{booking.description && (
)}
+
+
+ {isUpcoming && !isCancelled ? (
+ <>
+ {isPending && user?.id === booking.user?.id && }
+ {isConfirmed && }
+ {isRejected && {t("rejected")} }
+ >
+ ) : null}
+ {isPast && isPending && !isConfirmed ? : null}
+
+
|
-
-
+ |
{isUpcoming && !isCancelled ? (
<>
{isPending && user?.id === booking.user?.id && }
@@ -372,6 +398,54 @@ function BookingListItem(booking: BookingItemProps) {
);
}
+interface RecurringBookingsTooltipProps {
+ booking: BookingItemProps;
+ recurringStrings: string[];
+ recurringDates: Date[];
+}
+
+const RecurringBookingsTooltip = ({
+ booking,
+ recurringStrings,
+ recurringDates,
+}: RecurringBookingsTooltipProps) => {
+ const { t } = useLocale();
+
+ return (
+ (booking.recurringBookings &&
+ booking.eventType?.recurringEvent?.freq &&
+ (booking.listingStatus === "recurring" || booking.listingStatus === "cancelled") && (
+
+
+ (
+ {aDate}
+ ))}>
+
+
+
+ {booking.status === BookingStatus.ACCEPTED
+ ? `${t("event_remaining", {
+ count: recurringDates.length,
+ })}`
+ : getEveryFreqFor({
+ t,
+ recurringEvent: booking.eventType.recurringEvent,
+ recurringCount: booking.recurringBookings.length,
+ })}
+
+
+
+
+
+ )) ||
+ null
+ );
+};
+
interface UserProps {
id: number;
name: string | null;
diff --git a/apps/web/components/ui/TableActions.tsx b/apps/web/components/ui/TableActions.tsx
index 12c3d826ce..242b0c0dac 100644
--- a/apps/web/components/ui/TableActions.tsx
+++ b/apps/web/components/ui/TableActions.tsx
@@ -64,15 +64,9 @@ const DropdownActions = ({
};
const TableActions: FC = ({ actions }) => {
- const mobileActions = actions.flatMap((action) => {
- if (action.actions) {
- return action.actions;
- }
- return action;
- });
return (
<>
-
+
{actions.map((action) => {
const button = (
-
-
-
>
);
};
|