+
+
+ } />
);
diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx
index 337fd38..4d37f98 100644
--- a/src/components/Sidebar.jsx
+++ b/src/components/Sidebar.jsx
@@ -100,6 +100,15 @@ export default function Sidebar({ isMobileOpen, onMobileClose }) {
)
+ },
+ {
+ name: 'Auditor',
+ path: '/auditor',
+ icon: (
+
+
+
+ )
}
]
},
diff --git a/src/pages/Auditor.jsx b/src/pages/Auditor.jsx
new file mode 100644
index 0000000..832aac0
--- /dev/null
+++ b/src/pages/Auditor.jsx
@@ -0,0 +1,649 @@
+import React, { useState, useEffect } from 'react';
+import { getWithAuth, postWithAuth } from '../fetchWithAuth';
+const API_URL = import.meta.env.VITE_EFC_API_URL;
+
+function Auditor() {
+ const [loading, setLoading] = useState(false);
+ const [error, setError] = useState('');
+ const [pedimentos, setPedimentos] = useState([]);
+ const [showInstructions, setShowInstructions] = useState(false);
+ const [count, setCount] = useState(0);
+ const [page, setPage] = useState(1);
+ const [itemsPerPage] = useState(10);
+ const [auditando, setAuditando] = useState(false);
+ const [auditandoPartidas, setAuditandoPartidas] = useState(false);
+ const [auditandoRemesas, setAuditandoRemesas] = useState(false);
+ const [procesandoPedimento, setProcesandoPedimento] = useState(null);
+ const [procesandoRemesa, setProcesandoRemesa] = useState(null);
+
+ const handleAuditarRemesaPedimento = async (pedimentoId) => {
+ if (procesandoRemesa) return;
+
+ try {
+ setProcesandoRemesa(pedimentoId);
+
+ const response = await postWithAuth(`${API_URL}/customs/auditor/auditar-procesamiento-remesa/pedimento/`, {
+ pedimento_id: pedimentoId
+ });
+
+ if (!response.ok) {
+ throw new Error('Error al procesar las remesas del pedimento');
+ }
+
+ // Mostrar mensaje de éxito
+ alert('Las remesas del pedimento se están procesando');
+
+ } catch (error) {
+ console.error('Error:', error);
+ alert(error.message);
+ } finally {
+ setProcesandoRemesa(null);
+ }
+ };
+
+ const handleAuditarRemesas = async () => {
+ if (auditandoRemesas) return;
+
+ try {
+ setAuditandoRemesas(true);
+ // Obtener el organizacion_id del primer pedimento
+ const organizacionId = pedimentos[0]?.organizacion;
+
+ if (!organizacionId) {
+ throw new Error('No hay organización disponible para auditar');
+ }
+
+ const response = await postWithAuth(`${API_URL}/customs/auditor/auditar-procesamiento-remesas/`, {
+ organizacion_id: organizacionId
+ });
+
+ if (!response.ok) {
+ throw new Error('Error al iniciar la auditoría de remesas');
+ }
+
+ // Mostrar mensaje de éxito
+ alert('La auditoría de remesas se ha iniciado correctamente');
+
+ } catch (error) {
+ console.error('Error:', error);
+ alert(error.message);
+ } finally {
+ setAuditandoRemesas(false);
+ }
+ };
+
+ const handleAuditarPartidasPedimento = async (pedimentoId) => {
+ if (procesandoPedimento) return;
+
+ try {
+ setProcesandoPedimento(pedimentoId);
+
+ const response = await postWithAuth(`${API_URL}/customs/auditor/crear-partidas/pedimento/`, {
+ pedimento_id: pedimentoId
+ });
+
+ if (!response.ok) {
+ throw new Error('Error al procesar las partidas del pedimento');
+ }
+
+ // Mostrar mensaje de éxito
+ alert('Las partidas del pedimento se están procesando');
+
+ } catch (error) {
+ console.error('Error:', error);
+ alert(error.message);
+ } finally {
+ setProcesandoPedimento(null);
+ }
+ };
+
+ const handleAuditarPartidas = async () => {
+ if (auditandoPartidas) return;
+
+ try {
+ setAuditandoPartidas(true);
+ // Obtener el organizacion_id del primer pedimento
+ const organizacionId = pedimentos[0]?.organizacion;
+
+ if (!organizacionId) {
+ throw new Error('No hay organización disponible para auditar');
+ }
+
+ const response = await postWithAuth(`${API_URL}/customs/auditor/crear-partidas/organizacion/`, {
+ organizacion_id: organizacionId
+ });
+
+ if (!response.ok) {
+ throw new Error('Error al iniciar la auditoría de partidas');
+ }
+
+ // Mostrar mensaje de éxito
+ alert('La auditoría de partidas se ha iniciado correctamente');
+
+ } catch (error) {
+ console.error('Error:', error);
+ alert(error.message);
+ } finally {
+ setAuditandoPartidas(false);
+ }
+ };
+
+ const handleAuditarTodos = async () => {
+ if (auditando) return;
+
+ try {
+ setAuditando(true);
+ // Obtener el organizacion_id del primer pedimento
+ const organizacionId = pedimentos[0]?.organizacion;
+
+ if (!organizacionId) {
+ throw new Error('No hay organización disponible para auditar');
+ }
+
+ const response = await postWithAuth(`${API_URL}/customs/auditor/auditar-pedimentos/`, {
+ organizacion_id: organizacionId
+ });
+
+ if (!response.ok) {
+ throw new Error('Error al iniciar la auditoría');
+ }
+
+ // Mostrar mensaje de éxito
+ alert('La auditoría se ha iniciado correctamente');
+
+ } catch (error) {
+ console.error('Error:', error);
+ alert(error.message);
+ } finally {
+ setAuditando(false);
+ }
+ };
+
+ useEffect(() => {
+ const fetchPedimentos = async () => {
+ setLoading(true);
+ try {
+ const response = await getWithAuth(`${API_URL}/customs/pedimentos/?page=${page}&page_size=${itemsPerPage}`);
+ if (!response.ok) throw new Error('Error al cargar los pedimentos');
+ const data = await response.json();
+ setPedimentos(data.results);
+ setCount(data.count);
+ } catch (err) {
+ setError(err.message);
+ } finally {
+ setLoading(false);
+ }
+ };
+ fetchPedimentos();
+ }, [page, itemsPerPage]);
+
+ return (
+
+
+ {/* Header mejorado y responsivo */}
+
+
+
+
+ Panel de Auditoría
+
+
+
+ Monitoreo y control de operaciones
+
+
setShowInstructions(true)}
+ className="inline-flex items-center px-3 py-1 border border-transparent text-sm leading-4 font-medium rounded-md text-blue-700 bg-blue-100 hover:bg-blue-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-200"
+ >
+
+
+
+ Instrucciones
+
+
+
+ {/* Efectos decorativos de fondo */}
+
+
+ {/* Partículas flotantes */}
+
+
+
+ {/* Contenido principal */}
+
+
+ {loading ? (
+
+ ) : error ? (
+
+
+
Error al cargar
+
{error}
+
+ ) : (
+
+
+
+
+
+
+
+ Servicios de Auditoría
+
+
+
+
+ {auditando ? (
+ <>
+
+
+
+
+ Auditando...
+ >
+ ) : (
+ <>
+
+
+
+ Auditar Todos los Pedimentos
+ >
+ )}
+
+
+
+ {auditandoPartidas ? (
+ <>
+
+
+
+
+ Auditando Partidas...
+ >
+ ) : (
+ <>
+
+
+
+ Auditar Partidas
+ >
+ )}
+
+
+
+ {auditandoRemesas ? (
+ <>
+
+
+
+
+ Auditando Remesas...
+ >
+ ) : (
+ <>
+
+
+
+ Auditar Remesas
+ >
+ )}
+
+
+
+
+ {/* Tabla de pedimentos */}
+
+
+
+
+
+ Pedimento
+
+
+ PC
+ Pedimento Completo
+
+
+ RM
+ Remesas
+
+
+ PT
+ Partidas
+
+
+ AC
+ Acuse
+
+
+ COVE
+ Cove
+
+
+ AC_COVE
+ Acuse de Cove
+
+
+ EDoc
+ EDocument
+
+
+
+
+ {pedimentos.map((pedimento) => (
+
+
+ {pedimento.pedimento_app}
+
+ {/* PC - Pedimento Completo */}
+
+
+
+
+
+
+
+ {/* RM - Remesas */}
+
+ handleAuditarRemesaPedimento(pedimento.id)}
+ disabled={procesandoRemesa === pedimento.id}
+ className={`inline-flex items-center justify-center w-8 h-8 rounded-full bg-white border border-gray-200
+ ${procesandoRemesa === pedimento.id
+ ? 'opacity-50 cursor-not-allowed'
+ : 'shadow-sm hover:shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 transition-all duration-200 hover:scale-110'
+ }
+ `}
+ >
+ {procesandoRemesa === pedimento.id ? (
+
+
+
+
+ ) : (
+
+
+
+ )}
+
+
+ {/* PT - Partidas */}
+
+ handleAuditarPartidasPedimento(pedimento.id)}
+ disabled={procesandoPedimento === pedimento.id}
+ className={`inline-flex items-center justify-center w-8 h-8 rounded-full bg-white border border-gray-200
+ ${procesandoPedimento === pedimento.id
+ ? 'opacity-50 cursor-not-allowed'
+ : 'shadow-sm hover:shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 transition-all duration-200 hover:scale-110'
+ }
+ `}
+ >
+ {procesandoPedimento === pedimento.id ? (
+
+
+
+
+ ) : (
+
+
+
+ )}
+
+
+ {/* AC - Acuse */}
+
+
+
+
+
+
+
+ {/* COVE */}
+
+
+
+
+
+
+
+ {/* AC_COVE */}
+
+
+
+
+
+
+
+ {/* EDoc */}
+
+
+
+
+
+
+
+
+ ))}
+
+
+
+
+ {/* Paginación */}
+ {count > 0 && (
+
+
+ setPage(page => Math.max(1, page - 1))}
+ disabled={page === 1}
+ className="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
+ >
+ Anterior
+
+ setPage(page => page + 1)}
+ disabled={page >= Math.ceil(count / itemsPerPage)}
+ className="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
+ >
+ Siguiente
+
+
+
+
+
+ Mostrando {((page - 1) * itemsPerPage) + 1} a{' '}
+ {Math.min(page * itemsPerPage, count)} de{' '}
+ {count} resultados
+
+
+
+
+ setPage(1)}
+ disabled={page === 1}
+ className="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
+ >
+ Primera
+ ««
+
+ setPage(page => Math.max(1, page - 1))}
+ disabled={page === 1}
+ className="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
+ >
+ Anterior
+ «
+
+
+ Página {page}
+
+ setPage(page => page + 1)}
+ disabled={page >= Math.ceil(count / itemsPerPage)}
+ className="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
+ >
+ Siguiente
+ »
+
+ setPage(Math.ceil(count / itemsPerPage))}
+ disabled={page >= Math.ceil(count / itemsPerPage)}
+ className="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
+ >
+ Última
+ »»
+
+
+
+
+
+ )}
+
+
+ )}
+
+
+
+ {/* Modal de Instrucciones */}
+ {showInstructions && (
+
+
+
+
+
+
+
+ Instrucciones de Auditoría
+
+
setShowInstructions(false)}
+ className="text-gray-400 hover:text-gray-500 focus:outline-none"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+ Auditar Todos los Pedimentos
+
+
Este proceso revisará uno a uno cada XML del pedimento completo y agregará los campos restantes en nuestra tabla de pedimentos. Si el documento tiene COVEs y E-Docs, también los subirá a nuestra base de datos.
+
+
+
+
+
+
+ Auditar Partidas
+
+
Creará todas las partidas de cada uno de los pedimentos, extrayendo la información detallada de cada una.
+
+
+
+
+
+
+ Auditar Remesas
+
+
Obtendrá y agregará todos los COVEs existentes en el documento a nuestra base de datos.
+
+
+
+
+ setShowInstructions(false)}
+ className="w-full inline-flex justify-center items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
+ >
+ Entendido
+
+
+
+
+ )}
+
+ {/* Animaciones CSS */}
+
+
+ );
+}
+
+export default Auditor;
diff --git a/src/pages/Documents.jsx b/src/pages/Documents.jsx
index b2c85a8..eb4547b 100644
--- a/src/pages/Documents.jsx
+++ b/src/pages/Documents.jsx
@@ -511,7 +511,6 @@ export default function Documents() {
{doc.extension}
{
diff --git a/src/pages/PedimentoDetail.jsx b/src/pages/PedimentoDetail.jsx
index ceda4b5..c32fe11 100644
--- a/src/pages/PedimentoDetail.jsx
+++ b/src/pages/PedimentoDetail.jsx
@@ -124,6 +124,7 @@ export default function PedimentoDetail() {
const [selected, setSelected] = useState([]);
const [downloading, setDownloading] = useState(false);
const [downloadingAll, setDownloadingAll] = useState(false);
+ const [dashboardSummary, setDashboardSummary] = useState(null);
const [showFilters, setShowFilters] = useState(false);
// Filtros simplificados de documentos (nuevo diseño)
@@ -205,6 +206,27 @@ export default function PedimentoDetail() {
const [processingEdoc, setProcessingEdoc] = useState(null);
const [processingAcuseEdoc, setProcessingAcuseEdoc] = useState(null);
+ // Función para obtener el resumen del dashboard
+ const fetchDashboardSummary = async () => {
+ try {
+ if (!pedimento) return;
+
+ const url = `${import.meta.env.VITE_EFC_API_URL}/reports/dashboard/summary/?organizacion_id=${pedimento.organizacion}&pedimento_app=${pedimento.pedimento_app}`;
+ const res = await fetchWithAuth(url);
+
+ if (!res.ok) {
+ throw new Error('Error al obtener el resumen del dashboard');
+ }
+
+ const data = await res.json();
+ setDashboardSummary(data);
+
+ } catch (err) {
+ console.error('Error obteniendo el resumen del dashboard:', err);
+ showMessage('Error al obtener el resumen del dashboard: ' + err.message, 'error');
+ }
+ };
+
// Función para obtener credenciales VUCEM
const fetchCredenciales = async (contribuyente) => {
try {
@@ -385,6 +407,9 @@ export default function PedimentoDetail() {
// Función para cambiar de pestaña
const handleTabChange = (tab) => {
setActiveTab(tab);
+ if (tab === 'auditor') {
+ fetchDashboardSummary();
+ }
};
// Handler SPA para paginación
@@ -3623,6 +3648,8 @@ export default function PedimentoDetail() {
Análisis Completo
+
+
{/* Botones de Auditoría */}
@@ -3720,63 +3747,255 @@ export default function PedimentoDetail() {
{/* Contenido del Auditor */}
{/* Resumen de Estado */}
-
-
-
+
+
+
Resumen de Estado del Pedimento
+
+ {dashboardSummary ? (
+ <>
+ {/* Indicador de Cumplimiento Principal */}
+
+
+ Cumplimiento Total
+ {dashboardSummary.cumplimiento_total.toFixed(1)}%
+
+
+
+
+ {/* Grid de Estadísticas */}
+
+ {/* Pedimentos */}
+
+
+
+
+ Completos
+ {dashboardSummary.pedimentos.completos}
+
+
+ Pendientes
+ {dashboardSummary.pedimentos.pendientes}
+
+
+
+ Cumplimiento
+ {dashboardSummary.pedimentos.cumplimiento.toFixed(1)}%
+
+
+
+
+
+
+ {/* COVEs */}
+
+
+
+
+ Procesados
+ {dashboardSummary?.coves?.coves_procesados || 0}
+
+
+ Pendientes
+ {dashboardSummary?.coves?.coves_pendientes || 0}
+
+
+
+ Cumplimiento
+ {(dashboardSummary?.coves?.coves_cumplimiento || 0).toFixed(1)}%
+
+
+
+
+
+
+ {/* Acuses de COVEs */}
+
+
+
+
+ Procesados
+ {dashboardSummary?.acuse_coves?.acuse_coves_procesados || 0}
+
+
+ Pendientes
+ {dashboardSummary?.acuse_coves?.acuse_coves_pendientes || 0}
+
+
+
+ Cumplimiento
+ {(dashboardSummary?.acuse_coves?.acuse_coves_cumplimiento || 0).toFixed(1)}%
+
+
+
+
+
+
+ {/* E-Documents */}
+
+
+
+
+ Descargados
+ {dashboardSummary.edocuments.edocs_descargados}
+
+
+ Pendientes
+ {dashboardSummary.edocuments.edocs_pendientes}
+
+
+
+ Cumplimiento
+ {dashboardSummary.edocuments.edocs_cumplimiento.toFixed(1)}%
+
+
+
+
+
+
+ {/* Acuses */}
+
+
+
+
+ Descargados
+ {dashboardSummary?.acuses?.acuse_descargados || 0}
+
+
+ Pendientes
+ {dashboardSummary?.acuses?.acuses_pendientes || 0}
+
+
+
+ Cumplimiento
+ {(dashboardSummary?.acuses?.acuses_cumplimiento || 0).toFixed(1)}%
+
+
+
+
+
+
+ {/* Partidas */}
+
+
+
+
+ Descargadas
+ {dashboardSummary.partidas.partidas_descargadas}
+
+
+ Pendientes
+ {dashboardSummary.partidas.partidas_pendientes}
+
+
+
+ Cumplimiento
+ {dashboardSummary.partidas.cumplimiento.toFixed(1)}%
+
+
+
+
+
+
+ {/* Estadísticas Generales */}
+
+
+
Estadísticas Generales
+
+
+
+
+ Total Documentos
+ {dashboardSummary.documentos.descargados}
+
+
+ Total Remesas
+ {dashboardSummary.remesas.total}
+
+
+ Total Partidas
+ {dashboardSummary.partidas.total}
+
+
+
+
+ >
+ ) : (
+
+
+
+
+
No hay datos disponibles
+
Intente recargar la página o contacte a soporte si el problema persiste.
+
+ )}
-
-
-
-
-
Documentos
-
{docsCount || 0}
-
-
-
-
-
-
-
-
-
-
-
COVEs
-
{covesCount || 0}
-
-
-
-
-
-
-
-
-
-
-
EDocs
-
{edocsCount || 0}
-
-
-
-
-
-
-
-
-
-
-
Procesos
-
{procesosCount || 0}
-
-
-
-
-
-
-
{/* Análisis de Integridad */}
@@ -3788,36 +4007,193 @@ export default function PedimentoDetail() {
Análisis de Integridad
-
-
-
-
-
-
-
Documentos Requeridos
-
-
Completo
-
-
-
-
-
-
-
-
Validación de Estructura
-
-
Verificado
-
-
-
-
-
-
-
-
Seguridad y Firmas
-
-
Auditado
-
+
+ {dashboardSummary && (
+ <>
+ {/* Estado General del Pedimento */}
+
+
+
= 100 ? 'bg-green-100' :
+ dashboardSummary.cumplimiento_total >= 75 ? 'bg-yellow-100' :
+ 'bg-red-100'
+ }`}>
+
= 100 ? 'text-green-600' :
+ dashboardSummary.cumplimiento_total >= 75 ? 'text-yellow-600' :
+ 'text-red-600'
+ }`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
+ = 100
+ ? "M5 13l4 4L19 7" // check mark
+ : dashboardSummary.cumplimiento_total >= 75
+ ? "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" // warning
+ : "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" // error
+ }
+ />
+
+
+
+
Estado del Pedimento
+
+ {dashboardSummary.cumplimiento_total >= 100
+ ? 'Todos los documentos y validaciones están completos'
+ : dashboardSummary.cumplimiento_total >= 75
+ ? 'El pedimento requiere atención en algunos aspectos'
+ : 'Se requiere atención urgente en varios aspectos'}
+
+
+
+
+ = 100 ? 'bg-green-100 text-green-800' :
+ dashboardSummary.cumplimiento_total >= 75 ? 'bg-yellow-100 text-yellow-800' :
+ 'bg-red-100 text-red-800'
+ }`}>
+ {dashboardSummary.cumplimiento_total.toFixed(1)}% Completado
+
+
+
+
+ {/* Análisis Detallado */}
+
+ {/* Documentos Base */}
+
= 100 ? 'bg-green-50 border-green-200' : 'bg-yellow-50 border-yellow-200'
+ }`}>
+
+
= 100 ? 'text-green-600' : 'text-yellow-600'
+ }`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
+
+
+
+
= 100 ? 'text-green-800' : 'text-yellow-800'
+ }`}>Documentos Base
+
+ {`${dashboardSummary.pedimentos.completos} de ${dashboardSummary.pedimentos.total} documentos procesados`}
+
+
+
+
+
+ {/* Validación de COVEs */}
+
= 100 &&
+ dashboardSummary.acuse_coves.acuse_coves_cumplimiento >= 100) ?
+ 'bg-green-50 border-green-200' : 'bg-yellow-50 border-yellow-200'
+ }`}>
+
+
= 100 &&
+ dashboardSummary.acuse_coves.acuse_coves_cumplimiento >= 100) ?
+ 'text-green-600' : 'text-yellow-600'
+ }`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
+
+
+
+
= 100 &&
+ dashboardSummary.acuse_coves.acuse_coves_cumplimiento >= 100) ?
+ 'text-green-800' : 'text-yellow-800'
+ }`}>Validación de COVEs
+
+
+ {`COVEs: ${dashboardSummary.coves.coves_procesados} de ${dashboardSummary.coves.total} procesados`}
+
+
+ {`Acuses: ${dashboardSummary.acuse_coves.acuse_coves_procesados} de ${dashboardSummary.acuse_coves.total} procesados`}
+
+
+
+
+
+
+ {/* E-Documents y Acuses */}
+
= 100 &&
+ dashboardSummary.acuses.acuses_cumplimiento >= 100) ?
+ 'bg-green-50 border-green-200' : 'bg-yellow-50 border-yellow-200'
+ }`}>
+
+
= 100 &&
+ dashboardSummary.acuses.acuses_cumplimiento >= 100) ?
+ 'text-green-600' : 'text-yellow-600'
+ }`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
+
+
+
+
= 100 &&
+ dashboardSummary.acuses.acuses_cumplimiento >= 100) ?
+ 'text-green-800' : 'text-yellow-800'
+ }`}>E-Documents y Acuses
+
+
+ {`E-Docs: ${dashboardSummary.edocuments.edocs_descargados} de ${dashboardSummary.edocuments.total} descargados`}
+
+
+ {`Acuses: ${dashboardSummary.acuses.acuse_descargados} de ${dashboardSummary.acuses.total} descargados`}
+
+
+
+
+
+
+ {/* Partidas */}
+
= 100 ? 'bg-green-50 border-green-200' : 'bg-yellow-50 border-yellow-200'
+ }`}>
+
+
= 100 ? 'text-green-600' : 'text-yellow-600'
+ }`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
+
+
+
+
= 100 ? 'text-green-800' : 'text-yellow-800'
+ }`}>Validación de Partidas
+
+ {`${dashboardSummary.partidas.partidas_descargadas} de ${dashboardSummary.partidas.total} partidas procesadas`}
+
+
+
+
+
+
+ {/* Recomendaciones */}
+ {(dashboardSummary.cumplimiento_total < 100) && (
+
+
+
+
+
+ Recomendaciones
+
+
+ {dashboardSummary.coves.coves_cumplimiento < 100 && (
+ • Procesar los COVEs pendientes ({dashboardSummary.coves.coves_pendientes} restantes)
+ )}
+ {dashboardSummary.acuse_coves.acuse_coves_cumplimiento < 100 && (
+ • Obtener los acuses de COVEs faltantes ({dashboardSummary.acuse_coves.acuse_coves_pendientes} restantes)
+ )}
+ {dashboardSummary.edocuments.edocs_cumplimiento < 100 && (
+ • Completar la descarga de E-Documents ({dashboardSummary.edocuments.edocs_pendientes} pendientes)
+ )}
+ {dashboardSummary.acuses.acuses_cumplimiento < 100 && (
+ • Obtener los acuses de E-Documents ({dashboardSummary.acuses.acuses_pendientes} pendientes)
+ )}
+ {dashboardSummary.partidas.cumplimiento < 100 && (
+ • Procesar las partidas pendientes ({dashboardSummary.partidas.partidas_pendientes} restantes)
+ )}
+
+
+ )}
+ >
+ )}
@@ -3829,52 +4205,16 @@ export default function PedimentoDetail() {
Timeline de Actividades Recientes
-
-
-
-
-
-
Pedimento procesado correctamente
-
Todos los documentos han sido validados y procesados
-
{new Date().toLocaleDateString('es-ES')}
-
-
-
-
-
-
-
Documentos cargados
-
Se han cargado {docsCount || 0} documentos al expediente
-
{pedimento?.created_at ? new Date(pedimento.created_at).toLocaleDateString('es-ES') : 'Fecha no disponible'}
-
-
-
-
-
-
-
Expediente creado
-
Expediente #{pedimento?.pedimento_app || 'N/A'} iniciado
-
{pedimento?.created_at ? new Date(pedimento.created_at).toLocaleDateString('es-ES') : 'Fecha no disponible'}
-
+
+
+
+
Trabajando en ello
+
Estamos preparando el historial de actividades
+
Esta funcionalidad estará disponible próximamente
diff --git a/src/pages/TableroAlmacenamiento.jsx b/src/pages/TableroAlmacenamiento.jsx
index b702318..42ae999 100644
--- a/src/pages/TableroAlmacenamiento.jsx
+++ b/src/pages/TableroAlmacenamiento.jsx
@@ -266,7 +266,7 @@ export default function TableroAlmacenamiento() {
{summary.edocuments?.total ?? '-'}
- Descargados
+ asd
{summary.edocuments?.edocs_descargados ?? '-'}
@@ -291,17 +291,17 @@ export default function TableroAlmacenamiento() {
Descargados
- {summary.edocuments?.acuse_descargados ?? '-'}
+ {summary.edocuments.acuse_descargados ?? '-'}
Pendientes
- {summary.edocuments?.acuses_pendientes ?? '-'}
+ {summary.edocuments.acuses_pendientes ?? '-'}