cambios en expediente

This commit is contained in:
2025-08-16 11:37:16 -06:00
parent cce4bf5d3a
commit c453abfd30
3 changed files with 23 additions and 17 deletions

4
.env
View File

@@ -1,4 +1,4 @@
VITE_DEBUG_MODE=false VITE_DEBUG_MODE=false
VITE_EFC_API_URL=https://api.efc-aduanasoft.com/api/v1 VITE_EFC_API_URL=http://192.168.1.195:8000/api/v1
VITE_EFC_MICROSERVICE_URL=https://api.efc-aduanasoft.com/microservice/api/v1 VITE_EFC_MICROSERVICE_URL=http://192.168.1.195:8001/api/v1

View File

@@ -0,0 +1,4 @@
VITE_DEBUG_MODE=false
VITE_EFC_API_URL=https://api.efc-aduanasoft.com/api/v1
VITE_EFC_MICROSERVICE_URL=https://api.efc-aduanasoft.com/microservice/api/v1

View File

@@ -80,9 +80,8 @@ export default function Documents() {
// Construir objeto de filtros // Construir objeto de filtros
const filters = { const filters = {
search: searchFilter || undefined, search: searchFilter || undefined,
pedimento: pedimentoFilter || undefined, pedimento_app: pedimentoFilter || undefined,
existe_expediente: expedienteFilter === 'all' ? undefined : expedienteFilter, existe_expediente: expedienteFilter === 'all' ? undefined : expedienteFilter,
alerta: alertaFilter === 'all' ? undefined : alertaFilter,
contribuyente: contribuyenteFilter || undefined, contribuyente: contribuyenteFilter || undefined,
curp_apoderado: curpApoderadoFilter || undefined, curp_apoderado: curpApoderadoFilter || undefined,
fecha_pago: fechaPagoFilter || undefined, fecha_pago: fechaPagoFilter || undefined,
@@ -176,7 +175,7 @@ export default function Documents() {
</span> </span>
)} )}
</h1> </h1>
<p className="text-sm sm:text-lg text-blue-100 font-medium leading-relaxed">Gestiona y descarga los documentos de tus pedimentos</p> <p className="text-sm sm:text-lg text-blue-100 font-medium leading-relaxed">Gestiona y descarga los documentos de tus pedimento_app</p>
</div> </div>
{/* Efectos decorativos de fondo modernos */} {/* Efectos decorativos de fondo modernos */}
<div className="absolute -top-10 -right-10 opacity-20 pointer-events-none select-none"> <div className="absolute -top-10 -right-10 opacity-20 pointer-events-none select-none">
@@ -232,18 +231,18 @@ export default function Documents() {
type="text" type="text"
value={searchFilter} value={searchFilter}
onChange={e => setSearchFilter(e.target.value)} onChange={e => setSearchFilter(e.target.value)}
placeholder="Buscar pedimento, contribuyente..." placeholder="Buscar pedimento_app, contribuyente..."
className="w-full border border-gray-300 rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm transition-all duration-200 hover:shadow-md" className="w-full border border-gray-300 rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm transition-all duration-200 hover:shadow-md"
/> />
</div> </div>
{/* Pedimento */} {/* Pedimento_app */}
<div className="flex flex-col"> <div className="flex flex-col">
<label className="text-xs font-semibold text-gray-700 mb-1.5">Pedimento</label> <label className="text-xs font-semibold text-gray-700 mb-1.5">Pedimento_app</label>
<input <input
type="text" type="text"
value={pedimentoFilter} value={pedimentoFilter}
onChange={e => setPedimentoFilter(e.target.value)} onChange={e => setPedimentoFilter(e.target.value)}
placeholder="Número de pedimento..." placeholder="Número de pedimento_app..."
className="w-full border border-gray-300 rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm transition-all duration-200 hover:shadow-md" className="w-full border border-gray-300 rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm transition-all duration-200 hover:shadow-md"
/> />
</div> </div>
@@ -265,7 +264,10 @@ export default function Documents() {
value={contribuyenteInput} value={contribuyenteInput}
onChange={e => { onChange={e => {
setContribuyenteInput(e.target.value); setContribuyenteInput(e.target.value);
setContribuyenteFilter(''); setContribuyenteFilter(e.target.value);
}}
onBlur={e => {
setContribuyenteFilter(e.target.value);
}} }}
placeholder="Buscar o escribir..." placeholder="Buscar o escribir..."
className="w-full border border-gray-300 rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm transition-all duration-200 hover:shadow-md" className="w-full border border-gray-300 rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm transition-all duration-200 hover:shadow-md"
@@ -410,13 +412,13 @@ export default function Documents() {
<table className="min-w-full divide-y divide-gray-200"> <table className="min-w-full divide-y divide-gray-200">
<thead className="bg-gradient-to-r from-gray-50 to-blue-50"> <thead className="bg-gradient-to-r from-gray-50 to-blue-50">
<tr> <tr>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Pedimento</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Pedimento_app</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Fecha de pago</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Fecha de pago</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Contribuyente</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Contribuyente</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">CURP Apoderado</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">CURP Apoderado</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Importe total</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Importe total</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Saldo disponible</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Saldo disponible</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Importe pedimento</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Importe pedimento_app</th>
<th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Expediente</th> <th className="px-4 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider border-b border-gray-200">Expediente</th>
</tr> </tr>
</thead> </thead>
@@ -451,7 +453,7 @@ export default function Documents() {
to={`/expedientes/pedimento/${ped.id}`} to={`/expedientes/pedimento/${ped.id}`}
className="text-blue-600 hover:text-blue-800 font-semibold transition-colors duration-200 group-hover:underline" className="text-blue-600 hover:text-blue-800 font-semibold transition-colors duration-200 group-hover:underline"
> >
{ped.pedimento} {ped.pedimento_app}
</Link> </Link>
</td> </td>
<td className="px-4 py-4 whitespace-nowrap text-sm text-gray-700">{ped.fecha_pago}</td> <td className="px-4 py-4 whitespace-nowrap text-sm text-gray-700">{ped.fecha_pago}</td>
@@ -459,7 +461,7 @@ export default function Documents() {
<td className="px-4 py-4 whitespace-nowrap text-sm text-gray-700">{ped.curp_apoderado}</td> <td className="px-4 py-4 whitespace-nowrap text-sm text-gray-700">{ped.curp_apoderado}</td>
<td className="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-semibold">${ped.importe_total}</td> <td className="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-semibold">${ped.importe_total}</td>
<td className="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-semibold">${ped.saldo_disponible}</td> <td className="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-semibold">${ped.saldo_disponible}</td>
<td className="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-semibold">${ped.importe_pedimento}</td> <td className="px-4 py-4 whitespace-nowrap text-sm text-gray-900 font-semibold">${ped.importe_pedimento_app}</td>
<td className="px-4 py-4 whitespace-nowrap"> <td className="px-4 py-4 whitespace-nowrap">
<span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${ <span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${
ped.existe_expediente ped.existe_expediente
@@ -536,7 +538,7 @@ export default function Documents() {
to={`/expedientes/pedimento/${ped.id}`} to={`/expedientes/pedimento/${ped.id}`}
className="text-lg font-semibold text-blue-600 hover:text-blue-800 transition-colors duration-200" className="text-lg font-semibold text-blue-600 hover:text-blue-800 transition-colors duration-200"
> >
{ped.pedimento} {ped.pedimento_app}
</Link> </Link>
<p className="text-sm text-gray-500">{ped.fechapago}</p> <p className="text-sm text-gray-500">{ped.fechapago}</p>
</div> </div>
@@ -573,8 +575,8 @@ export default function Documents() {
<span className="text-sm font-bold text-blue-800">${ped.saldo_disponible}</span> <span className="text-sm font-bold text-blue-800">${ped.saldo_disponible}</span>
</div> </div>
<div className="flex items-center justify-between bg-gray-50 rounded-lg p-2"> <div className="flex items-center justify-between bg-gray-50 rounded-lg p-2">
<span className="text-sm font-medium text-gray-700">Importe pedimento:</span> <span className="text-sm font-medium text-gray-700">Importe pedimento_app:</span>
<span className="text-sm font-bold text-gray-800">${ped.importe_pedimento}</span> <span className="text-sm font-bold text-gray-800">${ped.importe_pedimento_app}</span>
</div> </div>
</div> </div>
</div> </div>