From 5a81af78721349c9789f59cf748f4608dd998cae Mon Sep 17 00:00:00 2001 From: CarlosssFlores <307100636@pcpuma.acatlan.unam.mx> Date: Tue, 23 Sep 2025 14:13:23 -0600 Subject: [PATCH] nuevas vistas y componentes --- app/(private)/InformacionEquipo/page.tsx | 45 ++----------- app/(private)/Programas/page.tsx | 86 +++++++++++++----------- app/Components/Equipos/equipos.tsx | 39 +++++++++++ 3 files changed, 93 insertions(+), 77 deletions(-) create mode 100644 app/Components/Equipos/equipos.tsx diff --git a/app/(private)/InformacionEquipo/page.tsx b/app/(private)/InformacionEquipo/page.tsx index 0e7ab86..743d05a 100644 --- a/app/(private)/InformacionEquipo/page.tsx +++ b/app/(private)/InformacionEquipo/page.tsx @@ -2,6 +2,7 @@ import ProgramSelector from "@/app/Components/ProgramSelector/ProgramSelector"; import Toggle from "@/app/Components/Toggle/Toggle"; import "./informacionequipo.css"; +import Equipos from "@/app/Components/Equipos/equipos"; export default function Page() { return ( @@ -14,51 +15,16 @@ export default function Page() { { key: "1", label: "Equipos", - content: ( -
-
- - -
- - - - - - - - - - - -
- - -
-
- ), + content: , }, { key: "2", label: "Programa por equipo", content: ( ), }, @@ -67,8 +33,9 @@ export default function Page() { label: "Programa por sala", content: ( ), }, diff --git a/app/(private)/Programas/page.tsx b/app/(private)/Programas/page.tsx index 1419f31..3722faf 100644 --- a/app/(private)/Programas/page.tsx +++ b/app/(private)/Programas/page.tsx @@ -1,31 +1,38 @@ "use client"; import { useState } from "react"; -import SearchUser from "../../Components/SearchUser/searchUser"; import styleprograms from "./programas.module.css"; export default function Page() { - const [Editar, setEditar] = useState(true); - const [Nuevo, setNuevo] = useState(true); + // modo puede ser: "ver", "editar", "nuevo" + const [modo, setModo] = useState("ver"); const handleNuevo = () => { - setNuevo(false); + setModo("nuevo"); }; + const handleEditar = () => { - setEditar(false); + setModo("editar"); + }; + + const handleCancelar = () => { + setModo("ver"); }; return ( <> - {Editar ? ( + {modo === "ver" && (
-

ID

- - setUser(e.target.value)} - placeholder="Coloca " - /> +

PROGRAMAS

+ +

Programa

+
- ) : ( -
-
ID
-

PROGRAMAS

- - setUser(e.target.value)} - placeholder="Coloca " - /> -
- + )} - +
)} - {!Nuevo && ( + {modo === "nuevo" && (
- - setUser(e.target.value)} - placeholder="Coloca " - /> +

Nuevo Programa

+ +
- -
diff --git a/app/Components/Equipos/equipos.tsx b/app/Components/Equipos/equipos.tsx new file mode 100644 index 0000000..1b0079f --- /dev/null +++ b/app/Components/Equipos/equipos.tsx @@ -0,0 +1,39 @@ +export default function Equipos() { + return ( +
+
+ + +
+ + + + + + + + + + + +
+ + +
+
+ ); +}