fix: Update PrimeReact to v10.8.3 and fix all compilation errors
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user