Proyectos Académicos
@@ -572,69 +616,76 @@ const FormEditProfesor = () => {
-
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
);
};
diff --git a/src/components/Teacher/PerfilProfesor/PerfilProfesor.css b/src/components/Teacher/PerfilProfesor/PerfilProfesor.css
index 69e96ef..e44534c 100644
--- a/src/components/Teacher/PerfilProfesor/PerfilProfesor.css
+++ b/src/components/Teacher/PerfilProfesor/PerfilProfesor.css
@@ -9,7 +9,7 @@
width: auto;
max-width: 40vw;
height: 250px;
- max-height: 25vh;
+ max-height: 50vh;
border-radius: 1em;
object-fit: cover;
}
@@ -38,6 +38,11 @@
align-items: start;
}
+.list{
+ margin-left: 20px;
+ list-style: circle;
+}
+
.datos-academicos,
.lineas-investigacion,
diff --git a/src/components/Teacher/PerfilProfesor/PerfilProfesor.js b/src/components/Teacher/PerfilProfesor/PerfilProfesor.js
index 89a261c..36bf65d 100644
--- a/src/components/Teacher/PerfilProfesor/PerfilProfesor.js
+++ b/src/components/Teacher/PerfilProfesor/PerfilProfesor.js
@@ -73,6 +73,19 @@ const PerfilProfesor = () => {
window.history.back();
};
+ const splitTextToListItems = (text) => {
+ const parts = text.split(".").filter((part) => part.trim() !== "");
+
+ return parts.map((part, index) => {
+ const formattedPart = part.trim() + (index < parts.length - 1 ? "." : "");
+ return (
+
+ {formattedPart}
+
+ );
+ });
+ };
+
return (
@@ -120,22 +133,34 @@ const PerfilProfesor = () => {
Datos académicos
- {profesor.datosAcademicos.map((datosAcademicos, index) => (
-
- -
- Grado Máximo:
- {datosAcademicos.grado_maximo
- ? datosAcademicos.grado_maximo
- : "NO encontrado"}
-
- -
- Grados Obtenidos:
- {datosAcademicos.grados_obtenidos
- ? datosAcademicos.grados_obtenidos
- : "NO encontrado"}
-
-
- ))}
+ -
+ Grado Máximo:
+ {profesor.datosAcademicos.length > 0 ? (
+ profesor.datosAcademicos[0].grado_maximo ? (
+ <>{profesor.datosAcademicos[0].grado_maximo}>
+ ) : (
+ <>No hay Grado Máximo registrado.>
+ )
+ ) : (
+
- No hay Datos Académicos registrados.
+ )}
+
+
+ Grados Obtenidos:
+
+ {profesor.datosAcademicos.length > 0 ? (
+ profesor.datosAcademicos.map((item, index) =>
+ item.grados_obtenidos ? (
+ -
+ {splitTextToListItems(item.grados_obtenidos)}
+
+ ) : null
+ )
+ ) : (
+ - No hay Grados registrados.
+ )}
+
+
-
Categoría:
{categoriaProfesor ? categoriaProfesor.categoria : "No ubicado"}
@@ -154,12 +179,16 @@ const PerfilProfesor = () => {
Líneas de investigación
+ Investigaciones:
{profesor.lineasInvestigacion.length > 0 ? (
profesor.lineasInvestigacion.map((linea, index) => (
- -
- Investigacion {index + 1}:
- {linea.lineas_inv_html ? linea.lineas_inv_html : "NO encontrado"}
-
+
+
+ {linea.lineas_inv_html
+ ? splitTextToListItems(linea.lineas_inv_html)
+ : null}
+
+
))
) : (
- No hay líneas de investigación registradas.
@@ -172,12 +201,16 @@ const PerfilProfesor = () => {
Proyectos académicos