diff --git a/apps/web/components/documentos/papeleria-tab.tsx b/apps/web/components/documentos/papeleria-tab.tsx index d1990df..618920b 100644 --- a/apps/web/components/documentos/papeleria-tab.tsx +++ b/apps/web/components/documentos/papeleria-tab.tsx @@ -229,6 +229,13 @@ export function PapeleriaTab() { onSuccess: invalidate, }); + const items = query.data ?? []; + const años = useMemo(() => { + const set = new Set([currentYear]); + items.forEach(i => set.add(i.anio)); + return [...set].sort((a, b) => b - a); + }, [items, currentYear]); + if (!selectedContribuyenteId) { return ( @@ -239,13 +246,6 @@ export function PapeleriaTab() { ); } - const items = query.data ?? []; - const años = useMemo(() => { - const set = new Set([currentYear]); - items.forEach(i => set.add(i.anio)); - return [...set].sort((a, b) => b - a); - }, [items, currentYear]); - return (
{/* Filtros + upload */}