diff --git a/client/src/components/CapacityProgressBar.tsx b/client/src/components/CapacityProgressBar.tsx new file mode 100644 index 0000000..95002c9 --- /dev/null +++ b/client/src/components/CapacityProgressBar.tsx @@ -0,0 +1,39 @@ +import { Progress } from "@/components/ui/progress"; +import { cn } from "@/lib/utils"; + +interface CapacityProgressBarProps { + nbInscrits: number; + capaciteMax: number; +} + +export default function CapacityProgressBar({ + nbInscrits, + capaciteMax, +}: CapacityProgressBarProps) { + const percentage = capaciteMax > 0 ? Math.round((nbInscrits / capaciteMax) * 100) : 0; + + // Déterminer la couleur selon le taux de remplissage + const getColor = () => { + if (percentage < 70) return "bg-green-500"; + if (percentage < 90) return "bg-orange-500"; + return "bg-red-500"; + }; + + return ( +
+ Vue mensuelle de toutes les séquences planifiées +
++ Configurez les rappels envoyés automatiquement avant les séquences +
+