diff --git a/Base/universidad.sql b/Base/universidad.sql index 794b7dc..d93630b 100644 --- a/Base/universidad.sql +++ b/Base/universidad.sql @@ -11,13 +11,14 @@ drop table alumno; create table alumno( id integer auto_increment primary key, nombre varchar(40), - apellidos varchar(100), + apellido varchar(100), fecha_nacimiento date, nacionalidad varchar(40), tipoSangre varchar(40), matricula varchar(40), - contraseña varchar(40) -); + contrasena varchar(40), +) + drop table examen; create table examen( diff --git a/backend/src/main/java/mx/uv/App.java b/backend/src/main/java/mx/uv/App.java index 16b2af1..13e0693 100644 --- a/backend/src/main/java/mx/uv/App.java +++ b/backend/src/main/java/mx/uv/App.java @@ -2,27 +2,63 @@ package mx.uv; import static spark.Spark.*; import java.util.HashMap; -import java.util.UUID; import com.google.gson.*; + +import mx.uv.Controller.DAO; +import mx.uv.Model.*; + public class App { + static Gson gson = new Gson(); + static HashMap usuarios = new HashMap<>(); public static void main( String[] args ) { - System.out.println( "Hello World!" ); - //port(80); + //fuente:https://gist.github.com/saeidzebardast/e375b7d17be3e0f4dddf + 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); + } + return "OK"; + }); - get("/usuarios", (request, response) ->{ + before((request,response)->response.header("Access-Control-Allow-Origin","*")); + + get("/TodosLosAlumnos", (request, response) ->{ response.type("application/json"); - JsonObject respuesta = new JsonObject(); - respuesta.addProperty("msj", "hola"); - return respuesta; + return gson.toJson(DAO.dameUsuarios()); }); - post("/usuarios", (request, response) ->{ + post("/agregarAlumno", (request, response) ->{ String payload = request.body(); + Alumno alumno = gson.fromJson(payload, Alumno.class); + + boolean msj = DAO.agregarAlumno(new Alumno("Pedro","Lazaro","Mexicano","SAKHBD197", "PezGato")); JsonObject respuesta = new JsonObject(); - respuesta.addProperty("msj", ""); + respuesta.addProperty("msj", msj); return respuesta; }); + put("/EditarAlumno", (request, response) ->{ + String payload = request.body(); + Alumno alumno = gson.fromJson(payload, Alumno.class); + boolean verificado = DAO.editarAlumno(alumno); + JsonObject respuesta = new JsonObject(); + respuesta.addProperty("existe", verificado); + return respuesta; + }); + delete("/EliminarAlumno", (request, response) ->{ + String payload = request.body(); + Alumno alumno = gson.fromJson(payload, Alumno.class); + boolean verificado = DAO.eliminarAlumno(alumno); + JsonObject respuesta = new JsonObject(); + respuesta.addProperty("existe", verificado); + return respuesta; + }); + + } -} +} \ No newline at end of file diff --git a/backend/src/main/java/mx/uv/Controller/Conexion.java b/backend/src/main/java/mx/uv/Controller/Conexion.java new file mode 100644 index 0000000..8537309 --- /dev/null +++ b/backend/src/main/java/mx/uv/Controller/Conexion.java @@ -0,0 +1,56 @@ +package mx.uv.Controller; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.logging.Logger; + +public class Conexion { + + private static Connection conexion; + private static Conexion instancia; + private static final String url = "jdbc:mysql://localhost:3306/universidad"; + private static final String user = "root"; + private static final String password = "Perro16tonto"; + private static final Logger logger = Logger.getLogger(Conexion.class.getName()); + + private Conexion() {} + + public static Conexion getInstance() { + if (instancia == null) { + synchronized (Conexion.class) { + if (instancia == null) { + instancia = new Conexion(); + } + } + } + return instancia; + } + + public Connection conectar() { + try { + Class.forName("com.mysql.cj.jdbc.Driver"); + conexion = DriverManager.getConnection(url, user, password); + if (conexion != null) { + logger.info("Conexión exitosa"); + return conexion; + } else { + logger.severe("ERROR: No se pudo conectar"); + } + } catch (Exception e) { + logger.severe("ERROR: " + e.getMessage()); + } + return null; + } + + public void cerrarConexion() { + try { + if (conexion != null && !conexion.isClosed()) { + conexion.close(); + logger.info("Se desconectó de la base de datos"); + } + } catch (SQLException e) { + logger.severe("ERROR: " + e.getMessage()); + } + } +} diff --git a/backend/src/main/java/mx/uv/Controller/DAO.java b/backend/src/main/java/mx/uv/Controller/DAO.java new file mode 100644 index 0000000..f3cf49d --- /dev/null +++ b/backend/src/main/java/mx/uv/Controller/DAO.java @@ -0,0 +1,124 @@ +package mx.uv.Controller; + +import java.sql.*; +import java.util.ArrayList; +import java.util.List; + + +import mx.uv.Model.Alumno; + +public class DAO { + private static Conexion cn = Conexion.getInstance(); + + public static List dameUsuarios() { + Statement stm = null; + ResultSet rs = null; + Connection conn = null; + List resultado = new ArrayList<>(); + + conn = cn.conectar(); + + try { + String sql = "SELECT * from alumno"; + 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)); + resultado.add(u); + } + } catch (Exception e) { + System.out.println(e); + } finally { + cerrarConexiones(null, conn); + } + return resultado; + } + public static boolean validarAlumno(Alumno alumno) { + Statement stm = null; + Connection conn = null; + boolean verificacion =false; + ResultSet rs = null; + conn = cn.conectar(); + try { + String sql ="select * from usuarios " + + "where matricula= '"+alumno.getMatricula()+"' and contrasena='"+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); + } + return verificacion; + } + + public static boolean agregarAlumno(Alumno alumno) { + PreparedStatement stm = null; + Connection conn = null; + boolean msj= false; + + conn = cn.conectar(); + try { + String sql = "INSERT INTO `alumno`(`nombre`,`apellido`,`nacionalidad`,`matricula`,`contrasena`)VALUES(?,?,?,?,?);"; + stm = (PreparedStatement) conn.prepareStatement(sql); + stm.setString(1, alumno.getNombre()); + stm.setString(2, alumno.getApellido()); + stm.setString(3, alumno.getNacionalidad()); + stm.setString(4, alumno.getMatricula()); + stm.setString(5, alumno.getContrasena()); + if (stm.executeUpdate() > 0) + msj = true; + else + msj = false; + + } 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 eliminarAlumno(Alumno alumno) { + + return false; + } + public static boolean editarAlumno(Alumno alumno) { + PreparedStatement stm = null; + Connection conn = null; + boolean verificacion =false; + conn = cn.conectar(); + try { + String sql ="UPDATE `producto` SET `nombreProducto` = '"+p.getNombreProducto()+"',`precio` = '"+p.getPrecio()+"',`cantidad` = '"+p.getCantidad()+"',`imagen` = '"+p.getImagen()+"'WHERE `id` = '"+p.getId()+"';"; + stm = conn.prepareStatement(sql); + stm.executeUpdate(); + verificacion = true; + conn.close(); + } catch (SQLException ex) { + System.err.println(ex); + }finally{ + actualizarVenta(p); + } + return verificacion; + } +} diff --git a/backend/model/Administrador.java b/backend/src/main/java/mx/uv/Model/Administrador.java similarity index 98% rename from backend/model/Administrador.java rename to backend/src/main/java/mx/uv/Model/Administrador.java index a400694..4d2ba05 100644 --- a/backend/model/Administrador.java +++ b/backend/src/main/java/mx/uv/Model/Administrador.java @@ -1,3 +1,5 @@ +package mx.uv.Model; + public class Administrador { private int id; private String matricula; diff --git a/backend/model/Alumno.java b/backend/src/main/java/mx/uv/Model/Alumno.java similarity index 92% rename from backend/model/Alumno.java rename to backend/src/main/java/mx/uv/Model/Alumno.java index d7a0f0e..7ab862b 100644 --- a/backend/model/Alumno.java +++ b/backend/src/main/java/mx/uv/Model/Alumno.java @@ -1,4 +1,4 @@ -package model; +package mx.uv.Model; // * Clase Alumno que servira para comunicarse con el controlador. public class Alumno { private int id; @@ -25,23 +25,21 @@ public class Alumno { public Alumno() { } - public Alumno(int id, String nombre, String apellido, String nacionalidad) { - this.id = id; + public Alumno(String nombre, String apellido, String nacionalidad, String matricula, String contrasena) { this.nombre = nombre; this.apellido = apellido; this.nacionalidad = nacionalidad; - } - - public Alumno(int id, String matricula, String contrasena) { - this.id = id; this.matricula = matricula; this.contrasena = contrasena; } + public Alumno(String matricula, String contrasena) { this.matricula = matricula; this.contrasena = contrasena; } + + public void setId(int id) { this.id = id; } diff --git a/backend/model/Tutor.java b/backend/src/main/java/mx/uv/Model/Tutor.java similarity index 98% rename from backend/model/Tutor.java rename to backend/src/main/java/mx/uv/Model/Tutor.java index 117ff18..b410300 100644 --- a/backend/model/Tutor.java +++ b/backend/src/main/java/mx/uv/Model/Tutor.java @@ -1,3 +1,4 @@ +package mx.uv.Model; public class Tutor { private int id; private String nombre; diff --git a/frontend/imagen.jpg b/frontend/imagen.jpg new file mode 100644 index 0000000..9a47531 Binary files /dev/null and b/frontend/imagen.jpg differ diff --git a/frontend/index.html b/frontend/index.html index ee94bcf..5e538a2 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,19 +4,11 @@ -<<<<<<< HEAD Registro -======= - SIU_Dran_net ->>>>>>> 48e69d3c4957e0bdf3d622c1408a569a14d5a80c - -
- -
+
- diff --git a/frontend/logo.png b/frontend/logo.png new file mode 100644 index 0000000..325deb2 Binary files /dev/null and b/frontend/logo.png differ diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 961eef3..10cc79f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,8 +8,10 @@ "name": "frontend", "version": "0.0.0", "dependencies": { + "axios": "^1.6.8", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "react-dropzone": "^14.2.3" }, "devDependencies": { "@types/react": "^18.2.66", @@ -1435,6 +1437,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "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", @@ -1450,6 +1465,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1575,6 +1600,17 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1715,6 +1751,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2290,6 +2334,17 @@ "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", @@ -2326,6 +2381,25 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -2335,6 +2409,19 @@ "is-callable": "^1.1.3" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3154,6 +3241,25 @@ "yallist": "^3.0.2" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3206,7 +3312,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -3470,13 +3575,17 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -3529,11 +3638,26 @@ "react": "^18.2.0" } }, + "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==", + "dependencies": { + "attr-accept": "^2.2.2", + "file-selector": "^0.6.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">= 10.13" + }, + "peerDependencies": { + "react": ">= 16.8 || 18.0.0" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-refresh": { "version": "0.14.0", @@ -3962,6 +4086,11 @@ "node": ">=4" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 39c7fb4..ac37084 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,8 +10,10 @@ "preview": "vite preview" }, "dependencies": { + "axios": "^1.6.8", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "react-dropzone": "^14.2.3" }, "devDependencies": { "@types/react": "^18.2.66", diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx deleted file mode 100644 index 3a09655..0000000 --- a/frontend/src/App.jsx +++ /dev/null @@ -1,42 +0,0 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' -import './login.css' - -function App() { - //const [count, setCount] = useState(0) - const [usuario, setUsuario]= useState("") - const [password, setPassword]= useState("") - - return ( - <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.jsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- - - - - ) -} - - -export default App diff --git a/frontend/src/OfertaEducativa.css b/frontend/src/OfertaEducativa.css new file mode 100644 index 0000000..4a0c572 --- /dev/null +++ b/frontend/src/OfertaEducativa.css @@ -0,0 +1,69 @@ +h1.tituloOE{ + color: rgba(36, 15, 103, 0.922); + text-transform: capitalize; + padding-inline:initial; + margin-top:15%; +} +header.headerOE{ + display: inline; + width: 100%; + height: 18%; +} +div.grupo1{ + background-color: #D5EEBB; + padding: 0%; +} +#logo{ + width: 70px; + height:min-content; +} +div.grupo2{ + background-color: #D5EEBB; + margin-top: 10px; + margin-left: 10px; + text-align: left; +} +li.tit{ + background-color: #D5EEBB; + color:rgba(36, 15, 103, 0.922); + font-size: 120%; +} +nav ul { + list-style-type: none; + background-color:#D5EEBB; +} +nav ul li { + display: inline; + margin-right: 80px; + +} +li a{ + background-color: #D5EEBB; + color:rgb(172, 104, 9); +} +.container{ + display: grid; + grid-template-columns: auto auto auto auto; + gap: 10%; + justify-content: center; /* Centra horizontalmente el contenedor */ + align-items: center; /* Ajusta el ancho del contenedor según sea necesario */ +} +div.area{ + color:rgb(27, 97, 154); + border: 1px solid rgb(27, 97, 154); + font-size: x-large; +} +div.listaLic{ + color: rgb(172, 104, 9); +} +.footerOE{ + font-size:large; + padding: 20px 0; /* Espaciado interno del footer */ + position:fixed; /* Hace que el footer sea fijo en la parte inferior */ + width: 100%; + font-weight: bold; +} + + + + diff --git a/frontend/src/OfertaEducativa.jsx b/frontend/src/OfertaEducativa.jsx new file mode 100644 index 0000000..2e793a3 --- /dev/null +++ b/frontend/src/OfertaEducativa.jsx @@ -0,0 +1,74 @@ +import './OfertaEducativa.css' + +function OfertaEducativa (){ + return ( + <> + +
+ +
+

Oferta Educativa

+
+
+ Área Técnica +
+
    +
  • Licenciatura en Matemáticas
  • +
  • Licenciatura en Física
  • +
  • Licenciatura en Arquitectura
  • +
+
+
+
+ Área Económico-Administrativo +
+
    +
  • Licenciatura en Contabilidad
  • +
  • Licenciatura en Economía
  • +
  • Licenciatura en Administración
  • +
+
+
+
+ Área de Humanidades +
+
    +
  • Licenciatura en historia
  • +
  • Licenciatura en Antropología
  • +
  • Licenciatura en Pedagogía
  • +
+
+
+
+ Área de Biológicas y Agropecuarias +
+
    +
  • Licenciatura en Biología
  • +
  • Ingeniería Química
  • +
  • Ingeniero Agrónomo
  • +
+
+
+
+
+ © 2024 Universidad Filadelfia. Todos los derechos reservados +
+ + + ); +} + +export default OfertaEducativa \ No newline at end of file diff --git a/frontend/src/Preinscripcion.jsx b/frontend/src/Preinscripcion.jsx new file mode 100644 index 0000000..0ffad25 --- /dev/null +++ b/frontend/src/Preinscripcion.jsx @@ -0,0 +1,13 @@ +import SubirPDF from "./SubirPDF"; +import React from 'react'; + +const App = () => { + return ( +
+

Subir archivo PDF

+ +
+ ); +}; + +export default App; diff --git a/frontend/src/SubirPDF.jsx b/frontend/src/SubirPDF.jsx new file mode 100644 index 0000000..e850a21 --- /dev/null +++ b/frontend/src/SubirPDF.jsx @@ -0,0 +1,36 @@ +import React, { useCallback } from 'react'; +import { useDropzone } from 'react-dropzone'; +import axios from 'axios'; + +const SubirPDF = () => { + const onDrop = useCallback(acceptedFiles => { + const file = acceptedFiles[0]; + const formData = new FormData(); + formData.append('pdfFile', file); + + axios.post('http://localhost:${port}', formData, { + headers: { + 'Content-Type': 'multipart/form-data' + } + }) + .then(response => { + // Manejar la respuesta del servidor + console.log(response.data); + }) + .catch(error => { + // Manejar errores + console.error('Error al subir el archivo:', error); + }); + }, []); + + const { getRootProps, getInputProps } = useDropzone({ onDrop }); + + return ( +
+ +

Arrastra y suelta un archivo PDF aquí, o haz clic para seleccionar uno

+
+ ); +}; + +export default SubirPDF; diff --git a/frontend/src/assets/login.jsx b/frontend/src/assets/login.jsx deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/login.css b/frontend/src/login.css index a03cbf7..2b1133c 100644 --- a/frontend/src/login.css +++ b/frontend/src/login.css @@ -1,10 +1,19 @@ * { - background-color: #444941; - padding: 0; - margin: 10; + background-color:#d8d8d8; box-sizing: border-box; - font-family:Arial, Helvetica, sans-serif; + flex-direction: column; } + +.gridContainer { + display: grid; + grid-template-columns: 1fr 1fr; /* Dos columnas de ancho igual */ + gap: 50px; /* Espacio entre las columnas */ +} + +.imgColum { + margin-top: auto; +} + .Formulario { font-size: 20px; @@ -18,35 +27,87 @@ input[type="text"], input[type="password"]{ /* align-items: center; */ border-radius: 5px; display: block; - height: 30px; + height: 40px; padding-left: 10px; padding-right: 10px; margin-left: auto; margin-right: auto; + font-size: large; } +header { + color: rgba(36, 15, 103, 0.922); + background-color: #D5EEBB; + padding: 20px 0; /* Espaciado interno del encabezado */ + position: fixed; /* Hace que el encabezado sea fijo */ + width: 100%; /* Ancho completo del encabezado */ + top: 0; /* Lo posiciona en la parte superior */ + z-index: 1000; /* Asegura que esté por encima del contenido */ + font-weight:bold; + font-size: x-large; +} +font{ + background-color: transparent; +} +/*#Formulario{ + min-height: 89vh; +}*/ + +form{ + margin-left: auto; +} + h1{ - color: #D5EEBB; + color: rgb(172, 104, 9); font-family: Jockey One; + text-transform: capitalize; + margin-top: 30%; + padding-left: 30%; } #button{ background-color: #D5EEBB; - margin-top: 20px; + color:rgba(36, 15, 103, 0.922); + margin-top: 30px; stroke: none; font-family: Georgia, 'Times New Roman', Times, serif; font-weight: bold; - padding-top: 100px; - padding: 5px; + text-align: center; + padding: 5px 5px 5px 5px; + height: fit-content; + font-size: x-large; } label{ - color: #D5EEBBAA; + color: rgb(172, 104, 9); font-family: JejuMyeongjo; - font-size: 20px; + font-size: 40px; font-weight: 400; text-align: left; } -.footer{ - color: aliceblue; +footer{ + color: #000000; + background-color: #D5EEBB; + padding: 20px 0; /* Espaciado interno del footer */ + position: absolute; /* Hace que el footer sea fijo en la parte inferior */ + width: 100%; /* Ancho completo del footer */ + bottom: 0; /* Lo posiciona en la parte inferior */ + display: flex; + justify-content: center; + align-items: center; + flex-direction: row; +} +#footerId{ + margin-left: 15px; + margin-right: 15px; + text-align: center; + font-size: large; + background-color: transparent; + font-weight: bold; +} + +div a{ + background-color: #D5EEBB; + color:rgb(172, 104, 9); + font-weight: bold; } diff --git a/frontend/src/login.jsx b/frontend/src/login.jsx index b23be85..b84fdb8 100644 --- a/frontend/src/login.jsx +++ b/frontend/src/login.jsx @@ -1,34 +1,35 @@ -import { useState } from 'react' import './login.css' function Login() { - - return ( - <> -
La universidad que esta para ti, ¡UNETE!
-
- -

Bienvenido

-
- - - - - - - -
+ return ( + <> + +
La universidad que esta para ti, ¡UNETE!
+
+
+ Imagen +
+
+

Bienvenido

+
+ + + + + +
+
-
- -
- - ); + + + + + ); } -export default Login \ No newline at end of file +export default Login + diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx index 39fe1b8..66fdbe8 100644 --- a/frontend/src/main.jsx +++ b/frontend/src/main.jsx @@ -1,11 +1,16 @@ import React from 'react' import ReactDOM from 'react-dom/client' +import OfertaEducativa from './OfertaEducativa.jsx' +import Preinscripcion from './Preinscripcion.jsx' +import SubirPDF from './SubirPDF.jsx' + import General from './General.jsx' import './Registro.css' +import './login.css'; ReactDOM.createRoot(document.getElementById('root')).render( - - + + , )