This commit is contained in:
IO420
2025-10-03 17:29:53 -06:00
parent f07954eef2
commit 02e06f10bf
6 changed files with 26 additions and 17 deletions
+4 -3
View File
@@ -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 (
<section className="containerSection">
<h2 className="title">EQUIPOS ACTIVOS Y EN MANTENIMIENTO</h2>
<Toggle
defaultView="Equipos"
defaultView={key}
options={[
{
key: "Equipos",
@@ -43,7 +44,7 @@ export default async function Page(props: {
label: "Mesas",
content: (
<>
<MesasDisponibles/>
<MesasDisponibles />
</>
),
},
+4 -2
View File
@@ -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: {
<h2 className="title"> ASIGNACION DE EQUIPOS </h2>
<Toggle
defaultView="Asignar"
defaultView={key}
options={[
{
key: "Asignar",
+1 -1
View File
@@ -35,7 +35,7 @@ export default async function Page(props: {
<h2 className="title"> ASIGNACION DE MESAS </h2>
<Toggle
defaultView="Asignar"
defaultView={key}
options={[
{
key: "Asignar",
+12 -9
View File
@@ -1,34 +1,37 @@
"use client";
import styles from "./Page.module.css";
import Toggle from "@/app/Components/Global/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() {
export default async function Page(props: {
searchParams?: Promise<{
key: string;
numAcount: string;
}>;
}) {
const params = await props.searchParams;
const key = params?.key && params.key;
return (
<section className="containerSection">
<h2 className="title"> REPORTES </h2>
<Toggle
defaultView="1"
defaultView={key}
options={[
{
key: "1",
key: "Por recibo",
label: "Por recibo",
content: (
<>
<SearchDateBetween />
<PorServicios />
</>
),
},
{
key: "2",
key: "Por Servicio",
label: "Por Servicio",
content: (
<>
@@ -61,6 +61,7 @@ function Impressions({ costs, numAcount }: ImpressionsProps) {
setPages("");
setCost("");
toast.success("Impresion cobrada correctamente");
router.refresh();
};
return (
+4 -2
View File
@@ -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));
}