From b73387cbf1307737bf24cfe6748f48546ab3fc57 Mon Sep 17 00:00:00 2001 From: yoelmarain Date: Fri, 27 Sep 2024 00:15:01 -0300 Subject: [PATCH] Refactor fetching and updating user data --- FrontAdmin/src/API-Alumnos/Compromiso.ts | 4 ++-- FrontAdmin/src/API-Alumnos/Pagos.ts | 2 -- .../src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/FrontAdmin/src/API-Alumnos/Compromiso.ts b/FrontAdmin/src/API-Alumnos/Compromiso.ts index bc574da..ee9fdf9 100644 --- a/FrontAdmin/src/API-Alumnos/Compromiso.ts +++ b/FrontAdmin/src/API-Alumnos/Compromiso.ts @@ -5,7 +5,7 @@ export const FetchCompromisos = async () => { try { const token = Cookies.get('tokennn'); const dni = Cookies.get('dni'); - // const dni = 42790229; + const response = await fetch(`http://localhost:8000/api/firmas/firmas-de-alumno/${dni}/`, { method: 'GET', headers: { @@ -49,7 +49,7 @@ export const FirmarCompromiso = async () => { try { const token = Cookies.get('tokennn'); const dni = Cookies.get('dni') - // const dni = 42790229; + const response = await fetch(`http://localhost:8000/api/firmas/firmar-compromiso/${dni}/`, { method: 'POST', headers: { diff --git a/FrontAdmin/src/API-Alumnos/Pagos.ts b/FrontAdmin/src/API-Alumnos/Pagos.ts index 4e686af..23d783e 100644 --- a/FrontAdmin/src/API-Alumnos/Pagos.ts +++ b/FrontAdmin/src/API-Alumnos/Pagos.ts @@ -10,7 +10,6 @@ export const FetchPostPago = async ( try { const token = Cookies.get('tokennn'); const dni = Cookies.get('dni'); - // const dni = 36562786; // Puedes obtener esto desde las cookies tambiƩn // Crea un nuevo objeto FormData const formData = new FormData(); @@ -53,7 +52,6 @@ export const FetchGetCuotas = async () => { try { const token = Cookies.get('tokennn'); const dni = Cookies.get('dni'); - // const dni = 36562786; const response = await fetch(`http://localhost:8000/api/cuotas/alumno/${dni}/?limit=6&offset=0/`, { method: 'GET', diff --git a/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx b/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx index 8368918..df5867c 100644 --- a/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx +++ b/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx @@ -28,9 +28,8 @@ interface Cuota { monto1erVencimiento: number; monto2doVencimiento: number; monto3erVencimiento: number; - montoActual: number; + valortotal: number; valorpagado: number; - valorinformado: number; valoradeudado: number; estado: string; }