diff --git a/client/pages/hub/ClientProjects.tsx b/client/pages/hub/ClientProjects.tsx new file mode 100644 index 00000000..6d8ebb54 --- /dev/null +++ b/client/pages/hub/ClientProjects.tsx @@ -0,0 +1,317 @@ +import { useState } from "react"; +import Layout from "@/components/Layout"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { useNavigate } from "react-router-dom"; +import { Badge } from "@/components/ui/badge"; +import { + Briefcase, + ArrowLeft, + Calendar, + Users, + TrendingUp, + Search, +} from "lucide-react"; +import { Input } from "@/components/ui/input"; + +interface ClientProject { + id: number; + name: string; + description: string; + status: "Planning" | "In Progress" | "Review" | "Completed" | "On Hold"; + progress: number; + startDate: string; + dueDate: string; + budget: number; + spent: number; + team: Array<{ name: string; role: string; avatar?: string }>; + deliverables: Array<{ name: string; completed: boolean }>; +} + +const mockProjects: ClientProject[] = [ + { + id: 1, + name: "Roblox Game Development", + description: + "Custom game development for multiplayer Roblox experience with advanced mechanics", + status: "In Progress", + progress: 65, + startDate: "2024-12-01", + dueDate: "2025-02-28", + budget: 50000, + spent: 32500, + team: [ + { name: "Alex Chen", role: "Lead Developer" }, + { name: "Jordan Smith", role: "Game Designer" }, + { name: "Taylor Brown", role: "QA Engineer" }, + ], + deliverables: [ + { name: "Core mechanics implementation", completed: true }, + { name: "UI/UX design", completed: true }, + { name: "Multiplayer networking", completed: false }, + { name: "Testing and optimization", completed: false }, + { name: "Deployment and launch", completed: false }, + ], + }, + { + id: 2, + name: "AI Integration Project", + description: "Integration of AI-powered features into existing game platform", + status: "In Progress", + progress: 45, + startDate: "2025-01-15", + dueDate: "2025-03-15", + budget: 35000, + spent: 15750, + team: [ + { name: "Casey Johnson", role: "AI Specialist" }, + { name: "Morgan Davis", role: "Backend Engineer" }, + ], + deliverables: [ + { name: "AI model training", completed: true }, + { name: "API integration", completed: false }, + { name: "Performance testing", completed: false }, + ], + }, + { + id: 3, + name: "Mobile App Launch", + description: "iOS and Android mobile application for player engagement", + status: "On Hold", + progress: 30, + startDate: "2025-02-01", + dueDate: "2025-04-01", + budget: 45000, + spent: 13500, + team: [ + { name: "Alex Chen", role: "Full Stack Developer" }, + { name: "Jordan Smith", role: "Mobile Architect" }, + ], + deliverables: [ + { name: "Design mockups", completed: true }, + { name: "iOS development", completed: false }, + { name: "Android development", completed: false }, + { name: "App store submission", completed: false }, + ], + }, +]; + +const statusColors: Record = { + Planning: "bg-slate-500/20 text-slate-300", + "In Progress": "bg-blue-500/20 text-blue-300", + Review: "bg-amber-500/20 text-amber-300", + Completed: "bg-green-500/20 text-green-300", + "On Hold": "bg-red-500/20 text-red-300", +}; + +export default function ClientProjects() { + const navigate = useNavigate(); + const [search, setSearch] = useState(""); + const [selectedStatus, setSelectedStatus] = useState(null); + + const filteredProjects = mockProjects.filter((project) => { + const matchesSearch = + project.name.toLowerCase().includes(search.toLowerCase()) || + project.description.toLowerCase().includes(search.toLowerCase()); + const matchesStatus = + !selectedStatus || project.status === selectedStatus; + return matchesSearch && matchesStatus; + }); + + const statuses: ClientProject["status"][] = [ + "Planning", + "In Progress", + "Review", + "Completed", + "On Hold", + ]; + + return ( + +
+ {/* Background */} +
+
+ +
+ {/* Header */} +
+
+ +
+ +

Projects

+
+

+ View and manage all your active projects +

+
+
+ + {/* Filters */} +
+
+
+ {/* Search */} +
+ + setSearch(e.target.value)} + className="pl-10 bg-slate-800 border-slate-700 text-white" + /> +
+ + {/* Status Filter */} +
+ + {statuses.map((status) => ( + + ))} +
+
+
+
+ + {/* Projects Grid */} +
+
+ {filteredProjects.length === 0 ? ( + + + +

+ No projects found matching your criteria +

+
+
+ ) : ( +
+ {filteredProjects.map((project) => ( + + navigate(`/hub/client/projects/${project.id}`) + } + > + +
+ {/* Left Column - Project Info */} +
+
+
+

+ {project.name} +

+

+ {project.description} +

+
+ + {project.status} + +
+ + {/* Progress Bar */} +
+
+ + Progress + + + {project.progress}% + +
+
+
+
+
+ + {/* Details */} +
+
+ + Due {project.dueDate} +
+
+ + {project.team.length} members +
+
+ + + ${project.spent.toLocaleString()} / + ${project.budget.toLocaleString()} + +
+
+
+ + {/* Right Column - Team */} +
+

+ Team ({project.team.length}) +

+
+ {project.team.map((member) => ( +
+

{member.name}

+

+ {member.role} +

+
+ ))} +
+
+
+ + + ))} +
+ )} +
+
+
+
+ + ); +}