fix: Resolve TypeScript errors in page.tsx and phases-chantier/page.tsx
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user