fixed style
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
.button-group {
|
||||
/* Estilos para el grupo de botones */
|
||||
margin-top: 10px;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.edit-button,
|
||||
@@ -66,6 +66,7 @@
|
||||
.status-label {
|
||||
position: absolute;
|
||||
top: 82%;
|
||||
left: 1em;
|
||||
padding: 0 5px;
|
||||
border-radius: 10px;
|
||||
color: white;
|
||||
@@ -79,3 +80,50 @@
|
||||
.status-label.inactive {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
padding: 8px;
|
||||
margin: 0;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.dialog p {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.dialog input {
|
||||
padding: 8px;
|
||||
margin-bottom: 0 !important;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dialog button {
|
||||
background-color: #ff0000 !important;
|
||||
padding: 8px 20px;
|
||||
margin: 5px 5px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.dialog button:first-child {
|
||||
padding: auto !important;
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.dialog button:last-child {
|
||||
padding: auto !important;
|
||||
background-color: #007bff !important;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -7,6 +7,8 @@ const CardProfesor = ({ profesor, edificioNombre, permissions }) => {
|
||||
const [showDialog, setShowDialog] = useState(false);
|
||||
const [confirmText, setConfirmText] = useState('');
|
||||
const { deleteProfesor, loading, error } = useDeleteProfesor();
|
||||
const defaultImage = 'https://static.vecteezy.com/system/resources/thumbnails/020/765/399/small_2x/default-profile-account-unknown-icon-black-silhouette-free-vector.jpg';
|
||||
const fotoProfesor = profesor.fotografia || defaultImage;
|
||||
|
||||
|
||||
const handleDeleteClick = () => {
|
||||
@@ -33,7 +35,9 @@ const CardProfesor = ({ profesor, edificioNombre, permissions }) => {
|
||||
return (
|
||||
<div className="card m-1">
|
||||
<div className='image'>
|
||||
<img src={profesor.fotografia} alt="Profesor img" className="imgProfe" onClick={handleViewProfesor}/>
|
||||
{fotoProfesor && fotoProfesor.startsWith("http") ? (
|
||||
<img src={fotoProfesor} className="imgProfe" onClick={handleViewProfesor}/>
|
||||
) : null}
|
||||
|
||||
<div className={`status-label ${profesor.activo ? 'active' : 'inactive'}`}>
|
||||
{profesor.activo ? 'Activo' : 'Inactivo'}
|
||||
@@ -60,7 +64,7 @@ const CardProfesor = ({ profesor, edificioNombre, permissions }) => {
|
||||
|
||||
{showDialog && (
|
||||
<div className="dialog">
|
||||
<p>¿Deseas eliminar al profesor {profesor.nombre}?</p>
|
||||
<p>¿Deseas eliminar al profesor <strong>{profesor.nombre}</strong>?</p>
|
||||
<p>Para borrar al profesor, escribe "aceptar".</p>
|
||||
<input
|
||||
type="text"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
|
||||
.dialog {
|
||||
position: fixed !important;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
padding: 8px;
|
||||
margin: 0;
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
.resp-interface {
|
||||
display: flex;
|
||||
flex-direction: column; /* Alinear elementos en columna */
|
||||
align-items: center; /* Centrar horizontalmente */
|
||||
justify-content: center; /* Centrar verticalmente */
|
||||
gap: 20px; /* Espacio entre la sección y el panel de navegación */
|
||||
max-width: 500px; /* Ancho máximo para evitar que se extiendan demasiado */
|
||||
margin: auto; /* Margen exterior y centrado horizontal */
|
||||
}
|
||||
|
||||
.nav-panel {
|
||||
margin-bottom: 20px; /* Espacio entre el panel de navegación y la sección */
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.resp-section {
|
||||
text-align: center;
|
||||
margin-bottom: 20px; /* Espacio entre cada sección principal y los botones */
|
||||
padding: 20px; /* Espaciado interno de la sección */
|
||||
border-radius: 10px; /* Bordes redondeados */
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Sombra ligera */
|
||||
background-color: #f9f9f9; /* Color de fondo de las secciones */
|
||||
width: 100%; /* Ancho de la sección */
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center; /* Centrar horizontalmente */
|
||||
justify-content: center; /* Centrar verticalmente */
|
||||
margin-bottom: 10px; /* Espacio entre el título y la imagen */
|
||||
}
|
||||
|
||||
.section-icon {
|
||||
width: 150px; /* Tamaño de la imagen */
|
||||
height: 150px;
|
||||
margin: 0 auto; /* Centrar la imagen dentro de su contenedor */
|
||||
display: block; /* Para asegurar que los márgenes automáticos funcionen */
|
||||
border-radius: 50%; /* Hacer que la imagen sea circular si es necesario */
|
||||
}
|
||||
|
||||
.resp-section h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
margin-top: 10px; /* Espacio entre el título y los botones */
|
||||
}
|
||||
|
||||
.action-button {
|
||||
margin: 0 5px; /* Espacio entre los botones */
|
||||
padding: 10px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.action-button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import React from 'react';
|
||||
import './InterResp.css'; // Importar el archivo CSS para los estilos
|
||||
|
||||
const InterResp = () => {
|
||||
return (
|
||||
<div className="resp-interface">
|
||||
<h1 className="nav-panel">Panel de navegación</h1>
|
||||
<div className="resp-section">
|
||||
<div className="section-header">
|
||||
<h2>Profesores</h2>
|
||||
<img src='https://png.pngtree.com/png-clipart/20190516/original/pngtree-users-vector-icon-png-image_3725294.jpg' alt="Profesores" className="section-icon" />
|
||||
</div>
|
||||
<div className="button-group">
|
||||
<button className="action-button">Crear</button>
|
||||
<button className="action-button">Editar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default InterResp;
|
||||
@@ -51,6 +51,7 @@ const PerfilProfesor = () => {
|
||||
|
||||
const fotoProfesor = profesor.fotografia || defaultImage;
|
||||
|
||||
|
||||
const handleEditClick = () => {
|
||||
window.location.href = `${PrivateRoutes.EDITARPROFESOR}${profesor.id_profesor}`;
|
||||
};
|
||||
@@ -73,7 +74,9 @@ const PerfilProfesor = () => {
|
||||
return (
|
||||
<div className="perfil-profesor">
|
||||
<div className="foto-nombre">
|
||||
<img src={fotoProfesor} alt={profesor.nombre} className="foto" />
|
||||
{fotoProfesor && fotoProfesor.startsWith("http") ? (
|
||||
<img src={fotoProfesor} className="foto" />
|
||||
) : null}
|
||||
<div className="info">
|
||||
<div className='nombre'>
|
||||
<h2>{profesor.nombre}</h2>
|
||||
|
||||
Reference in New Issue
Block a user