From 014b5df704e6b5b2c3a18128ab6c2282ff7229b0 Mon Sep 17 00:00:00 2001 From: Soka_jplr Date: Mon, 13 May 2024 00:44:42 -0600 Subject: [PATCH 1/6] funcinaliad del login --- backend/src/main/java/mx/uv/App.java | 18 +++- .../src/main/java/mx/uv/Controller/DAO.java | 80 +++++++++++++--- backend/src/main/java/mx/uv/Model/Alumno.java | 20 +++- .../src/main/java/mx/uv/Model/Mensaje.java | 26 ++++++ frontend/package-lock.json | 42 ++++++++- frontend/package.json | 4 +- frontend/src/Registro.jsx | 73 ++++++++++++--- frontend/src/login.css | 5 + frontend/src/login.jsx | 93 ++++++++++++++++++- frontend/src/main.jsx | 30 +++--- 10 files changed, 338 insertions(+), 53 deletions(-) create mode 100644 backend/src/main/java/mx/uv/Model/Mensaje.java diff --git a/backend/src/main/java/mx/uv/App.java b/backend/src/main/java/mx/uv/App.java index f9a9b8e..9b7504c 100644 --- a/backend/src/main/java/mx/uv/App.java +++ b/backend/src/main/java/mx/uv/App.java @@ -37,9 +37,11 @@ public class App String payload = request.body(); Alumno alumno = gson.fromJson(payload, Alumno.class); - boolean msj = DAO.agregarAlumno(alumno); + Mensaje msj = DAO.agregarAlumno(alumno); JsonObject respuesta = new JsonObject(); - respuesta.addProperty("msj", msj); + respuesta.addProperty("contrasena", msj.getAlumno().getContrasena()); + respuesta.addProperty("matricula", msj.getAlumno().getMatricula()); + respuesta.addProperty("verificacion", msj.isVerificacion()); return respuesta; }); put("/editarAlumno", (request, response) ->{ @@ -58,12 +60,22 @@ public class App respuesta.addProperty("existe", verificado); return respuesta; }); - get("/alumnoIniciado", (request, response) ->{ + + post("/alumnoIniciado", (request, response) ->{ response.type("application/json"); String payload = request.body(); Alumno alumno = gson.fromJson(payload, Alumno.class); return gson.toJson(DAO.alumnoIniciado(alumno.getMatricula(),alumno.getContrasena())); }); + post("/usuarioValido", (request, response) ->{ + String payload = request.body(); + Alumno alumno = gson.fromJson(payload, Alumno.class); + boolean verificado = DAO.validarAlumno(alumno); + JsonObject respuesta = new JsonObject(); + respuesta.addProperty("existe", verificado); + return respuesta; + }); + } } \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Controller/DAO.java b/backend/src/main/java/mx/uv/Controller/DAO.java index 3b39d7f..d10b172 100644 --- a/backend/src/main/java/mx/uv/Controller/DAO.java +++ b/backend/src/main/java/mx/uv/Controller/DAO.java @@ -3,9 +3,10 @@ package mx.uv.Controller; import java.sql.*; import java.util.ArrayList; import java.util.List; - +import java.util.Random; import mx.uv.Model.Alumno; +import mx.uv.Model.Mensaje; public class DAO { private static Conexion cn = Conexion.getInstance(); @@ -23,7 +24,7 @@ public class DAO { stm = conn.createStatement(); rs = stm.executeQuery(sql); while (rs.next()) { - Alumno u = new Alumno(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8)); + Alumno u = new Alumno(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9)); resultado.add(u); } } catch (Exception e) { @@ -40,8 +41,8 @@ public class DAO { ResultSet rs = null; conn = cn.conectar(); try { - String sql ="select * from usuarios " - + "where matricula= '"+alumno.getMatricula()+"' and contrasena='"+alumno.getContrasena()+"'"; + String sql ="select * from alumno " + + "where matricula= '"+alumno.getMatricula()+"' and password='"+alumno.getContrasena()+"'"; stm = (Statement) conn.createStatement(); rs = stm.executeQuery(sql); if(rs.next()){ @@ -56,31 +57,52 @@ public class DAO { return verificacion; } - public static boolean agregarAlumno(Alumno alumno) { + public static Mensaje agregarAlumno(Alumno alumno) { + Mensaje mensaje = new Mensaje(); PreparedStatement stm = null; Connection conn = null; boolean msj= false; - + String matricula = "SIU24"; + String password = crearContrasena(); + matricula += 1000+ obtenerUltimoID(); + alumno.setContrasena(password); + alumno.setMatricula(matricula); conn = cn.conectar(); try { - String sql = "INSERT INTO `alumno`(`nombre`,`apellido`,`nacionalidad`,`matricula`,`contrasena`)VALUES(?,?,?,?,?);"; + String sql = "INSERT INTO `alumno`(`nombre`,`apellido`,`nacionalidad`,`matricula`,`password`, `correo`)VALUES(?,?,?,?,?,?);"; stm = (PreparedStatement) conn.prepareStatement(sql); stm.setString(1, alumno.getNombre()); stm.setString(2, alumno.getApellido()); stm.setString(3, alumno.getNacionalidad()); stm.setString(4, alumno.getMatricula()); stm.setString(5, alumno.getContrasena()); - if (stm.executeUpdate() > 0) - msj = true; + stm.setString(6, alumno.getCorreo()); + if (stm.executeUpdate() > 0){ + mensaje.setVerificacion(true); + mensaje.setAlumno(alumno); + } else - msj = false; + mensaje.setVerificacion(false); } catch (Exception e) { System.out.println(e); } finally { cerrarConexiones(stm,conn); } - return msj; + return mensaje; + } + + public static String crearContrasena() { + Random random = new Random(); + String contrasena = ""; + String CARACTERES_PERMITIDOS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#"; + for (int i = 0; i < 10; i++) { + int numero = random.nextInt(CARACTERES_PERMITIDOS.length()); + char caracterAleatorio = CARACTERES_PERMITIDOS.charAt(numero); + contrasena += caracterAleatorio; + } + + return contrasena.toString(); } private static void cerrarConexiones(PreparedStatement stm,Connection conn) { @@ -109,7 +131,7 @@ public class DAO { boolean verificacion =false; conn = cn.conectar(); try { - String sql ="UPDATE `alumno` SET `nombre` = '"+alumno.getNombre()+"',`apellido` = '"+alumno.getApellido()+"',`fecha_nacimiento` = '"+alumno.getFechaNacimiento()+"',`nacionalidad` = '"+alumno.getNacionalidad()+"', `tipoSangre` = '"+alumno.getTipoDeSangre()+"', `contrasena`= '"+alumno.getContrasena()+"' WHERE `id` = '"+alumno.getId()+"';"; + String sql ="UPDATE `alumno` SET `nombre` = '"+alumno.getNombre()+"',`apellido` = '"+alumno.getApellido()+"',`fecha_nacimiento` = '"+alumno.getFechaNacimiento()+"',`nacionalidad` = '"+alumno.getNacionalidad()+"', `tipoSangre` = '"+alumno.getTipoDeSangre()+"', `password`= '"+alumno.getContrasena()+"' WHERE `id` = '"+alumno.getId()+"';"; stm = conn.prepareStatement(sql); stm.executeUpdate(); verificacion = true; @@ -130,13 +152,13 @@ public class DAO { conn = cn.conectar(); try { - String sql = "SELECT * FROM alumno WHERE matricula = ? AND contrasena = ?"; + String sql = "SELECT * FROM alumno WHERE matricula = ? AND password = ?"; PreparedStatement stmt = conn.prepareStatement(sql); stmt.setString(1, matricula); stmt.setString(2, contrasena); rs = stmt.executeQuery(); while (rs.next()) { - alumno = new Alumno(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8)); + alumno = new Alumno(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9)); } } catch (Exception e) { System.out.println(e); @@ -145,4 +167,34 @@ public class DAO { } return alumno; } + + public static int obtenerUltimoID() { + Connection conn = null; + Statement stm = null; + ResultSet rs = null; + int ultimoID = -1; + + try { + conn = cn.conectar(); + String sql = "SELECT MAX(id) AS ultimo_id FROM alumno"; + stm = conn.createStatement(); + rs = stm.executeQuery(sql); + + if (rs.next()) { + ultimoID = rs.getInt("ultimo_id"); + } + } catch (SQLException ex) { + System.err.println(ex); + } finally { + // Cerrar recursos + try { + if (rs != null) rs.close(); + if (stm != null) stm.close(); + if (conn != null) conn.close(); + } catch (SQLException ex) { + System.err.println(ex); + } + } + return ultimoID; + } } diff --git a/backend/src/main/java/mx/uv/Model/Alumno.java b/backend/src/main/java/mx/uv/Model/Alumno.java index 7ab862b..ce0cf49 100644 --- a/backend/src/main/java/mx/uv/Model/Alumno.java +++ b/backend/src/main/java/mx/uv/Model/Alumno.java @@ -9,9 +9,10 @@ public class Alumno { private String tipoDeSangre; private String matricula; private String contrasena; + private String correo; public Alumno(int id, String nombre, String apellido, String fechaNacimiento, String nacionalidad, - String tipoDeSangre, String matricula, String contrasena) { + String tipoDeSangre, String matricula, String contrasena, String correo) { this.id = id; this.nombre = nombre; this.apellido = apellido; @@ -20,17 +21,20 @@ public class Alumno { this.tipoDeSangre = tipoDeSangre; this.matricula = matricula; this.contrasena = contrasena; + this.correo = correo; } + public Alumno() { } - public Alumno(String nombre, String apellido, String nacionalidad, String matricula, String contrasena) { + public Alumno(String nombre, String apellido, String nacionalidad, String matricula, String contrasena,String correo) { this.nombre = nombre; this.apellido = apellido; this.nacionalidad = nacionalidad; this.matricula = matricula; this.contrasena = contrasena; + this.correo = correo; } public Alumno(String matricula, String contrasena) { @@ -38,8 +42,6 @@ public class Alumno { this.contrasena = contrasena; } - - public void setId(int id) { this.id = id; } @@ -89,6 +91,16 @@ public class Alumno { public String getContrasena() { return contrasena; } + + + public String getCorreo() { + return correo; + } + + + public void setCorreo(String correo) { + this.correo = correo; + } } \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Model/Mensaje.java b/backend/src/main/java/mx/uv/Model/Mensaje.java new file mode 100644 index 0000000..e73d54b --- /dev/null +++ b/backend/src/main/java/mx/uv/Model/Mensaje.java @@ -0,0 +1,26 @@ +package mx.uv.Model; + +public class Mensaje { + private boolean verificacion; + private Alumno alumno; + + public Mensaje(){ + }; + public Mensaje(boolean verificacion, Alumno alumno) { + this.verificacion = verificacion; + this.alumno = alumno; + } + public boolean isVerificacion() { + return verificacion; + } + public Alumno getAlumno() { + return alumno; + } + public void setVerificacion(boolean verificacion) { + this.verificacion = verificacion; + } + public void setAlumno(Alumno alumno) { + this.alumno = alumno; + } + +} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 10cc79f..c707cf8 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,7 +11,9 @@ "axios": "^1.6.8", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-dropzone": "^14.2.3" + "react-dropzone": "^14.2.3", + "react-router": "^6.23.1", + "react-router-dom": "^6.23.1" }, "devDependencies": { "@types/react": "^18.2.66", @@ -929,6 +931,14 @@ "node": ">= 8" } }, + "node_modules/@remix-run/router": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.16.1.tgz", + "integrity": "sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.14.3", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz", @@ -3668,6 +3678,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.23.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.1.tgz", + "integrity": "sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==", + "dependencies": { + "@remix-run/router": "1.16.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.23.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.1.tgz", + "integrity": "sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ==", + "dependencies": { + "@remix-run/router": "1.16.1", + "react-router": "6.23.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", diff --git a/frontend/package.json b/frontend/package.json index ac37084..1c35243 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -13,7 +13,9 @@ "axios": "^1.6.8", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-dropzone": "^14.2.3" + "react-dropzone": "^14.2.3", + "react-router": "^6.23.1", + "react-router-dom": "^6.23.1" }, "devDependencies": { "@types/react": "^18.2.66", diff --git a/frontend/src/Registro.jsx b/frontend/src/Registro.jsx index 0bc5b40..7adc51c 100644 --- a/frontend/src/Registro.jsx +++ b/frontend/src/Registro.jsx @@ -1,7 +1,61 @@ -import React from 'react'; +import React, {useState} from 'react'; +import axios from 'axios' import './Registro.css'; // Estilo para el formulario function Registro(){ + const [Cargando, setCargando] = useState(false); + const [alumno, setAlumno] = useState({ + nombre: "", + apellido: "", + nacionalidad: "", + correo: "", + }); + + const limpiar = () => { + setAlumno((prevAlumno) => ({ + ...prevAlumno, + nombre: "", + apellido: "", + nacionalidad: "", + correo: "", + })); + }; + + const hacerPeticion = async () => { + try { + const res = await axios.post("http://localhost:4567/agregarAlumno", alumno); + return res.data; + } catch (error) { + throw error; + } + }; + + const procesarFormulario = async (e) => { + e.preventDefault(); + setCargando(true); + try { + const res = await hacerPeticion(); + setCargando(false); + if (res.verificacion) { + limpiar(); + alert("Producto Registrado Correctamente" + "Contraseña: " + res.contrasena +" Matricula: " +res.matricula); + } else { + alert("Error Producto No registrado"); + } + } catch (error) { + console.log(error); + setCargando(false); + }finally{ + } + }; + + const cambiosAlumno = (e) => { + const { name, value } = e.target; + setAlumno({ + ...alumno, + [name]: value, + }); + }; return (
@@ -10,27 +64,24 @@ function Registro(){
- + +
- - -
-
- - + +
- +
- +
- +
diff --git a/frontend/src/login.css b/frontend/src/login.css index 2b1133c..8cbf2c6 100644 --- a/frontend/src/login.css +++ b/frontend/src/login.css @@ -111,3 +111,8 @@ div a{ font-weight: bold; } +.gridContainer{ + width: 50%; /* Puedes ajustar esto según tus necesidades */ + margin: 0 auto; +} + diff --git a/frontend/src/login.jsx b/frontend/src/login.jsx index b84fdb8..aabfdb9 100644 --- a/frontend/src/login.jsx +++ b/frontend/src/login.jsx @@ -1,6 +1,88 @@ -import './login.css' +import React, {useState} from 'react'; +import './login.css'; +import { Link } from 'react-router-dom'; +import axios from 'axios'; function Login() { + const [Cargando, setCargando] = useState(false); + const [datosUsuario, setDatosUsuario] = useState({ + matricula: "", + contrasena: "", + }); + const [usuario, setUsuario] = useState({ + id: 0, + nombre: "", + contrasena: "", + correo: "", + }); + + const limpiar = () => { + setDatosUsuario((prev) => ({ + matricula: "", + contrasena: "", + })); + }; + //peticion al Backend para ver si el usuario existe en la BD + const hacerPeticion = async () => { + try { + const res = await axios.post( + "http://localhost:4567/usuarioValido", + datosUsuario + ); + return res.data; + } catch (error) { + throw error; + } + }; + //peticion al Backend para regresar el usuario Iniciado + const obtenerUsuario = async () => { + try { + const res = await axios.post( + "http://localhost:4567/alumnoIniciado", + datosUsuario + ); + return res.data; + } catch (error) { + throw error; + } + }; + //prosesamiento de Uusario. + const procesarFormulario = async (e) => { + e.preventDefault(); + setCargando(true); + + try { + const res = await hacerPeticion(); + setCargando(false); + + if (res.existe) { + const aux = await obtenerUsuario(); + setUsuario({ + id: aux.id, + nombre: aux.nombre, + contrasena: aux.contrasena, + correo: aux.correo, + }); + alert("¡Bienvenido! " + aux.nombre); + limpiar(); + window.location.href = '/home'; + } else { + alert("Usuario No encontrado"); + } + } catch (error) { + console.log(error); + setCargando(false); + } + }; + + const cambiosUsuario = (e) => { + const { name, value } = e.target; + setDatosUsuario({ + ...datosUsuario, + [name]: value, + }); + }; + return ( <> @@ -12,11 +94,12 @@ function Login() {

Bienvenido

- - + + - - + + ¿Aún no te has registrado? +
diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx index 5cd4d00..ff1a2f4 100644 --- a/frontend/src/main.jsx +++ b/frontend/src/main.jsx @@ -1,16 +1,18 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' +import React from 'react'; +import { createRoot } from 'react-dom/client'; // Importar desde "react-dom/client" +import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; +import Login from './login.jsx' +import Registro from './Registro.jsx'; import OfertaEducativa from './OfertaEducativa.jsx' - -import './Registro.css' -import './login.css' - - -ReactDOM.createRoot(document.getElementById('root')).render( - - - , -) - - +createRoot(document.getElementById('root')).render( + + + + } /> + } /> + }/> + + + +); From f433408735170f5626be104716e330c83ce66b7e Mon Sep 17 00:00:00 2001 From: Soka_jplr Date: Tue, 14 May 2024 17:46:43 -0600 Subject: [PATCH 2/6] iplementacion --- Base/universidad.sql | 6 +++ .../src/main/java/mx/uv/Controller/DAO.java | 2 + .../java/mx/uv/Controller/DAORegistro.java | 45 +++++++++++++++++++ .../src/main/java/mx/uv/Model/Registro.java | 5 +++ 4 files changed, 58 insertions(+) create mode 100644 backend/src/main/java/mx/uv/Controller/DAORegistro.java create mode 100644 backend/src/main/java/mx/uv/Model/Registro.java diff --git a/Base/universidad.sql b/Base/universidad.sql index 7cfc73f..692800f 100644 --- a/Base/universidad.sql +++ b/Base/universidad.sql @@ -20,6 +20,12 @@ create table alumno( correo varchar(40) ); +create table registro( + id integer auto_increment primary key, + matricula varchar(40), + descripcion varchar(100) +); + drop table examen; create table examen( diff --git a/backend/src/main/java/mx/uv/Controller/DAO.java b/backend/src/main/java/mx/uv/Controller/DAO.java index d10b172..3fc8211 100644 --- a/backend/src/main/java/mx/uv/Controller/DAO.java +++ b/backend/src/main/java/mx/uv/Controller/DAO.java @@ -1,6 +1,7 @@ package mx.uv.Controller; import java.sql.*; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -160,6 +161,7 @@ public class DAO { while (rs.next()) { alumno = new Alumno(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9)); } + DAORegistro.registrar(alumno," Inicio Sesión ", LocalDateTime.now()); } catch (Exception e) { System.out.println(e); } finally { diff --git a/backend/src/main/java/mx/uv/Controller/DAORegistro.java b/backend/src/main/java/mx/uv/Controller/DAORegistro.java new file mode 100644 index 0000000..8c48915 --- /dev/null +++ b/backend/src/main/java/mx/uv/Controller/DAORegistro.java @@ -0,0 +1,45 @@ +package mx.uv.Controller; + +import java.time.LocalDateTime; +import java.sql.*; + +import mx.uv.Model.Alumno; + +public class DAORegistro { + private static Conexion cn = Conexion.getInstance(); + + public static void registrar(Alumno alumno, String descripcion, LocalDateTime day) { + PreparedStatement stm = null; + Connection conn = null; + conn = cn.conectar(); + try { + String sql = "INSERT INTO `registro`(`matricula`,`descripcion`)VALUES(?,?);"; + stm = (PreparedStatement) conn.prepareStatement(sql); + stm.setString(1, alumno.getMatricula()); + stm.setString(2, descripcion + day); + stm.executeUpdate(); + } catch (Exception e) { + System.out.println(e); + } finally { + cerrarConexiones(stm,conn); + } + } + + private static void cerrarConexiones(PreparedStatement stm,Connection conn) { + if (stm != null) { + try { + stm.close(); + } catch (Exception e) { + System.out.println(e); + } + stm = null; + } + try { + conn.close(); + cn.cerrarConexion(); + } catch (Exception e) { + System.out.println(e); + } + } + +} diff --git a/backend/src/main/java/mx/uv/Model/Registro.java b/backend/src/main/java/mx/uv/Model/Registro.java new file mode 100644 index 0000000..cf7bc25 --- /dev/null +++ b/backend/src/main/java/mx/uv/Model/Registro.java @@ -0,0 +1,5 @@ +package mx.uv.Model; + +public class Registro { + +} From 19aa1d5995833d433a77178c54f68e0cdb1bf50a Mon Sep 17 00:00:00 2001 From: Soka_jplr Date: Tue, 14 May 2024 22:46:35 -0600 Subject: [PATCH 3/6] correciones --- frontend/{ => public}/imagen.jpg | Bin frontend/{ => public}/logo.png | Bin frontend/{src/assets => public}/student.jpg | Bin frontend/public/vite.svg | 1 - frontend/src/{ => assets}/Encabezado.jsx | 0 frontend/src/{ => assets}/General.jsx | 0 frontend/src/{ => assets}/OfertaEducativa.jsx | 8 +- frontend/src/{ => assets}/Preinscripcion.jsx | 0 frontend/src/{ => assets}/Registro.jsx | 2 +- frontend/src/{ => assets}/SubirPDF.jsx | 0 frontend/src/assets/login.jsx | 136 ++++++++++++++++++ frontend/src/assets/react.svg | 1 - frontend/src/login.jsx | 118 --------------- frontend/src/main.jsx | 13 +- frontend/src/{ => styles}/Encabezado.css | 0 frontend/src/{ => styles}/OfertaEducativa.css | 0 frontend/src/{ => styles}/Registro.css | 0 frontend/src/{ => styles}/login.css | 49 ++++--- 18 files changed, 178 insertions(+), 150 deletions(-) rename frontend/{ => public}/imagen.jpg (100%) rename frontend/{ => public}/logo.png (100%) rename frontend/{src/assets => public}/student.jpg (100%) delete mode 100644 frontend/public/vite.svg rename frontend/src/{ => assets}/Encabezado.jsx (100%) rename frontend/src/{ => assets}/General.jsx (100%) rename frontend/src/{ => assets}/OfertaEducativa.jsx (90%) rename frontend/src/{ => assets}/Preinscripcion.jsx (100%) rename frontend/src/{ => assets}/Registro.jsx (97%) rename frontend/src/{ => assets}/SubirPDF.jsx (100%) create mode 100644 frontend/src/assets/login.jsx delete mode 100644 frontend/src/assets/react.svg delete mode 100644 frontend/src/login.jsx rename frontend/src/{ => styles}/Encabezado.css (100%) rename frontend/src/{ => styles}/OfertaEducativa.css (100%) rename frontend/src/{ => styles}/Registro.css (100%) rename frontend/src/{ => styles}/login.css (79%) diff --git a/frontend/imagen.jpg b/frontend/public/imagen.jpg similarity index 100% rename from frontend/imagen.jpg rename to frontend/public/imagen.jpg diff --git a/frontend/logo.png b/frontend/public/logo.png similarity index 100% rename from frontend/logo.png rename to frontend/public/logo.png diff --git a/frontend/src/assets/student.jpg b/frontend/public/student.jpg similarity index 100% rename from frontend/src/assets/student.jpg rename to frontend/public/student.jpg diff --git a/frontend/public/vite.svg b/frontend/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/frontend/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/src/Encabezado.jsx b/frontend/src/assets/Encabezado.jsx similarity index 100% rename from frontend/src/Encabezado.jsx rename to frontend/src/assets/Encabezado.jsx diff --git a/frontend/src/General.jsx b/frontend/src/assets/General.jsx similarity index 100% rename from frontend/src/General.jsx rename to frontend/src/assets/General.jsx diff --git a/frontend/src/OfertaEducativa.jsx b/frontend/src/assets/OfertaEducativa.jsx similarity index 90% rename from frontend/src/OfertaEducativa.jsx rename to frontend/src/assets/OfertaEducativa.jsx index 43c6be5..2f6016b 100644 --- a/frontend/src/OfertaEducativa.jsx +++ b/frontend/src/assets/OfertaEducativa.jsx @@ -1,8 +1,14 @@ -import './OfertaEducativa.css' +//import './OfertaEducativa.css' +import React, { useState } from 'react'; +import { useParams } from "react-router-dom"; function OfertaEducativa (){ + const { id } = useParams(); + const { nombre } = useParams(); + console.log(usuario); return ( <> +

Bienvenido, {nombre}!