menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Accueil'); $this->synthese = new Synthese(); } public function index() { // KPIs $kpis = $this->synthese->getKpis(); /* $kpis = [ "assures" => 1248, "nombre_salarie" => 405, "nombre_ayant" => 843, "sinistres_count" => 92, "sinistres_amount" => 48750000, "cotisations" => 162300000, "solde" => 12500000 ]; */ // 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); // Évolution cotisations $months = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin"]; $monthlyCotisations = [ 24500000, 25800000, 26200000, 27500000, 28900000, 30000000 ]; // SINISTRALITÉ (manquante jusqu’ici) $lossRatioLabels = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin"]; $lossRatioValues = [62, 68, 71, 65, 73, 69]; // % $this->genererVue( array ( 'kpis' => $kpis, 'activities' => $activities, 'alerts' => $alerts, 'months' => $months, 'monthlyCotisations' => $monthlyCotisations, 'lossRatioLabels' => $lossRatioLabels, 'lossRatioValues' => $lossRatioValues, 'dataTabClaims' => $dataTabClaims ) ); } }