Skip to content

Scheduling infrastructure for absolutely everyone.

remove cancel button for unconfirmed past bookings (#6142)

Mohammed Cherfaoui1a45cb35c119
diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx
index b8f77ac56f3..4c165a7663d 100644
--- a/apps/web/components/booking/BookingListItem.tsx
+++ b/apps/web/components/booking/BookingListItem.tsx
@@ -158,6 +158,10 @@ function BookingListItem(booking: BookingItemProps) {
bookedActions = bookedActions.filter((action) => action.id !== "edit_booking");
}
+ if (isPast && isPending && !isConfirmed) {
+ bookedActions = bookedActions.filter((action) => action.id !== "cancel");
+ }
+
const RequestSentMessage = () => {
return (
<div className="ml-1 mr-8 flex text-gray-500" data-testid="request_reschedule_sent">