From 935cc3ea1c6707c177767522659fffc457883738 Mon Sep 17 00:00:00 2001 From: PTA Date: Tue, 11 Aug 2026 15:09:15 +0200 Subject: [PATCH] =?UTF-8?q?Retrait=20des=20cumuls=20=C2=AB=20Consommation?= =?UTF-8?q?=20globale=20=C2=BB=20et=20=C2=AB=20Reste=20=C3=A0=20affecter?= =?UTF-8?q?=20=C2=BB=20du=20tableau=20de=20bord?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ces deux cartes additionnaient les heures de tous les agents suivis, quotités confondues : le pourcentage et le solde obtenus ne décrivaient la situation d'aucun agent réel et n'appelaient aucune action. Le bloc « Suivi des quotas annuels » conserve les indicateurs actionnables (agents suivis, agents sans aucune heure) et le tableau agent par agent. Les agrégats correspondants sont retirés du payload de api/dashboard_summary.php et de leur calcul dans DashboardController : plus aucun consommateur ne les lit. La tuile « Quotas dépassés » et son compteur de dépassements sont inchangés. Co-Authored-By: Claude Opus 5 --- app/Controllers/DashboardController.php | 16 ++++------------ app/Views/layouts/footer.php | 6 +++--- app/Views/layouts/header.php | 2 +- app/Views/pages/role.php | 2 +- app/Views/partials/dashboard.php | 10 ---------- assets/js/dashboard.js | 9 --------- 6 files changed, 9 insertions(+), 36 deletions(-) diff --git a/app/Controllers/DashboardController.php b/app/Controllers/DashboardController.php index 761b700..18880b6 100644 --- a/app/Controllers/DashboardController.php +++ b/app/Controllers/DashboardController.php @@ -186,28 +186,24 @@ final class DashboardController } /** - * Suivi des quotas : combien d'agents dépassent leur quota annuel, combien - * n'ont encore aucune heure planifiée, et le volume restant à affecter. + * Suivi des quotas : combien d'agents dépassent leur quota annuel et combien + * n'ont encore aucune heure planifiée. Les cumuls tous agents confondus + * (consommation globale, reste à affecter) ne sont volontairement pas exposés : + * une somme d'agents aux quotités différentes ne décrit aucune situation réelle. */ private function quotaPayload(int $year): array { $tracking = $this->dashboardModel->quotaTracking($year); $overCount = 0; $emptyCount = 0; - $remainingMinutes = 0; - $targetMinutes = 0; - $allocatedMinutes = 0; foreach ($tracking as $agent) { - $targetMinutes += $agent['quota_cible_minutes']; - $allocatedMinutes += $agent['minutes_affectees']; if ($agent['minutes_restantes'] < 0) { $overCount++; } if ($agent['minutes_affectees'] === 0) { $emptyCount++; } - $remainingMinutes += max(0, $agent['minutes_restantes']); } // Tri décroissant sur le taux : les dépassements remontent en tête, @@ -221,10 +217,6 @@ final class DashboardController 'agent_count' => count($tracking), 'depassement_count' => $overCount, 'sans_heure_count' => $emptyCount, - 'minutes_restantes' => $remainingMinutes, - 'minutes_cible' => $targetMinutes, - 'minutes_affectees' => $allocatedMinutes, - 'taux_global' => $targetMinutes > 0 ? round(($allocatedMinutes / $targetMinutes) * 100, 1) : 0.0, 'apercu' => array_slice($tracking, 0, self::QUOTA_APERCU_MAX), ]; } diff --git a/app/Views/layouts/footer.php b/app/Views/layouts/footer.php index 9993753..568fdd5 100644 --- a/app/Views/layouts/footer.php +++ b/app/Views/layouts/footer.php @@ -28,10 +28,10 @@ window.PTA_PAGE_CONFIG = $pageConfig, ], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) ?>; - + - + - + diff --git a/app/Views/layouts/header.php b/app/Views/layouts/header.php index aa2452f..482a4f6 100644 --- a/app/Views/layouts/header.php +++ b/app/Views/layouts/header.php @@ -67,7 +67,7 @@ $showGroupLabels = $visiblePageCount > 4; <?= htmlspecialchars($pageTitle) ?> — PTA - +
diff --git a/app/Views/pages/role.php b/app/Views/pages/role.php index f07105b..0d63bba 100644 --- a/app/Views/pages/role.php +++ b/app/Views/pages/role.php @@ -12,7 +12,7 @@ Choisir votre accès — PTA - +
diff --git a/app/Views/partials/dashboard.php b/app/Views/partials/dashboard.php index cdf0b62..ba5f521 100644 --- a/app/Views/partials/dashboard.php +++ b/app/Views/partials/dashboard.php @@ -92,16 +92,6 @@ — actifs -
- Consommation globale - — - du quota cumulé -
-
- Reste à affecter - — - hors agents déjà au-delà -
Sans aucune heure — diff --git a/assets/js/dashboard.js b/assets/js/dashboard.js index 670a441..26d2d6c 100644 --- a/assets/js/dashboard.js +++ b/assets/js/dashboard.js @@ -34,9 +34,6 @@ quotaTile: document.querySelector('#dashboard-tile-quota'), quotaSubtitle: document.querySelector('#dashboard-quota-subtitle'), quotaAgents: document.querySelector('#dashboard-quota-agents'), - quotaRate: document.querySelector('#dashboard-quota-rate'), - quotaRateDetail: document.querySelector('#dashboard-quota-rate-detail'), - quotaRemaining: document.querySelector('#dashboard-quota-remaining'), quotaEmptyAgents: document.querySelector('#dashboard-quota-empty'), quotaBody: document.querySelector('#dashboard-quota-body'), quotaEmptyState: document.querySelector('#dashboard-quota-empty-state'), @@ -232,12 +229,6 @@ `Année civile ${quota.annee} · heures validées et brouillon comprises, motifs décomptés uniquement.`; } if (elements.quotaAgents) elements.quotaAgents.textContent = String(quota.agent_count || 0); - if (elements.quotaRate) elements.quotaRate.textContent = `${Number(quota.taux_global || 0)} %`; - if (elements.quotaRateDetail) { - elements.quotaRateDetail.textContent = - `${formatDuration(Number(quota.minutes_affectees || 0))} sur ${formatDuration(Number(quota.minutes_cible || 0))}`; - } - if (elements.quotaRemaining) elements.quotaRemaining.textContent = formatDuration(Number(quota.minutes_restantes || 0)); if (elements.quotaEmptyAgents) elements.quotaEmptyAgents.textContent = String(quota.sans_heure_count || 0); const items = Array.isArray(quota.apercu) ? quota.apercu : [];