mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
chore: Capacité de l'établissement retourné en variable de session /
login sur la home page
This commit is contained in:
@ -38,7 +38,8 @@ export default function DashboardPage() {
|
||||
});
|
||||
|
||||
const [classes, setClasses] = useState([]);
|
||||
const { selectedEstablishmentId } = useEstablishment();
|
||||
const { selectedEstablishmentId, selectedEstablishmentTotalCapacity } =
|
||||
useEstablishment();
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
useEffect(() => {
|
||||
@ -116,13 +117,13 @@ export default function DashboardPage() {
|
||||
/>
|
||||
<StatCard
|
||||
title={t('structureCapacity')}
|
||||
value={`${structureCapacity}`}
|
||||
value={`${selectedEstablishmentTotalCapacity}`}
|
||||
icon={<School className="text-green-500" size={24} />}
|
||||
color="emerald"
|
||||
/>
|
||||
<StatCard
|
||||
title={t('capacityRate')}
|
||||
value={`${((totalStudents / structureCapacity) * 100).toFixed(1)}%`}
|
||||
value={`${((totalStudents / selectedEstablishmentTotalCapacity) * 100).toFixed(1)}%`}
|
||||
icon={<School className="text-orange-500" size={24} />}
|
||||
color="orange"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user