diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx deleted file mode 100644 index a283a4b..0000000 --- a/src/app/admin/page.tsx +++ /dev/null @@ -1,334 +0,0 @@ -"use client"; - -import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; -import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; -import { useState } from "react"; -import { BarChart3, Users, Briefcase, FileText, TrendingUp, LogOut } from "lucide-react"; - -const navItems = [ - { name: "Search Jobs", id: "" }, - { name: "Post a Job", id: "" }, - { name: "Admin", id: "/admin" }, - { name: "Browse", id: "" }, - { name: "Contact", id: "" }, -]; - -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 = "/"; - }; - - 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} - - -
-
-
- )} - - {/* User Management Tab */} - {activeTab === "users" && ( -
-

User Management

-
- - - - - - - - - - - - - {users.map((user) => ( - - - - - - - - - ))} - -
NameEmailRoleJoinedStatusActions
{user.name}{user.email}{user.role}{user.joined} - - {user.status} - - - - -
-
-
- )} - - {/* Analytics Tab */} - {activeTab === "analytics" && ( -
-

Analytics Overview

-
-
-
-
-

Total Jobs

-

{analytics.totalJobs}

-
- -
-
-
-
-
-

Active Applications

-

{analytics.activeApplications}

-
- -
-
-
-
-
-

Total Users

-

{analytics.totalUsers}

-
- -
-
-
-
-
-

Avg Time to Hire

-

{analytics.avgTimeToHire}

-
- -
-
-
-
-
-

Monthly Growth

-

{analytics.monthlyGrowth}

-
- -
-
-
-
-
-

Conversion Rate

-

{analytics.conversionRate}

-
- -
-
-
-
- )} -
-
-
- ); -}