From 5e13d3424a1f43b8955c0babd45f71990ae2befa Mon Sep 17 00:00:00 2001 From: IO420 <320154041@pcpuma.acatlan.unam.mx> Date: Wed, 10 Dec 2025 13:13:47 -0600 Subject: [PATCH] added new restriction and fixed button dowload --- public/excel.svg | 1 + src/app/styles/layout/BarNavigation.scss | 4 + src/app/styles/layout/pregunta7.scss | 5 +- src/components/AgregarEquipo.tsx | 61 +-- src/components/BarcodeScanner.tsx | 11 +- src/components/Dowload/Reporte.tsx | 25 +- src/components/Dowload/style.module.css | 41 +- src/components/Equipo_Computo/Pregunta2.tsx | 58 ++- src/components/Equipo_Computo/Pregunta3.tsx | 414 +++++++++++------- .../Equipo_Computo/pregunta2.module.scss | 11 +- .../Equipo_Computo/pregunta3.module.scss | 13 +- src/components/Equipo_Computo/pregunta9.css | 2 +- src/data/procesadores.ts | 5 +- src/data/so_por_equipo.ts | 6 +- 14 files changed, 427 insertions(+), 230 deletions(-) create mode 100644 public/excel.svg diff --git a/public/excel.svg b/public/excel.svg new file mode 100644 index 0000000..1d47514 --- /dev/null +++ b/public/excel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/styles/layout/BarNavigation.scss b/src/app/styles/layout/BarNavigation.scss index caf6184..08ff171 100644 --- a/src/app/styles/layout/BarNavigation.scss +++ b/src/app/styles/layout/BarNavigation.scss @@ -125,6 +125,10 @@ width: 100%; } + .barNavigation li{ + width: 100%; + } + .barNavigation ul { position: absolute; background-color: #f4f5f7; diff --git a/src/app/styles/layout/pregunta7.scss b/src/app/styles/layout/pregunta7.scss index b99c81c..742536c 100644 --- a/src/app/styles/layout/pregunta7.scss +++ b/src/app/styles/layout/pregunta7.scss @@ -59,6 +59,7 @@ border-radius: 0 0 4px 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); overflow: hidden; + min-height: 243px; } table { @@ -71,7 +72,7 @@ thead th { color: #fff; text-align: left; padding: 14px; - font-size: 15px; + font-size: 12px; font-weight: 600; cursor: pointer; user-select: none; @@ -85,7 +86,7 @@ thead th { tbody td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; - font-size: 15px; + font-size: 12px; } tr:nth-child(even) { diff --git a/src/components/AgregarEquipo.tsx b/src/components/AgregarEquipo.tsx index 4082309..70bc00c 100644 --- a/src/components/AgregarEquipo.tsx +++ b/src/components/AgregarEquipo.tsx @@ -373,6 +373,18 @@ export default function Page() { return; } + const inventario = formData.inventario; + + if (/^0/.test(inventario)) { + toast.error("El inventario no puede iniciar con 0"); + return; + } + + if (!/^[0-9E]+$/.test(inventario)) { + toast.error("El inventario solo puede contener n煤meros y la letra E"); + return; + } + try { const token = Cookies.get("token"); const headers = { Authorization: `Bearer ${token}` }; @@ -538,33 +550,30 @@ export default function Page() { )} -