From 882ba3780f660f115131e917d41b9b724bdff857 Mon Sep 17 00:00:00 2001 From: AdalbertoCV <34152734@uaz.edu.mx> Date: Mon, 4 Nov 2024 12:43:51 -0600 Subject: [PATCH] =?UTF-8?q?Revisi=C3=B3n=20de=20detalles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cosiap_frontend/src/App.jsx | 2 +- .../components/admin/CrearAdministrador.jsx | 4 +- .../components/admin/TablaAdministradores.jsx | 5 +- .../src/components/admin/TablaUsuarios.jsx | 5 +- .../common/utility/RenderElemento.jsx | 3 ++ .../src/components/modalidades/Modalidad.jsx | 10 +++- .../src/components/users/Login/LoginForm.jsx | 50 ++++++++----------- 7 files changed, 43 insertions(+), 36 deletions(-) diff --git a/cosiap_frontend/src/App.jsx b/cosiap_frontend/src/App.jsx index 7d6143c..ddd0e10 100644 --- a/cosiap_frontend/src/App.jsx +++ b/cosiap_frontend/src/App.jsx @@ -145,7 +145,7 @@ function RoutesApp({ setViewPageLoader }) { } /> } /> } /> - } /> + } /> } /> } /> } /> diff --git a/cosiap_frontend/src/components/admin/CrearAdministrador.jsx b/cosiap_frontend/src/components/admin/CrearAdministrador.jsx index b4d72df..e13a3fa 100644 --- a/cosiap_frontend/src/components/admin/CrearAdministrador.jsx +++ b/cosiap_frontend/src/components/admin/CrearAdministrador.jsx @@ -4,7 +4,7 @@ import MainContainer from "../common/utility/MainContainer"; import '@/App.css'; import { useNavigate } from "react-router-dom"; -const CrearAdmin = () =>{ +const CrearAdmin = ({setViewPageLoader}) =>{ const [nombre, setNombre] = useState(''); const [curp, setCurp] = useState(''); const [email, setEmail] = useState(''); @@ -25,6 +25,7 @@ const CrearAdmin = () =>{ const handleSubmit = async (e) => { e.preventDefault(); + setViewPageLoader(true) if (password !== passwordConfirm) { showAlert("Las contraseñas no coinciden.", false); @@ -51,6 +52,7 @@ const CrearAdmin = () =>{ } } } + setViewPageLoader(false); }; return ( diff --git a/cosiap_frontend/src/components/admin/TablaAdministradores.jsx b/cosiap_frontend/src/components/admin/TablaAdministradores.jsx index 8e694e6..4e96b67 100644 --- a/cosiap_frontend/src/components/admin/TablaAdministradores.jsx +++ b/cosiap_frontend/src/components/admin/TablaAdministradores.jsx @@ -37,7 +37,8 @@ const ListaAdmins = () =>{ fetchAdmins(); }, []); - const handleSingleClick = (fila) => { + const handleSingleClick = (e,fila) => { + e.preventDefault(); setSelectedRow(fila.pk); }; @@ -150,7 +151,7 @@ const ListaAdmins = () =>{ /> ) : ( handleSingleClick(fila)} + onContextMenu={(e) => handleSingleClick(e,fila)} onDoubleClick={() => handleEditRow(fila.pk)} style={{ cursor: "pointer" }} > diff --git a/cosiap_frontend/src/components/admin/TablaUsuarios.jsx b/cosiap_frontend/src/components/admin/TablaUsuarios.jsx index 2874608..18f7e22 100644 --- a/cosiap_frontend/src/components/admin/TablaUsuarios.jsx +++ b/cosiap_frontend/src/components/admin/TablaUsuarios.jsx @@ -37,7 +37,8 @@ const ListaUsuarios = () => { fetchUsuarios(); }, []); - const handleSingleClick = (fila) => { + const handleSingleClick = (e,fila) => { + e.preventDefault(); setSelectedRow(fila.id); // Muestra el menú para el registro seleccionado }; @@ -157,7 +158,7 @@ const ListaUsuarios = () => { /> ) : ( handleSingleClick(fila)} + onContextMenu={(e) => handleSingleClick(e,fila)} onDoubleClick={() => handleEditRow(fila.id)} style={{ cursor: "pointer" }} > diff --git a/cosiap_frontend/src/components/common/utility/RenderElemento.jsx b/cosiap_frontend/src/components/common/utility/RenderElemento.jsx index 497fe5f..2f05c90 100644 --- a/cosiap_frontend/src/components/common/utility/RenderElemento.jsx +++ b/cosiap_frontend/src/components/common/utility/RenderElemento.jsx @@ -88,6 +88,9 @@ export const renderElemento = (seccionId, elemento, handleInputChange, handleChe case "desplegable": return renderInput(