diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 86db400..a283a4b 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -2,54 +2,60 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; -import MetricCardTen from "@/components/sections/metrics/MetricCardTen"; -import FeatureBento from "@/components/sections/feature/FeatureBento"; -import FooterBase from "@/components/sections/footer/FooterBase"; -import { - Users, - BarChart3, - Shield, - Activity, - TrendingUp, -} from "lucide-react"; +import { useState } from "react"; +import { BarChart3, Users, Briefcase, FileText, TrendingUp, LogOut } from "lucide-react"; const navItems = [ - { name: "Dashboard", id: "/admin" }, - { name: "Jobs", id: "/admin#jobs" }, - { name: "Users", id: "/admin#users" }, - { name: "Moderation", id: "/admin#moderation" }, - { name: "Analytics", id: "/admin#analytics" }, + { name: "Search Jobs", id: "" }, + { name: "Post a Job", id: "" }, + { name: "Admin", id: "/admin" }, + { name: "Browse", id: "" }, + { name: "Contact", id: "" }, ]; -const footerColumns = [ - { - title: "Admin", items: [ - { label: "Dashboard", href: "/admin" }, - { label: "Settings", href: "/admin#settings" }, - { label: "Reports", href: "/admin#reports" }, - ], - }, - { - title: "Quick Links", items: [ - { label: "Help", href: "#" }, - { label: "Support", href: "#" }, - { label: "Documentation", href: "#" }, - ], - }, -]; +type TabType = "jobs" | "applications" | "users" | "analytics"; + +export default function AdminDashboard() { + const [activeTab, setActiveTab] = useState("jobs"); + const [jobs] = useState([ + { id: 1, title: "Senior Developer", company: "Tech Corp", status: "Active", applications: 12, posted: "2 days ago" }, + { id: 2, title: "Product Manager", company: "Startup Inc", status: "Active", applications: 8, posted: "5 days ago" }, + { id: 3, title: "Designer", company: "Creative Agency", status: "Inactive", applications: 5, posted: "10 days ago" }, + ]); + + const [applications] = useState([ + { id: 1, candidate: "John Smith", position: "Senior Developer", status: "Under Review", appliedDate: "2025-01-20" }, + { id: 2, candidate: "Sarah Johnson", position: "Product Manager", status: "Interview", appliedDate: "2025-01-19" }, + { id: 3, candidate: "Mike Davis", position: "Senior Developer", status: "Rejected", appliedDate: "2025-01-18" }, + ]); + + const [users] = useState([ + { id: 1, name: "Alice Chen", email: "alice@example.com", role: "Job Seeker", joined: "2025-01-10", status: "Active" }, + { id: 2, name: "Bob Wilson", email: "bob@example.com", role: "Employer", joined: "2025-01-05", status: "Active" }, + { id: 3, name: "Carol White", email: "carol@example.com", role: "Job Seeker", joined: "2024-12-20", status: "Inactive" }, + ]); + + const [analytics] = useState({ + totalJobs: 284, + activeApplications: 156, + totalUsers: 2341, + avgTimeToHire: "18 days", monthlyGrowth: "+12.5%", conversionRate: "8.3%"}); + + const handleLogout = () => { + window.location.href = "/"; + }; -export default function AdminPage() { return ( -
- -
+
+
+

Admin Dashboard

-
- -
+ {/* Tab Navigation */} +
+ + + + +
-
- -
+ {/* Job Management Tab */} + {activeTab === "jobs" && ( +
+
+

Job Listings

+ +
+
+ + + + + + + + + + + + + {jobs.map((job) => ( + + + + + + + + + ))} + +
Job TitleCompanyStatusApplicationsPostedActions
{job.title}{job.company} + + {job.status} + + {job.applications}{job.posted} + + +
+
+
+ )} -
- -
+ {/* Applications Management Tab */} + {activeTab === "applications" && ( +
+

Application Management

+
+ + + + + + + + + + + + {applications.map((app) => ( + + + + + + + + ))} + +
CandidatePositionStatusApplied DateActions
{app.candidate}{app.position} + + {app.status} + + {app.appliedDate} + + +
+
+
+ )} -
);