diff --git a/src/app/(Administrador)/cambiarPass/page.tsx b/src/app/(Administrador)/cambiarPass/page.tsx index 9c576ab..089183d 100644 --- a/src/app/(Administrador)/cambiarPass/page.tsx +++ b/src/app/(Administrador)/cambiarPass/page.tsx @@ -47,39 +47,39 @@ export default function Page() { }; return ( -
-

Cambiar contraseña

-

Ingresa el nombre del usuario y su nueva contraseña.

+
+
-
- - setNombre(e.target.value)} - placeholder="Nombre de usuario" - required - /> +

Cambiar contraseña de operador

+

Ingresa el nombre del usuario y su nueva contraseña.

- - setContraseña(e.target.value)} - placeholder="Nueva contraseña" - required - /> + + + setNombre(e.target.value)} + placeholder="Nombre de usuario" + required + /> - + + setContraseña(e.target.value)} + placeholder="Nueva contraseña" + required + /> -
- Regresar al inicio -
-
-
+ + + + + ); } diff --git a/src/app/(Administrador)/crearCuenta/page.tsx b/src/app/(Administrador)/crearCuenta/page.tsx index 82b332a..d46267d 100644 --- a/src/app/(Administrador)/crearCuenta/page.tsx +++ b/src/app/(Administrador)/crearCuenta/page.tsx @@ -73,7 +73,7 @@ export default function Page() { return (
-

Crear cuenta

+

Crear cuenta de Operador

@@ -86,17 +86,6 @@ export default function Page() { />
-
- - setCorreo(e.target.value)} - required - /> -
-
- ¿Ya tienes cuenta? Inicia sesión
diff --git a/src/app/(Administrador)/pregunta1/page.tsx b/src/app/(Administrador)/pregunta1/page.tsx index 97ea191..9f6eea1 100644 --- a/src/app/(Administrador)/pregunta1/page.tsx +++ b/src/app/(Administrador)/pregunta1/page.tsx @@ -1,161 +1,15 @@ -"use client"; +"use client" +import React from "react"; +import Pregunta1 from "@/components/Preguanta1"; +import Pregunta2 from "@/components/Pregunta2"; -import { useState, useEffect } from "react"; -import "../../styles/layout/pregunta1.scss"; - -// Tipos -type OsEntry = { - os: string; - count: string; // o number si la API devuelve números - isTotal?: boolean; -}; - -type PlatformData = { - [key: string]: OsEntry[]; -}; - -// === DATOS TEMPORALES (mock) === -const MOCK_DATA: PlatformData = { - "pc-desktop": [ - { os: "Windows 11", count: "408" }, - { os: "Windows 10", count: "1171" }, - { os: "Windows 7/8", count: "177" }, - { os: "Windows XP/Vista", count: "43" }, - { os: "Linux", count: "45" }, - { os: "Total", count: "1844", isTotal: true }, - ], - "apple-desktop": [ - { os: "Mac OS X(13 - Ventura, 14 - Sonoma)", count: "205" }, - { - os: "Mac OS X(Mojave,Catalina,11 - Big Sur, 12 - Monterrey)", - count: "180", - }, - { os: "Mac OS X(Yosemite,El Capitan,Sierra,High Sierra)", count: "95" }, - { os: "Mac OS X(Snow Leopard,Mountain Lion,Mavericks)", count: "6" }, - { os: "Total", count: "480", isTotal: true }, - ], - "pc-laptop": [ - { os: "Windows 11", count: "40" }, - { os: "Windows 10", count: "171" }, - { os: "Windows 7/8", count: "17" }, - { os: "Windows XP/Vista", count: "3" }, - { os: "Linux", count: "5" }, - { os: "Total", count: "144", isTotal: true }, - ], - "apple-laptop": [ - { os: "Mac OS X(13 - Ventura, 14 - Sonoma)", count: "205" }, - { - os: "Mac OS X(Mojave,Catalina,11 - Big Sur, 12 - Monterrey)", - count: "180", - }, - { os: "Mac OS X(Yosemite,El Capitan,Sierra,High Sierra)", count: "95" }, - { os: "Mac OS X(Snow Leopard,Mountain Lion,Mavericks)", count: "6" }, - { os: "Total", count: "480", isTotal: true }, - ], - servers: [ - { - os: "Linux (CentOs,Fedora,Ubuntu,Red Hat Enterprise,entre otros)", - count: "120", - }, - { os: "Unix (AIX,MAC OS Server,Solaris,entre otros)", count: "80" }, - { os: "Windows Server 2022/2023", count: "50" }, - { os: "Windows Server 2016/2019", count: "80" }, - { os: "Windows Server 2008/2012", count: "50" }, - { os: "Windows Server 2000/2003", count: "12" }, - { os: "Total", count: "250", isTotal: true }, - ], -}; - -const API_ENDPOINT = "/api/platform-stats"; // ← ¡Reemplaza esto cuando sepas la URL real! - -const Page = () => { - const [activeTab, setActiveTab] = useState("pc-desktop"); - const [data, setData] = useState(MOCK_DATA); - const [loading, setLoading] = useState(true); - const [error, setError] = useState(null); - - useEffect(() => { - const fetchData = async () => { - try { - // === DESCOMENTA ESTO CUANDO TENGAS LA API === - // const response = await fetch(API_ENDPOINT); - // if (!response.ok) throw new Error('Error al cargar estadísticas'); - // const apiData: PlatformData = await response.json(); - // setData(apiData); - // setLoading(false); - - // === POR AHORA: usa datos simulados (y simula un retraso si quieres) === - // await new Promise(resolve => setTimeout(resolve, 300)); - setData(MOCK_DATA); - setLoading(false); - } catch (err) { - console.error("Error al cargar datos:", err); - setError( - "No se pudieron cargar las estadísticas. Usando datos temporales." - ); - setData(MOCK_DATA); // fallback en caso de error - setLoading(false); - } - }; - - fetchData(); - }, []); - - const currentData = data[activeTab] || []; - - // Si quisieras mostrar un estado de carga (opcional) - // if (loading) return

Cargando...

; - // if (error) console.warn(error); // o muestra un toast, etc. - - return ( -
-
-

Estadísticas de Plataformas

-
- -
-
-
- Presione cada pestaña para ver la información de las plataformas. -
- -
-
- {Object.entries({ - "pc-desktop": "Computadoras de escritorio Plataforma PC", - "apple-desktop": "Computadoras de escritorio Plataforma Apple", - "pc-laptop": "Computadoras portatiles Plataforma PC", - "apple-laptop": "Computadoras portatiles Plataforma Apple", - servers: "Servidores de alto rendimiento", - }).map(([key, label]) => ( -
setActiveTab(key)} - > - {label} -
- ))} -
- -
-
- {currentData.map((item, index) => ( -
-
{item.os}
-
{item.count}
-
- ))} -
-
-
-
-
-
+export default function Page(){ + return( + <> +

Reporte General de Preguntas

+ + + ); -}; - -export default Page; + +} \ No newline at end of file diff --git a/src/app/(Administrador)/pregunta1.1/page.tsx b/src/app/(Administrador)/pregunta1_1/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta1.1/page.tsx rename to src/app/(Administrador)/pregunta1_1/page.tsx diff --git a/src/app/(Administrador)/pregunta1.2/page.tsx b/src/app/(Administrador)/pregunta1_2/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta1.2/page.tsx rename to src/app/(Administrador)/pregunta1_2/page.tsx diff --git a/src/app/(Administrador)/pregunta1.2/page1.css b/src/app/(Administrador)/pregunta1_2/page1.css similarity index 100% rename from src/app/(Administrador)/pregunta1.2/page1.css rename to src/app/(Administrador)/pregunta1_2/page1.css diff --git a/src/app/(Administrador)/pregunta2/pregunta2.scss b/src/app/(Administrador)/pregunta2/pregunta2.scss index dff448f..e6129f8 100644 --- a/src/app/(Administrador)/pregunta2/pregunta2.scss +++ b/src/app/(Administrador)/pregunta2/pregunta2.scss @@ -159,7 +159,6 @@ .scanView .tab { flex: 1; - padding: 14px 0; text-align: center; font-size: 13px; } diff --git a/src/app/(Administrador)/pregunta2.1/page.tsx b/src/app/(Administrador)/pregunta2_1/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta2.1/page.tsx rename to src/app/(Administrador)/pregunta2_1/page.tsx diff --git a/src/app/(Administrador)/pregunta2.1/page2.css b/src/app/(Administrador)/pregunta2_1/page2.css similarity index 100% rename from src/app/(Administrador)/pregunta2.1/page2.css rename to src/app/(Administrador)/pregunta2_1/page2.css diff --git a/src/app/(Administrador)/pregunta3.1/page.tsx b/src/app/(Administrador)/pregunta3_1/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta3.1/page.tsx rename to src/app/(Administrador)/pregunta3_1/page.tsx diff --git a/src/app/(Administrador)/pregunta3.1/page3.1.css b/src/app/(Administrador)/pregunta3_1/page3.1.css similarity index 100% rename from src/app/(Administrador)/pregunta3.1/page3.1.css rename to src/app/(Administrador)/pregunta3_1/page3.1.css diff --git a/src/app/(Administrador)/pregunta3.2/page.tsx b/src/app/(Administrador)/pregunta3_2/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta3.2/page.tsx rename to src/app/(Administrador)/pregunta3_2/page.tsx diff --git a/src/app/(Administrador)/pregunta3.2/page3.2.css b/src/app/(Administrador)/pregunta3_2/page3.2.css similarity index 100% rename from src/app/(Administrador)/pregunta3.2/page3.2.css rename to src/app/(Administrador)/pregunta3_2/page3.2.css diff --git a/src/app/(Administrador)/pregunta3.3/page.tsx b/src/app/(Administrador)/pregunta3_3/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta3.3/page.tsx rename to src/app/(Administrador)/pregunta3_3/page.tsx diff --git a/src/app/(Administrador)/pregunta3.3/page3.3.css b/src/app/(Administrador)/pregunta3_3/page3.3.css similarity index 100% rename from src/app/(Administrador)/pregunta3.3/page3.3.css rename to src/app/(Administrador)/pregunta3_3/page3.3.css diff --git a/src/app/(Administrador)/pregunta3.4/page.tsx b/src/app/(Administrador)/pregunta3_4/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta3.4/page.tsx rename to src/app/(Administrador)/pregunta3_4/page.tsx diff --git a/src/app/(Administrador)/pregunta3.4/page3.4.css b/src/app/(Administrador)/pregunta3_4/page3.4.css similarity index 100% rename from src/app/(Administrador)/pregunta3.4/page3.4.css rename to src/app/(Administrador)/pregunta3_4/page3.4.css diff --git a/src/app/(Administrador)/pregunta3.5/page.tsx b/src/app/(Administrador)/pregunta3_5/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta3.5/page.tsx rename to src/app/(Administrador)/pregunta3_5/page.tsx diff --git a/src/app/(Administrador)/pregunta3.5/page3.5.css b/src/app/(Administrador)/pregunta3_5/page3.5.css similarity index 100% rename from src/app/(Administrador)/pregunta3.5/page3.5.css rename to src/app/(Administrador)/pregunta3_5/page3.5.css diff --git a/src/app/(Administrador)/pregunta7.1/page.tsx b/src/app/(Administrador)/pregunta7_1/page.tsx similarity index 100% rename from src/app/(Administrador)/pregunta7.1/page.tsx rename to src/app/(Administrador)/pregunta7_1/page.tsx diff --git a/src/app/(Administrador)/pregunta7.1/pregunta7.css b/src/app/(Administrador)/pregunta7_1/pregunta7.css similarity index 100% rename from src/app/(Administrador)/pregunta7.1/pregunta7.css rename to src/app/(Administrador)/pregunta7_1/pregunta7.css diff --git a/src/app/(Administrador)/pregunta9/pregunta9.css b/src/app/(Administrador)/pregunta9/pregunta9.css index bf92392..5bc5cec 100644 --- a/src/app/(Administrador)/pregunta9/pregunta9.css +++ b/src/app/(Administrador)/pregunta9/pregunta9.css @@ -1,6 +1,5 @@ .contenedor-pregunta { padding: 20px; - font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; background-color: #f9fafc; } diff --git a/src/app/(Administrador)/reporte/page.tsx b/src/app/(Administrador)/reporte/page.tsx index ce601e1..c651acd 100644 --- a/src/app/(Administrador)/reporte/page.tsx +++ b/src/app/(Administrador)/reporte/page.tsx @@ -1,92 +1,85 @@ "use client"; -import { useState } from "react"; -import "./reporte.css"; -import axios from "axios"; -export default function Page() { - const [report, setReport] = useState(); +import React, { useState } from "react"; +import Pregunta1 from "@/components/Preguanta1"; // Asegúrate que el nombre del archivo sea correcto +import Pregunta2 from "@/components/Pregunta2"; +import Pregunta9 from "@/components/Pregunta9"; +import "../../styles/layout/reporte.scss"; - async function Report() { - const res = await axios.get("https"); - setReport(res.data); - } +export default function Reporte() { + const [isOpen1, setIsOpen1] = useState(true); + const [isOpen2, setIsOpen2] = useState(true); + const [isOpen9, setIsOpen9] = useState(true); return ( -
- {/* Panel izquierdo: título, buscador y tabla */} -
-
-

REPORTE

+
+
+ {/* Pregunta 1 */} +
+
+ +
+
+ +
-
- - -
- -
- {/* Aquí irá tu tabla real */} -

Tabla de equipos...

-
-
- - {/* Panel derecho: filtros + botón descargar */} -
-
-
-

Filtro

-
- - - - - - - - - - - - - -
- - -
-
+ {/* Pregunta 2 */} +
+
+ +
+
+ +
- + {/* Pregunta 9 */} +
+
+ +
+
+ +
+
); -} +} \ No newline at end of file diff --git a/src/app/(Administrador)/reporteNOValido/page.tsx b/src/app/(Administrador)/reporteNOValido/page.tsx new file mode 100644 index 0000000..6cf87c7 --- /dev/null +++ b/src/app/(Administrador)/reporteNOValido/page.tsx @@ -0,0 +1,93 @@ +"use client"; +import { useState } from "react"; +import "./reporte.css"; +import axios from "axios"; +import Pregunta9 from "../pregunta9/page"; +export default function Page() { + const [report, setReport] = useState(); + + async function Report() { + const res = await axios.get("https"); + setReport(res.data); + } + + return ( +
+ {/* Panel izquierdo: título, buscador y tabla */} +
+
+

REPORTE

+
+ +
+ + +
+ +
+ {/* Aquí irá tu tabla real */} +

Tabla de equipos...

+
+
+ + {/* Panel derecho: filtros + botón descargar */} +
+
+
+

Filtro

+
+ + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +
+ ); +} diff --git a/src/app/(Administrador)/reporte/reporte.css b/src/app/(Administrador)/reporteNOValido/reporte.css similarity index 100% rename from src/app/(Administrador)/reporte/reporte.css rename to src/app/(Administrador)/reporteNOValido/reporte.css diff --git a/src/app/(Operador)/escaner/page.tsx b/src/app/(Operador)/escaner/page.tsx index 2105340..3860d17 100644 --- a/src/app/(Operador)/escaner/page.tsx +++ b/src/app/(Operador)/escaner/page.tsx @@ -29,10 +29,11 @@ export default function Page() { if (data) { router.push(`/editar?equipoId=${data.inventario}`); } else { - toast.error("Equipo no encontrado"); + router.push(`/agregarEquipo?equipoId=${data.inventario}`); } } catch (error) { - toast.error(`Equipo no encontrado,${error}`); + toast.error("Error No se encontro el equipo"); + router.push(`/agregarEquipo?equipoId=${search}`); } }; diff --git a/src/app/styles/layout/ForgotPasswordPage.scss b/src/app/styles/layout/ForgotPasswordPage.scss index 93651e9..c32595e 100644 --- a/src/app/styles/layout/ForgotPasswordPage.scss +++ b/src/app/styles/layout/ForgotPasswordPage.scss @@ -3,13 +3,13 @@ // ===================================== .forgot-password-page { - width: 90%; - max-width: 520px; - margin: 10rem auto; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100%; padding: 2rem; - background: #ffffff; border-radius: 1rem; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); color: #222; transition: background 0.3s ease, color 0.3s ease; @@ -128,10 +128,8 @@ // --- Teléfonos pequeños --- @media (max-width: 480px) { .forgot-password-page { - margin: 15rem auto; padding: 1.5rem; width: 92%; - box-shadow: none; h1 { font-size: 1.6rem; @@ -160,9 +158,7 @@ // --- Tablets (iPad y similares) --- @media (min-width: 768px) and (max-width: 1024px) { .forgot-password-page { - margin: 8rem auto; padding: 3rem 2.5rem; - max-width: 600px; font-size: 1.05rem; h1 { @@ -193,8 +189,6 @@ // --- Escritorio grande --- @media (min-width: 1280px) { .forgot-password-page { - margin: 12rem auto; padding: 3rem; - max-width: 520px; } } diff --git a/src/app/styles/layout/pregunta1.scss b/src/app/styles/layout/pregunta1.scss index dff448f..35dea0b 100644 --- a/src/app/styles/layout/pregunta1.scss +++ b/src/app/styles/layout/pregunta1.scss @@ -7,33 +7,12 @@ background-color: #f4f4f4; } -.header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 16px 24px; - background-color: #ffffff; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); - position: sticky; - top: 0; - z-index: 10; - h2 { - margin: 0; - font-size: 1.5rem; - color: #0056b3; - } -} + .scanView { - flex: 1; - display: flex; - flex-direction: column; - align-items: center; - justify-content: flex-start; padding: 20px; width: 100%; - height: 100%; .container { width: 100%; @@ -55,9 +34,6 @@ color: #0056b3; text-align: center; font-weight: 500; - display: block; - box-shadow: none; - position: static; } .main-content { @@ -70,11 +46,11 @@ background-color: #fafafa; display: flex; flex-direction: column; - justify-content: flex-start; + justify-content: space-evenly; } .tab { - padding: 18px 16px; + padding: auto 16px; cursor: pointer; border-right: 1px solid #e0e0e0; color: #555; @@ -82,6 +58,9 @@ border-left: 4px solid transparent; font-size: 15px; font-weight: 500; + background: none; + border: none; + text-align: left; } .tab:hover { @@ -141,7 +120,7 @@ font-weight: bold; .count-box { - color:#0056b3; + color: #0056b3; } } } @@ -159,7 +138,6 @@ .scanView .tab { flex: 1; - padding: 14px 0; text-align: center; font-size: 13px; } diff --git a/src/app/styles/layout/reporte.scss b/src/app/styles/layout/reporte.scss new file mode 100644 index 0000000..ee6730b --- /dev/null +++ b/src/app/styles/layout/reporte.scss @@ -0,0 +1,75 @@ +.accordion-content { + max-height: 0; + overflow: hidden; + transition: max-height 0.4s ease, opacity 0.4s ease; + opacity: 0; +} + +.accordion-content.open { + max-height: 1000px; /* Ajusta si tienes más contenido */ + opacity: 1; +} +.accordion-header-wrapper { + padding: 20px; +} + +.accordion-header { + background-color: #f5f5f5; + border:none; + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + background-color: #f5f5f5; + border-left: 6px solid #001f3f; + padding: 15px; + border-radius: 8px; + font-size: 16px; + cursor: pointer; + text-align: left; + transition: background-color 0.2s ease; + + &:hover { + background-color: #f0f2f5; + } + + .toggle-icon { + font-size: 14px; + color: #666; + transition: transform 0.3s ease; + display: inline-block; + width: 20px; + text-align: center; + } + + .toggle-icon.open { + transform: rotate(180deg); + } +} +.reporte-page { + .reporte-container { + padding: 40px; + background-color: #f9fafc; + } + + .titulo-reporte { + text-align: center; + font-size: 28px; + font-weight: bold; + color: #002855; + margin-bottom: 40px; + } + + .reporte-contenido { + display: flex; + flex-direction: column; + gap: 40px; + } + + .bloque-pregunta { + background-color: white; + border-radius: 12px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + padding: 25px; + } +} diff --git a/src/components/AgregarEquipo.tsx b/src/components/AgregarEquipo.tsx index 514825b..d08233a 100644 --- a/src/components/AgregarEquipo.tsx +++ b/src/components/AgregarEquipo.tsx @@ -160,7 +160,7 @@ export default function Page() { const headers = { Authorization: `Bearer ${token}` }; const response = await axios.get( - `${api_url}/equipos/procesador-tipo-equipos/${formData.id_tipo_equipo}`, + `${api_url}/equipos/procesador-tipo-equipos`, { headers, } @@ -422,12 +422,13 @@ export default function Page() {
handleInputChange( @@ -449,7 +451,7 @@ export default function Page() { ) } > - + {SO_POR_EQUIPO[formData.id_tipo_equipo]?.map((so) => (