Pagination and search on long lists (1.50.1)

Audit log: search (person, target, IP), role filter, every action in the
filter, inclusive To date. Data requests: search and paging (was cut at
200). Webhook deliveries: status filter and Load older. Supervisor Payments
loads only what it needs (unpaid registrations, recent/today/donation
payments, a person's own for refunds) instead of everything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
2026-10-29 06:53:54 +02:00
co-authored by Claude Opus 5.5
parent 0ffbb13a1f
commit 4c066e67d9
26 changed files with 460 additions and 147 deletions
+28
View File
@@ -0,0 +1,28 @@
"use client";
/**
* "21–40 of 312 · ← Prev · Next →" under a server-paged list. Hidden when everything fits on
* one page.
*/
export function Pager({ page, pageSize, total, onPage, busy }: {
page: number;
pageSize: number;
total: number;
onPage: (page: number) => void;
busy?: boolean;
}) {
const pages = Math.max(1, Math.ceil(total / pageSize));
if (pages <= 1) return null;
const btn = "px-2 py-1 rounded bg-gray-100 hover:bg-gray-200 disabled:opacity-40";
return (
<nav aria-label="Pages" className="flex items-center justify-between mt-4 text-sm">
<span className="text-gray-500">
{(page - 1) * pageSize + 1}–{Math.min(page * pageSize, total)} of {total} · page {page} of {pages}
</span>
<div className="flex gap-1">
<button className={btn} disabled={page <= 1 || busy} onClick={() => onPage(page - 1)}>← Prev</button>
<button className={btn} disabled={page >= pages || busy} onClick={() => onPage(page + 1)}>Next →</button>
</div>
</nav>
);
}