fix: Update PrimeReact and fix all compilation errors

This commit is contained in:
Lions Dev
2025-10-13 05:18:02 +02:00
parent 6ebca4945c
commit 96eb956b0b
793 changed files with 11998 additions and 10690 deletions

12
app/(main)/client/dashboard/page.tsx Normal file → Executable file
View File

@@ -44,7 +44,7 @@ const ClientDashboard = () => {
const { user: currentUser } = useAuth();
// Vérifier que l'utilisateur est connecté et est un client
if (!currentUser || currentUser.role !== 'CLIENT') {
if (!currentUser || !currentUser.roles?.includes('CLIENT')) {
return (
<div className="flex align-items-center justify-content-center min-h-screen">
<div className="text-center">
@@ -65,8 +65,8 @@ const ClientDashboard = () => {
try {
setLoading(true);
// Charger mes chantiers (en utilisant le clientId)
const chantiers = await chantierService.getByClient(currentUser.clientId!);
// Charger mes chantiers (en utilisant l'id utilisateur)
const chantiers = await chantierService.getByClient(currentUser.id as any);
setMesChantiers(chantiers);
// Calculer les statistiques
@@ -206,12 +206,12 @@ const ClientDashboard = () => {
<div>
<h2 className="text-primary m-0">Mon Espace Client</h2>
<p className="text-color-secondary m-0">
Bienvenue {currentUser.prenom} {currentUser.nom}
Bienvenue {currentUser.firstName} {currentUser.lastName}
</p>
</div>
<div className="flex align-items-center gap-2">
<Avatar
label={`${currentUser.prenom.charAt(0)}${currentUser.nom.charAt(0)}`}
<Avatar
label={`${currentUser.firstName?.charAt(0) || ''}${currentUser.lastName?.charAt(0) || ''}`}
className="bg-primary text-white"
size="large"
/>