import Layout from "@/components/Layout"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Users, Briefcase, BookOpen, MessageSquare, Trophy, Target, ArrowRight, Shield, Clock, TrendingUp, Zap, Lock, } from "lucide-react"; import { useNavigate } from "react-router-dom"; import { useEffect, useState, useRef } from "react"; import { useAuth } from "@/contexts/AuthContext"; import LoadingScreen from "@/components/LoadingScreen"; import { aethexToast } from "@/lib/aethex-toast"; export default function Staff() { const navigate = useNavigate(); const { user, loading } = useAuth(); const [isLoading, setIsLoading] = useState(true); const toastShownRef = useRef(false); // Redirect unauthenticated users to login useEffect(() => { if (!loading && !user) { navigate("/staff/login", { replace: true }); return; } }, [user, loading, navigate]); useEffect(() => { const timer = setTimeout(() => { setIsLoading(false); if (!toastShownRef.current) { aethexToast.system("Staff operations portal initialized"); toastShownRef.current = true; } }, 900); return () => clearTimeout(timer); }, []); if (isLoading) { return ( ); } const staffResources = [ { icon: Briefcase, title: "Announcements", description: "Company updates, news, and important information", link: "/staff/announcements", color: "from-rose-500 to-pink-500", lightBg: "bg-rose-500/10", }, { icon: BookOpen, title: "Knowledge Base", description: "Internal documentation, guides, and best practices", link: "/staff/knowledge-base", color: "from-blue-500 to-cyan-500", lightBg: "bg-blue-500/10", }, { icon: MessageSquare, title: "Team Handbook", description: "Policies, procedures, and team guidelines", link: "/staff/team-handbook", color: "from-green-500 to-emerald-500", lightBg: "bg-green-500/10", }, { icon: Trophy, title: "Performance Reviews", description: "Career development and performance tracking", link: "/staff/performance-reviews", color: "from-amber-500 to-orange-500", lightBg: "bg-amber-500/10", }, { icon: Target, title: "Project Tracking", description: "Team projects and task management", link: "/staff/project-tracking", color: "from-violet-500 to-indigo-500", lightBg: "bg-violet-500/10", }, { icon: Users, title: "Directory", description: "Staff directory and team contacts", link: "/staff/knowledge-base", color: "from-teal-500 to-cyan-500", lightBg: "bg-teal-500/10", }, ]; const workspaceStats = [ { icon: Users, label: "Team Members", value: "142", trend: "+8 this quarter", color: "text-purple-300", }, { icon: Clock, label: "Ongoing Projects", value: "47", trend: "+12 this month", color: "text-purple-300", }, { icon: TrendingUp, label: "Productivity Score", value: "94%", trend: "↑ 5% from last month", color: "text-purple-300", }, { icon: Zap, label: "Active Teams", value: "8", trend: "All operational", color: "text-purple-300", }, ]; return (
{/* Animated gradient background */}
{/* Grid background */}
{/* Hero Section */}
{/* Animated Logo */}
Staff Portal
{/* Badge */}
Internal Operations Portal
{/* Main Heading */}

The Staff Command Center

Unified workspace for internal communications, team collaboration, and operational excellence. Manage projects, track performance, and connect with your team—all in one secure platform.

{/* CTA Button */}
{/* Stats Section */}
{workspaceStats.map((stat) => { const Icon = stat.icon; return (

{stat.label}

{stat.value}

{stat.trend}

); })}
{/* Resources Section */}

Quick Access Resources

Everything you need to manage operations, collaborate with your team, and stay informed

{staffResources.map((resource) => { const Icon = resource.icon; return ( navigate(resource.link)} className={`group cursor-pointer ${resource.lightBg} border-purple-500/20 hover:border-purple-400/50 transition-all duration-300 hover:shadow-xl hover:shadow-purple-500/20 hover:scale-105 overflow-hidden`} >
{resource.title}

{resource.description}

Explore
); })}
{/* Features Section */}

Communication & Collaboration

    {[ "Real-time company announcements", "Department-specific updates", "Team collaboration workspace", "Internal messaging system", "Event notifications", ].map((item) => (
  • {item}
  • ))}

Resources & Governance

    {[ "Comprehensive internal documentation", "Policies and procedures library", "Team handbook & guidelines", "Performance tracking tools", "Secure information sharing", ].map((item) => (
  • {item}
  • ))}
{/* Security Notice */}

Enterprise Security & Privacy

All staff information is protected with enterprise-grade security. Access is restricted to authenticated team members only. Your data is encrypted, audited, and compliant with privacy regulations.

); }