diff --git a/Base/universidad.sql b/Base/universidad.sql index 692800f..31ced7c 100644 --- a/Base/universidad.sql +++ b/Base/universidad.sql @@ -1,23 +1,56 @@ create database universidad; drop database universidad; + CREATE USER 'UserRemoto' @'localhost' IDENTIFIED BY 'password123'; + DROP USER 'UserRemoto'@'localhost'; -GRANT ALL PRIVILEGES ON cocina TO 'UserRemoto' @'localhost'; +GRANT ALL PRIVILEGES ON universidad.* TO 'UserRemoto'@'LOCALHOST'; FLUSH PRIVILEGES; + use universidad; -drop table alumno; -create table alumno( +create table usuario( + id integer auto_increment primary key, + nombre varchar(40) not null, + apellido varchar(100) not null, + matricula varchar(40) not null UNIQUE, + contrasena varchar(40) not null, + correo varchar(40) not null, + nacionalidad varchar(30), + tipoSangre varchar(6), + fecha_nacimiento date, + curp varchar(18), + rol varchar(30) not null, + idCarrera integer references carrera, + inscrito BIT +); + +create table carrera( id integer auto_increment primary key, nombre varchar(40), - apellido varchar(100), - fecha_nacimiento date, - nacionalidad varchar(40), - tipoSangre varchar(40), - matricula varchar(40), - password varchar(40), - correo varchar(40) + area varchar(40) +); + +create table tutor( + id integer auto_increment primary key, + nombre varchar(40), + apellido varchar(40), + numeroDeTelefono integer, + idUsuario integer references usuario +); + +create table documento( +id integer auto_increment primary key, +titulo varchar(40), +archivo blob, +idUsuario integer references usuario, +valido BIT +); +create table inscripcion( +id integer auto_increment primary key, +idUusario integer references usuario, +idDocumento integer references documento ); create table registro( @@ -26,146 +59,14 @@ create table registro( descripcion varchar(100) ); - -drop table examen; -create table examen( - id integer auto_increment primary key, - calificacion double, - derecho_inscripcion boolean, - id_alumno integer, - FOREIGN KEY (id_alumno) REFERENCES alumno(id) -); - -drop table tutor; -create table tutor( -id integer auto_increment primary key, -nombre varchar(40), -apellidos varchar(100), -parentesco varchar(40), -ocupacion varchar(100), -telefono varchar(100) -); - -drop table carrera; -create table carrera( -id integer auto_increment primary key, -area varchar(100), -nombre varchar(40), -modalidad varchar(40), -campus varchar(40), -costo double -); - -drop table documentacion; -create table documentacion( -id integer auto_increment primary key, -acta_nacimiento blob, -certificado_bachillerato blob, -curp blob, -ine blob, -ine_tutor blob, -certificado_medico blob, -comprobante blob, -fotografia blob, -constancia blob -); - - -drop table fichaP; -create table fichaP( -id integer auto_increment primary key, -id_alumno integer, -id_carrera integer, -fecha_inicio date, -fecha_fin date, -FOREIGN KEY (id_alumno) REFERENCES alumno(id), -FOREIGN KEY (id_carrera) REFERENCES carrera(id) -); - -drop table fichaI; -create table fichaI( -id_alumno integer, -id_carrera integer, -id_tutor integer, -id_documentacion integer, -fecha_inicio date, -fecha_fin date, -FOREIGN KEY (id_alumno) REFERENCES alumno(id), -FOREIGN KEY (id_carrera) REFERENCES carrera(id), -FOREIGN KEY (id_tutor) REFERENCES tutor(id), -FOREIGN KEY (id_documentacion) REFERENCES documentacion(id) -); - -drop table administrador; -create table administrador( -id integer auto_increment primary key, -matricula varchar(40), -contraseña varchar(40) -); - -create table documentacion; -create table documentacion ( -id integer auto_increment primary key, -acta_nacimiento BLOB, -certificadoBachillerato BLOB, -curp BLOB, -ine_Alumno BLOB, -ine_Tutor BLOB, -certificado_Medico BLOB, -comprobante_Domicilio BLOB, -fotografia BLOB, -constancia BLOB, -municipio varchar(40), -estado varchar(40), -telefono varchar(40), -domicilio varchar(40) -); - -INSERT INTO alumno (nombre, apellidos, fecha_nacimiento, nacionalidad, tipoSangre, matricula, password) -VALUES -('Juan', 'Pérez García', '2000-05-15', 'Mexicana', 'O+', '123ABC', 'contraseña123'), -('María', 'López Rodríguez', '1999-10-20', 'Mexicana', 'A-', '456DEF', 'maria123'), -('Carlos', 'González Martínez', '2001-03-08', 'Mexicana', 'B+', '789GHI', 'carlos456'), -('Laura', 'Hernández Sánchez', '1998-12-03', 'Mexicana', 'AB-', '012JKL', 'laura789'), -('Pedro', 'Díaz Pérez', '2002-07-11', 'Mexicana', 'O-', '345MNO', 'pedro123'); - -INSERT INTO examen (calificacion, derecho_inscripcion, id_alumno) -VALUES -(85.5, true, 1), -(78.9, false, 2), -(92.3, true, 3), -(64.7, false, 4), -(88.1, true, 5); - -INSERT INTO tutor (nombre, apellidos, parentesco, ocupacion, telefono) -VALUES -('Ana', 'García Martínez', 'Madre', 'Ingeniera', '555-123-4567'), -('Luis', 'López Rodríguez', 'Padre', 'Abogado', '555-987-6543'), -('María', 'Pérez Sánchez', 'Tía', 'Médico', '555-456-7890'), -('Juan', 'Martínez González', 'Abuelo', 'Profesor', '555-234-5678'), -('Laura', 'Díaz Fernández', 'Hermana', 'Estudiante', '555-678-9012'); - - -INSERT INTO carrera (area, nombre, modalidad, campus, costo) -VALUES -('Ingeniería', 'Ingeniería Civil', 'Presencial', 'Ciudad Universitaria', 120000), -('Ciencias de la Salud', 'Medicina', 'Presencial', 'Hospital Universitario', 180000), -('Ciencias Sociales', 'Psicología', 'Presencial', 'Campus Central', 100000), -('Arte y Diseño', 'Diseño Gráfico', 'Presencial', 'Campus de Arte', 90000), -('Ciencias de la Computación', 'Ingeniería en Sistemas', 'Presencial', 'Campus Tecnológico', 150000); - -INSERT INTO fichaP (id_alumno, id_carrera, fecha_inicio, fecha_fin) -VALUES -(1, 1, '2023-09-01', '2027-06-30'), -(2, 2, '2023-09-01', '2027-06-30'), -(3, 3, '2023-09-01', '2027-06-30'), -(4, 4, '2023-09-01', '2027-06-30'), -(5, 5, '2023-09-01', '2027-06-30'); - -INSERT INTO administrador (matricula, contraseña) VALUES ('Daniel', 'lalelilolu'); -INSERT INTO administrador (matricula, contraseña) VALUES ('Juan', 'perrotonto16'); -INSERT INTO administrador (matricula, contraseña) VALUES ('francis', 'palapa'); -INSERT INTO administrador (matricula, contraseña) VALUES ('citlali', 'java'); +INSERT INTO carrera (nombre, area) VALUES +('Ingeniería de Sistemas', 'Tecnología'), +('Medicina', 'Salud'), +('Derecho', 'Ciencias Sociales'), +('Arquitectura', 'Arte y Diseño'), +('Administración de Empresas', 'Negocios'), +('Psicología', 'Ciencias Sociales'); + diff --git a/backend/src/main/java/mx/uv/App.java b/backend/src/main/java/mx/uv/App.java index 959f0fd..a2a96c1 100644 --- a/backend/src/main/java/mx/uv/App.java +++ b/backend/src/main/java/mx/uv/App.java @@ -11,15 +11,16 @@ import mx.uv.Model.*; public class App { static Gson gson = new Gson(); - static HashMap usuarios = new HashMap<>(); + static HashMap usuarios = new HashMap<>(); public static void main(String[] args) { - // fuente:https://gist.github.com/saeidzebardast/e375b7d17be3e0f4dddf + // Configuración de CORS options("/*", (request, response) -> { String accessControlRequestHeaders = request.headers("Access-Control-Request-Headers"); if (accessControlRequestHeaders != null) { response.header("Access-Control-Allow-Headers", accessControlRequestHeaders); } + String accessControlRequestMethod = request.headers("Access-Control-Request-Method"); if (accessControlRequestMethod != null) { response.header("Access-Control-Allow-Methods", accessControlRequestMethod); @@ -27,60 +28,70 @@ public class App { return "OK"; }); - before((request, response) -> response.header("Access-Control-Allow-Origin", "*")); + before((request, response) -> { + response.header("Access-Control-Allow-Origin", "http://localhost:5173"); + response.header("Access-Control-Allow-Credentials", "true"); + }); get("/todosLosAlumnos", (request, response) -> { response.type("application/json"); return gson.toJson(DAO.dameAlumnos()); }); + post("/agregarAlumno", (request, response) -> { String payload = request.body(); - Alumno alumno = gson.fromJson(payload, Alumno.class); - - Mensaje msj = DAO.agregarAlumno(alumno); + Usuario usuario = gson.fromJson(payload, Usuario.class); + usuario.setRol("estudiante"); + Mensaje msj = DAO.agregarAlumno(usuario); JsonObject respuesta = new JsonObject(); - respuesta.addProperty("contrasena", msj.getAlumno().getContrasena()); - respuesta.addProperty("matricula", msj.getAlumno().getMatricula()); + respuesta.addProperty("contrasena", msj.getUsuario().getContrasena()); + respuesta.addProperty("matricula", msj.getUsuario().getMatricula()); respuesta.addProperty("verificacion", msj.isVerificacion()); return respuesta; }); + put("/editarAlumno", (request, response) -> { String payload = request.body(); - Alumno alumno = gson.fromJson(payload, Alumno.class); - boolean verificado = DAO.editarAlumno(alumno); + Usuario usuario = gson.fromJson(payload, Usuario.class); + boolean verificado = DAO.editarAlumno(usuario); JsonObject respuesta = new JsonObject(); respuesta.addProperty("Editado", verificado); return respuesta; }); + delete("/eliminarAlumno", (request, response) -> { String payload = request.body(); - Alumno alumno = gson.fromJson(payload, Alumno.class); - boolean verificado = DAO.eliminarAlumno(alumno.getId()); + Usuario usuario = gson.fromJson(payload, Usuario.class); + boolean verificado = DAO.eliminarAlumno(usuario.getId()); JsonObject respuesta = new JsonObject(); respuesta.addProperty("existe", verificado); return respuesta; }); - get("/alumnoIniciado", (request, response) -> { + post("/alumnoIniciado", (request, response) -> { + String payload = request.body(); response.type("application/json"); - String contrasena = request.queryParams("contrasena"); - String matricula = request.queryParams("matricula"); - Alumno alumno = new Alumno(matricula, contrasena); - if (contrasena == null || matricula == null) { - response.status(400); // Bad request + Usuario u = gson.fromJson(payload, Usuario.class); + if (u.getContrasena() == null || u.getMatricula() == null) { + response.status(400); return gson.toJson("Missing matricula or contrasena"); } - return gson.toJson(DAO.alumnoIniciado(alumno.getMatricula(), alumno.getContrasena())); + Usuario usuario = DAO.alumnoIniciado(u.getMatricula(), u.getContrasena()); + JsonObject respuesta = new JsonObject(); + respuesta.addProperty("matricula", usuario.getMatricula()); + respuesta.addProperty("authToken", usuario.crearToken()); + respuesta.addProperty("authRol", usuario.getRol()); + respuesta.addProperty("message", "Binevenido " + usuario.getNombre()); + return gson.toJson(respuesta); }); post("/usuarioValido", (request, response) -> { String payload = request.body(); - Alumno alumno = gson.fromJson(payload, Alumno.class); - boolean verificado = DAO.validarAlumno(alumno); + Usuario usuario = gson.fromJson(payload, Usuario.class); + boolean verificado = DAO.validarAlumno(usuario); 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 3fc8211..ab46514 100644 --- a/backend/src/main/java/mx/uv/Controller/DAO.java +++ b/backend/src/main/java/mx/uv/Controller/DAO.java @@ -6,168 +6,202 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import mx.uv.Model.Alumno; +import mx.uv.Model.Usuario; import mx.uv.Model.Mensaje; +import mx.uv.Model.Registro; + +import java.sql.*; +import java.util.*; +import java.time.LocalDateTime; public class DAO { private static Conexion cn = Conexion.getInstance(); + private static String nombreTabla = "usuario"; + private static String colId = "id"; + private static String colNombre = "nombre"; + private static String colApellido = "apellido"; + private static String colMatricula = "matricula"; + private static String colContrasena = "contrasena"; + private static String colCorreo = "correo"; + private static String colNacionalidad = "nacionalidad"; + private static String colTipoSangre = "tipoSangre"; + private static String colFechaNacimiento = "fecha_nacimiento"; + private static String colCurp = "curp"; + private static String colRol = "rol"; + private static String colIdCarrera = "idCarrera"; + private static String colInscrito = "inscrito"; - public static List dameAlumnos() { + public static List dameAlumnos() { Statement stm = null; ResultSet rs = null; Connection conn = null; - List resultado = new ArrayList<>(); + List resultado = new ArrayList<>(); conn = cn.conectar(); try { - String sql = "SELECT * from alumno"; + String sql = "SELECT " + colId + " " + colNombre + " " + colApellido + " " + colMatricula + " from " + + nombreTabla; 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),rs.getString(9)); + Usuario u = new Usuario(rs.getInt(colId), rs.getString(colNombre), rs.getString(colApellido), + rs.getString(colMatricula)); resultado.add(u); } } catch (Exception e) { System.out.println(e); } finally { - cerrarConexiones(null, conn); + cerrarConexiones(null, conn); } return resultado; } - public static boolean validarAlumno(Alumno alumno) { - Statement stm = null; + + public static boolean validarAlumno(Usuario alumno) { + PreparedStatement stm = null; Connection conn = null; - boolean verificacion =false; + boolean verificacion = false; ResultSet rs = null; conn = cn.conectar(); try { - String sql ="select * from alumno " - + "where matricula= '"+alumno.getMatricula()+"' and password='"+alumno.getContrasena()+"'"; - stm = (Statement) conn.createStatement(); - rs = stm.executeQuery(sql); - if(rs.next()){ - verificacion = true; - }else{ - verificacion = false; - } - conn.close(); - } catch (SQLException ex) { - System.err.println(ex); + String sql = "SELECT * FROM " + nombreTabla + " WHERE " + colMatricula + " = ? AND " + colContrasena + + " = ?"; + stm = conn.prepareStatement(sql); + stm.setString(1, alumno.getMatricula()); + stm.setString(2, alumno.getContrasena()); + rs = stm.executeQuery(); + if (rs.next()) { + verificacion = true; + } else { + verificacion = false; } + } catch (SQLException ex) { + System.err.println(ex); + } finally { + cerrarConexiones(stm, conn); + } return verificacion; } - public static Mensaje agregarAlumno(Alumno alumno) { + public static Mensaje agregarAlumno(Usuario usuario) { Mensaje mensaje = new Mensaje(); PreparedStatement stm = null; Connection conn = null; - boolean msj= false; - String matricula = "SIU24"; + String matricula = "SIU24" + (1000 + obtenerUltimoID()); String password = crearContrasena(); - matricula += 1000+ obtenerUltimoID(); - alumno.setContrasena(password); - alumno.setMatricula(matricula); + usuario.setContrasena(password); + usuario.setMatricula(matricula); conn = cn.conectar(); try { - 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()); - stm.setString(6, alumno.getCorreo()); - if (stm.executeUpdate() > 0){ + String sql = "INSERT INTO " + nombreTabla + " (" + colNombre + ", " + colApellido + ", " + colNacionalidad + + ", " + colMatricula + ", " + colContrasena + ", " + colCorreo + ", " + colRol + + ") VALUES (?, ?, ?, ?, ?, ?,?)"; + stm = conn.prepareStatement(sql); + stm.setString(1, usuario.getNombre()); + stm.setString(2, usuario.getApellido()); + stm.setString(3, usuario.getNacionalidad()); + stm.setString(4, usuario.getMatricula()); + stm.setString(5, usuario.getContrasena()); + stm.setString(6, usuario.getCorreo()); + stm.setString(7, usuario.getRol()); + if (stm.executeUpdate() > 0) { mensaje.setVerificacion(true); - mensaje.setAlumno(alumno); - } - else + mensaje.setUsuario(usuario); + } else { mensaje.setVerificacion(false); - + } } catch (Exception e) { System.out.println(e); } finally { - cerrarConexiones(stm,conn); + cerrarConexiones(stm, conn); } return mensaje; } public static String crearContrasena() { Random random = new Random(); - String contrasena = ""; + StringBuilder contrasena = new StringBuilder(); 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; + contrasena.append(CARACTERES_PERMITIDOS.charAt(numero)); } - return contrasena.toString(); } - private static void cerrarConexiones(PreparedStatement stm,Connection 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(); + if (conn != null) { + conn.close(); + cn.cerrarConexion(); + } } catch (Exception e) { System.out.println(e); } } + public static boolean eliminarAlumno(int idAlumno) { - - return false; + return false; } - public static boolean editarAlumno(Alumno alumno) { + + public static boolean editarAlumno(Usuario usuario) { PreparedStatement stm = null; Connection conn = null; - boolean verificacion =false; + 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()+"', `password`= '"+alumno.getContrasena()+"' WHERE `id` = '"+alumno.getId()+"';"; - stm = conn.prepareStatement(sql); - stm.executeUpdate(); - verificacion = true; - } catch (SQLException ex) { - System.err.println(ex); - }finally{ - cerrarConexiones(stm, conn); - cn.cerrarConexion(); - } + String sql = "UPDATE " + nombreTabla + " SET " + colNombre + " = ?, " + colApellido + " = ?, " + + colFechaNacimiento + " = ?, " + colNacionalidad + " = ?, " + colTipoSangre + " = ?, " + + colContrasena + " = ? WHERE " + colId + " = ?"; + stm = conn.prepareStatement(sql); + stm.setString(1, usuario.getNombre()); + stm.setString(2, usuario.getApellido()); + stm.setString(3, usuario.getFecha_nacimiento()); + stm.setString(4, usuario.getNacionalidad()); + stm.setString(5, usuario.getTipoSangre()); + stm.setString(6, usuario.getContrasena()); + stm.setInt(7, usuario.getId()); + stm.executeUpdate(); + verificacion = true; + } catch (SQLException ex) { + System.err.println(ex); + } finally { + cerrarConexiones(stm, conn); + cn.cerrarConexion(); + } return verificacion; } - public static Alumno alumnoIniciado(String matricula, String contrasena) { + public static Usuario alumnoIniciado(String matricula, String contrasena) { ResultSet rs = null; Connection conn = null; - Alumno alumno =null; - + Usuario usuario = null; conn = cn.conectar(); - try { - String sql = "SELECT * FROM alumno WHERE matricula = ? AND password = ?"; + String sql = "SELECT * FROM " + nombreTabla + " WHERE " + colMatricula + " = ? AND " + colContrasena + + " = ?"; 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),rs.getString(9)); + if (rs.next()) { + usuario = new Usuario(rs.getInt(colId), rs.getString(colNombre), rs.getString(colApellido), + rs.getString(colMatricula), rs.getString(colRol)); + DAORegistro.registrar(usuario, "Inicio Sesión", LocalDateTime.now()); } - DAORegistro.registrar(alumno," Inicio Sesión ", LocalDateTime.now()); } catch (Exception e) { System.out.println(e); } finally { - cerrarConexiones(null, conn); + cerrarConexiones(null, conn); } - return alumno; + return usuario; } public static int obtenerUltimoID() { @@ -175,24 +209,24 @@ public class DAO { Statement stm = null; ResultSet rs = null; int ultimoID = -1; - try { conn = cn.conectar(); - String sql = "SELECT MAX(id) AS ultimo_id FROM alumno"; + String sql = "SELECT MAX(" + colId + ") AS ultimo_id FROM " + nombreTabla; 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(); + if (rs != null) + rs.close(); + if (stm != null) + stm.close(); + if (conn != null) + conn.close(); } catch (SQLException ex) { System.err.println(ex); } diff --git a/backend/src/main/java/mx/uv/Controller/DAORegistro.java b/backend/src/main/java/mx/uv/Controller/DAORegistro.java index 8c48915..3d7ae80 100644 --- a/backend/src/main/java/mx/uv/Controller/DAORegistro.java +++ b/backend/src/main/java/mx/uv/Controller/DAORegistro.java @@ -3,29 +3,29 @@ package mx.uv.Controller; import java.time.LocalDateTime; import java.sql.*; -import mx.uv.Model.Alumno; +import mx.uv.Model.Usuario; public class DAORegistro { private static Conexion cn = Conexion.getInstance(); - public static void registrar(Alumno alumno, String descripcion, LocalDateTime day) { + public static void registrar(Usuario usuario, 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(1, usuario.getMatricula()); stm.setString(2, descripcion + day); stm.executeUpdate(); } catch (Exception e) { System.out.println(e); } finally { - cerrarConexiones(stm,conn); + cerrarConexiones(stm, conn); } } - private static void cerrarConexiones(PreparedStatement stm,Connection conn) { + private static void cerrarConexiones(PreparedStatement stm, Connection conn) { if (stm != null) { try { stm.close(); diff --git a/backend/src/main/java/mx/uv/Controller/DAOTutor.java b/backend/src/main/java/mx/uv/Controller/DAOTutor.java index c9278ce..6fb321f 100644 --- a/backend/src/main/java/mx/uv/Controller/DAOTutor.java +++ b/backend/src/main/java/mx/uv/Controller/DAOTutor.java @@ -10,11 +10,10 @@ import java.util.List; import mx.uv.Model.Tutor; - public class DAOTutor { private static Conexion cn = Conexion.getInstance(); - + public static List dameTutores() { Statement stm = null; ResultSet rs = null; @@ -28,7 +27,7 @@ public class DAOTutor { stm = conn.createStatement(); rs = stm.executeQuery(sql); while (rs.next()) { - Tutor u = new Tutor(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getString(6)); + Tutor u = new Tutor(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5)); resultado.add(u); } } catch (Exception e) { @@ -39,26 +38,26 @@ public class DAOTutor { return resultado; } - public static boolean validarTutor(Tutor tutor){ + public static boolean validarTutor(Tutor tutor) { Statement stm = null; Connection conn = null; - boolean verificacion =false; + boolean verificacion = false; ResultSet rs = null; conn = cn.conectar(); try { - String sql ="select * from tutor " - + "where id= '"+tutor.getId()+"' and nombre='"+tutor.getNombre()+"'"; - stm = (Statement) conn.createStatement(); - rs = stm.executeQuery(sql); - if(rs.next()){ - verificacion = true; - }else{ - verificacion = false; - } - conn.close(); - } catch (Exception ex) { - System.err.println(ex); + String sql = "select * from tutor " + + "where id= '" + tutor.getId() + "' and nombre='" + tutor.getNombre() + "'"; + stm = (Statement) conn.createStatement(); + rs = stm.executeQuery(sql); + if (rs.next()) { + verificacion = true; + } else { + verificacion = false; } + conn.close(); + } catch (Exception ex) { + System.err.println(ex); + } return verificacion; } @@ -73,19 +72,18 @@ public class DAOTutor { stm = (PreparedStatement) conn.prepareStatement(sql); stm.setString(1, tutor.getNombre()); stm.setString(2, tutor.getApellido()); - stm.setString(3, tutor.getParentesco()); - stm.setString(4, tutor.getOcupacion()); - stm.setString(5, tutor.getTelefono()); + stm.setString(3, tutor.getNumeroDeTelefono()); + stm.setInt(4, tutor.getIdUsuario()); } catch (Exception e) { System.out.println(e); } finally { - //cerrarConexiones(stm, conn); + // cerrarConexiones(stm, conn); } return msj; } - private static void cerrarConexiones(PreparedStatement stm, Connection conn){ - if(stm != null){ + private static void cerrarConexiones(PreparedStatement stm, Connection conn) { + if (stm != null) { try { stm.close(); } catch (Exception e) { @@ -93,7 +91,7 @@ public class DAOTutor { } stm = null; } - try{ + try { conn.close(); cn.cerrarConexion(); } catch (Exception e) { @@ -110,12 +108,13 @@ public class DAOTutor { Connection conn = null; boolean verificacion = false; conn = cn.conectar(); - try{ - String sql ="UPDATE `tutor` SET `nombre` = '"+tutor.getNombre()+"',`apellido` = '"+tutor.getApellido()+"',`parentesco` = '"+tutor.getParentesco()+"',`ocupacion` = '"+tutor.getOcupacion()+"', `telefono` = '"+tutor.getTelefono()+"';"; + try { + String sql = "UPDATE `tutor` SET `nombre` = '" + tutor.getNombre() + "',`apellido` = '" + + tutor.getApellido() + "';"; stm = conn.prepareStatement(sql); stm.executeQuery(); verificacion = true; - } catch (SQLException ex){ + } catch (SQLException ex) { System.out.println(ex); } finally { cerrarConexiones(stm, conn); diff --git a/backend/src/main/java/mx/uv/Controller/DAO_Administrador.java b/backend/src/main/java/mx/uv/Controller/DAO_Administrador.java deleted file mode 100644 index 589b070..0000000 --- a/backend/src/main/java/mx/uv/Controller/DAO_Administrador.java +++ /dev/null @@ -1,153 +0,0 @@ -package mx.uv.Controller; - -import java.sql.*; -import java.util.ArrayList; -import java.util.List; - -import mx.uv.Model.Administrador; - - - - -public class DAO_Administrador{ - private static Conexion cn = Conexion.getInstance(); - - public static List dameAministradores(){ - Statement stm = null; - ResultSet rs = null; - Connection conn = null; - List resultado = new ArrayList<>(); - - conn = cn.conectar(); - - try { - String sql = "SELECT * from administrador"; - stm = conn.createStatement(); - rs = stm.executeQuery(sql); - while (rs.next()) { - Administrador u = new Administrador(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4),rs.getString(5)); - resultado.add(u); - } - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(null, conn); - } - return resultado; - } - - public static boolean ValidarAdministrador(Administrador administrador){ - Statement stm = null; - Connection conn = null; - boolean verificacion =false; - ResultSet rs = null; - conn = cn.conectar(); - - try { - String sql ="select * from administrador " - + "where matricula= '"+administrador.getMatricula()+"' and contrasena='"+administrador.getContrasena()+"'"; - stm = (Statement) conn.createStatement(); - rs = stm.executeQuery(sql); - if(rs.next()){ - verificacion = true; - }else{ - verificacion = false; - } - conn.close(); - } catch (SQLException ex) { - System.err.println(ex); - } - return verificacion; - } - - public boolean agregarAdministrador(Administrador administrador){ - PreparedStatement stm = null; - Connection conn = null; - boolean msj= false; - - conn = cn.conectar(); - - try{ - String sql ="INSERT INTO `administrador` (`matricula`,`contrasena`, `nombre`, `apellido`) VALUES(?,?,?,?);"; - stm = (PreparedStatement) conn.prepareStatement(sql); - stm.setString(1, administrador.getMatricula()); - stm.setString(2, administrador.getContrasena()); - stm.setString(3, administrador.getNombre()); - stm.setString(4, administrador.getNombre()); - stm.setString(5, administrador.getApellido()); - - - - }catch(Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(stm,conn); - } - return msj; - } - - 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); - } - } - - public static boolean eliminarAdministrador(int idAdministrador){ - return false; - } - - public static boolean editarAdministrador(Administrador administrador){ - PreparedStatement stm = null; - Connection conn = null; - boolean verificacion =false; - conn = cn.conectar(); - - try{ - String sql ="UPDATE `administrador` SET `matricula` = '"+administrador.getMatricula()+"',`contrasena` = '"+administrador.getContrasena()+"',`nombre` = '"+administrador.getNombre()+"',`apellido` = '"+administrador.getApellido()+"' WHERE `id` = '"+administrador.getId()+"';"; - stm = conn.prepareStatement(sql); - stm.executeUpdate(); - verificacion = true; - }catch (SQLException ex) { - System.err.println(ex); - }finally{ - cerrarConexiones(stm, conn); - cn.cerrarConexion(); - } - return verificacion; - } - - public static Administrador administradorIniciado(String matricula, String contrasena){ - ResultSet rs = null; - Connection conn = null; - Administrador administrador =null; - - conn = cn.conectar(); - - try { - String sql = "SELECT * FROM administrador WHERE matricula = ? AND contrasena = ?"; - PreparedStatement stmt = conn.prepareStatement(sql); - stmt.setString(1, matricula); - stmt.setString(2, contrasena); - rs = stmt.executeQuery(); - while (rs.next()) { - administrador = new Administrador(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5)); - } - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(null, conn); - } - return administrador; - } -} \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Controller/DAO_Carrrera.java b/backend/src/main/java/mx/uv/Controller/DAO_Carrrera.java index 7f66a52..3742b12 100644 --- a/backend/src/main/java/mx/uv/Controller/DAO_Carrrera.java +++ b/backend/src/main/java/mx/uv/Controller/DAO_Carrrera.java @@ -4,104 +4,111 @@ import java.sql.*; import java.util.ArrayList; import java.util.List; - import mx.uv.Model.Carrera; -public class DAO_Carrrera{ - private static Conexion cn = Conexion.getInstance(); +public class DAO_Carrrera { + /* + * private static Conexion cn = Conexion.getInstance(); + * + * public static List dameCarreras(){ + * Statement stm = null; + * ResultSet rs = null; + * Connection conn = null; + * List resultado = new ArrayList<>(); + * + * conn = cn.conectar(); + * + * try { + * String sql = "SELECT * from carrera"; + * stm = conn.createStatement(); + * rs = stm.executeQuery(sql); + * while (rs.next()) { + * Carrera u = new Carrera(rs.getInt(1), rs.getString(2), + * rs.getString(3),rs.getString(4), rs.getString(5),rs.getDouble(6)); + * resultado.add(u); + * } + * } catch (Exception e) { + * System.out.println(e); + * } finally { + * cerrarConexiones(null, conn); + * } + * return resultado; + * + * } + * + * public static boolean agregarCarrera(Carrera carrera){ + * PreparedStatement stm = null; + * Connection conn = null; + * boolean msj= false; + * + * conn = cn.conectar(); + * + * try{ + * String sql + * ="INSERT INTO `carrera` (`area`,`nombre`, `modalidad`, `campus`, `costo`) VALUES(?,?,?,?,?);" + * ; + * stm = (PreparedStatement) conn.prepareStatement(sql); + * stm.setString(1, carrera.getArea()); + * stm.setString(2, carrera.getNombre()); + * stm.setString(3, carrera.getModalidad()); + * stm.setString(4, carrera.getCampus()); + * stm.setDouble(5, carrera.getCosto()); + * + * + * + * + * }catch(Exception e) { + * System.out.println(e); + * } finally { + * cerrarConexiones(stm,conn); + * } + * return msj; + * } + * + * 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); + * } + * } + * + * public static boolean eliminarCarrera(int idCarrera){ + * return false; + * } + * + * public static boolean editarCarrera(Carrera carrera){ + * PreparedStatement stm = null; + * Connection conn = null; + * boolean verificacion =false; + * conn = cn.conectar(); + * + * try{ + * String sql + * ="UPDATE `alumno` SET `area` = '"+carrera.getArea()+"',`nombre` = '"+carrera. + * getNombre()+"',`modalidad` = '"+carrera.getModalidad()+"',`campus` = '" + * +carrera.getCampus()+"', `costo` = '"+carrera.getCosto()+"' WHERE `id` = '" + * +carrera.getId()+"';"; + * stm = conn.prepareStatement(sql); + * stm.executeUpdate(); + * verificacion = true; + * }catch (SQLException ex) { + * System.err.println(ex); + * }finally{ + * cerrarConexiones(stm, conn); + * cn.cerrarConexion(); + * } + * return verificacion; + * } + */ - public static List dameCarreras(){ - Statement stm = null; - ResultSet rs = null; - Connection conn = null; - List resultado = new ArrayList<>(); - - conn = cn.conectar(); - - try { - String sql = "SELECT * from carrera"; - stm = conn.createStatement(); - rs = stm.executeQuery(sql); - while (rs.next()) { - Carrera u = new Carrera(rs.getInt(1), rs.getString(2), rs.getString(3),rs.getString(4), rs.getString(5),rs.getDouble(6)); - resultado.add(u); - } - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(null, conn); - } - return resultado; - - } - - public static boolean agregarCarrera(Carrera carrera){ - PreparedStatement stm = null; - Connection conn = null; - boolean msj= false; - - conn = cn.conectar(); - - try{ - String sql ="INSERT INTO `carrera` (`area`,`nombre`, `modalidad`, `campus`, `costo`) VALUES(?,?,?,?,?);"; - stm = (PreparedStatement) conn.prepareStatement(sql); - stm.setString(1, carrera.getArea()); - stm.setString(2, carrera.getNombre()); - stm.setString(3, carrera.getModalidad()); - stm.setString(4, carrera.getCampus()); - stm.setDouble(5, carrera.getCosto()); - - - - - }catch(Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(stm,conn); - } - return msj; - } - - 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); - } - } - - public static boolean eliminarCarrera(int idCarrera){ - return false; - } - - public static boolean editarCarrera(Carrera carrera){ - PreparedStatement stm = null; - Connection conn = null; - boolean verificacion =false; - conn = cn.conectar(); - - try{ - String sql ="UPDATE `alumno` SET `area` = '"+carrera.getArea()+"',`nombre` = '"+carrera.getNombre()+"',`modalidad` = '"+carrera.getModalidad()+"',`campus` = '"+carrera.getCampus()+"', `costo` = '"+carrera.getCosto()+"' WHERE `id` = '"+carrera.getId()+"';"; - stm = conn.prepareStatement(sql); - stm.executeUpdate(); - verificacion = true; - }catch (SQLException ex) { - System.err.println(ex); - }finally{ - cerrarConexiones(stm, conn); - cn.cerrarConexion(); - } - return verificacion; - } - - } \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Controller/DAO_Documentacion.java b/backend/src/main/java/mx/uv/Controller/DAO_Documentacion.java index 4b4aa1a..afa65e1 100644 --- a/backend/src/main/java/mx/uv/Controller/DAO_Documentacion.java +++ b/backend/src/main/java/mx/uv/Controller/DAO_Documentacion.java @@ -8,71 +8,59 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -import mx.uv.Model.Documentacion; +import mx.uv.Model.Documento; public class DAO_Documentacion { private static Conexion cn = Conexion.getInstance(); @SuppressWarnings("null") - public List dameDocumentacion() { + public List dameDocumentacion() { Statement stm = null; ResultSet rs = null; Connection conn = null; - List resultado = new ArrayList<>(); + List resultado = new ArrayList<>(); try { String sql = "SELECT * from documentacion"; stm = conn.createStatement(); rs = stm.executeQuery(sql); while (rs.next()) { - Documentacion u = new Documentacion(rs.getInt(1), rs.getBytes(2), rs.getBytes(3),rs.getBytes(4), rs.getBytes(5),rs.getBytes(6), rs.getBytes(7), rs.getBytes(8), rs.getBytes(9), rs.getBytes(10)); - resultado.add(u); + // Documento u = new Documento(rs.getInt(1), rs.getBytes(2), + // rs.getBytes(3),rs.getBytes(4), rs.getBytes(5),rs.getBytes(6), rs.getBytes(7), + // rs.getBytes(8), rs.getBytes(9), rs.getBytes(10)); + // resultado.add(u); } } catch (Exception e) { System.out.println(e); } finally { - cerrarConexiones(null, conn); + cerrarConexiones(null, conn); } return resultado; } - public static boolean agregarDocumentacion(Documentacion documentacion){ + public static boolean agregarDocumentacion(Documento documentacion) { PreparedStatement stm = null; Connection conn = null; - boolean msj= false; + boolean msj = false; conn = cn.conectar(); - try{ - String sql ="INSERT INTO `documentacion` (`id`,`acta_nacimiento`, `certificado_bachillerato`, `curp`, `ine`, `ine_tutor`, `certificado_medico`, `comprobante`, `fotografia`, `constancia`) VALUES(?,?,?,?,?,?,?,?,?,?);"; + try { + String sql = "INSERT INTO `documentacion` (`id`,`acta_nacimiento`, `certificado_bachillerato`, `curp`, `ine`, `ine_tutor`, `certificado_medico`, `comprobante`, `fotografia`, `constancia`) VALUES(?,?,?,?,?,?,?,?,?,?);"; stm = (PreparedStatement) conn.prepareStatement(sql); stm.setInt(1, documentacion.getId()); - stm.setBytes(2, documentacion.getActaNacimiento()); - stm.setBytes(3, documentacion.getCertificadoBachillerato()); - stm.setBytes(4, documentacion.getCurp()); - stm.setBytes(5, documentacion.getIne()); - stm.setBytes(6, documentacion.getIneTutor()); - stm.setBytes(7, documentacion.getCertificadoMedico()); - stm.setBytes(8, documentacion.getComprobante()); - stm.setBytes(9, documentacion.getFotografia()); - stm.setBytes(10, documentacion.getConstancia()); - - - - - }catch(Exception e) { + } catch (Exception e) { System.out.println(e); } finally { - cerrarConexiones(stm,conn); + cerrarConexiones(stm, conn); } return msj; } - - private static void cerrarConexiones(PreparedStatement stm,Connection conn) { + private static void cerrarConexiones(PreparedStatement stm, Connection conn) { if (stm != null) { try { stm.close(); @@ -89,27 +77,41 @@ public class DAO_Documentacion { } } - public static boolean eliminarDocumentacion(int idDocumentacion){ + public static boolean eliminarDocumentacion(int idDocumentacion) { return false; } - public static boolean editarDocumentacion(Documentacion documentacion){ + public static boolean editarDocumentacion(Documento documentacion) { PreparedStatement stm = null; Connection conn = null; - boolean verificacion =false; + boolean verificacion = false; conn = cn.conectar(); - try{ - String sql ="UPDATE `documentacion` SET `acta_nacimiento` = '"+documentacion.getActaNacimiento()+"',`certificado_bachillerato` = '"+documentacion.getCertificadoBachillerato()+"',`curp` = '"+documentacion.getCurp()+"',`ine` = '"+documentacion.getIne()+"', `ine_tutor` = '"+documentacion.getIneTutor()+"',`certificado_medico` = '"+documentacion.getCertificadoMedico()+"',`comprobante` = '"+documentacion.getComprobante()+"',`fotografia` = '"+documentacion.getFotografia()+"',`constancia` = '"+documentacion.getConstancia()+"' WHERE `id` = '"+documentacion.getId()+"';"; - stm = conn.prepareStatement(sql); - stm.executeUpdate(); - verificacion = true; - }catch (SQLException ex) { + try { + /* + * String sql = "UPDATE `documentacion` SET `acta_nacimiento` = '" + + * documentacion.getActaNacimiento() + * + "',`certificado_bachillerato` = '" + + * documentacion.getCertificadoBachillerato() + "',`curp` = '" + * + documentacion.getCurp() + "',`ine` = '" + documentacion.getIne() + + * "', `ine_tutor` = '" + * + documentacion.getIneTutor() + "',`certificado_medico` = '" + + * documentacion.getCertificadoMedico() + * + "',`comprobante` = '" + documentacion.getComprobante() + + * "',`fotografia` = '" + * + documentacion.getFotografia() + "',`constancia` = '" + + * documentacion.getConstancia() + * + "' WHERE `id` = '" + documentacion.getId() + "';"; + */ + stm = conn.prepareStatement(""); + stm.executeUpdate(); + verificacion = true; + } catch (SQLException ex) { System.err.println(ex); - }finally{ + } finally { cerrarConexiones(stm, conn); cn.cerrarConexion(); } - return verificacion; + return verificacion; } } diff --git a/backend/src/main/java/mx/uv/Controller/DAO_Examen.java b/backend/src/main/java/mx/uv/Controller/DAO_Examen.java deleted file mode 100644 index bc9368d..0000000 --- a/backend/src/main/java/mx/uv/Controller/DAO_Examen.java +++ /dev/null @@ -1,109 +0,0 @@ -package mx.uv.Controller; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; - -import mx.uv.Model.Examen; - -public class DAO_Examen { - - private static Conexion cn = Conexion.getInstance(); - - public static List dameExamenes(){ - Statement stm = null; - ResultSet rs = null; - Connection conn = null; - List resultado = new ArrayList<>(); - - conn = cn.conectar(); - - try { - String sql = "SELECT * from examen"; - stm = conn.createStatement(); - rs = stm.executeQuery(sql); - while (rs.next()) { - Examen u = new Examen(rs.getInt(1),rs.getDouble(2),rs.getBoolean(3),rs.getInt(4)); - resultado.add(u); - } - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(null, conn); - } - return resultado; - } - - - public static boolean agregarExamen(Examen examen){ - PreparedStatement stm = null; - Connection conn = null; - boolean msj = false; - - conn = cn.conectar(); - - try{ - String sql = "INSERT INTO `examen` (`calificacion`, `derechoInscripcion`) VALUES(?,?);"; - stm = (PreparedStatement) conn.prepareStatement(sql); - stm.setDouble(1, examen.getCalificacion()); - stm.setBoolean(2, examen.isDerechoInscripcion()); - - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(stm, conn); - } - return msj; - } - - - 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); - } - } - - public static boolean eliminarExamen(int id){ - return false; - } - - public static boolean editarExamen(Examen examen){ - PreparedStatement stm = null; - Connection conn = null; - boolean verificacion = false; - conn = cn.conectar(); - - try{ - String sql = "UPDATE `examen` SET `calificacion` = ?, `derechoInscripcion` = ? WHERE `idExamen` = ?;"; - stm = conn.prepareStatement(sql); - stm.executeQuery(); - verificacion = true; - } catch (SQLException ex){ - System.err.println(ex); - } finally{ - cerrarConexiones(stm, conn); - cn.cerrarConexion(); - } - - return verificacion; - } - - - - -} \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Controller/DAO_FichaI.java b/backend/src/main/java/mx/uv/Controller/DAO_FichaI.java deleted file mode 100644 index 35a93c0..0000000 --- a/backend/src/main/java/mx/uv/Controller/DAO_FichaI.java +++ /dev/null @@ -1,118 +0,0 @@ -package mx.uv.Controller; - -import java.sql.*; -import java.util.ArrayList; -import java.util.List; -import mx.uv.Model.FichaI; - -public class DAO_FichaI { - private static Conexion cn = Conexion.getInstance(); - - public static List obtenerFichas() { - Statement stm = null; - ResultSet rs = null; - Connection conn = null; - List resultado = new ArrayList<>(); - - conn = cn.conectar(); - - try { - String sql = "SELECT * FROM fichaI"; - stm = conn.createStatement(); - rs = stm.executeQuery(sql); - while (rs.next()) { - FichaI ficha = new FichaI( - rs.getInt("id_alumno"), - rs.getInt("id_carrera"), - rs.getInt("id_tutor"), - rs.getInt("id_documentacion"), - rs.getDate("fecha_inicio"), - rs.getDate("fecha_fin") - ); - resultado.add(ficha); - } - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(null, conn); - } - return resultado; - } - - public static boolean agregarFichaI(FichaI ficha) { - PreparedStatement stm = null; - Connection conn = null; - boolean agregado = false; - - conn = cn.conectar(); - - try { - String sql = "INSERT INTO fichaI (id_alumno, id_carrera, id_tutor, id_documentacion, fecha_inicio, fecha_fin) VALUES (?, ?, ?, ?, ?, ?)"; - stm = conn.prepareStatement(sql); - stm.setInt(1, ficha.getIdAlumno()); - stm.setInt(2, ficha.getIdCarrera()); - stm.setInt(3, ficha.getIdTutor()); - stm.setInt(4, ficha.getIdDocumentacion()); - stm.setDate(5, new java.sql.Date(ficha.getFechaInicio().getTime())); - stm.setDate(6, new java.sql.Date(ficha.getFechaFin().getTime())); - - agregado = stm.executeUpdate() > 0; - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(stm, conn); - } - return agregado; - } - - - public static boolean editarFichaI(FichaI ficha) { - PreparedStatement stm = null; - Connection conn = null; - boolean actualizado = false; - - conn = cn.conectar(); - - try { - String sql = "UPDATE fichaI SET id_carrera = ?, id_tutor = ?, id_documentacion = ?, fecha_inicio = ?, fecha_fin = ? WHERE id_alumno = ?"; - stm = conn.prepareStatement(sql); - stm.setInt(1, ficha.getIdCarrera()); - stm.setInt(2, ficha.getIdTutor()); - stm.setInt(3, ficha.getIdDocumentacion()); - stm.setDate(4, new java.sql.Date(ficha.getFechaInicio().getTime())); - stm.setDate(5, new java.sql.Date(ficha.getFechaFin().getTime())); - stm.setInt(6, ficha.getIdAlumno()); - - actualizado = stm.executeUpdate() > 0; - } catch (SQLException ex) { - System.err.println(ex); - } finally { - cerrarConexiones(stm, conn); - } - return actualizado; - } - - - public static boolean eliminarFicha(int idAlumno) { - return false; - } - - - private static void cerrarConexiones(PreparedStatement stm, Connection conn) { - if (stm != null) { - try { - stm.close(); - } catch (Exception e) { - System.out.println(e); - } - } - if (conn != null) { - try { - conn.close(); - cn.cerrarConexion(); - } catch (Exception e) { - System.out.println(e); - } - } - } -} diff --git a/backend/src/main/java/mx/uv/Controller/DAO_FichaP.java b/backend/src/main/java/mx/uv/Controller/DAO_FichaP.java deleted file mode 100644 index 7e3f8d5..0000000 --- a/backend/src/main/java/mx/uv/Controller/DAO_FichaP.java +++ /dev/null @@ -1,113 +0,0 @@ -package mx.uv.Controller; - -import java.sql.*; -import java.util.ArrayList; -import java.util.List; -import mx.uv.Model.FichaP; - -public class DAO_FichaP { - private static Conexion cn = Conexion.getInstance(); - - // Método para obtener todas las fichas - public static List dameFichasP() { - Statement stm = null; - ResultSet rs = null; - Connection conn = null; - List resultado = new ArrayList<>(); - - conn = cn.conectar(); - - try { - String sql = "SELECT * FROM fichaP"; - stm = conn.createStatement(); - rs = stm.executeQuery(sql); - while (rs.next()) { - FichaP ficha = new FichaP( - rs.getInt("id"), - rs.getInt("id_alumno"), - rs.getInt("id_carrera"), - rs.getDate("fecha_inicio"), - rs.getDate("fecha_fin") - ); - resultado.add(ficha); - } - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(null, conn); - } - return resultado; - } - - public static boolean agregarFichaP(FichaP ficha) { - PreparedStatement stm = null; - Connection conn = null; - boolean agregado = false; - - conn = cn.conectar(); - - try { - String sql = "INSERT INTO fichaP (id_alumno, id_carrera, fecha_inicio, fecha_fin) VALUES (?, ?, ?, ?)"; - stm = conn.prepareStatement(sql); - stm.setInt(1, ficha.getIdAlumno()); - stm.setInt(2, ficha.getIdCarrera()); - stm.setDate(3, new java.sql.Date(ficha.getFechaInicio().getTime())); - stm.setDate(4, new java.sql.Date(ficha.getFechaFin().getTime())); - - agregado = stm.executeUpdate() > 0; - } catch (Exception e) { - System.out.println(e); - } finally { - cerrarConexiones(stm, conn); - } - return agregado; - } - - public static boolean editarFichaP(FichaP ficha) { - PreparedStatement stm = null; - Connection conn = null; - boolean actualizado = false; - - conn = cn.conectar(); - - try { - String sql = "UPDATE fichaP SET id_alumno = ?, id_carrera = ?, fecha_inicio = ?, fecha_fin = ? WHERE id = ?"; - stm = conn.prepareStatement(sql); - stm.setInt(1, ficha.getIdAlumno()); - stm.setInt(2, ficha.getIdCarrera()); - stm.setDate(3, new java.sql.Date(ficha.getFechaInicio().getTime())); - stm.setDate(4, new java.sql.Date(ficha.getFechaFin().getTime())); - stm.setInt(5, ficha.getId()); - - actualizado = stm.executeUpdate() > 0; - } catch (SQLException ex) { - System.err.println(ex); - } finally { - cerrarConexiones(stm, conn); - } - return actualizado; - } - - - public static boolean eliminarFichaP(int id) { - return false; - } - - private static void cerrarConexiones(PreparedStatement stm, Connection conn) { - if (stm != null) { - try { - stm.close(); - } catch (Exception e) { - System.out.println(e); - } - } - if (conn != null) { - try { - conn.close(); - cn.cerrarConexion(); - } catch (Exception e) { - System.out.println(e); - } - } - } -} diff --git a/backend/src/main/java/mx/uv/Model/Administrador.java b/backend/src/main/java/mx/uv/Model/Administrador.java deleted file mode 100644 index 4d2ba05..0000000 --- a/backend/src/main/java/mx/uv/Model/Administrador.java +++ /dev/null @@ -1,55 +0,0 @@ -package mx.uv.Model; - -public class Administrador { - private int id; - private String matricula; - private String contrasena; - private String nombre; - private String apellido; - - - public Administrador() { - } - - public Administrador(int id, String matricula, String contrasena, String nombre, String apellido) { - this.id = id; - this.matricula = matricula; - this.contrasena = contrasena; - this.nombre = nombre; - this.apellido = apellido; - } - public void setId(int id) { - this.id = id; - } - public void setMatricula(String matricula) { - this.matricula = matricula; - } - public void setContrasena(String contrasena) { - this.contrasena = contrasena; - } - public void setNombre(String nombre) { - this.nombre = nombre; - } - public void setApellido(String apellido) { - this.apellido = apellido; - } - - - public int getId() { - return id; - } - public String getMatricula() { - return matricula; - } - public String getContrasena() { - return contrasena; - } - public String getNombre() { - return nombre; - } - public String getApellido() { - return apellido; - } - - -} diff --git a/backend/src/main/java/mx/uv/Model/Alumno.java b/backend/src/main/java/mx/uv/Model/Alumno.java deleted file mode 100644 index ce0cf49..0000000 --- a/backend/src/main/java/mx/uv/Model/Alumno.java +++ /dev/null @@ -1,106 +0,0 @@ -package mx.uv.Model; -// * Clase Alumno que servira para comunicarse con el controlador. -public class Alumno { - private int id; - private String nombre; - private String apellido; - private String fechaNacimiento; - private String nacionalidad; - 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 correo) { - this.id = id; - this.nombre = nombre; - this.apellido = apellido; - this.fechaNacimiento = fechaNacimiento; - this.nacionalidad = nacionalidad; - 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,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) { - this.matricula = matricula; - this.contrasena = contrasena; - } - - public void setId(int id) { - this.id = id; - } - public void setNombre(String nombre) { - this.nombre = nombre; - } - public void setApellido(String apellido) { - this.apellido = apellido; - } - public void setFechaNacimiento(String fechaNacimiento) { - this.fechaNacimiento = fechaNacimiento; - } - public void setNacionalidad(String nacionalidad) { - this.nacionalidad = nacionalidad; - } - public void setTipoDeSangre(String tipoDeSangre) { - this.tipoDeSangre = tipoDeSangre; - } - public void setMatricula(String matricula) { - this.matricula = matricula; - } - public void setContrasena(String contrasena) { - this.contrasena = contrasena; - } - - public int getId() { - return id; - } - public String getNombre() { - return nombre; - } - public String getApellido() { - return apellido; - } - public String getFechaNacimiento() { - return fechaNacimiento; - } - public String getNacionalidad() { - return nacionalidad; - } - public String getTipoDeSangre() { - return tipoDeSangre; - } - public String getMatricula() { - return matricula; - } - 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/Carrera.java b/backend/src/main/java/mx/uv/Model/Carrera.java index 394512a..a55b6c5 100644 --- a/backend/src/main/java/mx/uv/Model/Carrera.java +++ b/backend/src/main/java/mx/uv/Model/Carrera.java @@ -2,69 +2,36 @@ package mx.uv.Model; public class Carrera { private int id; - private String area; private String nombre; - private String modalidad; - private String campus; - private Double costo; + private String area; - public Carrera(int id,String area, String nombre, String modalidad, String campus, double costo){ - this.id=id; - this.area=area; - this.nombre=nombre; - this.modalidad=modalidad; - this.campus=campus; - this.costo=costo; + public Carrera(int id, String nombre, String area) { + this.id = id; + this.nombre = nombre; + this.area = area; } - public void setId(int id){ - this.id=id; - } - - public void setArea(String area){ - this.area=area; - } - - public void setNombre(String nombre){ - this.nombre=nombre; - } - - public void setModalidad(String modalidad){ - this.modalidad=modalidad; - } - - public void setCampus(String campus){ - this.campus=campus; - } - - public void setCosto(double costo){ - this.costo=costo; - } - - public int getId(){ + public int getId() { return id; } - public String getArea(){ - return area; - } - - public String getNombre(){ + public String getNombre() { return nombre; } - public String getModalidad(){ - return modalidad; + public String getArea() { + return area; } - public String getCampus(){ - return campus; - } - - public double getCosto(){ - return costo; + public void setId(int id) { + this.id = id; } - + public void setNombre(String nombre) { + this.nombre = nombre; + } + public void setArea(String area) { + this.area = area; + } } diff --git a/backend/src/main/java/mx/uv/Model/Documentacion.java b/backend/src/main/java/mx/uv/Model/Documentacion.java deleted file mode 100644 index 542b835..0000000 --- a/backend/src/main/java/mx/uv/Model/Documentacion.java +++ /dev/null @@ -1,108 +0,0 @@ -package mx.uv.Model; - -public class Documentacion { - private int id; - private byte[] actaDeNacimiento; - private byte[] certificadoBachillerato; - private byte[] curp; - private byte[] ine; - private byte[] ineTutor; - private byte[] certificadoMedico; - private byte[] comprobante; - private byte[] fotografia; - private byte[] constancia; - - public Documentacion(int id, byte[] actaDeNacimiento, byte[] certificadoBachillerato, byte[] curp, byte[] ine, byte[] ineTutor, byte[] certificadoMedico, byte[] comprobante, byte[] fotografia, byte[] constancia){ - this.id=id; - this.actaDeNacimiento=actaDeNacimiento; - this.certificadoBachillerato=certificadoBachillerato; - this.curp=curp; - this.ine=ine; - this.ineTutor=ineTutor; - this.certificadoMedico=certificadoMedico; - this.comprobante=comprobante; - this.fotografia=fotografia; - this.constancia=constancia; - } - - public void setId(int id){ - this.id=id; - } - - public void setActaNacimiento(byte[] actaDeNacimiento){ - this.actaDeNacimiento=actaDeNacimiento; - } - - public void setCertificadoBachillerato(byte[] certificadoBachillerato){ - this.certificadoBachillerato=certificadoBachillerato; - } - - public void setCurp(byte[] curp){ - this.curp=curp; - } - - public void setIne(byte[] ine){ - this.ine=ine; - } - - public void setIneTutor(byte[] ineTutor){ - this.ineTutor=ineTutor; - } - - public void setCertificadoMedico(byte[] certificadoMedico){ - this.certificadoMedico=certificadoMedico; - } - - public void setComprobante(byte[] comprobante){ - this.comprobante=comprobante; - } - - public void setFoto(byte[] fotografia){ - this.fotografia=fotografia; - } - - public void setConstancia(byte[] constancia){ - this.constancia=constancia; - } - - public int getId(){ - return id; - } - - public byte[] getActaNacimiento(){ - return actaDeNacimiento; - } - - public byte[] getCertificadoBachillerato(){ - return certificadoBachillerato; - } - - public byte[] getCurp(){ - return curp; - } - - public byte[] getIne(){ - return ine; - } - - public byte[] getIneTutor(){ - return ineTutor; - } - - public byte[] getCertificadoMedico(){ - return certificadoMedico; - } - - public byte[] getComprobante(){ - return comprobante; - } - - public byte[] getFotografia(){ - return fotografia; - } - - public byte[] getConstancia(){ - return constancia; - } - -} diff --git a/backend/src/main/java/mx/uv/Model/Documento.java b/backend/src/main/java/mx/uv/Model/Documento.java new file mode 100644 index 0000000..80b47ac --- /dev/null +++ b/backend/src/main/java/mx/uv/Model/Documento.java @@ -0,0 +1,57 @@ +package mx.uv.Model; + +public class Documento { + private int id; + private String titulo; + private byte[] archivo; + private int idUsuario; + private int valido; + + public Documento(int id, String titulo, byte[] archivo, int idUsuario, int valido) { + this.id = id; + this.titulo = titulo; + this.archivo = archivo; + this.idUsuario = idUsuario; + this.valido = valido; + } + + public int getId() { + return id; + } + + public String getTitulo() { + return titulo; + } + + public byte[] getArchivo() { + return archivo; + } + + public int getIdUsuario() { + return idUsuario; + } + + public int getValido() { + return valido; + } + + public void setId(int id) { + this.id = id; + } + + public void setTitulo(String titulo) { + this.titulo = titulo; + } + + public void setArchivo(byte[] archivo) { + this.archivo = archivo; + } + + public void setIdUsuario(int idUsuario) { + this.idUsuario = idUsuario; + } + + public void setValido(int valido) { + this.valido = valido; + } +} diff --git a/backend/src/main/java/mx/uv/Model/Examen.java b/backend/src/main/java/mx/uv/Model/Examen.java deleted file mode 100644 index 051b411..0000000 --- a/backend/src/main/java/mx/uv/Model/Examen.java +++ /dev/null @@ -1,59 +0,0 @@ -package mx.uv.Model; - -public class Examen { - private int id; - private double calificacion; - private boolean derechoInscripcion; - private int idAlumno; - - public Examen(int id, double calificacion, boolean derechoInscripcion, int idAlumno) { - this.id = id; - this.calificacion = calificacion; - this.derechoInscripcion = derechoInscripcion; - this.idAlumno = idAlumno; - } - - // Getters y Setters - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public double getCalificacion() { - return calificacion; - } - - public void setCalificacion(double calificacion) { - this.calificacion = calificacion; - } - - public boolean isDerechoInscripcion() { - return derechoInscripcion; - } - - public void setDerechoInscripcion(boolean derechoInscripcion) { - this.derechoInscripcion = derechoInscripcion; - } - - public int getIdAlumno() { - return idAlumno; - } - - public void setIdAlumno(int idAlumno) { - this.idAlumno = idAlumno; - } - - // toString() para representación legible - @Override - public String toString() { - return "Examen{" + - "id=" + id + - ", calificacion=" + calificacion + - ", derechoInscripcion=" + derechoInscripcion + - ", idAlumno=" + idAlumno + - '}'; - } -} \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Model/FichaI.java b/backend/src/main/java/mx/uv/Model/FichaI.java deleted file mode 100644 index afd407f..0000000 --- a/backend/src/main/java/mx/uv/Model/FichaI.java +++ /dev/null @@ -1,84 +0,0 @@ -package mx.uv.Model; - -import java.util.Date; - -public class FichaI { - private int idAlumno; - private int idCarrera; - private int idTutor; - private int idDocumentacion; - private Date fechaInicio; - private Date fechaFin; - - public FichaI(int idAlumno, int idCarrera, int idTutor, int idDocumentacion, Date fechaInicio, Date fechaFin) { - this.idAlumno = idAlumno; - this.idCarrera = idCarrera; - this.idTutor = idTutor; - this.idDocumentacion = idDocumentacion; - this.fechaInicio = fechaInicio; - this.fechaFin = fechaFin; - } - - // Getters y Setters - - public int getIdAlumno() { - return idAlumno; - } - - public void setIdAlumno(int idAlumno) { - this.idAlumno = idAlumno; - } - - public int getIdCarrera() { - return idCarrera; - } - - public void setIdCarrera(int idCarrera) { - this.idCarrera = idCarrera; - } - - public int getIdTutor() { - return idTutor; - } - - public void setIdTutor(int idTutor) { - this.idTutor = idTutor; - } - - public int getIdDocumentacion() { - return idDocumentacion; - } - - public void setIdDocumentacion(int idDocumentacion) { - this.idDocumentacion = idDocumentacion; - } - - public Date getFechaInicio() { - return fechaInicio; - } - - public void setFechaInicio(Date fechaInicio) { - this.fechaInicio = fechaInicio; - } - - public Date getFechaFin() { - return fechaFin; - } - - public void setFechaFin(Date fechaFin) { - this.fechaFin = fechaFin; - } - - // toString() para representación legible - @Override - public String toString() { - return "FichaI{" + - "idAlumno=" + idAlumno + - ", idCarrera=" + idCarrera + - ", idTutor=" + idTutor + - ", idDocumentacion=" + idDocumentacion + - ", fechaInicio=" + fechaInicio + - ", fechaFin=" + fechaFin + - '}'; - } -} diff --git a/backend/src/main/java/mx/uv/Model/FichaP.java b/backend/src/main/java/mx/uv/Model/FichaP.java deleted file mode 100644 index 6ed85bf..0000000 --- a/backend/src/main/java/mx/uv/Model/FichaP.java +++ /dev/null @@ -1,73 +0,0 @@ -package mx.uv.Model; - -import java.util.Date; - -public class FichaP { - private int id; - private int idAlumno; - private int idCarrera; - private Date fechaInicio; - private Date fechaFin; - - public FichaP(int id, int idAlumno, int idCarrera, Date fechaInicio, Date fechaFin) { - this.id = id; - this.idAlumno = idAlumno; - this.idCarrera = idCarrera; - this.fechaInicio = fechaInicio; - this.fechaFin = fechaFin; - } - - // Getters y Setters - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getIdAlumno() { - return idAlumno; - } - - public void setIdAlumno(int idAlumno) { - this.idAlumno = idAlumno; - } - - public int getIdCarrera() { - return idCarrera; - } - - public void setIdCarrera(int idCarrera) { - this.idCarrera = idCarrera; - } - - public Date getFechaInicio() { - return fechaInicio; - } - - public void setFechaInicio(Date fechaInicio) { - this.fechaInicio = fechaInicio; - } - - public Date getFechaFin() { - return fechaFin; - } - - public void setFechaFin(Date fechaFin) { - this.fechaFin = fechaFin; - } - - // toString() para representación legible - @Override - public String toString() { - return "FichaP{" + - "id=" + id + - ", idAlumno=" + idAlumno + - ", idCarrera=" + idCarrera + - ", fechaInicio=" + fechaInicio + - ", fechaFin=" + fechaFin + - '}'; - } -} diff --git a/backend/src/main/java/mx/uv/Model/Incripcion.java b/backend/src/main/java/mx/uv/Model/Incripcion.java new file mode 100644 index 0000000..7d5dacb --- /dev/null +++ b/backend/src/main/java/mx/uv/Model/Incripcion.java @@ -0,0 +1,38 @@ +package mx.uv.Model; + +public class Incripcion { + private int id; + private int idUusario; + private int idDocumento; + + public Incripcion(int id, int idUusario, int idDocumento) { + this.id = id; + this.idUusario = idUusario; + this.idDocumento = idDocumento; + } + + public void setId(int id) { + this.id = id; + } + + public void setIdUusario(int idUusario) { + this.idUusario = idUusario; + } + + public void setIdDocumento(int idDocumento) { + this.idDocumento = idDocumento; + } + + public int getId() { + return id; + } + + public int getIdUusario() { + return idUusario; + } + + public int getIdDocumento() { + return idDocumento; + } + +} diff --git a/backend/src/main/java/mx/uv/Model/Mensaje.java b/backend/src/main/java/mx/uv/Model/Mensaje.java index e73d54b..7c3c541 100644 --- a/backend/src/main/java/mx/uv/Model/Mensaje.java +++ b/backend/src/main/java/mx/uv/Model/Mensaje.java @@ -2,25 +2,30 @@ package mx.uv.Model; public class Mensaje { private boolean verificacion; - private Alumno alumno; + private Usuario usuario; - public Mensaje(){ - }; - public Mensaje(boolean verificacion, Alumno alumno) { - this.verificacion = verificacion; - this.alumno = alumno; + public Mensaje() { } + + public Mensaje(boolean verificacion, Usuario usuario) { + this.verificacion = verificacion; + this.usuario = usuario; + } + public boolean isVerificacion() { return verificacion; } - public Alumno getAlumno() { - return alumno; + + public Usuario getUsuario() { + return usuario; } + public void setVerificacion(boolean verificacion) { this.verificacion = verificacion; } - public void setAlumno(Alumno alumno) { - this.alumno = alumno; + + public void setUsuario(Usuario usuario) { + this.usuario = usuario; } - + } diff --git a/backend/src/main/java/mx/uv/Model/Registro.java b/backend/src/main/java/mx/uv/Model/Registro.java index cf7bc25..afdbd2e 100644 --- a/backend/src/main/java/mx/uv/Model/Registro.java +++ b/backend/src/main/java/mx/uv/Model/Registro.java @@ -1,5 +1,38 @@ package mx.uv.Model; public class Registro { - + private int id; + private String matricula; + private String descripcion; + + public Registro(int id, String matricula, String descripcion) { + this.id = id; + this.matricula = matricula; + this.descripcion = descripcion; + } + + public void setId(int id) { + this.id = id; + } + + public void setMatricula(String matricula) { + this.matricula = matricula; + } + + public void setDescripcion(String descripcion) { + this.descripcion = descripcion; + } + + public int getId() { + return id; + } + + public String getMatricula() { + return matricula; + } + + public String getDescripcion() { + return descripcion; + } + } diff --git a/backend/src/main/java/mx/uv/Model/Tutor.java b/backend/src/main/java/mx/uv/Model/Tutor.java index b410300..ba88183 100644 --- a/backend/src/main/java/mx/uv/Model/Tutor.java +++ b/backend/src/main/java/mx/uv/Model/Tutor.java @@ -1,57 +1,58 @@ package mx.uv.Model; + public class Tutor { private int id; private String nombre; private String apellido; - private String parentesco; - private String ocupacion; - private String telefono; - - public Tutor(int id, String nombre, String apellido, String parentesco, String ocupacion, String telefono) { - this.id = id; - this.nombre = nombre; - this.apellido = apellido; - this.parentesco = parentesco; - this.ocupacion = ocupacion; - this.telefono = telefono; - } + private String numeroDeTelefono; + private int idUsuario; - public void setId(int id) { + public Tutor(int id, String nombre, String apellido, String numeroDeTelefono, int idUsuario) { this.id = id; - } - public void setNombre(String nombre) { this.nombre = nombre; - } - public void setApellido(String apellido) { this.apellido = apellido; - } - public void setParentesco(String parentesco) { - this.parentesco = parentesco; - } - public void setOcupacion(String ocupacion) { - this.ocupacion = ocupacion; - } - public void setTelefono(String telefono) { - this.telefono = telefono; + this.numeroDeTelefono = numeroDeTelefono; + this.idUsuario = idUsuario; } public int getId() { return id; } + public String getNombre() { return nombre; } + public String getApellido() { return apellido; } - public String getParentesco() { - return parentesco; + + public String getNumeroDeTelefono() { + return numeroDeTelefono; } - public String getOcupacion() { - return ocupacion; + + public int getIdUsuario() { + return idUsuario; } - public String getTelefono() { - return telefono; + + public void setId(int id) { + this.id = id; } - + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public void setApellido(String apellido) { + this.apellido = apellido; + } + + public void setNumeroDeTelefono(String numeroDeTelefono) { + this.numeroDeTelefono = numeroDeTelefono; + } + + public void setIdUsuario(int idUsuario) { + this.idUsuario = idUsuario; + } + } diff --git a/backend/src/main/java/mx/uv/Model/Usuario.java b/backend/src/main/java/mx/uv/Model/Usuario.java new file mode 100644 index 0000000..d5c2058 --- /dev/null +++ b/backend/src/main/java/mx/uv/Model/Usuario.java @@ -0,0 +1,176 @@ +package mx.uv.Model; + +import java.security.SecureRandom; + +public class Usuario { + private int id; + private String nombre; + private String apellido; + private String matricula; + private String contrasena; + private String correo; + private String nacionalidad; + private String tipoSangre; + private String fecha_nacimiento; + private String curp; + private String rol; + private int idCarrera; + private int inscrito; + + public Usuario(int id, String nombre, String apellido, String matricula, String contrasena, String correo, + String nacionalidad, String tipoSangre, String fecha_nacimiento, String curp, String rol, int idCarrera, + int inscrito) { + this.id = id; + this.nombre = nombre; + this.apellido = apellido; + this.matricula = matricula; + this.contrasena = contrasena; + this.correo = correo; + this.nacionalidad = nacionalidad; + this.tipoSangre = tipoSangre; + this.fecha_nacimiento = fecha_nacimiento; + this.curp = curp; + this.rol = rol; + this.idCarrera = idCarrera; + this.inscrito = inscrito; + } + + + public Usuario(int id, String nombre, String apellido, String matricula) { + this.id = id; + this.nombre = nombre; + this.apellido = apellido; + this.matricula = matricula; + } + + + + public Usuario(int id, String nombre, String apellido, String matricula, String rol) { + this.id = id; + this.nombre = nombre; + this.apellido = apellido; + this.matricula = matricula; + this.rol = rol; + } + + + public Usuario(String matricula, String contrasena) { + this.matricula = matricula; + this.contrasena = contrasena; + } + + public int getId() { + return id; + } + + public String getNombre() { + return nombre; + } + + public String getApellido() { + return apellido; + } + + public String getMatricula() { + return matricula; + } + + public String getContrasena() { + return contrasena; + } + + public String getCorreo() { + return correo; + } + + public String getNacionalidad() { + return nacionalidad; + } + + public String getTipoSangre() { + return tipoSangre; + } + + public String getFecha_nacimiento() { + return fecha_nacimiento; + } + + public String getCurp() { + return curp; + } + + public String getRol() { + return rol; + } + + public int getIdCarrera() { + return idCarrera; + } + + public int getInscrito() { + return inscrito; + } + + public void setId(int id) { + this.id = id; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public void setApellido(String apellido) { + this.apellido = apellido; + } + + public void setMatricula(String matricula) { + this.matricula = matricula; + } + + public void setContrasena(String contrasena) { + this.contrasena = contrasena; + } + + public void setCorreo(String correo) { + this.correo = correo; + } + + public void setNacionalidad(String nacionalidad) { + this.nacionalidad = nacionalidad; + } + + public void setTipoSangre(String tipoSangre) { + this.tipoSangre = tipoSangre; + } + + public void setFecha_nacimiento(String fecha_nacimiento) { + this.fecha_nacimiento = fecha_nacimiento; + } + + public void setCurp(String curp) { + this.curp = curp; + } + + public void setRol(String rol) { + this.rol = rol; + } + + public void setIdCarrera(int idCarrera) { + this.idCarrera = idCarrera; + } + + public void setInscrito(int inscrito) { + this.inscrito = inscrito; + } + + public String crearToken() { + String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + SecureRandom random = new SecureRandom(); + StringBuilder token = new StringBuilder(15); + for (int i = 0; i < 15; i++) { + int index = random.nextInt(CHARACTERS.length()); + token.append(CHARACTERS.charAt(index)); + } + return token.toString(); + } +} diff --git a/frontend/index.html b/frontend/index.html index c933b91..6fdf0eb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,12 +2,12 @@ - + - Registro + SIU -
+
diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 82f520c..04acbbe 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,12 +8,16 @@ "name": "frontend", "version": "0.0.0", "dependencies": { - "axios": "^1.6.8", + "@fortawesome/fontawesome-free": "^6.5.2", + "axios": "^1.7.0", + "bootstrap": "^5.3.3", + "chart.js": "^4.4.3", "react": "^18.2.0", + "react-bootstrap-pagination-control": "^1.0.5", + "react-chartjs-2": "^5.2.0", "react-dom": "^18.2.0", - "react-dropzone": "^14.2.3", - "react-router": "^6.23.1", - "react-router-dom": "^6.23.1" + "react-router-dom": "^6.23.1", + "sweetalert2": "^11.11.0" }, "devDependencies": { "@types/react": "^18.2.66", @@ -23,19 +27,9 @@ "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", - "react-router-dom": "^6.23.1", "vite": "^5.2.0" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -72,21 +66,21 @@ } }, "node_modules/@babel/core": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", - "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", + "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.4", + "@babel/generator": "^7.24.5", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.4", - "@babel/parser": "^7.24.4", + "@babel/helper-module-transforms": "^7.24.5", + "@babel/helpers": "^7.24.5", + "@babel/parser": "^7.24.5", "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -102,12 +96,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", - "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "dependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.5", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -179,16 +173,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -198,33 +192,33 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -240,9 +234,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -258,26 +252,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", - "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", + "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -287,9 +281,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", - "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -299,12 +293,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.1.tgz", - "integrity": "sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.5.tgz", + "integrity": "sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -328,6 +322,17 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.24.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", @@ -343,19 +348,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -364,13 +369,13 @@ } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -816,6 +821,15 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.2.tgz", + "integrity": "sha512-hRILoInAx8GNT5IMkrtIt9blOdrqHOnPBH+k70aWUAqPZPgopb9G5EQJFpaBx/S8zp2fC+mPW349Bziuk1o28Q==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -897,6 +911,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kurkle/color": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -932,19 +951,80 @@ "node": ">= 8" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.3.tgz", + "integrity": "sha512-5bUZ93dmvHFcmfUcEN7qzYe8yQQ8JY+nHN6m9/iSDCQ/QmCiE0kWXYwhurjw5ch6I8WokQzx66xKIMHBAa4NNA==", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" + } + }, "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==", - "dev": true, "engines": { "node": ">=14.0.0" } }, + "node_modules/@restart/hooks": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.16.tgz", + "integrity": "sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w==", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui": { + "version": "1.6.9", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.9.tgz", + "integrity": "sha512-mUbygUsJcRurjZCt1f77gg4DpheD1D+Sc7J3JjAkysUj7t8m4EBJVOqWC9788Qtbc69cJ+HlJc6jBguKwS8Mcw==", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@popperjs/core": "^2.11.6", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.4.9", + "@types/warning": "^3.0.0", + "dequal": "^2.0.3", + "dom-helpers": "^5.2.0", + "uncontrollable": "^8.0.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + } + }, + "node_modules/@restart/ui/node_modules/uncontrollable": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.4.tgz", + "integrity": "sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ==", + "peerDependencies": { + "react": ">=16.14.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", - "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", + "integrity": "sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==", "cpu": [ "arm" ], @@ -955,9 +1035,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz", - "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz", + "integrity": "sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==", "cpu": [ "arm64" ], @@ -968,9 +1048,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz", - "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz", + "integrity": "sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==", "cpu": [ "arm64" ], @@ -981,9 +1061,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz", - "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz", + "integrity": "sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==", "cpu": [ "x64" ], @@ -994,9 +1074,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz", - "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz", + "integrity": "sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==", "cpu": [ "arm" ], @@ -1007,9 +1087,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz", - "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz", + "integrity": "sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==", "cpu": [ "arm" ], @@ -1020,9 +1100,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz", - "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz", + "integrity": "sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==", "cpu": [ "arm64" ], @@ -1033,9 +1113,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz", - "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz", + "integrity": "sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==", "cpu": [ "arm64" ], @@ -1046,9 +1126,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz", - "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz", + "integrity": "sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==", "cpu": [ "ppc64" ], @@ -1059,9 +1139,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz", - "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz", + "integrity": "sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==", "cpu": [ "riscv64" ], @@ -1072,9 +1152,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz", - "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz", + "integrity": "sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==", "cpu": [ "s390x" ], @@ -1085,9 +1165,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz", - "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", + "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", "cpu": [ "x64" ], @@ -1098,9 +1178,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz", - "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz", + "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==", "cpu": [ "x64" ], @@ -1111,9 +1191,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz", - "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz", + "integrity": "sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==", "cpu": [ "arm64" ], @@ -1124,9 +1204,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz", - "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz", + "integrity": "sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==", "cpu": [ "ia32" ], @@ -1137,9 +1217,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz", - "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz", + "integrity": "sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==", "cpu": [ "x64" ], @@ -1149,6 +1229,14 @@ "win32" ] }, + "node_modules/@swc/helpers": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.11.tgz", + "integrity": "sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A==", + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1199,28 +1287,39 @@ "node_modules/@types/prop-types": { "version": "15.7.12", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", - "dev": true + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" }, "node_modules/@types/react": { - "version": "18.2.79", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz", - "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==", - "dev": true, + "version": "18.3.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.2.tgz", + "integrity": "sha512-Btgg89dAnqD4vV7R3hlwOxgqobUQKgx3MmrQRi0yYbs/P0ym8XozIAlkqVilPqHQwXs4e9Tf63rrCgl58BcO4w==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.2.25", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz", - "integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==", + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", "dev": true, "dependencies": { "@types/react": "*" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/warning": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.3.tgz", + "integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==" + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -1454,14 +1553,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "node_modules/attr-accept": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", - "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==", - "engines": { - "node": ">=4" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1478,9 +1569,9 @@ } }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.0.tgz", + "integrity": "sha512-IiB0wQeKyPRdsFVhBgIo31FbzOyf2M6wYl7/NVutFwFBRMiAbjNiydJIHKeLmPugF4kJLfA1uWZ82Is2QzqqFA==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1493,6 +1584,24 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/bootstrap": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.8" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1564,9 +1673,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001610", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz", - "integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==", + "version": "1.0.30001620", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz", + "integrity": "sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==", "dev": true, "funding": [ { @@ -1597,6 +1706,22 @@ "node": ">=4" } }, + "node_modules/chart.js": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.3.tgz", + "integrity": "sha512-qK1gkGSRYcJzqrrzdR6a+I0vQ4/R+SoODXyAjscQ/4mzuNzySaMCd+hyVxitSY1+L2fjPD1Gbn+ibNqRmwQeLw==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1652,8 +1777,7 @@ "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/data-view-buffer": { "version": "1.0.1", @@ -1771,6 +1895,14 @@ "node": ">=0.4.0" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "engines": { + "node": ">=6" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1783,10 +1915,19 @@ "node": ">=6.0.0" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/electron-to-chromium": { - "version": "1.4.738", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.738.tgz", - "integrity": "sha512-lwKft2CLFztD+vEIpesrOtCrko/TFnEJlHFdRhazU7Y/jx5qc4cqsocfVrBg4So4gGe9lvxnbLIoev47WMpg+A==", + "version": "1.4.774", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.774.tgz", + "integrity": "sha512-132O1XCd7zcTkzS3FgkAzKmnBuNJjK8WjcTtNuoylj7MYbqw5eXehjQ5OK91g0zm7OTKIPeaAG4CPoRfD9M1Mg==", "dev": true }, "node_modules/es-abstract": { @@ -1871,14 +2012,14 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", - "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", + "es-abstract": "^1.23.3", "es-errors": "^1.3.0", "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", @@ -2091,9 +2232,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "engines": { "node": ">=10" @@ -2103,9 +2244,9 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.6.tgz", - "integrity": "sha512-NjGXdm7zgcKRkKMua34qVO9doI7VOxZ6ancSvBELJSSoX97jyndXcSoa8XBh69JoB31dNz3EEzlMcizZl7LaMA==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.7.tgz", + "integrity": "sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw==", "dev": true, "peerDependencies": { "eslint": ">=7" @@ -2346,17 +2487,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-selector": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", - "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==", - "dependencies": { - "tslib": "^2.4.0" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2577,12 +2707,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -2754,6 +2885,14 @@ "node": ">= 0.4" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", @@ -3440,17 +3579,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -3532,9 +3671,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/possible-typed-array-names": { @@ -3593,6 +3732,18 @@ "react-is": "^16.13.1" } }, + "node_modules/prop-types-extra": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz", + "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==", + "dependencies": { + "react-is": "^16.3.2", + "warning": "^4.0.0" + }, + "peerDependencies": { + "react": ">=0.14.0" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -3628,9 +3779,9 @@ ] }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -3638,32 +3789,69 @@ "node": ">=0.10.0" } }, - "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "node_modules/react-bootstrap": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.2.tgz", + "integrity": "sha512-UvB7mRqQjivdZNxJNEA2yOQRB7L9N43nBnKc33K47+cH90/ujmnMwatTCwQLu83gLhrzAl8fsa6Lqig/KLghaA==", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "@babel/runtime": "^7.22.5", + "@restart/hooks": "^0.4.9", + "@restart/ui": "^1.6.8", + "@types/react-transition-group": "^4.4.6", + "classnames": "^2.3.2", + "dom-helpers": "^5.2.1", + "invariant": "^2.2.4", + "prop-types": "^15.8.1", + "prop-types-extra": "^1.1.0", + "react-transition-group": "^4.4.5", + "uncontrollable": "^7.2.1", + "warning": "^4.0.3" }, "peerDependencies": { - "react": "^18.2.0" + "@types/react": ">=16.14.8", + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/react-dropzone": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.2.3.tgz", - "integrity": "sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==", + "node_modules/react-bootstrap-pagination-control": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/react-bootstrap-pagination-control/-/react-bootstrap-pagination-control-1.0.5.tgz", + "integrity": "sha512-6OW9NUz0CAYLZ3hBEBWkxEgHggGo/RcxW+Owo0D2FUkgwtWyDEH40gSwZf0hX3r36vl5WfOg1VYkzLPMv3Rqbw==", "dependencies": { - "attr-accept": "^2.2.2", - "file-selector": "^0.6.0", - "prop-types": "^15.8.1" + "bootstrap": "^5.2.1", + "react-bootstrap": "^2.5.0" }, "engines": { - "node": ">= 10.13" + "node": ">=10" }, "peerDependencies": { - "react": ">= 16.8 || 18.0.0" + "react": ">=16" + } + }, + "node_modules/react-chartjs-2": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.2.0.tgz", + "integrity": "sha512-98iN5aguJyVSxp5U3CblRLH67J8gkfyGNbiK3c+l1QI/G4irHMPQw44aEPmjVag+YKTyQ260NcF82GTQ3bdscA==", + "peerDependencies": { + "chart.js": "^4.1.1", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" } }, "node_modules/react-is": { @@ -3671,10 +3859,15 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "node_modules/react-refresh": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", - "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3684,7 +3877,6 @@ "version": "6.23.1", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.1.tgz", "integrity": "sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==", - "dev": true, "dependencies": { "@remix-run/router": "1.16.1" }, @@ -3699,7 +3891,6 @@ "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==", - "dev": true, "dependencies": { "@remix-run/router": "1.16.1", "react-router": "6.23.1" @@ -3712,6 +3903,21 @@ "react-dom": ">=16.8" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", @@ -3733,6 +3939,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -3803,9 +4014,9 @@ } }, "node_modules/rollup": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz", - "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", + "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -3818,22 +4029,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.14.3", - "@rollup/rollup-android-arm64": "4.14.3", - "@rollup/rollup-darwin-arm64": "4.14.3", - "@rollup/rollup-darwin-x64": "4.14.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.14.3", - "@rollup/rollup-linux-arm-musleabihf": "4.14.3", - "@rollup/rollup-linux-arm64-gnu": "4.14.3", - "@rollup/rollup-linux-arm64-musl": "4.14.3", - "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3", - "@rollup/rollup-linux-riscv64-gnu": "4.14.3", - "@rollup/rollup-linux-s390x-gnu": "4.14.3", - "@rollup/rollup-linux-x64-gnu": "4.14.3", - "@rollup/rollup-linux-x64-musl": "4.14.3", - "@rollup/rollup-win32-arm64-msvc": "4.14.3", - "@rollup/rollup-win32-ia32-msvc": "4.14.3", - "@rollup/rollup-win32-x64-msvc": "4.14.3", + "@rollup/rollup-android-arm-eabi": "4.17.2", + "@rollup/rollup-android-arm64": "4.17.2", + "@rollup/rollup-darwin-arm64": "4.17.2", + "@rollup/rollup-darwin-x64": "4.17.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.17.2", + "@rollup/rollup-linux-arm-musleabihf": "4.17.2", + "@rollup/rollup-linux-arm64-gnu": "4.17.2", + "@rollup/rollup-linux-arm64-musl": "4.17.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2", + "@rollup/rollup-linux-riscv64-gnu": "4.17.2", + "@rollup/rollup-linux-s390x-gnu": "4.17.2", + "@rollup/rollup-linux-x64-gnu": "4.17.2", + "@rollup/rollup-linux-x64-musl": "4.17.2", + "@rollup/rollup-win32-arm64-msvc": "4.17.2", + "@rollup/rollup-win32-ia32-msvc": "4.17.2", + "@rollup/rollup-win32-x64-msvc": "4.17.2", "fsevents": "~2.3.2" } }, @@ -3896,9 +4107,9 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } @@ -4115,6 +4326,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sweetalert2": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.11.0.tgz", + "integrity": "sha512-wKCTtoE6lQVDKaJ5FFq+znk/YykJmJlD8RnLZps8C7DyivctCoRlVeeOwnKfgwKS+QJYon7s++3dmNi3/am1tw==", + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/limonte" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4247,10 +4467,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/uncontrollable": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz", + "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==", + "dependencies": { + "@babel/runtime": "^7.6.3", + "@types/react": ">=16.9.11", + "invariant": "^2.2.4", + "react-lifecycles-compat": "^3.0.4" + }, + "peerDependencies": { + "react": ">=15.0.0" + } + }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "dev": true, "funding": [ { @@ -4267,8 +4501,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -4287,9 +4521,9 @@ } }, "node_modules/vite": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz", - "integrity": "sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==", + "version": "5.2.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", + "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", "dev": true, "dependencies": { "esbuild": "^0.20.1", @@ -4341,6 +4575,14 @@ } } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4435,6 +4677,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index 03286f0..c061f95 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,12 +10,16 @@ "preview": "vite preview" }, "dependencies": { - "axios": "^1.6.8", + "@fortawesome/fontawesome-free": "^6.5.2", + "axios": "^1.7.0", + "bootstrap": "^5.3.3", + "chart.js": "^4.4.3", "react": "^18.2.0", + "react-bootstrap-pagination-control": "^1.0.5", + "react-chartjs-2": "^5.2.0", "react-dom": "^18.2.0", - "react-dropzone": "^14.2.3", - "react-router": "^6.23.1", - "react-router-dom": "^6.23.1" + "react-router-dom": "^6.23.1", + "sweetalert2": "^11.11.0" }, "devDependencies": { "@types/react": "^18.2.66", @@ -25,7 +29,6 @@ "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", - "react-router-dom": "^6.23.1", "vite": "^5.2.0" } } diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx new file mode 100644 index 0000000..980251d --- /dev/null +++ b/frontend/src/App.jsx @@ -0,0 +1,37 @@ +import { BrowserRouter, Routes, Route } from "react-router-dom"; +import Nav from "./Components/Nav"; +import Login from "./Views/Login"; +import Registro from "./Views/Registro"; +import './Styles/App.css'; + +import ProtectorDeRutas from "./Components/ProtectorDeRutas"; +import OfertaEducativa from "./Views/OfertaEducativa"; +import Inscripcion from "./Views/Inscripcion"; +import ProtectorEstudiante from "./Components/ProtectorEstudiante"; +import ProtectorAdmin from "./Components/ProtectorAdmin"; +import ValidacionAdm from "./Views/ValidacionAdm"; +import Informacion from "./Views/Informacion"; + +function App() { + return ( + +