Checkpoint: Correction de l'erreur d'affichage au clic sur un événement du calendrier (ajout import useState manquant) et correction du menu invisible sur la page Établissements (ajout DashboardLayout wrapper)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
|
import DashboardLayout from "@/components/DashboardLayout";
|
||||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
||||||
import { trpc } from "@/lib/trpc";
|
import { trpc } from "@/lib/trpc";
|
||||||
import { Building2, Users, TrendingUp, Activity } from "lucide-react";
|
import { Building2, Users, TrendingUp, Activity } from "lucide-react";
|
||||||
@@ -12,16 +13,17 @@ export default function AdminEtablissements() {
|
|||||||
const tauxGlobal = totalApprenants > 0 ? Math.round((totalActifs / totalApprenants) * 100) : 0;
|
const tauxGlobal = totalApprenants > 0 ? Math.round((totalActifs / totalApprenants) * 100) : 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-6">
|
<DashboardLayout>
|
||||||
<div>
|
<div className="space-y-6">
|
||||||
<h1 className="text-3xl font-bold">Établissements</h1>
|
<div>
|
||||||
<p className="text-muted-foreground mt-2">
|
<h1 className="text-3xl font-bold">Établissements</h1>
|
||||||
Vue d'ensemble des établissements et de leur participation
|
<p className="text-muted-foreground mt-2">
|
||||||
</p>
|
Vue d'ensemble des établissements et de leur participation
|
||||||
</div>
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Statistiques globales */}
|
{/* Statistiques globales */}
|
||||||
<div className="grid gap-4 md:grid-cols-4">
|
<div className="grid gap-4 md:grid-cols-4">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||||
<CardTitle className="text-sm font-medium">Établissements</CardTitle>
|
<CardTitle className="text-sm font-medium">Établissements</CardTitle>
|
||||||
@@ -65,18 +67,18 @@ export default function AdminEtablissements() {
|
|||||||
<p className="text-xs text-muted-foreground">Global</p>
|
<p className="text-xs text-muted-foreground">Global</p>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tableau des établissements */}
|
{/* Tableau des établissements */}
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>Liste des établissements</CardTitle>
|
<CardTitle>Liste des établissements</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
Statistiques de participation par établissement
|
Statistiques de participation par établissement
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Skeleton className="h-10 w-full" />
|
<Skeleton className="h-10 w-full" />
|
||||||
<Skeleton className="h-10 w-full" />
|
<Skeleton className="h-10 w-full" />
|
||||||
@@ -116,8 +118,9 @@ export default function AdminEtablissements() {
|
|||||||
Aucun établissement trouvé
|
Aucun établissement trouvé
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
</DashboardLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
5
todo.md
5
todo.md
@@ -567,3 +567,8 @@
|
|||||||
- [x] Créer les requêtes backend pour récupérer les statistiques par établissement
|
- [x] Créer les requêtes backend pour récupérer les statistiques par établissement
|
||||||
- [x] Créer une page "Établissements" avec liste et statistiques
|
- [x] Créer une page "Établissements" avec liste et statistiques
|
||||||
- [x] Ajouter le lien dans le menu de navigation
|
- [x] Ajouter le lien dans le menu de navigation
|
||||||
|
|
||||||
|
## Corrections bugs interface
|
||||||
|
|
||||||
|
- [x] Corriger l'erreur d'affichage au clic sur un événement du calendrier (ajout import useState)
|
||||||
|
- [x] Corriger le problème de menu invisible sur la page Établissements (ajout DashboardLayout)
|
||||||
|
|||||||
Reference in New Issue
Block a user