Merge branch 'Lino' into Develop
This commit is contained in:
@@ -7,33 +7,17 @@ import Cookies from "js-cookie";
|
||||
import "../../styles/layout/ForgotPasswordPage.scss";
|
||||
|
||||
export default function UpdateUserPage() {
|
||||
const [nombre, setNombre] = useState("");
|
||||
const [contrasenaN, setContrasenaN] = useState("");
|
||||
const [contrasenaV, setContrasenaV] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (!nombre && !contrasenaV && !contrasenaN) {
|
||||
if ( !contrasenaV && !contrasenaN) {
|
||||
toast.error("No hay cambios realizados");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nombre && !contrasenaV) {
|
||||
toast.error("Coloca la contraseña actual");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nombre && !contrasenaV) {
|
||||
toast.error("");
|
||||
return;
|
||||
}
|
||||
|
||||
if (nombre && nombre.trim().length < 3) {
|
||||
toast.error("El nombre debe tener al menos 3 caracteres.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (contrasenaN && contrasenaN.length < 5) {
|
||||
toast.error("La nueva contraseña debe tener al menos 6 caracteres.");
|
||||
return;
|
||||
@@ -51,10 +35,6 @@ export default function UpdateUserPage() {
|
||||
const headers = { Authorization: `Bearer ${token}` };
|
||||
const body: any = {};
|
||||
|
||||
if (nombre && nombre.trim() !== "") {
|
||||
body.nombre = nombre;
|
||||
}
|
||||
|
||||
if (contrasenaN && contrasenaN.trim() !== "") {
|
||||
body.contraseñaN = contrasenaN;
|
||||
}
|
||||
@@ -88,18 +68,9 @@ export default function UpdateUserPage() {
|
||||
<div className="forgot-form-container">
|
||||
<h1>Actualiza tus datos</h1>
|
||||
<form onSubmit={handleSubmit} className="forgot-form">
|
||||
<div>
|
||||
<label>Nombre (opcional)</label>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Nuevo nombre"
|
||||
value={nombre}
|
||||
onChange={(e) => setNombre(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>Nueva contraseña (opcional)</label>
|
||||
<label>Nueva contraseña</label>
|
||||
<input
|
||||
type="password"
|
||||
placeholder="Nueva contraseña"
|
||||
|
||||
@@ -94,3 +94,18 @@ select {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 12px;
|
||||
}
|
||||
//overwrite css toaster
|
||||
[data-rht-toaster] {
|
||||
bottom: auto !important;
|
||||
right: auto !important;
|
||||
max-width: 100% !important;
|
||||
width: auto !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
[data-rht-toaster] {
|
||||
left: 8px !important;
|
||||
top: 8px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
max-width: 45px;
|
||||
}
|
||||
|
||||
.menuToggle div {
|
||||
@@ -52,22 +56,6 @@
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.subMenu ul {
|
||||
opacity: 0;
|
||||
max-height: 0;
|
||||
position: absolute;
|
||||
flex-direction: column;
|
||||
min-width: 200px;
|
||||
max-width: 300px;
|
||||
left: 0;
|
||||
background-color: #003e79;
|
||||
transition: opacity 0.4s ease, max-height 0.4s ease;
|
||||
}
|
||||
|
||||
.subMenu ul a {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.subMenu:hover ul {
|
||||
opacity: 1;
|
||||
max-height: 500px;
|
||||
@@ -125,13 +113,16 @@
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: end;
|
||||
height: fit-content;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.barNavigation {
|
||||
font-size: 15px;
|
||||
display: block;
|
||||
display: flex;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -152,6 +143,8 @@
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
z-index: 3;
|
||||
top: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.barNavigation li:hover {
|
||||
@@ -169,7 +162,6 @@
|
||||
}
|
||||
|
||||
.logout-button {
|
||||
margin-top: 10px;
|
||||
padding: 6px 12px;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
max-width: 45px;
|
||||
}
|
||||
|
||||
.menuToggle div {
|
||||
@@ -125,13 +129,16 @@
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: end;
|
||||
height: fit-content;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.barNavigation {
|
||||
font-size: 15px;
|
||||
display: block;
|
||||
display: flex;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -151,6 +158,8 @@
|
||||
left: 0;
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
top: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.barNavigation li:hover {
|
||||
@@ -168,7 +177,6 @@
|
||||
}
|
||||
|
||||
.logout-button {
|
||||
margin-top: 10px;
|
||||
padding: 6px 12px;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
.formGroup {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
|
||||
textarea.textAreaLarge {
|
||||
height: auto;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -53,6 +54,8 @@
|
||||
background-color: #f9f9f9;
|
||||
font-size: 80px;
|
||||
color: #000;
|
||||
width: min(90vw, 400px);
|
||||
aspect-ratio: 2 / 1;
|
||||
img {
|
||||
width: 150px;
|
||||
height: auto;
|
||||
@@ -86,6 +89,7 @@
|
||||
}
|
||||
|
||||
.searchBox {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
@@ -105,6 +109,8 @@
|
||||
}
|
||||
|
||||
.searchButton {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
background-color: #0056b3;
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
.logo {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
margin: 5px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.logoContainer {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 250px;
|
||||
min-width: 200px;
|
||||
height: auto;
|
||||
aspect-ratio: 250/70;
|
||||
}
|
||||
|
||||
.cedetecContainer {
|
||||
@@ -27,13 +36,13 @@
|
||||
left: -20px;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
min-width: 300px;
|
||||
background: linear-gradient(to right, #bd8c01 40%, #fff 100%);
|
||||
transform: skew(-45deg);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100vw;
|
||||
background-color: #fff;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
@@ -67,6 +76,16 @@
|
||||
transform: skew(45deg);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.containerBarNav {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-left: 80px;
|
||||
max-height: 50%;
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.yellowPart {
|
||||
left: 0;
|
||||
@@ -80,3 +99,17 @@
|
||||
left: -80px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.header::after {
|
||||
min-width: 100%;
|
||||
transform: skew(25deg);
|
||||
}
|
||||
.header::before {
|
||||
min-width: 100%;
|
||||
transform: skew(25deg);
|
||||
}
|
||||
.containerBarNav {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10vw;
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
|
||||
@@ -566,7 +566,7 @@ export default function Editar() {
|
||||
value={formData.modelo}
|
||||
placeholder="Ingresa modelo"
|
||||
onChange={(e) =>
|
||||
setFormData({ ...formData, modelo: e.target.value })
|
||||
setFormData({ ...formData, modelo: e.target.value.toUpperCase() })
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
@@ -765,7 +765,6 @@ export default function Editar() {
|
||||
placeholder="Selecciona una Adscripción"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/* Columna 3 */}
|
||||
|
||||
+11
-18
@@ -10,7 +10,7 @@ function Header() {
|
||||
const pathname = usePathname();
|
||||
|
||||
const publicNav = ["/escaner", "/agregarEquipo", "/editar", "/cambiarPass"];
|
||||
const privateNav = ["/equipoComputo", "/crearCuenta","/perifericos"];
|
||||
const privateNav = ["/equipoComputo", "/crearCuenta", "/perifericos"];
|
||||
|
||||
return (
|
||||
<header className={header.header}>
|
||||
@@ -23,25 +23,18 @@ function Header() {
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
className={header.logo}
|
||||
src="/logo-blanco.png"
|
||||
alt="Logo FES"
|
||||
width={250}
|
||||
height={70}
|
||||
/>
|
||||
<div className={header.logoContainer}>
|
||||
<Image
|
||||
className={header.logo}
|
||||
src="/logo-blanco.png"
|
||||
alt="Logo FES"
|
||||
fill
|
||||
style={{ objectFit: "contain" }}
|
||||
/>
|
||||
</div>
|
||||
</Link>
|
||||
<div className={header.yellowPart}></div>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
paddingLeft: "40px",
|
||||
maxHeight: "50%",
|
||||
alignItems: "end",
|
||||
}}
|
||||
>
|
||||
<div className={header.containerBarNav}>
|
||||
{publicNav.includes(pathname) && <BarNavigation />}
|
||||
{privateNav.includes(pathname) && <BarNavigationAdmin />}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user