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

@@ -158,8 +158,8 @@ const NouveauChantierPage = () => {
console.error('❌ API TypeChantier non disponible. Le backend doit être redémarré.', error);
// Afficher un message d'erreur à l'utilisateur
if (toastRef.current) {
toastRef.current.show({
if (toast.current) {
toast.current.show({
severity: 'error',
summary: 'API non disponible',
detail: 'Les endpoints TypeChantier ne sont pas encore exposés. Redémarrez le backend.',
@@ -232,6 +232,7 @@ const NouveauChantierPage = () => {
dateFinEstimee: dateFinEstimee,
complexite: {
niveau: (typeChantier.dureeMoyenneJours || 180) > 300 ? 'COMPLEXE' : 'SIMPLE',
score: (typeChantier.dureeMoyenneJours || 180) > 300 ? 75 : 25,
facteurs: []
},
phasesCount: 8, // Valeur par défaut en attendant les templates
@@ -252,8 +253,8 @@ const NouveauChantierPage = () => {
} catch (error) {
console.error('❌ Impossible de calculer la prévisualisation - API TypeChantier non disponible:', error);
if (toastRef.current) {
toastRef.current.show({
if (toast.current) {
toast.current.show({
severity: 'warn',
summary: 'Prévisualisation indisponible',
detail: 'Impossible de calculer la prévisualisation sans l\'API TypeChantier',
@@ -351,7 +352,7 @@ const NouveauChantierPage = () => {
nom: chantierForm.nom,
description: chantierForm.description || '',
adresse: chantierForm.adresse,
dateDebut: chantierForm.dateDebut instanceof Date ? chantierForm.dateDebut.toISOString().split('T')[0] : chantierForm.dateDebut,
dateDebut: chantierForm.dateDebut,
dateFinPrevue: chantierForm.dateFinPrevue || null,
statut: chantierForm.statut || 'PLANIFIE',
montantPrevu: Number(chantierForm.montantPrevu) || 0,
@@ -1239,4 +1240,4 @@ const NouveauChantierPage = () => {
);
};
export default NouveauChantierPage;
export default NouveauChantierPage;