From bc64fceeef399adc4f4c0b145c476ea8866eb4fb Mon Sep 17 00:00:00 2001 From: Yehia Rasheed <157399068+yehiarasheed@users.noreply.github.com> Date: Wed, 14 Jan 2026 18:08:06 +0200 Subject: [PATCH 1/3] fix: disable edit button for bazaars that have started - Add editDisabled prop to EventCard component - Disable edit button if bazaar startDate and startTime have passed - Restrict edit access to events_office role only - Display startTime and endTime in 12-hour format in details dialog --- client/src/components/EventCard.tsx | 3 + client/src/components/EventsDetailsDialog.tsx | 17 ++++- client/src/pages/EventsOfficeDashboard.tsx | 70 ++++++++++++++++++- 3 files changed, 86 insertions(+), 4 deletions(-) diff --git a/client/src/components/EventCard.tsx b/client/src/components/EventCard.tsx index 01cf5eb2..bc325694 100644 --- a/client/src/components/EventCard.tsx +++ b/client/src/components/EventCard.tsx @@ -160,6 +160,7 @@ export interface EventCardProps { onUnarchive?: () => void; isUnarchiving?: boolean; onEdit?: () => void; + editDisabled?: boolean; canDelete?: boolean; className?: string; allowCancellation?: boolean; @@ -205,6 +206,7 @@ export default function EventCard({ onUnarchive, isUnarchiving = false, onEdit, + editDisabled = false, canDelete = false, status, className, @@ -1069,6 +1071,7 @@ export default function EventCard({