From 8c88698ddf3bedfb55fa383c17c10cd1cb924c59 Mon Sep 17 00:00:00 2001 From: tyrannusss Date: Thu, 2 Oct 2025 00:11:37 -0600 Subject: [PATCH] Centrar Quitar sanciones y componentes de reportes --- app/(private)/QuitarSancion/page.tsx | 10 +++- app/(private)/Reportes/page.tsx | 68 +++--------------------- app/Components/Reportes/Page.module.css | 69 +++++++++++++++++++++++++ app/Components/Reportes/porRecibo.tsx | 34 ++++++++++++ app/Components/Reportes/porServicio.tsx | 43 +++++++++++++++ 5 files changed, 160 insertions(+), 64 deletions(-) create mode 100644 app/Components/Reportes/Page.module.css create mode 100644 app/Components/Reportes/porRecibo.tsx create mode 100644 app/Components/Reportes/porServicio.tsx diff --git a/app/(private)/QuitarSancion/page.tsx b/app/(private)/QuitarSancion/page.tsx index 1040422..86eb0b8 100644 --- a/app/(private)/QuitarSancion/page.tsx +++ b/app/(private)/QuitarSancion/page.tsx @@ -2,10 +2,16 @@ import SearchUser from "@/app/Components/SearchUser/searchUser"; import QuitarSancion from "@/app/Components/QuitarSancion/QuitarSancion"; - export default function Page() { return ( -
+

Quitar Sanciones

diff --git a/app/(private)/Reportes/page.tsx b/app/(private)/Reportes/page.tsx index 9624bec..ac6bf32 100644 --- a/app/(private)/Reportes/page.tsx +++ b/app/(private)/Reportes/page.tsx @@ -1,28 +1,12 @@ "use client"; -import { useState } from "react"; -import styles from "./Page.module.css"; // importamos el css import Toggle from "@/app/Components/Toggle/Toggle"; import SearchDateBetween from "@/app/Components/SearchDateBetween/SearchDateBetween"; +import Porservicio from "@/app/Components/Reportes/porServicio"; +import PorServicios from "@/app/Components/Reportes/porServicio"; +import PorRecibos from "@/app/Components/Reportes/porRecibo"; export default function Page() { - const [reportes] = useState([ - { - Servicio: "Plotter", - Total: "$1440.00", - }, - ]); - - const [recibos] = useState([ - { - folio_recibo: "100255", - monto: "40.00", - fecha_recibo: "10/10/2025", - fecha_registro: "10/10/2025 05:32:20 pm", - usuario: "modulo1", - }, - ]); - return (

REPORTES

@@ -36,30 +20,7 @@ export default function Page() { content: ( <> -
- - - - - - - - - - - - {recibos.map((recibo, index) => ( - - - - - - - - ))} - -
Folio ReciboMontoFecha ReciboFecha RegistroUsuario
{recibo.folio_recibo}{recibo.monto}{recibo.fecha_recibo}{recibo.fecha_registro}{recibo.usuario}
-
+ ), }, @@ -69,25 +30,8 @@ export default function Page() { label: "Por Servicio", content: ( <> - -
- - - - - - - - - {reportes.map((reporte, index) => ( - - - - - ))} - -
ServicioTotal
{reporte.Servicio}{reporte.Total}
-
+ + ), }, diff --git a/app/Components/Reportes/Page.module.css b/app/Components/Reportes/Page.module.css new file mode 100644 index 0000000..d48a3c1 --- /dev/null +++ b/app/Components/Reportes/Page.module.css @@ -0,0 +1,69 @@ +.tableContainer { + overflow-y: auto; + overflow-x: auto; + border-radius: 4px; + border: 1px solid #cfcfcf; + max-height: 430px; + scrollbar-color: rgb(1, 92, 184) rgba(0, 0, 0, 0); + background-color: #f9f9f9; + width: 100%; +} + +.machineTable { + width: 100%; + border-collapse: collapse; + table-layout: auto; +} + +.machineTable th, +.machineTable td { + padding: 10px; + text-align: center; + border-bottom: 1px solid #cfcfcf; + word-wrap: break-word; + overflow-wrap: break-word; +} + +.machineTable th { + position: sticky; + top: 0px; + background-color: rgb(1, 92, 184); + color: white; +} + +.machineTable tr { + min-width: 400px; +} + +.disponible { + display: flex; + width: 100%; + height: 100%; + background-color: green; + color: green; + font-weight: bold; +} + +.ocupado { + color: red; + font-weight: bold; +} + +.actions { + text-align: center; +} + +.resetButton { + padding: 8px 16px; + background-color: #ff4d4d; + color: white; + border: none; + border-radius: 6px; + cursor: pointer; + font-weight: bold; + transition: 0.3s; +} + +.resetButton:hover { + background-color: #cc0000; +} diff --git a/app/Components/Reportes/porRecibo.tsx b/app/Components/Reportes/porRecibo.tsx new file mode 100644 index 0000000..8590296 --- /dev/null +++ b/app/Components/Reportes/porRecibo.tsx @@ -0,0 +1,34 @@ +"use client"; +import { useState } from "react"; +import styles from "./Page.module.css"; + +interface reportes { + Servicio: "Plotter"; + Total: "$1440.00"; +} + +function PorRecibos() { + const [reportes, SetQuitarSanciones] = useState([]); + return ( +
+ + + + + + + + + {reportes.map((reporte, index) => ( + + + + + ))} + +
ServicioTotal
{reporte.Servicio}{reporte.Total}
+
+ ); +} + +export default PorRecibos; diff --git a/app/Components/Reportes/porServicio.tsx b/app/Components/Reportes/porServicio.tsx new file mode 100644 index 0000000..0259344 --- /dev/null +++ b/app/Components/Reportes/porServicio.tsx @@ -0,0 +1,43 @@ +"use client"; +import { useState } from "react"; +import styles from "./Page.module.css"; + +interface servicios { + folio_recibo: "100255"; + monto: "40.00"; + fecha_recibo: "10/10/2025"; + fecha_registro: "10/10/2025 05:32:20 pm"; + usuario: "modulo1"; +} + +function PorServicios() { + const [recibos, setRecibos] = useState([]); + return ( +
+ + + + + + + + + + + + {recibos.map((recibo, index) => ( + + + + + + + + ))} + +
Folio ReciboMontoFecha ReciboFecha RegistroUsuario
{recibo.folio_recibo}{recibo.monto}{recibo.fecha_recibo}{recibo.fecha_registro}{recibo.usuario}
+
+ ); +} + +export default PorServicios;