From 1a45cb35c119eece98c635d1fe3b16188fe782ec Mon Sep 17 00:00:00 2001 From: Mohammed Cherfaoui <37941426+mocherfaoui@users.noreply.github.com> Date: Wed, 21 Dec 2022 14:43:31 +0100 Subject: [PATCH] remove cancel button for unconfirmed past bookings (#6142) Co-authored-by: Alex van Andel --- apps/web/components/booking/BookingListItem.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index b8f77ac56f..4c165a7663 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 (