From 137a68c867c58560e65717502d71c48d46c6be04 Mon Sep 17 00:00:00 2001 From: chark1es Date: Tue, 8 Apr 2025 21:43:06 -0700 Subject: [PATCH] Add event type --- .../dashboard/EventsSection/EventCheckIn.tsx | 1 + .../dashboard/EventsSection/EventLoad.tsx | 5 +++ .../Officer_EventManagement/EventEditor.tsx | 44 ++++++++++++++++--- src/schemas/pocketbase/schema.ts | 1 + 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/components/dashboard/EventsSection/EventCheckIn.tsx b/src/components/dashboard/EventsSection/EventCheckIn.tsx index ef8fd79..d690657 100644 --- a/src/components/dashboard/EventsSection/EventCheckIn.tsx +++ b/src/components/dashboard/EventsSection/EventCheckIn.tsx @@ -12,6 +12,7 @@ import type { Event, EventAttendee, LimitedUser } from "../../../schemas/pocketb // Extended Event interface with additional properties needed for this component interface ExtendedEvent extends Event { description?: string; // This component uses 'description' but schema has 'event_description' + event_type: string; // Add event_type field from schema } // Note: Date conversion is now handled automatically by the Get and Update classes. diff --git a/src/components/dashboard/EventsSection/EventLoad.tsx b/src/components/dashboard/EventsSection/EventLoad.tsx index 3698a90..8d3c143 100644 --- a/src/components/dashboard/EventsSection/EventLoad.tsx +++ b/src/components/dashboard/EventsSection/EventLoad.tsx @@ -10,6 +10,7 @@ import type { Event, AttendeeEntry, EventAttendee } from "../../../schemas/pocke // Extended Event interface with additional properties needed for this component interface ExtendedEvent extends Event { description?: string; // This component uses 'description' but schema has 'event_description' + event_type: string; // Add event_type field from schema } declare global { @@ -277,6 +278,10 @@ const EventLoad = () => { {event.location || "No location specified"} +
+ + {event.event_type || "Other"} +
{/* Action Buttons */} diff --git a/src/components/dashboard/Officer_EventManagement/EventEditor.tsx b/src/components/dashboard/Officer_EventManagement/EventEditor.tsx index b7a8778..250a2ec 100644 --- a/src/components/dashboard/Officer_EventManagement/EventEditor.tsx +++ b/src/components/dashboard/Officer_EventManagement/EventEditor.tsx @@ -133,6 +133,28 @@ const EventForm = memo(({ /> + {/* Event Type */} +
+ + +
+ {/* Points to Reward */}