diff --git a/app/src/app/Controllers/Admin/EstadistiquesController.php b/app/src/app/Controllers/Admin/EstadistiquesController.php index f8efc15..354ef74 100644 --- a/app/src/app/Controllers/Admin/EstadistiquesController.php +++ b/app/src/app/Controllers/Admin/EstadistiquesController.php @@ -12,20 +12,19 @@ public function index($queryParams = []) { // Obtenim les dades del model correcte $totalContractes = Contract::count(); - $totalTreeTypes = TreeType::count(); + $nomcontracts = Contract::findAll(); // Comprova si $grafiques és null i assegura't que sigui un array - $contracts = Contract::findAll(); // Renderitzem la vista amb les dades View::render([ 'view' => 'Admin/Grafics', 'title' => 'Grafiques', 'layout' => 'Admin/AdminLayout', - 'data' => ['totalContractes' => $totalContractes, 'totalTreeTypes' => $totalTreeTypes], + 'data' => ['totalContractes' => $totalContractes, 'nomsContractes' => $nomcontracts], ]); } } diff --git a/app/src/app/Views/Admin/Grafics.php b/app/src/app/Views/Admin/Grafics.php index c03b2c7..d637dd8 100644 --- a/app/src/app/Views/Admin/Grafics.php +++ b/app/src/app/Views/Admin/Grafics.php @@ -22,7 +22,10 @@ Seleccionar Contrato