feat(admin): P1 — clearer tickets labels, pagination, min_staff_rank, analytics errors
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m37s

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-22 19:04:45 +02:00
1 parent 75cdfdebe4
commit f150aea8b9
13 files changed
+311 -101

No files matched your search

@@ -0,0 +1,49 @@
import Link from "next/link";
/** Minimal prev/next pager for admin list pages without DataTable. */
export function AdminSimplePager({
page,
lastPage,
total,
basePath,
label,
}: {
page: number;
lastPage: number;
total: number;
basePath: string;
label?: string;
}) {
if (lastPage <= 1) return null;
const href = (p: number) => {
const u = new URLSearchParams();
u.set("page", String(p));
return `${basePath}?${u.toString()}`;
};
return (
<div className="mt-3 flex flex-wrap items-center justify-between gap-2 text-sm text-[var(--admin-text-muted)]">
<span>
{label ? `${label} · ` : null}
{total} total · page {page}/{lastPage}
</span>
<div className="flex items-center gap-2">
{page > 1 ? (
<Link className="btn btn-ghost btn-sm" href={href(page - 1)}>
Previous
</Link>
) : (
<span className="opacity-40">Previous</span>
)}
{page < lastPage ? (
<Link className="btn btn-ghost btn-sm" href={href(page + 1)}>
Next
</Link>
) : (
<span className="opacity-40">Next</span>
)}
</div>
</div>
);
}