fix(conciliacion): headers visibles aun sin resultados en filtros

This commit is contained in:
Horux Dev
2026-05-24 19:28:45 +00:00
parent 31be887882
commit c65e3455e6

View File

@@ -376,11 +376,6 @@ export default function ConciliacionPage() {
<Card>
<CardContent className="pt-6">
<h3 className="font-medium mb-4">Por conciliar ({pendientesOrdenados.length})</h3>
{pendientesOrdenados.length === 0 ? (
<p className="text-sm text-muted-foreground">
No hay CFDIs pendientes de conciliar
</p>
) : (
<div className="overflow-x-auto">
<table className="w-full text-sm">
<thead>
@@ -412,7 +407,14 @@ export default function ConciliacionPage() {
</tr>
</thead>
<tbody>
{pendientesOrdenados.map((cfdi) => (
{pendientesOrdenados.length === 0 ? (
<tr>
<td colSpan={isVisor ? 9 : 10} className="py-4 text-sm text-muted-foreground text-center">
No hay CFDIs pendientes de conciliar
</td>
</tr>
) : (
pendientesOrdenados.map((cfdi) => (
<tr key={cfdi.id} className="border-b hover:bg-muted/50">
{!isVisor && (
<td className="py-2">
@@ -452,11 +454,11 @@ export default function ConciliacionPage() {
</Button>
</td>
</tr>
))}
))
)}
</tbody>
</table>
</div>
)}
</CardContent>
</Card>
@@ -508,9 +510,6 @@ export default function ConciliacionPage() {
<Card>
<CardContent className="pt-6">
<h3 className="font-medium mb-4">Conciliadas ({conciliadasOrdenadas.length})</h3>
{conciliadasOrdenadas.length === 0 ? (
<p className="text-sm text-muted-foreground">No hay CFDIs conciliados</p>
) : (
<div className="overflow-x-auto">
<table className="w-full text-sm">
<thead>
@@ -530,7 +529,14 @@ export default function ConciliacionPage() {
</tr>
</thead>
<tbody>
{conciliadasOrdenadas.map((cfdi) => (
{conciliadasOrdenadas.length === 0 ? (
<tr>
<td colSpan={8} className="py-4 text-sm text-muted-foreground text-center">
No hay CFDIs conciliados
</td>
</tr>
) : (
conciliadasOrdenadas.map((cfdi) => (
<tr key={cfdi.id} className="border-b hover:bg-muted/50">
<td className="py-2 font-mono text-xs text-center" title={cfdi.uuid}>
{cfdi.uuid?.substring(0, 8)}
@@ -579,11 +585,11 @@ export default function ConciliacionPage() {
)}
</td>
</tr>
))}
))
)}
</tbody>
</table>
</div>
)}
</CardContent>
</Card>
</>