Files
front-AT/app/Components/QuitarSancion/QuitarSancion.tsx
T

51 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-09-22 16:53:34 -06:00
"use client";
import { useState } from "react";
2025-09-28 01:59:16 -06:00
2025-09-22 16:53:34 -06:00
import styles from "./Page.module.css";
2025-09-23 17:28:23 -06:00
interface quitarSanciones {
2025-09-22 16:53:34 -06:00
id: number;
nombre: string;
motivo: string;
duracion: number;
fecha_sancion: string;
utilizar_equipo: number;
}
function QuitarSancion() {
2025-09-23 17:28:23 -06:00
const [quitarSanciones, SetQuitarSanciones] = useState<quitarSanciones[]>([]);
2025-09-22 16:53:34 -06:00
return (
<section className="containerSection">
<div className={styles.tableContainer}>
<table className={styles.machineTable}>
<thead>
<tr>
<th>id</th>
<th>Nombre</th>
<th>Motivo Sancion</th>
<th>Duracion (semanas) </th>
<th>Fecha Sancion</th>
<th>Podria utilizar el servicio hasta</th>
</tr>
</thead>
<tbody>
2025-09-23 17:28:23 -06:00
{quitarSanciones.map((quitarSanciones, index) => (
2025-09-22 16:53:34 -06:00
<tr key={index}>
2025-09-23 17:28:23 -06:00
<td>{quitarSanciones.id}</td>
<td>{quitarSanciones.nombre}</td>
<td>{quitarSanciones.motivo}</td>
<td>{quitarSanciones.duracion}</td>
<td>{quitarSanciones.fecha_sancion}</td>
<td>{quitarSanciones.utilizar_equipo}</td>
2025-09-22 16:53:34 -06:00
</tr>
))}
</tbody>
</table>
</div>
<button className="button buttonSearch">Quitar Sancion</button>
</section>
);
}
export default QuitarSancion;