menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Accueil'); $this->synthese = new Synthese(); } public function index() { // KPIs $kpis = $this->synthese->getKpis(); // Activité récente $activities = [ ["icon" => "fas fa-user-plus", "label" => "Nouveaux salariés ajoutés", "time" => "Il y a 1 heure"], ["icon" => "fas fa-sign-out-alt", "label" => "5 départs validés", "time" => "Il y a 2 heures"], ["icon" => "fas fa-pause-circle", "label" => "3 contrats suspendus", "time" => "Il y a 3 jours"], ["icon" => "fas fa-file-invoice", "label" => "Facture de février réglée", "time" => "Il y a 3 jours"] ]; // Alertes $alerts = [ "Plafond de remboursement atteint", "Paiement en retard de 4 520 €", "Documents manquants pour 2 dossiers" ]; // Répartition sinistres $claims = $this->synthese->getClaims(); $tabclaims = [ 'claimsLabels' => array_column($claims, 'claimsLabels'), 'claimsValues' => array_column($claims, 'claimsValues') ]; $dataTabClaims = json_encode($tabclaims, JSON_NUMERIC_CHECK); // SINISTRALITÉ (manquante jusqu’ici) $lossRatioLabels = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin"]; $lossRatioValues = [62, 68, 71, 65, 73, 69]; // % // Polices $polices = $this->synthese->getPolices(); $this->genererVue( array ( 'kpis' => $kpis, 'activities' => $activities, 'alerts' => $alerts, 'lossRatioLabels' => $lossRatioLabels, 'lossRatioValues' => $lossRatioValues, 'dataTabClaims' => $dataTabClaims, 'polices' => $polices ) ); } }