From cbbb30d39da64cc74a1435c4d6bafdff427256c2 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 10 Nov 2025 19:29:55 +0000 Subject: [PATCH] Create Staff Announcements page for company news and updates cgen-5abf94bef5284d2f81eeac753e9abf26 --- client/pages/staff/StaffAnnouncements.tsx | 281 ++++++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 client/pages/staff/StaffAnnouncements.tsx diff --git a/client/pages/staff/StaffAnnouncements.tsx b/client/pages/staff/StaffAnnouncements.tsx new file mode 100644 index 00000000..4450d5d0 --- /dev/null +++ b/client/pages/staff/StaffAnnouncements.tsx @@ -0,0 +1,281 @@ +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

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