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 b7e0912..f7c24d4 100644
--- a/backend/src/main/java/mx/uv/Controller/DAO_Carrrera.java
+++ b/backend/src/main/java/mx/uv/Controller/DAO_Carrrera.java
@@ -24,7 +24,7 @@ public class DAO_Carrrera {
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.getString(6), rs.getString(7));
+ rs.getString(5), rs.getString(6), rs.getString(7), rs.getString(8));
resultado.add(u);
}
} catch (Exception e) {
@@ -36,29 +36,33 @@ public class DAO_Carrrera {
}
- /*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;
- }*/
+ /*
+ * 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) {
@@ -81,27 +85,31 @@ public class DAO_Carrrera {
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 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/Model/Carrera.java b/backend/src/main/java/mx/uv/Model/Carrera.java
index b280a19..0d2d0aa 100644
--- a/backend/src/main/java/mx/uv/Model/Carrera.java
+++ b/backend/src/main/java/mx/uv/Model/Carrera.java
@@ -10,10 +10,11 @@ public class Carrera {
private String vision;
private String objetivo;
- public Carrera(int id, String nombre, String campus, String descripcion, String mision, String vision,
+ public Carrera(int id, String nombre, String area, String campus, String descripcion, String mision, String vision,
String objetivo) {
this.id = id;
this.nombre = nombre;
+ this.area = area;
this.campus = campus;
this.descripcion = descripcion;
this.mision = mision;
diff --git a/frontend/src/Styles/Informacion.css b/frontend/src/Styles/Informacion.css
new file mode 100644
index 0000000..4a56290
--- /dev/null
+++ b/frontend/src/Styles/Informacion.css
@@ -0,0 +1,43 @@
+#labelSelect {
+ margin-right: 10px;
+ font-size: x-large;
+ color: #55574f;
+ font-weight: bold;
+}
+
+#informacion {
+ margin-left: 5%;
+ margin-right: 5%;
+}
+
+#subtitulo {
+ font-size: x-large;
+ font-weight: bold;
+}
+
+#grupoP {
+ margin-bottom: 2%;
+}
+
+#subtituloIngreso {
+ font-size: 20px;
+}
+
+#subtituloTexto {
+ font-size: large;
+ font-weight: 100;
+}
+
+.btnElegirCarrera {
+ display: flex;
+ justify-content: center;
+ font-family: Georgia, 'Times New Roman', Times, serif;
+ font-weight: bold;
+ font-size: x-large;
+ color: #D5EEBB;
+ background-color: #474941;
+}
+
+.btnElegirCarrera:hover {
+ background-color: #55574f;
+}
\ No newline at end of file
diff --git a/frontend/src/Views/Informacion.jsx b/frontend/src/Views/Informacion.jsx
index 4488a25..6f843fc 100644
--- a/frontend/src/Views/Informacion.jsx
+++ b/frontend/src/Views/Informacion.jsx
@@ -1,15 +1,16 @@
-import React from 'react'
-import { useState, useEffect } from 'react';
-import { sendRequest } from "../funciones";
+import React, { useState, useEffect } from 'react';
+import axios from 'axios';
+import '../Styles/Informacion.css';
const Informacion = () => {
- const [productosData, setProductosData] = useState([]);
+ const [carrerasData, setCarrerasData] = useState([]);
+ const [selectedCarrera, setSelectedCarrera] = useState(null);
useEffect(() => {
const fetchData = async () => {
try {
const res = await axios.get("/carreras");
- setProductosData(res.data);
+ setCarrerasData(res.data);
} catch (error) {
console.error(error);
}
@@ -18,46 +19,60 @@ const Informacion = () => {
fetchData();
}, []);
- const Picture = (parametros) => {
- const id = parametros.id;
- const nombre = parametros.nombre;
- const area = parametros.area;
- const campus = parametros.campus;
- const descripcion = parametros.descripcion;
- const mision = parametros.mision;
- const vision = parametros.vision;
- const objetivo = parametros.objetivo;
-
- return (
-
- {nombre}
- {area}
- {campus}
- {descripcion}
- {mision}
- {vision}
- {objetivo}
-