import { useState } from "react"; import Layout from "@/components/Layout"; import SEO from "@/components/SEO"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Bell, Star, Archive, Pin } from "lucide-react"; interface Announcement { id: string; title: string; content: string; category: string; author: string; date: string; isPinned: boolean; isArchived: boolean; priority: "High" | "Normal" | "Low"; } const announcements: Announcement[] = [ { id: "1", title: "Q1 2025 All-Hands Meeting Rescheduled", content: "The all-hands meeting has been moved to Friday at 2 PM PST. Please mark your calendars and join us for company updates.", category: "Company News", author: "Sarah Chen", date: "Today", isPinned: true, isArchived: false, priority: "High", }, { id: "2", title: "New Benefits Portal is Live", content: "Welcome to our upgraded benefits portal! You can now view and manage your health insurance, retirement plans, and more.", category: "Benefits", author: "HR Team", date: "2 days ago", isPinned: true, isArchived: false, priority: "High", }, { id: "3", title: "Summer Internship Program Open for Applications", content: "We're hiring summer interns across all departments. If you know someone talented, send them our way!", category: "Hiring", author: "Talent Team", date: "3 days ago", isPinned: false, isArchived: false, priority: "Normal", }, { id: "4", title: "Server Maintenance Window This Weekend", content: "We'll be performing scheduled maintenance on Saturday evening. Services may be temporarily unavailable.", category: "Technical", author: "DevOps Team", date: "4 days ago", isPinned: false, isArchived: false, priority: "Normal", }, { id: "5", title: "Welcome New Team Members!", content: "Please join us in welcoming 5 amazing new colleagues who started this week. Check out their profiles in the directory.", category: "Team", author: "HR Team", date: "1 week ago", isPinned: false, isArchived: false, priority: "Low", }, ]; const getPriorityColor = (priority: string) => { switch (priority) { case "High": return "bg-red-500/20 text-red-300 border-red-500/30"; case "Normal": return "bg-blue-500/20 text-blue-300 border-blue-500/30"; case "Low": return "bg-slate-500/20 text-slate-300 border-slate-500/30"; default: return "bg-slate-500/20 text-slate-300"; } }; const categories = [ "All", "Company News", "Benefits", "Hiring", "Technical", "Team", ]; export default function StaffAnnouncements() { const [selectedCategory, setSelectedCategory] = useState("All"); const [showArchived, setShowArchived] = useState(false); const filtered = announcements.filter((ann) => { const matchesCategory = selectedCategory === "All" || ann.category === selectedCategory; const matchesArchived = showArchived ? ann.isArchived : !ann.isArchived; return matchesCategory && matchesArchived; }); const pinnedAnnouncements = filtered.filter((a) => a.isPinned); const unpinnedAnnouncements = filtered.filter((a) => !a.isPinned); return (
{/* Background effects */}
{/* Header */}

Announcements

Company news, updates, and important information

{/* Category Filter */}
{categories.map((category) => ( ))}
{/* Pinned Announcements */} {pinnedAnnouncements.length > 0 && (

Pinned

{pinnedAnnouncements.map((announcement) => (
{announcement.title} by {announcement.author} • {announcement.date}
{announcement.priority}

{announcement.content}

{announcement.category}
))}
)} {/* Regular Announcements */} {unpinnedAnnouncements.length > 0 && (

Recent Announcements

{unpinnedAnnouncements.map((announcement) => (
{announcement.title} by {announcement.author} • {announcement.date}
{announcement.priority}

{announcement.content}

{announcement.category}
))}
)} {filtered.length === 0 && (

No announcements found

)}
); }