This commit is contained in:
alma 2025-05-04 22:50:23 +02:00
parent 838a06f215
commit e6211f0edf
5 changed files with 43 additions and 7 deletions

23
app/livres/page.tsx Normal file
View File

@ -0,0 +1,23 @@
import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { redirect } from "next/navigation";
import { ResponsiveIframe } from "@/app/components/responsive-iframe";
export default async function LivresPage() {
const session = await getServerSession(authOptions);
if (!session) {
redirect("/signin");
}
return (
<main className="w-full h-screen bg-black">
<div className="w-full h-full px-4 pt-12 pb-4">
<ResponsiveIframe
src={process.env.NEXT_PUBLIC_IFRAME_LIVRE_URL || ''}
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
/>
</div>
</main>
);
}

View File

@ -213,7 +213,7 @@ export function AnnouncementForm({ userRole }: AnnouncementFormProps) {
<FormItem>
<FormLabel className="text-gray-700">Target Audience</FormLabel>
<FormControl>
<div className="p-3 border border-gray-200 rounded-md bg-gray-50">
<div className="p-3 border border-gray-200 rounded-md bg-white">
<p className="text-sm text-gray-500 mb-2">Select which roles can see this announcement:</p>
<div className="flex flex-wrap gap-2">
{availableRoles.map(role => (
@ -222,8 +222,8 @@ export function AnnouncementForm({ userRole }: AnnouncementFormProps) {
variant={selectedRoles.includes(role.id) ? "default" : "outline"}
className={`cursor-pointer px-3 py-1 ${
selectedRoles.includes(role.id)
? "bg-blue-600 hover:bg-blue-700"
: "hover:bg-gray-100"
? "bg-blue-600 hover:bg-blue-700 text-white"
: "bg-white hover:bg-gray-100 text-gray-700 border-gray-300"
}`}
onClick={() => handleRoleToggle(role.id)}
>

View File

@ -123,7 +123,11 @@ export function AnnouncementsList({ userRole }: AnnouncementsListProps) {
: role.charAt(0).toUpperCase() + role.slice(1);
return (
<Badge key={role} variant="outline" className="mr-1">
<Badge
key={role}
variant="outline"
className="mr-1 bg-white text-gray-700 border-gray-300"
>
{roleName}
</Badge>
);
@ -182,6 +186,7 @@ export function AnnouncementsList({ userRole }: AnnouncementsListProps) {
variant="outline"
size="sm"
onClick={() => handleViewAnnouncement(announcement)}
className="bg-white text-gray-700 border-gray-300"
>
<Eye className="h-4 w-4" />
<span className="sr-only">View</span>
@ -190,6 +195,7 @@ export function AnnouncementsList({ userRole }: AnnouncementsListProps) {
variant="outline"
size="sm"
onClick={() => handleDeleteClick(announcement)}
className="bg-white text-gray-700 border-gray-300"
>
<Trash2 className="h-4 w-4" />
<span className="sr-only">Delete</span>

View File

@ -35,16 +35,16 @@ export function AnnouncementsPage({ userRole = [] }: AnnouncementsPageProps) {
<Tabs defaultValue="list">
<div className="flex justify-between items-center mb-8">
<TabsList className="bg-black/20 border-0">
<TabsList className="bg-gray-200 border-0">
<TabsTrigger
value="list"
className="data-[state=active]:bg-blue-600 data-[state=active]:text-white text-gray-400"
className="data-[state=active]:bg-blue-600 data-[state=active]:text-white text-gray-700"
>
All Announcements
</TabsTrigger>
<TabsTrigger
value="create"
className="data-[state=active]:bg-blue-600 data-[state=active]:text-white text-gray-400"
className="data-[state=active]:bg-blue-600 data-[state=active]:text-white text-gray-700"
>
Create Announcement
</TabsTrigger>

View File

@ -21,6 +21,7 @@ import {
ChevronLeft,
ChevronRight,
BookOpen,
Book,
} from "lucide-react";
import { Button } from "@/components/ui/button";
import { ScrollArea } from "@/components/ui/scroll-area";
@ -158,6 +159,12 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
href: "/agilite",
iframe: process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL,
},
{
title: "Livres",
icon: Book,
href: "/livres",
iframe: process.env.NEXT_PUBLIC_IFRAME_LIVRE_URL,
},
];
// Role-specific menu items