add current date and tyrannuss
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user