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