From 2f4c0c073ec5a4912c02fb7c752ea2129aac04d8 Mon Sep 17 00:00:00 2001 From: jayshah2005 Date: Sun, 15 Mar 2026 12:46:19 -0400 Subject: [PATCH 1/7] feat: create admin panel with dummy data --- app/admin/events/[id]/page.tsx | 0 app/admin/events/page.tsx | 189 +++++++++++++++++++++++++ app/admin/execs/page.tsx | 252 +++++++++++++++++++++++++++++++++ app/admin/layout.tsx | 81 +++++++++++ app/admin/page.tsx | 67 ++++----- components/ui/modal.tsx | 28 ++++ 6 files changed, 584 insertions(+), 33 deletions(-) create mode 100644 app/admin/events/[id]/page.tsx create mode 100644 app/admin/events/page.tsx create mode 100644 app/admin/execs/page.tsx create mode 100644 app/admin/layout.tsx create mode 100644 components/ui/modal.tsx diff --git a/app/admin/events/[id]/page.tsx b/app/admin/events/[id]/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/admin/events/page.tsx b/app/admin/events/page.tsx new file mode 100644 index 0000000..c7e9214 --- /dev/null +++ b/app/admin/events/page.tsx @@ -0,0 +1,189 @@ +"use client"; + +import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from "@/components/ui/table"; +import { Button } from "@/components/ui/button"; +import Modal from "@/components/ui/modal"; +import { useState } from "react"; + +export default function EventsManagementPage() { + const [showModal, setShowModal] = useState(false); + const [showPastEvents, setShowPastEvents] = useState(false); + // Dummy event data + const upcomingEvents = [ + { title: "Algorithm Workshop", date: "Oct 24, 2023", time: "5:00 PM", location: "ST 102", status: "Upcoming", type: "Upcoming" }, + { title: "Gaming Night", date: "Oct 28, 2023", time: "7:00 PM", location: "Union Hall", status: "Draft", type: "Upcoming" }, + { title: "Career Fair prep", date: "Nov 05, 2023", time: "10:00 AM", location: "Computer Lab 3", status: "Confirmed", type: "Upcoming" }, + ]; + const recurringEvents = [ + { title: "Weekly Coding Session", date: "Every Friday", time: "4:00 PM", location: "ST 105", status: "Active", type: "Recurring" }, + { title: "Monthly Meetup", date: "First Monday", time: "6:00 PM", location: "Room 200", status: "Active", type: "Recurring" }, + ]; + const pastEvents = [ + { title: "Welcome Day 2022", date: "Sep 05, 2022", time: "1:00 PM", location: "Field", status: "Completed", type: "Past" }, + { title: "Spring Hackathon", date: "Mar 12, 2023", time: "9:00 AM", location: "Gym", status: "Completed", type: "Past" }, + ]; + + return ( +
+

Events Management

+

Plan, coordinate, and review club events

+ +
+ +
+ +
+

Upcoming Events

+ + + + Event Title + Date + Time + Location + Status + Actions + + + + {upcomingEvents.map((event, idx) => ( + + {event.title} + {event.date} + {event.time} + {event.location} + + + {event.status} + + + + + + + ))} + +
+
+ +
+

Recurring Events

+ + + + Event Title + Date + Time + Location + Status + Actions + + + + {recurringEvents.map((event, idx) => ( + + {event.title} + {event.date} + {event.time} + {event.location} + + + {event.status} + + + + + + + ))} + +
+
+ +
+ + + {showPastEvents && ( + + + + Event Title + Date + Time + Location + Status + Actions + + + + {pastEvents.map((event, idx) => ( + + {event.title} + {event.date} + {event.time} + {event.location} + + + {event.status} + + + + + + + ))} + +
+ )} +
+ + setShowModal(false)} title="Add New Event"> +
+
+ + +
+
+ +