mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
chore: application prettier
This commit is contained in:
@ -5,7 +5,7 @@ import { GraduationCap } from 'lucide-react';
|
||||
const ClasseDetails = ({ classe }) => {
|
||||
if (!classe) return null;
|
||||
|
||||
const nombreElevesInscrits = classe?.eleves?.length||0;
|
||||
const nombreElevesInscrits = classe?.eleves?.length || 0;
|
||||
const capaciteTotale = classe.number_of_students;
|
||||
const pourcentage = Math.round((nombreElevesInscrits / capaciteTotale) * 100);
|
||||
|
||||
@ -42,14 +42,12 @@ const ClasseDetails = ({ classe }) => {
|
||||
{nombreElevesInscrits}/{capaciteTotale}
|
||||
</span>
|
||||
<div className="w-32 bg-gray-200 rounded-full h-6 shadow-inner">
|
||||
<div
|
||||
<div
|
||||
className={`h-full rounded-full ${getColor(pourcentage)}`}
|
||||
style={{ width: `${pourcentage}%` }}
|
||||
></div>
|
||||
</div>
|
||||
<span className="ml-4 font-bold text-gray-700">
|
||||
{pourcentage}%
|
||||
</span>
|
||||
<span className="ml-4 font-bold text-gray-700">{pourcentage}%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -60,7 +58,7 @@ const ClasseDetails = ({ classe }) => {
|
||||
columns={[
|
||||
{ name: 'NOM', transform: (row) => row.name },
|
||||
{ name: 'PRENOM', transform: (row) => row.first_name },
|
||||
{ name: 'AGE', transform: (row) => `${row.age}` }
|
||||
{ name: 'AGE', transform: (row) => `${row.age}` },
|
||||
]}
|
||||
data={classe.students}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user