From 6b0d458df72ce30c0eb7d504d1d956794b7f9264 Mon Sep 17 00:00:00 2001 From: Michael Chu Date: Mon, 9 Mar 2026 12:32:16 -0400 Subject: [PATCH 01/12] Allow organizers to add/remove participants after event ends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Organizers can now manage their roster on past events — claim empty slots, remove participants, and use the join button. Non-organizers still see "Registration Closed" as before. Also allows registered participants (not just organizers) to claim spots for guests via updated RLS policy. Co-Authored-By: Claude Opus 4.6 --- src/components/ParticipantListItem.tsx | 2 +- src/lib/utils.ts | 6 +- src/pages/EventDetailPage.tsx | 12 +- src/pages/__tests__/EventDetailPage.test.tsx | 123 +++++++++++++++++- src/pages/__tests__/canUserClaimSpot.test.ts | 8 +- ...0000_allow_participants_to_claim_spots.sql | 24 ++++ 6 files changed, 159 insertions(+), 16 deletions(-) create mode 100644 supabase/migrations/20260310000000_allow_participants_to_claim_spots.sql diff --git a/src/components/ParticipantListItem.tsx b/src/components/ParticipantListItem.tsx index 9a48877..5783b9f 100644 --- a/src/components/ParticipantListItem.tsx +++ b/src/components/ParticipantListItem.tsx @@ -134,7 +134,7 @@ export function ParticipantListItem({ )} )} - {!isOrganizerItem && !isArchived && ( + {!isOrganizerItem && (!isArchived || isOrganizer) && ( )} - {!isOrganizerItem && (!isArchived || isOrganizer) && ( + {!isOrganizerItem && !isArchived && (