diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index 81e52af8c0..bc73c43d61 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -103,7 +103,7 @@ const isBookingReroutable = (booking: ParsedBooking): booking is ReroutableBooki function BookingListItem(booking: BookingItemProps) { const parsedBooking = buildParsedBooking(booking); - const { userId, userTimeZone, userTimeFormat, userEmail } = booking.loggedInUser; + const { userTimeZone, userTimeFormat, userEmail } = booking.loggedInUser; const { t, i18n: { language }, @@ -113,6 +113,7 @@ function BookingListItem(booking: BookingItemProps) { const [rejectionDialogIsOpen, setRejectionDialogIsOpen] = useState(false); const [chargeCardDialogIsOpen, setChargeCardDialogIsOpen] = useState(false); const [viewRecordingsDialogIsOpen, setViewRecordingsDialogIsOpen] = useState(false); + const [isNoShowDialogOpen, setIsNoShowDialogOpen] = useState(false); const cardCharged = booking?.payment[0]?.success; const mutation = trpc.viewer.bookings.confirm.useMutation({ onSuccess: (data) => { @@ -268,6 +269,17 @@ function BookingListItem(booking: BookingItemProps) { }); } + if (isBookingInPast) { + editBookingActions.push({ + id: "no_show", + label: t("mark_as_no_show"), + onClick: () => { + setIsNoShowDialogOpen(true); + }, + icon: "eye-off" as const, + }); + } + let bookedActions: ActionType[] = [ { id: "cancel", @@ -452,6 +464,14 @@ function BookingListItem(booking: BookingItemProps) { timeFormat={userTimeFormat ?? null} /> )} + {isNoShowDialogOpen && ( + + )}
@@ -983,7 +1003,7 @@ const GroupedAttendees = (groupedAttendeeProps: GroupedAttendeeProps) => { /> ))} -
+
+
+ + ))} + + {t("done")} + + +
+ ); +}; + const GroupedGuests = ({ guests }: { guests: AttendeeProps[] }) => { const [openDropdown, setOpenDropdown] = useState(false); const { t } = useLocale(); @@ -1035,7 +1124,7 @@ const GroupedGuests = ({ guests }: { guests: AttendeeProps[] }) => { ))} -
+