Files
MAD-Platform/app/dashboard/calendrier/page.tsx

34 lines
959 B
TypeScript
Raw Normal View History

2026-01-21 17:34:48 +01:00
import { redirect } from 'next/navigation';
import { getCurrentUser } from '@/lib/auth';
2026-01-22 18:53:23 +01:00
import { hasPageAccess } from '@/lib/permissions';
2026-01-21 17:34:48 +01:00
import DashboardLayout from '@/components/DashboardLayout';
import CalendrierPageContent from '@/components/CalendrierPageContent';
export default async function CalendrierPage() {
const user = await getCurrentUser();
if (!user) {
redirect('/login');
}
2026-01-22 18:53:23 +01:00
const hasAccess = await hasPageAccess(user.id, '/dashboard/calendrier');
if (!hasAccess) {
redirect('/dashboard/parametres');
}
2026-01-21 17:34:48 +01:00
return (
<DashboardLayout user={user}>
2026-02-08 15:27:44 +01:00
<div className="p-4 sm:p-6 lg:p-8">
<h1 className="text-2xl sm:text-3xl font-semibold text-cblack mb-2">
2026-01-21 17:34:48 +01:00
Calendrier
</h1>
2026-02-08 15:27:44 +01:00
<p className="text-xs sm:text-sm text-cgray mb-6 sm:mb-8">
2026-01-21 17:34:48 +01:00
Gestion des trajets et planning des chauffeurs
</p>
<CalendrierPageContent />
</div>
</DashboardLayout>
);
}