fix: Update PrimeReact to v10.8.3 and fix all compilation errors

This commit is contained in:
dahoud
2025-10-13 03:01:36 +00:00
parent 2a2e54c0e3
commit 30cad6220b
85 changed files with 928 additions and 2020 deletions

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"
/>