From d3e935fa35f1b85caa30e15ef37e0282075a1f83 Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Wed, 24 Dec 2025 15:51:04 +0000 Subject: [PATCH] Valider --- Controleur/ControleurAccueil.php | 50 +++++++------------------------- Modele/Synthese.php | 2 +- Vue/Accueil/index.php | 28 ++++++++++++------ 3 files changed, 30 insertions(+), 50 deletions(-) diff --git a/Controleur/ControleurAccueil.php b/Controleur/ControleurAccueil.php index 4dca9c8..f7486ad 100755 --- a/Controleur/ControleurAccueil.php +++ b/Controleur/ControleurAccueil.php @@ -15,6 +15,10 @@ class ControleurAccueil extends Controleur { public function index() { // KPIs + + $kpis = $this->synthese->getKpis(); + + /* $kpis = [ "assures" => 1248, "nombre_salarie" => 405, @@ -24,6 +28,7 @@ class ControleurAccueil extends Controleur { "cotisations" => 162300000, "solde" => 12500000 ]; + */ // Activité récente @@ -42,49 +47,14 @@ class ControleurAccueil extends Controleur { ]; // Répartition sinistres - $claims = $this->synthese->getClaims(); + $claims = $this->synthese->getClaims(); - $claimsLabels = array(); - $claimsValues = array(); - - $tabclaims = [ - 'claimsLabels' => [], - 'claimsValues' => [] - ]; - - foreach ($claims as $v) { - $tabclaims['claimsLabels'][] = $v['claimsLabels']; - $tabclaims['claimsValues'][] = $v['claimsValues']; - } - - $dataTabClaims = json_encode($tabclaims,JSON_NUMERIC_CHECK); - - //var_dump($dataTabClaims); exit(); - - - $claimsLabels = [ - "Consultations", - "Pharmacie", - "Hospitalisation", - "Imagerie", - "Dentaire" + $tabclaims = [ + 'claimsLabels' => array_column($claims, 'claimsLabels'), + 'claimsValues' => array_column($claims, 'claimsValues') ]; - $claimsLabelsEng = [ - "Consultations", - "Pharmacie", - "Hospitalisation", - "Imagerie", - "Dentaire" - ]; - - $claimsValues = [ - 22, - 28, - 30, - 12, - 8 - ]; + $dataTabClaims = json_encode($tabclaims, JSON_NUMERIC_CHECK); // Évolution cotisations $months = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin"]; diff --git a/Modele/Synthese.php b/Modele/Synthese.php index aa05faf..6a852b1 100755 --- a/Modele/Synthese.php +++ b/Modele/Synthese.php @@ -11,7 +11,7 @@ class Synthese extends Modele { $resultat = $this->executerRequete($sql, array($idClient)); - return $resultat->fetchAll(); + return $resultat->fetch(); } diff --git a/Vue/Accueil/index.php b/Vue/Accueil/index.php index e50d0e9..f74f34d 100644 --- a/Vue/Accueil/index.php +++ b/Vue/Accueil/index.php @@ -3,34 +3,44 @@
+
+

+
+
+

-
+
: - +
: - +

-
+

/
-
- -
-

-
+
+
+ : + +
+
+ : + +
+