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: