diff --git a/client/pages/StaffAchievements.tsx b/client/pages/StaffAchievements.tsx new file mode 100644 index 00000000..94af47d0 --- /dev/null +++ b/client/pages/StaffAchievements.tsx @@ -0,0 +1,327 @@ +import { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import Layout from "@/components/Layout"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Progress } from "@/components/ui/progress"; +import { Trophy, Star, Target, ExternalLink } from "lucide-react"; + +const ACHIEVEMENTS = [ + { + id: 1, + name: "Developer Leader", + description: "Lead 5+ engineering projects", + progress: 3, + total: 5, + icon: "👨‍💻", + unlocked: false, + }, + { + id: 2, + name: "Community Builder", + description: "Mentor 10+ team members", + progress: 8, + total: 10, + icon: "🤝", + unlocked: false, + }, + { + id: 3, + name: "Innovator", + description: "Launch 3 new features", + progress: 2, + total: 3, + icon: "💡", + unlocked: false, + }, + { + id: 4, + name: "Excellence", + description: "Maintain 95%+ team satisfaction", + progress: 92, + total: 95, + icon: "⭐", + unlocked: false, + }, +]; + +const MILESTONES = [ + { + id: 1, + title: "1 Year Anniversary", + description: "Celebrate 1 year with the team", + date: "2025-06-15", + achieved: false, + daysLeft: 145, + }, + { + id: 2, + title: "100 Mentorship Sessions", + description: "Complete 100 one-on-one mentorship sessions", + date: "2025-03-20", + achieved: false, + daysLeft: 58, + }, + { + id: 3, + title: "First Leadership Role", + description: "Lead your first major team initiative", + date: "2024-12-01", + achieved: true, + daysLeft: 0, + }, + { + id: 4, + title: "5 Successful Launches", + description: "Ship 5 major features to production", + date: "2025-04-10", + achieved: false, + daysLeft: 79, + }, +]; + +export default function StaffAchievements() { + const navigate = useNavigate(); + const [expandedAchievement, setExpandedAchievement] = useState( + null + ); + + const unlockedCount = ACHIEVEMENTS.filter((a) => a.unlocked).length; + const achievedMilestones = MILESTONES.filter((m) => m.achieved).length; + + return ( + +
+
+ {/* Header */} +
+
+

Achievements

+

+ + Track your progress and accomplishments +

+
+ +
+ + {/* Stats */} +
+ + +
+

Achievements Unlocked

+

+ {unlockedCount}/{ACHIEVEMENTS.length} +

+
+
+
+ + + +
+

Milestones Completed

+

+ {achievedMilestones}/{MILESTONES.length} +

+
+
+
+ + + +
+

Total Points

+

2,480

+
+
+
+ + + +
+

Level

+

12

+
+
+
+
+ + {/* Achievements */} +
+

+ + Achievements +

+
+ {ACHIEVEMENTS.map((achievement) => ( + + setExpandedAchievement( + expandedAchievement === achievement.id + ? null + : achievement.id + ) + } + > + +
+
+
+ {achievement.icon} +
+

+ {achievement.name} +

+

+ {achievement.description} +

+
+
+ {achievement.unlocked && ( + + Unlocked + + )} +
+ +
+
+ Progress + + {achievement.progress}/{achievement.total} + +
+ +
+
+
+
+ ))} +
+
+ + {/* Milestones */} +
+

+ + Milestones +

+
+ {MILESTONES.map((milestone) => ( + + +
+
+
+

+ {milestone.title} +

+ {milestone.achieved && ( + + Achieved + + )} +
+

+ {milestone.description} +

+
+
+ {milestone.achieved ? ( +

+ Completed ✓ +

+ ) : ( + <> +

+ {milestone.daysLeft} days left +

+

+ {milestone.date} +

+ + )} +
+
+
+
+ ))} +
+
+ + {/* Leaderboard Preview */} + + + + + Top Achievers This Month + + + +
+ {[ + { name: "Sarah Dev", points: 2850, rank: 1 }, + { name: "You", points: 2480, rank: 2 }, + { name: "Mike Operations", points: 2340, rank: 3 }, + { name: "Emma Design", points: 2100, rank: 4 }, + ].map((user) => ( +
+
+ + #{user.rank} + + {user.name} +
+ + {user.points} pts + +
+ ))} +
+
+
+
+
+
+ ); +}