From 02e06f10bf1e2feb92ddcc71b8ffd60e18e8b3cd Mon Sep 17 00:00:00 2001 From: IO420 Date: Fri, 3 Oct 2025 17:29:53 -0600 Subject: [PATCH] builded --- app/(private)/ActivosMantenimiento/page.tsx | 7 ++++--- app/(private)/AsignacionEquipo/page.tsx | 6 ++++-- app/(private)/AsignacionMesas/page.tsx | 2 +- app/(private)/Reportes/page.tsx | 21 ++++++++++++--------- app/Components/Impressions/impressions.tsx | 1 + app/Components/Receipt/Receipt.tsx | 6 ++++-- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/app/(private)/ActivosMantenimiento/page.tsx b/app/(private)/ActivosMantenimiento/page.tsx index 76ce0c5..66332ee 100644 --- a/app/(private)/ActivosMantenimiento/page.tsx +++ b/app/(private)/ActivosMantenimiento/page.tsx @@ -5,20 +5,21 @@ import Toggle from "@/app/Components/Global/Toggle/Toggle"; export default async function Page(props: { searchParams?: Promise<{ + key?: string; numAcount?: string; machine?: string; }>; }) { const params = await props.searchParams; + const key = params?.key && params.key; const numAcount = params?.numAcount ? params.numAcount : null; return (
-

EQUIPOS ACTIVOS Y EN MANTENIMIENTO

- + ), }, diff --git a/app/(private)/AsignacionEquipo/page.tsx b/app/(private)/AsignacionEquipo/page.tsx index 4844964..700a708 100644 --- a/app/(private)/AsignacionEquipo/page.tsx +++ b/app/(private)/AsignacionEquipo/page.tsx @@ -4,17 +4,19 @@ import { GetStudent } from "@/app/lib/getStudent"; import CheckBoxEquipo from "@/app/Components/CheckBoxEquipo"; import Information from "@/app/Components/Global/Information/information"; +import ShowError from "@/app/Components/Global/ShowError"; import "@/app/globals.css"; -import ShowError from "@/app/Components/Global/ShowError"; export default async function Page(props: { searchParams?: Promise<{ + key?:string numAcount?: string; machine?: string; }>; }) { const params = await props.searchParams; + const key = params?.key && params.key; const numAcount = params?.numAcount ? params.numAcount : null; const machine = params?.machine ? params.machine : null; @@ -38,7 +40,7 @@ export default async function Page(props: {

ASIGNACION DE EQUIPOS

ASIGNACION DE MESAS ; +}) { + const params = await props.searchParams; + const key = params?.key && params.key; + return (

REPORTES

- ), }, { - key: "2", + key: "Por Servicio", label: "Por Servicio", content: ( <> diff --git a/app/Components/Impressions/impressions.tsx b/app/Components/Impressions/impressions.tsx index 534f634..6a03ba4 100644 --- a/app/Components/Impressions/impressions.tsx +++ b/app/Components/Impressions/impressions.tsx @@ -61,6 +61,7 @@ function Impressions({ costs, numAcount }: ImpressionsProps) { setPages(""); setCost(""); toast.success("Impresion cobrada correctamente"); + router.refresh(); }; return ( diff --git a/app/Components/Receipt/Receipt.tsx b/app/Components/Receipt/Receipt.tsx index 79b125d..cf8f6bb 100644 --- a/app/Components/Receipt/Receipt.tsx +++ b/app/Components/Receipt/Receipt.tsx @@ -3,7 +3,7 @@ import toast from "react-hot-toast"; import { useState } from "react"; import { PostReceipt } from "@/app/lib/postReceipt"; -import { useRouter } from "next/navigation"; +import { useParams, usePathname, useRouter } from "next/navigation"; import "./Receipt.css"; @@ -13,6 +13,8 @@ interface ReceiptsProps { function Receipt({ numAcount }: ReceiptsProps) { const router = useRouter(); + const path = usePathname(); + console.log(path); const [folio, setFolio] = useState(""); const [amount, setAmount] = useState(""); @@ -29,7 +31,6 @@ function Receipt({ numAcount }: ReceiptsProps) { //restrict this month// const handleSaveReceipt = async () => { - if (!numAcount) { toast.error("busca de nuevo al estudiante"); return; @@ -63,6 +64,7 @@ function Receipt({ numAcount }: ReceiptsProps) { setDate(""); toast.success("Recibo guardado"); + router.refresh(); } catch (err: any) { toast.error(String(err)); }