From e2c4734306685d68c02c0d5e2cd58c457b8791e5 Mon Sep 17 00:00:00 2001 From: IO <320154041@pcpuma.acatlan.unam.mx> Date: Tue, 17 Feb 2026 19:16:57 -0600 Subject: [PATCH] just fixed styles --- app/(private)/AsignacionEquipo/asignacion.css | 1 + .../InformacionEquipo/informacionequipo.css | 2 +- app/(private)/Monitor/DSC.tsx | 207 +++++++++++------- app/(private)/Monitor/page.tsx | 3 +- .../BitacoraSanciones/BitacoraEquipo.tsx | 81 ++++++- .../QuitarSancion/QuitarSancion.tsx | 2 +- app/creadores/page.tsx | 4 +- 7 files changed, 209 insertions(+), 91 deletions(-) diff --git a/app/(private)/AsignacionEquipo/asignacion.css b/app/(private)/AsignacionEquipo/asignacion.css index 65d9e2b..fef117c 100644 --- a/app/(private)/AsignacionEquipo/asignacion.css +++ b/app/(private)/AsignacionEquipo/asignacion.css @@ -6,6 +6,7 @@ width: 100%; font-size: 14px; margin-bottom: 1rem; + max-width: 500px; } .customSelect.disabled { diff --git a/app/(private)/InformacionEquipo/informacionequipo.css b/app/(private)/InformacionEquipo/informacionequipo.css index 0ec5f3c..8887fbb 100644 --- a/app/(private)/InformacionEquipo/informacionequipo.css +++ b/app/(private)/InformacionEquipo/informacionequipo.css @@ -25,7 +25,7 @@ .form-container select { font-size: 13px; - padding: 4px 8px; + padding: 8px 12px; border: 1px solid #ccc; border-radius: 6px; outline: none; diff --git a/app/(private)/Monitor/DSC.tsx b/app/(private)/Monitor/DSC.tsx index 2443f64..47c234c 100644 --- a/app/(private)/Monitor/DSC.tsx +++ b/app/(private)/Monitor/DSC.tsx @@ -1,85 +1,144 @@ 'use client'; -type EstadoPC = 'libre' | 'ocupada' | 'fallo'; - -const colores: Record = { - libre: '#22c55e', // verde - ocupada: '#ef4444', // rojo - fallo: '#facc15', // amarillo -}; - -const pcs = [ - { - id: 'PC-01', - x: 120, - y: 180, - width: 40, - height: 40, - estado: 'libre' as EstadoPC, - }, - { - id: 'PC-02', - x: 170, - y: 180, - width: 40, - height: 40, - estado: 'ocupada' as EstadoPC, - }, - { - id: 'PC-03', - x: 220, - y: 180, - width: 40, - height: 40, - estado: 'fallo' as EstadoPC, - }, -]; - export default function DSC() { return ( - + - {/* FONDO */} - - {/* CAPA INTERACTIVA */} - - {pcs.map(pc => ( - - {/* CUADRO */} - console.log(pc.id)} - /> + {/* ===== BLOQUE SUPERIOR IZQUIERDO (AULAS Y SALAS) ===== */} - {/* NÚMERO */} - - {pc.id.replace('PC-', '')} - - - ))} - + + + AULA 5 + + + + + SALA USOS MÚLTIPLES + + + + + SALA DE ENTRENAMIENTO + + + {/* ===== BLOQUE CENTRAL WINDOWS ===== */} + + + + ÁREA WINDOWS + + + {/* División interna Windows */} + + + {/* ===== BLOQUE DERECHO MAC ===== */} + + + + ÁREA MAC + + + {/* ===== ROBÓTICA ===== */} + + + + ROBÓTICA + + + {/* ===== ADMINISTRACIÓN Y OFICINAS ===== */} + + + + ADMINISTRACIÓN + + + + + ASIGNACIÓN + + + + + IMPRESIÓN + + + {/* ===== CUBÍCULOS ===== */} + + {Array.from({ length: 8 }).map((_, i) => ( + + ))} + + + CUBÍCULOS 1–8 + + + {/* ===== SANITARIOS ===== */} + + + + SANITARIO HOMBRES + + + + + SANITARIO MUJERES + + + {/* ===== SALIDA EMERGENCIA ===== */} + + + SALIDA DE EMERGENCIA + + + {/* ===== ENTRADA PRINCIPAL ===== */} + + + ENTRADA Y SALIDA PRINCIPAL + ); diff --git a/app/(private)/Monitor/page.tsx b/app/(private)/Monitor/page.tsx index 2694969..1810f66 100644 --- a/app/(private)/Monitor/page.tsx +++ b/app/(private)/Monitor/page.tsx @@ -3,6 +3,7 @@ import MachineTable from "./MachineTable"; import styles from "./Page.module.css"; import MachineTableActive from "./MachineTableActive"; import DSC from "./DSC"; +import ToggleTable from "@/app/Components/Global/Toggle/ToggleTable"; export default async function Page(props: { searchParams?: Promise<{ numAcount: string; key: string }>; @@ -18,7 +19,7 @@ export default async function Page(props: {
- ([]); - const [ubicacion_equipo, setUbicacionEquipo] = useState(""); + const [open, setOpen] = useState(false); + const [loadingEquipos, setLoadingEquipos] = useState(false); + const [equipoSeleccionado, setEquipoSeleccionado] = useState(null); + const [equipos, setEquipos] = useState([]); + + useEffect(() => { + const fetchData = async () => { + setLoadingEquipos(true); + const response = await axios.get(`${envConfig.apiUrl}/equipo`); + setEquipos(response.data); + setLoadingEquipos(false); + }; + + fetchData(); + }, []); + return ( <> -
- + -
- + {equipoSeleccionado ? ( + + {equipoSeleccionado.ubicacion}{" "} + {equipoSeleccionado.nombre_equipo} + + ) : ( + + {loadingEquipos + ? "Cargando equipos..." + : "Seleccione un equipo"} + + )} + + {open ? "▲" : "▼"} +
+ + {open && ( +
+ {equipos.length === 0 && ( +
+ No hay equipos disponibles +
+ )} + + {equipos.map((eq) => ( +
{ + setEquipoSeleccionado(eq); + setOpen(false); + }} + > + {eq.ubicacion} {eq.nombre_equipo} +
+ ))} +
+ )} -
+
diff --git a/app/Components/QuitarSancion/QuitarSancion.tsx b/app/Components/QuitarSancion/QuitarSancion.tsx index 8fa4e4c..f05d7ef 100644 --- a/app/Components/QuitarSancion/QuitarSancion.tsx +++ b/app/Components/QuitarSancion/QuitarSancion.tsx @@ -38,7 +38,7 @@ function QuitarSancion({ id_cuenta }: { id_cuenta: number }) { return (
- + {(alumnoSanciones?.length > 0) &&