fix: Resolve TypeScript errors in page.tsx and phases-chantier/page.tsx

This commit is contained in:
dahoud
2025-10-15 20:01:04 +00:00
parent 763ab81da3
commit aed2ce0182
22 changed files with 152 additions and 118 deletions

View File

@@ -37,7 +37,7 @@ const GestionnaireDashboard = () => {
const { user: currentUser } = useAuth();
// Vérifier que l'utilisateur est connecté et est un gestionnaire
if (!currentUser || currentUser.role !== 'GESTIONNAIRE_PROJET') {
if (!currentUser || !currentUser.roles?.includes('GESTIONNAIRE_PROJET')) {
return (
<div className="flex align-items-center justify-content-center min-h-screen">
<div className="text-center">
@@ -200,7 +200,7 @@ const GestionnaireDashboard = () => {
<div>
<h2 className="text-primary m-0">Dashboard Gestionnaire</h2>
<p className="text-color-secondary m-0">
Bienvenue {currentUser.prenom} {currentUser.nom}
Bienvenue {currentUser.fullName || currentUser.username}
</p>
</div>
</div>