diff --git a/cosiap_frontend/src/App.jsx b/cosiap_frontend/src/App.jsx index 7d6143c0f3f3305a7352958995549fcfb9657d13..ddd0e101fe9656381cd5e1c08a6f983e919607d2 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 b4d72df74997f0c518313cbac630b68b51a0d9f5..e13a3fa6ddcd879010ec4cae710d7d0252d2b3a1 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 8e694e6593ab8bf0689fc6d318a0ff87450455d6..4e96b67cea73aa9bb1233b42e58397ecfa665c54 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 28746089c0dbf697c5b90ba8b33b5e0e8d1404c4..18f7e22ea7fd4de2eac9b5790054e5141129bbb8 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 497fe5f7688af4fe968907eba43942de22916e2e..2f05c902653e5434e9238aab96e7560672cb3989 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(