diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx new file mode 100644 index 0000000..a46bcd9 --- /dev/null +++ b/src/app/admin/page.tsx @@ -0,0 +1,342 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline"; +import FooterBaseCard from "@/components/sections/footer/FooterBaseCard"; +import { useState } from "react"; +import { Plus, Edit2, Trash2, Search, Settings, Users, BarChart3, Heart } from "lucide-react"; + +export default function AdminPage() { + const [activeTab, setActiveTab] = useState<"animals" | "adoptions" | "users" | "settings">("animals"); + const [searchTerm, setSearchTerm] = useState(""); + + const navItems = [ + { name: "Home", id: "/" }, + { name: "Browse Animals", id: "/animals" }, + { name: "Admin", id: "/admin" }, + { name: "About", id: "about" }, + { name: "Contact", id: "contact" }, + ]; + + const footerColumns = [ + { + title: "Adoption", items: [ + { label: "Browse Pets", href: "/animals" }, + { label: "How to Adopt", href: "#how-it-works" }, + ], + }, + { + title: "Company", items: [ + { label: "About Us", href: "/about" }, + { label: "Our Team", href: "#team" }, + ], + }, + ]; + + const sampleAnimals = [ + { id: 1, name: "Luna", species: "Dog", breed: "Golden Retriever", status: "Available", adoptionFee: "$150" }, + { id: 2, name: "Max", species: "Cat", breed: "Tabby", status: "Pending", adoptionFee: "$75" }, + { id: 3, name: "Bella", species: "Dog", breed: "Border Collie", status: "Available", adoptionFee: "$120" }, + ]; + + const sampleAdoptions = [ + { id: 1, animalName: "Buddy", familyName: "Johnson", status: "Completed", date: "2025-01-10" }, + { id: 2, animalName: "Whiskers", familyName: "Smith", status: "In Progress", date: "2025-01-15" }, + { id: 3, animalName: "Charlie", familyName: "Williams", status: "Pending Review", date: "2025-01-20" }, + ]; + + const sampleUsers = [ + { id: 1, name: "John Doe", email: "john@example.com", role: "Admin", status: "Active" }, + { id: 2, name: "Jane Smith", email: "jane@example.com", role: "Staff", status: "Active" }, + { id: 3, name: "Bob Wilson", email: "bob@example.com", role: "Volunteer", status: "Inactive" }, + ]; + + return ( + + + +
+
+ {/* Header */} +
+

Admin Dashboard

+

Manage animals, adoptions, users, and platform settings

+
+ + {/* Tab Navigation */} +
+ + + + +
+ + {/* Search & Controls */} + {activeTab !== "settings" && ( +
+
+ + setSearchTerm(e.target.value)} + className="w-full pl-10 pr-4 py-2 border border-slate-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-800 text-slate-900 dark:text-white placeholder-slate-500" + /> +
+ +
+ )} + + {/* Content Sections */} + {activeTab === "animals" && ( +
+
+ + + + + + + + + + + + + {sampleAnimals.map((animal) => ( + + + + + + + + + ))} + +
NameSpeciesBreedStatusFeeActions
{animal.name}{animal.species}{animal.breed} + + {animal.status} + + {animal.adoptionFee} +
+ + +
+
+
+
+ )} + + {activeTab === "adoptions" && ( +
+
+ + + + + + + + + + + + {sampleAdoptions.map((adoption) => ( + + + + + + + + ))} + +
AnimalFamilyStatusDateActions
{adoption.animalName}{adoption.familyName} + + {adoption.status} + + {adoption.date} +
+ +
+
+
+
+ )} + + {activeTab === "users" && ( +
+
+ + + + + + + + + + + + {sampleUsers.map((user) => ( + + + + + + + + ))} + +
NameEmailRoleStatusActions
{user.name}{user.email}{user.role} + + {user.status} + + +
+ + +
+
+
+
+ )} + + {activeTab === "settings" && ( +
+
+

Platform Settings

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

System Status

+
+
+ Database + Operational +
+
+ API Server + Operational +
+
+ Email Service + Operational +
+
+
+
+ )} +
+
+ + +
+ ); +}