add current date and tyrannuss

This commit is contained in:
2026-02-17 17:27:53 -06:00
parent 45d60d87ec
commit 4de5a7d27d
5 changed files with 10 additions and 5 deletions
@@ -17,6 +17,7 @@ export default function ApplySanction({ idCuenta }: { idCuenta: number }) {
const [alumnoSanciones, setAlumnoSanciones] = useState<AlumnoSancion[]>([]);
const [selectedSancion, setSelectedSancion] = useState("");
const [loading, setLoading] = useState(false);
const [loadingTable, setLoadingTable] = useState(false);
const fetchAlumnoSanciones = async () => {
try {
@@ -27,6 +28,8 @@ export default function ApplySanction({ idCuenta }: { idCuenta: number }) {
setAlumno(res.data.student ?? null);
setAlumnoSanciones(res.data.alusancion ?? []);
} catch {
}finally{
setLoadingTable(true)
}
};
@@ -73,7 +76,7 @@ export default function ApplySanction({ idCuenta }: { idCuenta: number }) {
<>
<TableSanction alumnoSanciones={alumnoSanciones} alumno={alumno} />
{alumnoSanciones.length === 0 && (
{loadingTable && alumnoSanciones.length === 0 && (
<>
<form className="containerForm">
<div className="groupInput">