diff --git a/src/app/styles/layout/agregarEquipo.scss b/src/app/styles/layout/agregarEquipo.scss
index dd71e3c..f53b852 100644
--- a/src/app/styles/layout/agregarEquipo.scss
+++ b/src/app/styles/layout/agregarEquipo.scss
@@ -155,5 +155,7 @@ textarea {
}
.information {
- border-bottom: 1px solid;
+ display: flex;
+ justify-content: space-between;
+ border-bottom: 1px solid #003e79;
}
From 0d4225e244310032fd7fb701199be3f70abcdfdb Mon Sep 17 00:00:00 2001
From: IO420 <320154041@pcpuma.acatlan.unam.mx>
Date: Mon, 27 Oct 2025 17:42:41 -0600
Subject: [PATCH 2/3] new structure
---
middleware.ts | 2 +-
src/app/{ => (Operador)}/AgregarEquipo/page.tsx | 2 +-
src/app/{ => (Operador)}/Editar/editar.css | 0
src/app/{ => (Operador)}/Editar/page.tsx | 2 +-
src/app/{ => (Operador)}/Escaner/page.tsx | 10 ++++++----
src/components/header.tsx | 6 ++++--
6 files changed, 13 insertions(+), 9 deletions(-)
rename src/app/{ => (Operador)}/AgregarEquipo/page.tsx (99%)
rename src/app/{ => (Operador)}/Editar/editar.css (100%)
rename src/app/{ => (Operador)}/Editar/page.tsx (99%)
rename src/app/{ => (Operador)}/Escaner/page.tsx (92%)
diff --git a/middleware.ts b/middleware.ts
index bf54abf..3a86fa0 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -13,6 +13,6 @@ export function middleware(request: NextRequest) {
}
export const config = {
- matcher: ["/AgregarEquipo"],
+ matcher: ["/AgregarEquipo", "Escaner"],
};
//IO
diff --git a/src/app/AgregarEquipo/page.tsx b/src/app/(Operador)/AgregarEquipo/page.tsx
similarity index 99%
rename from src/app/AgregarEquipo/page.tsx
rename to src/app/(Operador)/AgregarEquipo/page.tsx
index 190cd44..df3c474 100644
--- a/src/app/AgregarEquipo/page.tsx
+++ b/src/app/(Operador)/AgregarEquipo/page.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState } from "react";
-import "../styles/layout/agregarEquipo.scss"; // Asegúrate de crear este archivo
+import "../../styles/layout/agregarEquipo.scss"; // Asegúrate de crear este archivo
export default function page() {
const [formData, setFormData] = useState({
diff --git a/src/app/Editar/editar.css b/src/app/(Operador)/Editar/editar.css
similarity index 100%
rename from src/app/Editar/editar.css
rename to src/app/(Operador)/Editar/editar.css
diff --git a/src/app/Editar/page.tsx b/src/app/(Operador)/Editar/page.tsx
similarity index 99%
rename from src/app/Editar/page.tsx
rename to src/app/(Operador)/Editar/page.tsx
index 43483dd..dc6f33b 100644
--- a/src/app/Editar/page.tsx
+++ b/src/app/(Operador)/Editar/page.tsx
@@ -1,6 +1,6 @@
"use client";
import { useState } from "react";
-import "../styles/layout/agregarEquipo.scss";
+import "../../styles/layout/agregarEquipo.scss";
import "./editar.css";
export default function Home() {
const [formData, setFormData] = useState({
diff --git a/src/app/Escaner/page.tsx b/src/app/(Operador)/Escaner/page.tsx
similarity index 92%
rename from src/app/Escaner/page.tsx
rename to src/app/(Operador)/Escaner/page.tsx
index dcdd707..64b4f5c 100644
--- a/src/app/Escaner/page.tsx
+++ b/src/app/(Operador)/Escaner/page.tsx
@@ -2,7 +2,7 @@
import { useState } from "react";
import { useRouter } from "next/navigation";
-import "../styles/layout/escaner.scss"; // Importación global
+import "../../styles/layout/escaner.scss"; // Importación global
// Tipos
type Equipo = {
@@ -44,7 +44,10 @@ export default function Dashboard() {
} else {
const codigo = prompt("Equipo no registrado. Ingresa el codigo:");
if (codigo) {
- setEquipos([...equipos, { id: code, nombre: codigo, estado: "Disponible" }]);
+ setEquipos([
+ ...equipos,
+ { id: code, nombre: codigo, estado: "Disponible" },
+ ]);
alert("Equipo agregado al inventario");
}
}
@@ -52,7 +55,6 @@ export default function Dashboard() {
return (
-
{/* VISTA DE ESCANEO */}
Escanear Inventario
@@ -83,4 +85,4 @@ export default function Dashboard() {
);
-}
\ No newline at end of file
+}
diff --git a/src/components/header.tsx b/src/components/header.tsx
index 085e669..827c457 100644
--- a/src/components/header.tsx
+++ b/src/components/header.tsx
@@ -3,8 +3,11 @@ import Image from "next/image";
import header from "../app/styles/layout/header.module.scss";
import Link from "next/link";
import BarNavigation from "./BarNavigation";
+import { usePathname } from "next/navigation";
function Header() {
+ const pathname = usePathname(); // obtenemos la ruta actual
+
return (
-
+ {pathname !== "/" && }
);
From 374ce02350db05430bc40286bdff9fe767e82eae Mon Sep 17 00:00:00 2001
From: IO420 <320154041@pcpuma.acatlan.unam.mx>
Date: Mon, 27 Oct 2025 18:17:53 -0600
Subject: [PATCH 3/3] modified escaner
---
src/app/(Operador)/Escaner/page.tsx | 8 +-------
src/app/styles/layout/header.module.scss | 8 ++++++++
src/components/BarcodeScanner.tsx | 4 ++--
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/app/(Operador)/Escaner/page.tsx b/src/app/(Operador)/Escaner/page.tsx
index 75ff2bf..048944e 100644
--- a/src/app/(Operador)/Escaner/page.tsx
+++ b/src/app/(Operador)/Escaner/page.tsx
@@ -47,16 +47,10 @@ export default function Dashboard() {
const encontrado = equipos.find((e) => e.id === code);
if (encontrado) {
- // ✅ Si el equipo existe, redirige directamente
router.push(`/Editar?equipoId=${encontrado.id}`);
} else {
// 🚫 Si no existe, se puede registrar
- const nombre = prompt("Equipo no registrado. Ingresa el nombre:");
- if (nombre) {
- const nuevoEquipo = { id: code, nombre, estado: "Disponible" };
- setEquipos([...equipos, nuevoEquipo]);
- alert("Equipo agregado al inventario");
- }
+ router.push(`/AgregarEquipo`);
}
};
diff --git a/src/app/styles/layout/header.module.scss b/src/app/styles/layout/header.module.scss
index 3be1c6a..04938a3 100644
--- a/src/app/styles/layout/header.module.scss
+++ b/src/app/styles/layout/header.module.scss
@@ -69,6 +69,14 @@
}
@media (max-width: 800px) {
.yellowPart {
+ left: 0;
background: #bd8c01;
+ transform: skew(0deg);
+ }
+ .header::after {
+ left: -100px;
+ }
+ .header::before {
+ left: -80px;
}
}
diff --git a/src/components/BarcodeScanner.tsx b/src/components/BarcodeScanner.tsx
index 794bb92..5354e3e 100644
--- a/src/components/BarcodeScanner.tsx
+++ b/src/components/BarcodeScanner.tsx
@@ -46,7 +46,7 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) {
target: scannerRef.current,
constraints: {
width: 640,
- height: 480,
+ height: 370,
facingMode: "environment",
},
},
@@ -114,4 +114,4 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) {
}}
/>
);
-}
\ No newline at end of file
+}