feat: filtro de grupo en cobros con cuotas pendientes por grupo

- El listado de grupos devuelve `unpaidPaymentsCount` (PENDING y OVERDUE).
- Cobros: nuevo selector de grupo (GroupFilter) junto a los filtros de estado;
  con un grupo filtrado no se repite su nombre en cada card.
- Sheet: entra deslizando desde abajo en mobile (salvo reduced motion).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-11-02 14:59:33 -03:00
parent b6f22ae67d
commit d397e9663c
12 changed files with 326 additions and 34 deletions

View File

@@ -61,7 +61,7 @@ describe('groups routes', () => {
it('lists groups scoped to the current user', async () => {
prisma.group.findMany.mockResolvedValue([
{ ...group, _count: { attendees: 4, waitlist: 1 } },
{ ...group, _count: { attendees: 4, waitlist: 1, payments: 3 } },
]);
prisma.group.count.mockResolvedValue(1);
@@ -76,6 +76,7 @@ describe('groups routes', () => {
updatedAt: group.updatedAt.toISOString(),
attendeesCount: 4,
waitlistCount: 1,
unpaidPaymentsCount: 3,
},
],
pagination: { page: 1, pageSize: 10, total: 1, totalPages: 1 },
@@ -89,7 +90,11 @@ describe('groups routes', () => {
where,
include: {
_count: {
select: { attendees: true, waitlist: { where: { status: 'PENDING' } } },
select: {
attendees: true,
waitlist: { where: { status: 'PENDING' } },
payments: { where: { status: { in: ['PENDING', 'OVERDUE'] } } },
},
},
},
});