diff --git a/src/components/Card/Card.css b/src/components/Card/Card.css index cea3d1d..1a4deca 100644 --- a/src/components/Card/Card.css +++ b/src/components/Card/Card.css @@ -1,7 +1,7 @@ .card { max-width: 90vw; width: 400px; - height: 175px; + height: 150px; margin: auto; padding: 0.5em; border-radius: 1em !important; diff --git a/src/components/Card/CardProfesores/CardProfesor.js b/src/components/Card/CardProfesores/CardProfesor.js index dc3230d..e5ad580 100644 --- a/src/components/Card/CardProfesores/CardProfesor.js +++ b/src/components/Card/CardProfesores/CardProfesor.js @@ -3,6 +3,8 @@ import "../Card.css"; import { PrivateRoutes, PublicRoutes } from "../../../models/routes"; import { useDeleteTeacher } from "../../../services/teacher.services"; +const API_URL = process.env.REACT_APP_API_URL; + const CardProfesor = ({ profesor, edificioNombre, permissions }) => { const [showDialog, setShowDialog] = useState(false); const [confirmText, setConfirmText] = useState(""); @@ -41,7 +43,14 @@ const CardProfesor = ({ profesor, edificioNombre, permissions }) => { alt={profesor.nombre} onClick={handleViewProfesor} /> - ) : null} + ) : ( + {profesor.nombre} + )} {permissions ? (
{ let imageUrl = ""; if (fotoBase64) { - imageUrl = await uploadImage(fotoBase64, nombre); + imageUrl = await uploadImage(fotoBase64, id_usuario); } const updatedDatosAcademicos = datosAcademicos.map(dato => ({ diff --git a/src/components/Teacher/PerfilProfesor/PerfilProfesor.css b/src/components/Teacher/PerfilProfesor/PerfilProfesor.css index e44534c..d3e8f54 100644 --- a/src/components/Teacher/PerfilProfesor/PerfilProfesor.css +++ b/src/components/Teacher/PerfilProfesor/PerfilProfesor.css @@ -3,6 +3,7 @@ align-items: center; justify-content: space-evenly; margin-bottom: 20px; + gap: 20px; } .foto { @@ -27,7 +28,7 @@ border: 1px solid #ccc; border-radius: 5px; background-color: white; - margin: 20px auto; + margin: 0 auto 10px auto; width: 800px; max-width: 90vw; } diff --git a/src/components/Teacher/PerfilProfesor/PerfilProfesor.js b/src/components/Teacher/PerfilProfesor/PerfilProfesor.js index 36bf65d..bd18f7f 100644 --- a/src/components/Teacher/PerfilProfesor/PerfilProfesor.js +++ b/src/components/Teacher/PerfilProfesor/PerfilProfesor.js @@ -13,6 +13,8 @@ import { useTeacher, } from "../../../services/teacher.services"; +const API_URL = process.env.REACT_APP_API_URL; + const defaultImage = "https://static.vecteezy.com/system/resources/thumbnails/020/765/399/small_2x/default-profile-account-unknown-icon-black-silhouette-free-vector.jpg"; @@ -97,7 +99,13 @@ const PerfilProfesor = () => {
{fotoProfesor && fotoProfesor.startsWith("http") ? ( {profesor.nombre} - ) : null} + ) : ( + {profesor.nombre} + )}
@@ -134,7 +142,7 @@ const PerfilProfesor = () => {
  • - Grado Máximo: + Grado Máximo: {profesor.datosAcademicos.length > 0 ? ( profesor.datosAcademicos[0].grado_maximo ? ( <>{profesor.datosAcademicos[0].grado_maximo} @@ -240,7 +248,7 @@ const PerfilProfesor = () => {
{showDialog && ( -
+

¿Deseas eliminar al profesor {profesor.nombre}?

diff --git a/src/services/auth.services.js b/src/services/auth.services.js index f2dfb03..3b0878c 100644 --- a/src/services/auth.services.js +++ b/src/services/auth.services.js @@ -77,7 +77,7 @@ export const useUploadImage = () => { } const result = await response.json(); - return `${API_URL}${result.imageUrl}`; + return result.imageUrl; } catch (error) { throw error; }