feat(admin): reorganize housekeeping and strengthen shared workflows
This commit is contained in:
1 parent
35f66d879f
commit
a070004e7b
35 files changed
+1667
-462
No files matched your search
@@ -0,0 +1,6 @@
|
||||
/** A centered, bounded window including the current page, also at either end. */
|
||||
export function tablePageNumbers(page: number, last: number): number[] {
|
||||
const count = Math.min(5, Math.max(1, last));
|
||||
const start = Math.max(1, Math.min(page - 2, last - count + 1));
|
||||
return Array.from({ length: count }, (_, index) => start + index);
|
||||
}
|
||||
Reference in new issue
Block a user