Fix: Corriger toutes les erreurs de build du frontend

- Correction des erreurs TypeScript dans userService.ts et workflowTester.ts
- Ajout des propriétés manquantes aux objets User mockés
- Conversion des dates de string vers objets Date
- Correction des appels asynchrones et des types incompatibles
- Ajout de dynamic rendering pour résoudre les erreurs useSearchParams
- Enveloppement de useSearchParams dans Suspense boundary
- Configuration de force-dynamic au niveau du layout principal

Build réussi: 126 pages générées avec succès

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
dahoud
2025-10-18 13:23:08 +00:00
parent c377291608
commit a8825a058b
164 changed files with 1228 additions and 1824 deletions

View File

@@ -1,4 +1,6 @@
'use client';
export const dynamic = 'force-dynamic';
import React, { useState, useEffect, useRef } from 'react';
import { Card } from 'primereact/card';
@@ -17,6 +19,7 @@ import { Badge } from 'primereact/badge';
import { chantierService, clientService, factureService, devisService } from '../../../services/api';
import { formatCurrency, formatDate } from '../../../utils/formatters';
import type { Chantier, Client, Facture, Devis } from '../../../types/btp';
import { StatutChantier } from '../../../types/btp';
interface ReportData {
chantiers: Chantier[];
@@ -101,12 +104,14 @@ const RapportsPage = () => {
nom: 'Résidence Les Palmiers',
description: 'Construction de 20 appartements',
adresse: '123 Rue des Palmiers, Abidjan',
dateDebut: new Date('2024-01-15'),
dateFinPrevue: new Date('2024-06-15'),
dateFinReelle: new Date('2024-06-20'),
statut: 'TERMINE',
dateDebut: '2024-01-15',
dateFinPrevue: '2024-06-15',
dateFinReelle: '2024-06-20',
statut: StatutChantier.TERMINE,
montantPrevu: 850000,
montantReel: 820000,
dateCreation: '2024-01-01',
dateModification: '2024-06-20',
actif: true,
client: {
id: '1',
@@ -118,8 +123,8 @@ const RapportsPage = () => {
codePostal: '00225',
ville: 'Abidjan',
entreprise: 'Entreprise Kouassi',
dateCreation: new Date('2024-01-01'),
dateModification: new Date('2024-01-01'),
dateCreation: '2024-01-01',
dateModification: '2024-01-01',
actif: true
}
},
@@ -128,12 +133,14 @@ const RapportsPage = () => {
nom: 'Immeuble Commercial',
description: 'Bureaux commerciaux',
adresse: '789 Boulevard Principal, Abidjan',
dateDebut: new Date('2024-03-01'),
dateFinPrevue: new Date('2024-12-31'),
dateDebut: '2024-03-01',
dateFinPrevue: '2024-12-31',
dateFinReelle: null,
statut: 'EN_COURS',
statut: StatutChantier.EN_COURS,
montantPrevu: 1200000,
montantReel: 600000,
dateCreation: '2024-02-01',
dateModification: '2024-10-15',
actif: true,
client: {
id: '2',
@@ -145,8 +152,8 @@ const RapportsPage = () => {
codePostal: '00225',
ville: 'Abidjan',
entreprise: 'Traoré SARL',
dateCreation: new Date('2024-02-01'),
dateModification: new Date('2024-02-01'),
dateCreation: '2024-02-01',
dateModification: '2024-02-01',
actif: true
}
}