feat(housekeeping): cut over administration to ase

This commit is contained in:
Simo committed 2026-08-30 20:35:22 +02:00
1 parent c9e35cf602
commit 2b8f73a91d
457 files changed
+589 -55936

No files matched your search

@@ -1,52 +0,0 @@
import Link from "@/components/link";
/** Minimal prev/next pager for admin list pages without DataTable. */
export function AdminSimplePager({
page,
lastPage,
total,
basePath,
params,
label,
}: {
page: number;
lastPage: number;
total: number;
basePath: string;
/** Extra query params preserved across pages (e.g. filter=sold). */
params?: Record<string, string>;
label?: string;
}) {
if (lastPage <= 1) return null;
const href = (p: number) => {
const u = new URLSearchParams(params);
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>
);
}