From 8e87d6581a967ffb53ef0d4f10a3911569bec292 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 22 Sep 2026 10:22:48 -0500 Subject: [PATCH] Actualizar frontend/src/pages/Comisiones.jsx --- frontend/src/pages/Comisiones.jsx | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/frontend/src/pages/Comisiones.jsx b/frontend/src/pages/Comisiones.jsx index e519e99..5639ffd 100644 --- a/frontend/src/pages/Comisiones.jsx +++ b/frontend/src/pages/Comisiones.jsx @@ -47,7 +47,7 @@ export default function Comisiones() { const [modalAdd, setModalAdd] = useState(false); const [modalBuscar, setModalBuscar] = useState(false); const [modalConfig, setModalConfig] = useState(false); - const cols = useColumnasAjustables([200, 160, 150, 160, 150, 130, 110]); + const cols = useColumnasAjustables([200, 160, 150, 160, 150, 130, 160]); // Carga TODOS los manuales del año (una sola vez por año) → cambio de mes instantáneo function cargarManuales() { @@ -62,10 +62,10 @@ export default function Comisiones() { [manualesAno, mes] ); - // Tabla de ventas (depende del mes, sede y programa) + // Tabla de ventas (depende del mes, sede y programa) — Comisiones SÍ aplica overrides function cargarTabla() { setLoading(true); setError(null); - api.ventas(ano, mes, sede, programa) + api.ventas(ano, mes, sede, programa, true) .then((res) => { setFilas(res.filas || []); setLoading(false); }) .catch((e) => { setError(e.message); setLoading(false); }); } @@ -73,7 +73,7 @@ export default function Comisiones() { useEffect(() => { let activo = true; setLoading(true); setError(null); - api.ventas(ano, mes, sede, programa) + api.ventas(ano, mes, sede, programa, true) .then((res) => { if (activo) { setFilas(res.filas || []); setLoading(false); } }) .catch((e) => { if (activo) { setError(e.message); setLoading(false); } }); return () => { activo = false; }; @@ -138,10 +138,12 @@ export default function Comisiones() { {f[5]}{fmt(f[6])} {fmt(f[7])} - - +
+ + +
))} @@ -154,10 +156,12 @@ export default function Comisiones() { —— {fmt(g.totalMonto)} - - +
+ + +
))}