Skip to content

Scheduling infrastructure for absolutely everyone.

chore: add check for recording (#12584)

Udit Takkar45c4f4789bb7
diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx
index ea9efb0c746..f2281abd8a7 100644
--- a/apps/web/components/booking/BookingListItem.tsx
+++ b/apps/web/components/booking/BookingListItem.tsx
@@ -262,15 +262,21 @@ function BookingListItem(booking: BookingItemProps) {
const title = booking.title;
- const showRecordingsButtons = !!(booking.isRecorded && isPast && isConfirmed);
+ const showViewRecordingsButton = !!(booking.isRecorded && isPast && isConfirmed);
+ const showCheckRecordingButton =
+ isPast &&
+ isConfirmed &&
+ !booking.isRecorded &&
+ (!booking.location || booking.location === "integrations:daily" || booking?.location?.trim() === "");
const showRecordingActions: ActionType[] = [
{
id: "view_recordings",
- label: t("view_recordings"),
+ label: showCheckRecordingButton ? t("check_for_recordings") : t("view_recordings"),
onClick: () => {
setViewRecordingsDialogIsOpen(true);
},
+ color: showCheckRecordingButton ? "secondary" : "primary",
disabled: mutation.isLoading,
},
];
@@ -298,7 +304,7 @@ function BookingListItem(booking: BookingItemProps) {
paymentCurrency={booking.payment[0].currency}
/>
)}
- {showRecordingsButtons && (
+ {(showViewRecordingsButton || showCheckRecordingButton) && (
<ViewRecordingsDialog
booking={booking}
isOpenDialog={viewRecordingsDialogIsOpen}
@@ -478,7 +484,9 @@ function BookingListItem(booking: BookingItemProps) {
</>
) : null}
{isPast && isPending && !isConfirmed ? <TableActions actions={bookedActions} /> : null}
- {showRecordingsButtons && <TableActions actions={showRecordingActions} />}
+ {(showViewRecordingsButton || showCheckRecordingButton) && (
+ <TableActions actions={showRecordingActions} />
+ )}
{isCancelled && booking.rescheduled && (
<div className="hidden h-full items-center md:flex">
<RequestSentMessage />