diff --git a/Bootstrap_new/css/style_office.css b/Bootstrap_new/css/style_office.css index 5e544f7..651a55b 100644 --- a/Bootstrap_new/css/style_office.css +++ b/Bootstrap_new/css/style_office.css @@ -862,6 +862,20 @@ body.sidebar-collapsed .nav-bar { padding: 1rem !important; font-size: 9pt; } + + .chart-container { + height: 60vh; + } + + .card-header { + flex-direction: column; + align-items: flex-start !important; + } + + .btn-export { + margin-top: 0.5rem; + align-self: flex-end; + } } /* Écrans larges : mêmes insets pour nav-tabs et content-area */ @@ -1431,4 +1445,20 @@ li i { margin-right:10px; color:#007bff; } padding: 15px; border-radius: 8px; background-color: white; -} \ No newline at end of file +} + +/* Styles communs pour tous les graphiques */ +.chart-container { + position: relative; + width: 100%; + min-height: 300px; +} + +.legend-text { + vertical-align: middle; +} + +.btn-export { + padding: 0.25rem 0.5rem; + font-size: 0.75rem; +} diff --git a/Controleur/ControleurFichebeneficiaire.php b/Controleur/ControleurFichebeneficiaire.php index d0188c7..4775c5a 100644 --- a/Controleur/ControleurFichebeneficiaire.php +++ b/Controleur/ControleurFichebeneficiaire.php @@ -202,9 +202,35 @@ class ControleurFichebeneficiaire extends Controleur $limite_beneficiaire = $this->garantieadherent->getLimitesBeneficiaire($idBeneficiaire); $limite_adherent = $this->garantieadherent->getLimitesAdherent($idAdherent); + + $prestationsParMois = $this->beneficiaire->getPrestationsmensuelles($idBeneficiaire); + + // Extraction directe des colonnes avec array_column + $tabConsoParMois = [ + 'mois' => array_column($prestationsParMois, 'mois'), + 'consos' => array_column($prestationsParMois, 'consommationBeneficiaire') + ]; + + $tabConsoParGaranties = [ + 'garanties' => array_column($garantieadherents, 'codeGarantie'), + 'depenses' => array_column($garantieadherents, 'consommation'), + 'plafonds' => array_column($garantieadherents, 'plafond') + ]; + + // Encodage JSON + $dataConsoParMois = json_encode($tabConsoParMois, JSON_NUMERIC_CHECK); + $dataConsoParGaranties = json_encode($tabConsoParGaranties, JSON_NUMERIC_CHECK); - $this->genererVue(array('beneficiaire' => $beneficiaire, 'message' => $message, 'nouveau_fichier' => $nouveau_fichier, - 'garantieadherents' => $garantieadherents, 'limite_beneficiaire' => $limite_beneficiaire, 'limite_adherent' => $limite_adherent)); + $this->genererVue(array( + 'beneficiaire' => $beneficiaire, + 'message' => $message, + 'nouveau_fichier' => $nouveau_fichier, + 'garantieadherents' => $garantieadherents, + 'limite_beneficiaire' => $limite_beneficiaire, + 'limite_adherent' => $limite_adherent, + 'dataConsoParMois' => $dataConsoParMois, + 'dataConsoParGaranties' => $dataConsoParGaranties + )); } public function supprimer() { diff --git a/Modele/Beneficiaire.php b/Modele/Beneficiaire.php index c13d2be..b6b4894 100755 --- a/Modele/Beneficiaire.php +++ b/Modele/Beneficiaire.php @@ -1644,5 +1644,18 @@ class Beneficiaire extends Modele { return $resultat->fetch(PDO::FETCH_ASSOC); } + + public function getPrestationsmensuelles($idBeneficiaire){ + + if (isset($_SESSION['lang']) && $_SESSION['lang']=="en_US"){ + $sql = 'call prestations_mensuelles_beneficiaire_eng(?)'; + }else{ + $sql = 'call prestations_mensuelles_beneficiaire(?)'; + } + + $resultat = $this->executerRequete($sql, array($idBeneficiaire)); + + return $resultat->fetchAll(PDO::FETCH_ASSOC); + } } \ No newline at end of file diff --git a/Vue/Fichebeneficiaire/index.php b/Vue/Fichebeneficiaire/index.php index 83d8cb3..2e6c9aa 100644 --- a/Vue/Fichebeneficiaire/index.php +++ b/Vue/Fichebeneficiaire/index.php @@ -88,243 +88,285 @@ -
-
-
-

- : -

- : nettoyer($beneficiaire['dateEffet'])) ?> -
- -
- - - - -
-
+ +
+
+

+ : +

+ : nettoyer($beneficiaire['dateEffet'])) ?> +
+ +
+ + + + +
+
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
-
- - -
-
- - -
-
- - -
+
+ + +
+
+ + +
+
+ + +
-
- -
- - -
-
-
- - -
-
-
-
-
+
+ +
+ + +
+
+
+ + +
+
+
+
+
-
-
-
-
- - - - -
- -
- - -
-
-

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

+ +
+ + + +
+
+
+ + +
+ +
+
:
+ +
+
+ +
+
-
- -
-
-
-
-
-
- - -
-
- - -
-
- - -
-
-
-
-
- +
+ +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ - -
-
-
-
-
-
- - -
-
- - -
-
- - -
-
-
-
-
- -
+ +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ +
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%
nettoyer($garantieadherent['exercieReference'])?>nettoyer($garantieadherent['garantie'])?>nettoyer($garantieadherent['plafondAnnuel'])) ?>nettoyer($garantieadherent['tauxAvenant']) ?>%nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['consommation'])) ?>nettoyer($garantieadherent['solde'])) ?> - nettoyer($garantieadherent['champApplication'])=='1') ? 'checked' : '' ?> disabled> - nettoyer($garantieadherent['garantieparentaffichage'])?>
-
-
-
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
%
nettoyer($garantieadherent['exercieReference'])?>nettoyer($garantieadherent['garantie'])?>nettoyer($garantieadherent['plafondAnnuel'])) ?>nettoyer($garantieadherent['tauxAvenant']) ?>%nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['consommation'])) ?>nettoyer($garantieadherent['solde'])) ?> + nettoyer($garantieadherent['champApplication'])=='1') ? 'checked' : '' ?> disabled> + nettoyer($garantieadherent['garantieparentaffichage'])?>
+
+
+ -
-
-
-
-
- - -
-
- -
-
- " "): ?> -
- -
- -
- - : -
- -
-
-
-
-
+
+
+
+
+
+ + +
+
+ +
+
+ " "): ?> +
+ +
+ +
+ + : +
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 5e8a22e..3fc7c8e 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -126,7 +126,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte']; - +