Compare commits
6 Commits
development
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| 53df6eb3b9 | |||
| d318679a89 | |||
| e2457f4cd4 | |||
| 06fbb32734 | |||
| ddc2e0466e | |||
| 9d20a50674 |
@@ -1,2 +1 @@
|
|||||||
REACT_APP_API_URL=https://venus.acatlan.unam.mx/directorio_test
|
REACT_APP_API_URL=https://venus.acatlan.unam.mx/directorio_test
|
||||||
REACT_APP_PORT=3001
|
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
.edit-button,
|
.edit-button,
|
||||||
.delete-boton {
|
.delete-boton {
|
||||||
padding: 8px 12px;
|
padding: 4px 12px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -352,7 +352,7 @@ button[type="submit"]:disabled {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.delete-botones {
|
.delete-botones {
|
||||||
background-image: url("https://cdn.icon-icons.com/icons2/1791/PNG/512/trashcan1_114647.png");
|
background-image: url("./assets/img/trashcan.png");
|
||||||
filter: invert(1);
|
filter: invert(1);
|
||||||
background-color: aqua;
|
background-color: aqua;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 171 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -17,7 +17,7 @@
|
|||||||
.transition{
|
.transition{
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(20px);
|
transform: translateY(20px);
|
||||||
transition: opacity 0.5s ease-out, transform 0.5s ease-out;
|
transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transition.show {
|
.transition.show {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ function FilterProfesor() {
|
|||||||
onChange={(e) => setAdscripcion(e.target.value)}
|
onChange={(e) => setAdscripcion(e.target.value)}
|
||||||
className="form-control me-2"
|
className="form-control me-2"
|
||||||
>
|
>
|
||||||
<option value="">Adscripcion</option>
|
<option value="">Adscripción</option>
|
||||||
{adscripciones.map((adscripcion) => (
|
{adscripciones.map((adscripcion) => (
|
||||||
<option
|
<option
|
||||||
key={adscripcion.id_adscripcion}
|
key={adscripcion.id_adscripcion}
|
||||||
@@ -71,7 +71,7 @@ function FilterProfesor() {
|
|||||||
onChange={(e) => setCategoria(e.target.value)}
|
onChange={(e) => setCategoria(e.target.value)}
|
||||||
className="form-control me-2"
|
className="form-control me-2"
|
||||||
>
|
>
|
||||||
<option value="">Categoria</option>
|
<option value="">Categoría</option>
|
||||||
{categorias.map((categoria) => (
|
{categorias.map((categoria) => (
|
||||||
<option
|
<option
|
||||||
key={categoria.id_categoria}
|
key={categoria.id_categoria}
|
||||||
|
|||||||
@@ -18,14 +18,13 @@ const MapeoUsuario = ({ filters }) => {
|
|||||||
setMaxPagesToShow(10);
|
setMaxPagesToShow(10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener("resize", updateMaxPagesToShow);
|
window.addEventListener("resize", updateMaxPagesToShow);
|
||||||
|
|
||||||
updateMaxPagesToShow();
|
updateMaxPagesToShow();
|
||||||
|
|
||||||
return () => window.removeEventListener("resize", updateMaxPagesToShow);
|
return () => window.removeEventListener("resize", updateMaxPagesToShow);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
if (totalPages === 0) {
|
if (totalPages === 0) {
|
||||||
return (
|
return (
|
||||||
@@ -100,9 +99,13 @@ const MapeoUsuario = ({ filters }) => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{usuarios.map((usuario) => (
|
<div className="profesores-container">
|
||||||
<CardUsuario key={usuario.id_usuario} usuario={usuario} />
|
{usuarios.map((usuario) => (
|
||||||
))}
|
<div className="transition show">
|
||||||
|
<CardUsuario key={usuario.id_usuario} usuario={usuario} />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
<nav aria-label="Navegación de páginas">
|
<nav aria-label="Navegación de páginas">
|
||||||
<ul className="pagination justify-content-center">
|
<ul className="pagination justify-content-center">
|
||||||
|
|||||||
+101
-11
@@ -1,18 +1,108 @@
|
|||||||
import React from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import "./style.css";
|
import "./style.css";
|
||||||
|
import Sam from "../assets/img/Sam.png";
|
||||||
|
import IO from "../assets/img/IO.png";
|
||||||
|
|
||||||
|
const konamiCode = [
|
||||||
|
"ArrowUp",
|
||||||
|
"ArrowUp",
|
||||||
|
"ArrowLeft",
|
||||||
|
"ArrowRight",
|
||||||
|
"ArrowLeft",
|
||||||
|
"ArrowRight",
|
||||||
|
];
|
||||||
|
|
||||||
|
let codePosition = 0;
|
||||||
|
|
||||||
const Footer = () => {
|
const Footer = () => {
|
||||||
|
const [showImage, setShowImage] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handleCodeInput = (key) => {
|
||||||
|
if (key === konamiCode[codePosition]) {
|
||||||
|
codePosition++;
|
||||||
|
if (codePosition === konamiCode.length) {
|
||||||
|
activateSecretScreen();
|
||||||
|
codePosition = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
codePosition = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleKeyDown = (e) => handleCodeInput(e.key);
|
||||||
|
document.addEventListener("keydown", handleKeyDown);
|
||||||
|
|
||||||
|
let touchSequence = [];
|
||||||
|
let startX = 0;
|
||||||
|
let startY = 0;
|
||||||
|
|
||||||
|
const handleTouchStart = (e) => {
|
||||||
|
startX = e.touches[0].clientX;
|
||||||
|
startY = e.touches[0].clientY;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleTouchEnd = (e) => {
|
||||||
|
let endX = e.changedTouches[0].clientX;
|
||||||
|
let endY = e.changedTouches[0].clientY;
|
||||||
|
handleSwipe(startX, startY, endX, endY);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSwipe = (startX, startY, endX, endY) => {
|
||||||
|
const deltaX = endX - startX;
|
||||||
|
const deltaY = endY - startY;
|
||||||
|
|
||||||
|
if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
||||||
|
if (deltaX > 30) touchSequence.push("ArrowRight");
|
||||||
|
else if (deltaX < -30) touchSequence.push("ArrowLeft");
|
||||||
|
} else {
|
||||||
|
if (deltaY > 30) touchSequence.push("ArrowDown");
|
||||||
|
else if (deltaY < -30) touchSequence.push("ArrowUp");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
touchSequence.slice(-konamiCode.length).join("") === konamiCode.join("")
|
||||||
|
) {
|
||||||
|
activateSecretScreen();
|
||||||
|
touchSequence = [];
|
||||||
|
} else if (touchSequence.length > konamiCode.length) {
|
||||||
|
touchSequence.shift();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener("touchstart", handleTouchStart);
|
||||||
|
document.addEventListener("touchend", handleTouchEnd);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
document.removeEventListener("keydown", handleKeyDown);
|
||||||
|
document.removeEventListener("touchstart", handleTouchStart);
|
||||||
|
document.removeEventListener("touchend", handleTouchEnd);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const activateSecretScreen = () => {
|
||||||
|
setShowImage(true);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="footer">
|
<>
|
||||||
<div className="container">
|
{showImage && (
|
||||||
<p>
|
<div className="center">
|
||||||
Hecho en México. Todos los derechos reservados 2024. Esta página puede
|
<img className={`img S ${showImage ? 'show' : ''}`} src={Sam} alt="Sam" />
|
||||||
ser reproducida con fines no lucrativos, siempre y cuando no se
|
<img className={`img I ${showImage ? 'show' : ''}`} src={IO} alt="IO" />
|
||||||
mutile, se cite la fuente completa y su dirección electrónica. De otra
|
</div>
|
||||||
forma, requiere permiso previo por escrito de la institución.
|
)}
|
||||||
</p>
|
<footer className=" frow footer">
|
||||||
</div>
|
<div className="container">
|
||||||
</footer>
|
<p>
|
||||||
|
Hecho en México. Todos los derechos reservados 2024. Esta página
|
||||||
|
puede ser reproducida con fines no lucrativos, siempre y cuando no
|
||||||
|
se mutile, se cite la fuente completa y su dirección electrónica. De
|
||||||
|
otra forma, requiere permiso previo por escrito de la institución.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import "./style.css";
|
import "./style.css";
|
||||||
import logo1 from "../assets/img/escudo-b2.png"; // Ajusta la ruta si es necesario
|
import logo1 from "../assets/img/escudo-b2.png";
|
||||||
import logo2 from "../assets/img/logo_unam-b.png"; // Ajusta la ruta si es necesario
|
import logo2 from "../assets/img/logo_unam-b.png";
|
||||||
|
|
||||||
const Header = () => {
|
const Header = () => {
|
||||||
return (
|
return (
|
||||||
<header className="header">
|
<header className="header">
|
||||||
<a href="https://www.unam.mx/">
|
<a href="https://www.unam.mx/">
|
||||||
<img className="logo" alt="Logo 1" src={logo1} />
|
<img className="logo" alt="Logo 1" src={logo2} />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://www.acatlan.unam.mx/">
|
<a href="https://www.acatlan.unam.mx/">
|
||||||
<img className="logo" alt="Logo 2" src={logo2} />
|
<img className="logo" alt="Logo 2" src={logo1} />
|
||||||
</a>
|
</a>
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -114,17 +114,17 @@ const FormProfesor = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!id_categoria) {
|
if (!id_categoria) {
|
||||||
alert("Por favor, Coloque la categoria en Datos de Investigación.");
|
alert("Por favor, Coloque la categoría en Datos académicos.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!id_adscripcion) {
|
if (!id_adscripcion) {
|
||||||
alert("Por favor, Coloque la adscripcion en Datos de Investigación.");
|
alert("Por favor, Coloque la adscripción en Datos académicos.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!id_edificio) {
|
if (!id_edificio) {
|
||||||
alert("Por favor, Coloque el edificio en Datos de Investigación.");
|
alert("Por favor, Coloque el edificio en Datos académicos.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,7 +408,7 @@ const FormProfesor = () => {
|
|||||||
|
|
||||||
{page === 3 && (
|
{page === 3 && (
|
||||||
<div className="form-section">
|
<div className="form-section">
|
||||||
<h2>Datos de Investigación</h2>
|
<h2>Datos Académicos</h2>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>
|
<label>
|
||||||
Categoría <span className="required">*</span>
|
Categoría <span className="required">*</span>
|
||||||
@@ -485,6 +485,7 @@ const FormProfesor = () => {
|
|||||||
<p>
|
<p>
|
||||||
Arrastra y suelta la imagen aquí, o haz clic para
|
Arrastra y suelta la imagen aquí, o haz clic para
|
||||||
seleccionar una imagen
|
seleccionar una imagen
|
||||||
|
Peso maximo de la imagen 2MB
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -535,19 +536,19 @@ const FormProfesor = () => {
|
|||||||
className="boton"
|
className="boton"
|
||||||
onClick={addGrados_obtenidos}
|
onClick={addGrados_obtenidos}
|
||||||
>
|
>
|
||||||
Agregar Grados de investigacion
|
Agregar Grados
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{page === 5 && (
|
{page === 5 && (
|
||||||
<div className="form-section">
|
<div className="form-section">
|
||||||
<h2>Lineas de Investigacion</h2>
|
<h2>Líneas de Investigación</h2>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
{lineasInvestigacion.map((linea, index) => (
|
{lineasInvestigacion.map((linea, index) => (
|
||||||
<div key={index} className="input-with-delete">
|
<div key={index} className="input-with-delete">
|
||||||
<label>
|
<label>
|
||||||
Linea de Investigacion {index + 1}
|
Línea de Investigación {index + 1}
|
||||||
<span className="required">*</span>
|
<span className="required">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import {
|
|||||||
useUpdateTeacher,
|
useUpdateTeacher,
|
||||||
} from "../../../services/teacher.services";
|
} from "../../../services/teacher.services";
|
||||||
|
|
||||||
|
const API_URL = process.env.REACT_APP_API_URL;
|
||||||
|
|
||||||
const FormEditProfesor = () => {
|
const FormEditProfesor = () => {
|
||||||
const { id_profesor } = useParams();
|
const { id_profesor } = useParams();
|
||||||
const [profesor, setProfesor] = useState(null);
|
const [profesor, setProfesor] = useState(null);
|
||||||
@@ -74,7 +76,11 @@ const FormEditProfesor = () => {
|
|||||||
setCorreo_per(teacher.correo_per);
|
setCorreo_per(teacher.correo_per);
|
||||||
setUbicacion(teacher.ubicacion);
|
setUbicacion(teacher.ubicacion);
|
||||||
setGrado_maximo(teacher.datosAcademicos[0]?.grado_maximo || "");
|
setGrado_maximo(teacher.datosAcademicos[0]?.grado_maximo || "");
|
||||||
setOldFoto(teacher.fotografia);
|
if(teacher.fotografia.startsWith("http")){
|
||||||
|
setOldFoto(teacher.fotografia);
|
||||||
|
}else{
|
||||||
|
setOldFoto(`${API_URL}/imagenes/${teacher.fotografia}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [teacher]);
|
}, [teacher]);
|
||||||
|
|
||||||
@@ -393,7 +399,7 @@ const FormEditProfesor = () => {
|
|||||||
|
|
||||||
{page === 3 && (
|
{page === 3 && (
|
||||||
<div className="form-section">
|
<div className="form-section">
|
||||||
<h2>Datos de Investigación</h2>
|
<h2>Datos académicos</h2>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>
|
<label>
|
||||||
Categoría <span className="required">*</span>
|
Categoría <span className="required">*</span>
|
||||||
@@ -471,6 +477,7 @@ const FormEditProfesor = () => {
|
|||||||
<p>
|
<p>
|
||||||
Arrastra y suelta la imagen aquí, o haz clic para
|
Arrastra y suelta la imagen aquí, o haz clic para
|
||||||
seleccionar una imagen
|
seleccionar una imagen
|
||||||
|
Peso maximo de la imagen 2MB
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -534,19 +541,19 @@ const FormEditProfesor = () => {
|
|||||||
className="boton"
|
className="boton"
|
||||||
onClick={addGrados_obtenidos}
|
onClick={addGrados_obtenidos}
|
||||||
>
|
>
|
||||||
Agregar Grados de investigacion
|
Agregar Grados
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{page === 5 && (
|
{page === 5 && (
|
||||||
<div className="form-section">
|
<div className="form-section">
|
||||||
<h2>Lineas de Investigacion</h2>
|
<h2>Líneas de Investigación</h2>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
{lineasInvestigacion.map((linea, index) => (
|
{lineasInvestigacion.map((linea, index) => (
|
||||||
<div key={index} className="input-with-delete">
|
<div key={index} className="input-with-delete">
|
||||||
<label>
|
<label>
|
||||||
Lineas de Investigacion {index + 1}
|
Líneas de Investigación {index + 1}
|
||||||
<span className="required">*</span>
|
<span className="required">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -28,4 +28,29 @@
|
|||||||
.footer .container {
|
.footer .container {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img {
|
||||||
|
max-width: 100px;
|
||||||
|
height: auto;
|
||||||
|
object-fit: cover;
|
||||||
|
z-index: -1;
|
||||||
|
opacity: 0;
|
||||||
|
filter: drop-shadow(0 0 8px black);
|
||||||
|
transition: transform 1s ease-in-out, opacity 1s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
.S.show {
|
||||||
|
transform: translateY(24px);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.I.show {
|
||||||
|
transform: translateY(15px);
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user