From 51927e3865f1b65b67fdaed6d705d2977f355c03 Mon Sep 17 00:00:00 2001
From: IO420 <320154041@pcpuma.acatlan.unam.mx>
Date: Fri, 23 Jan 2026 20:09:10 -0600
Subject: [PATCH] tring to do mesa
---
app/(private)/AsignacionMesas/page.tsx | 19 +++++++------------
app/(private)/Monitor/MachineTable.tsx | 11 +++++------
app/(private)/Monitor/page.tsx | 2 +-
app/Components/CheckBoxMesa.tsx | 22 +++++++++++++++++-----
4 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/app/(private)/AsignacionMesas/page.tsx b/app/(private)/AsignacionMesas/page.tsx
index e624d29..d9ce25e 100644
--- a/app/(private)/AsignacionMesas/page.tsx
+++ b/app/(private)/AsignacionMesas/page.tsx
@@ -8,13 +8,13 @@ import Table from "@/app/Components/Global/table";
import { envConfig } from "@/app/lib/config";
import { GetRegisterStudent } from "@/app/lib/getRegisterStudent";
+import axios from "axios";
async function getInscripcion(idCuenta: number) {
try {
- const res = await fetch(
- `${envConfig.apiUrl}/alumno-inscrito/${idCuenta}`,
- { cache: "no-store" }
- );
+ const res = await fetch(`${envConfig.apiUrl}/alumno-inscrito/${idCuenta}`, {
+ cache: "no-store",
+ });
if (!res.ok) throw new Error("Error al cargar inscripción");
return await res.json();
@@ -42,13 +42,8 @@ export default async function Page(props: {
if (numAcount) {
const idCuenta = parseInt(numAcount);
- const result = await GetRegisterStudent(idCuenta);
-
- if (result.error) {
- errorMessage = result.error;
- } else {
- student = result[0]?.alumno;
- }
+ const result = await axios.get(`${envConfig.apiUrl}/bitacora-mesa/cuenta/${idCuenta}`);
+ student = result.data
const inscResult = await getInscripcion(idCuenta);
if (!inscResult.error && Array.isArray(inscResult)) {
@@ -104,7 +99,7 @@ export default async function Page(props: {
{
key: "Liberar",
label: "Cancelar mesa",
- content: