🔧 Pelleteuse CAT 320
Type: PREVENTIVE • Prévue: 20/10/2025
Vidange et filtres
# Conception Dashboard BTP Xpress - 100% Données Réelles API **Date**: 2025-11-01 **Objectif**: Dashboard professionnel couvrant TOUS les aspects métiers BTP Xpress **Principe**: AUCUNE donnée fictive - 100% données réelles de l'API backend --- ## Architecture de disposition ### Layout global: 3 colonnes responsives ``` ┌─────────────────────────────────────────────────────────────────┐ │ BARRE D'ALERTES (conditionnelle) │ └─────────────────────────────────────────────────────────────────┘ ┌────────────────────────┬────────────────────────┬────────────────┐ │ KPI Principal 1 │ KPI Principal 2 │ KPI Principal 3 │ │ (Chantiers actifs) │ (Équipes dispo) │ (Maintenance) │ └────────────────────────┴────────────────────────┴────────────────┘ ┌─────────────────────────────────────┬──────────────────────────────┐ │ │ │ │ GRAPHIQUE D'ACTIVITÉ │ KPIs RESSOURCES │ │ (Chantiers par statut) │ - Employés actifs │ │ │ - Matériel disponible │ │ │ - Taux d'utilisation │ │ │ │ └─────────────────────────────────────┴──────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────┐ │ │ │ TABLEAU CHANTIERS ACTIFS │ │ (nom, client, budget, avancement, statut) │ │ │ └──────────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────┬──────────────────────────────┐ │ │ │ │ CHANTIERS EN RETARD │ MAINTENANCES EN RETARD │ │ (timeline avec détails) │ (liste avec matériel) │ │ │ │ └─────────────────────────────────────┴──────────────────────────────┘ ┌─────────────────────────────────────┬──────────────────────────────┐ │ │ │ │ DISPONIBILITÉS EN ATTENTE │ ÉVÉNEMENTS AUJOURD'HUI │ │ (demandes congés/absences) │ (planning du jour) │ │ │ │ └─────────────────────────────────────┴──────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────┐ │ │ │ DOCUMENTS RÉCENTS │ │ (5 derniers documents ajoutés) │ │ │ └──────────────────────────────────────────────────────────────────┘ ``` --- ## Mapping des données API vers composants UI ### 1. Barre d'alertes (affichée si totalAlertes > 0) **API**: `GET /api/v1/dashboard/alertes` ```json { "totalAlertes": 12, "alerteCritique": true, "maintenance": { "enRetard": 3, "details": [...] }, "chantiers": { "enRetard": 5, "details": [...] }, "disponibilites": { "enAttente": 2, "details": [...] }, "planning": { "conflits": 2, "details": [...] } } ``` **UI**: Bannière rouge en haut avec icône ⚠️ - "**12 alertes** nécessitent votre attention" + bouton "Voir les détails" --- ### 2. KPIs Principaux (3 cartes en ligne) #### KPI 1: Chantiers Actifs **API**: `GET /api/v1/dashboard` → `chantiers` ```json "chantiers": { "total": 45, "actifs": 28, "tauxActivite": 62.22 } ``` **UI**: Carte blanche avec icône 🏗️ - **Titre**: "Chantiers actifs" - **Nombre**: `28` (grand, bold) - **Sous-titre**: "Sur 45 au total" - **Badge**: `62.22%` d'activité #### KPI 2: Équipes Disponibles **API**: `GET /api/v1/dashboard` → `equipes` ```json "equipes": { "total": 12, "disponibles": 5, "tauxDisponibilite": 41.67 } ``` **UI**: Carte bleue avec icône 👥 - **Titre**: "Équipes disponibles" - **Nombre**: `5/12` - **ProgressBar**: 41.67% - **Sous-titre**: "Taux de disponibilité" #### KPI 3: Maintenances Critiques **API**: `GET /api/v1/dashboard` → `maintenance` ```json "maintenance": { "enRetard": 3, "planifiees": 8, "alerteRetard": true } ``` **UI**: Carte rouge (si alerteRetard) ou verte avec icône 🔧 - **Titre**: "Maintenances en retard" - **Nombre**: `3` (rouge si > 0) - **Sous-titre**: "8 planifiées" - **Badge**: "URGENT" si enRetard > 0 --- ### 3. Graphique d'activité (Chart.js) **API**: `GET /api/v1/dashboard/chantiers` → `statistiques` **Type**: Doughnut Chart (camembert) - **EN_COURS**: nombre + pourcentage - **PLANIFIE**: nombre + pourcentage - **TERMINE**: nombre + pourcentage - **SUSPENDU**: nombre + pourcentage - **ANNULE**: nombre + pourcentage **Couleurs Freya**: - EN_COURS: `--primary-color` (violet) - PLANIFIE: `--blue-500` - TERMINE: `--green-500` - SUSPENDU: `--orange-500` - ANNULE: `--red-500` --- ### 4. KPIs Ressources (colonne droite) **API**: `GET /api/v1/dashboard/ressources` ```json { "equipes": { "total": 12, "disponibles": 5, "tauxDisponibilite": 41.67 }, "employes": { "total": 156, "actifs": 142, "tauxActivite": 91.03 }, "materiel": { "total": 89, "disponible": 67, "tauxDisponibilite": 75.28 } } ``` **UI**: 3 sous-cartes empilées #### 4.1 Employés Actifs - **Icon**: 👨💼 - **Nombre**: `142/156` - **Label**: "Employés actifs" - **ProgressBar**: 91.03% (vert si > 80%, orange si > 60%, rouge sinon) #### 4.2 Matériel Disponible - **Icon**: 🚜 - **Nombre**: `67/89` - **Label**: "Matériel disponible" - **ProgressBar**: 75.28% #### 4.3 Taux d'utilisation global - **Calcul frontend**: moyenne des 3 taux (chantiers, équipes, employés) - **ProgressBar circulaire**: donut chart mini --- ### 5. Tableau Chantiers Actifs **API**: `GET /api/v1/dashboard/chantiers` → `chantiersActifs` (array) ```json "chantiersActifs": [ { "id": "uuid", "nom": "Rénovation Villa Dauphine", "client": "Jean Dupont", "dateDebut": "2025-01-15", "dateFinPrevue": "2025-04-30", "statut": "EN_COURS", "budget": 250000.00, "coutReel": 180000.00, "avancement": 72 } ] ``` **UI**: PrimeFaces DataTable responsive | Nom | Client | Début | Fin prévue | Avancement | Budget | Coût réel | Statut | Actions | |-----|--------|-------|------------|------------|--------|-----------|--------|---------| | Rénovation Villa Dauphine | Jean Dupont | 15/01/2025 | 30/04/2025 | ██████░░ 72% | 250 000 Fcfa | 180 000 Fcfa | 🟢 EN_COURS | 👁️ | **Colonnes**: 1. **Nom**: Texte (lien vers détails) 2. **Client**: Texte 3. **Date Début**: Format `dd/MM/yyyy` 4. **Date Fin Prévue**: Format `dd/MM/yyyy` 5. **Avancement**: ProgressBar avec % 6. **Budget**: Formaté avec `fcfaConverter` 7. **Coût Réel**: Formaté avec `fcfaConverter` + Badge (vert si < budget, rouge sinon) 8. **Statut**: Badge coloré selon statut 9. **Actions**: Bouton "Voir détails" **Pagination**: 10 par page **Tri**: Par date de début (décroissant) --- ### 6. Chantiers en Retard (Timeline) **API**: `GET /api/v1/dashboard/chantiers` → `chantiersEnRetard` (array) ```json "chantiersEnRetard": [ { "id": "uuid", "nom": "Construction Immeuble B", "dateFinPrevue": "2025-10-15", "joursRetard": 17 } ] ``` **UI**: Timeline Freya (ul.timeline) ```html
Type: PREVENTIVE • Prévue: 20/10/2025
Vidange et filtres