admin page updates

This commit is contained in:
2026-02-14 14:54:06 +11:00
parent 295e373f37
commit e34bec2f9d
22 changed files with 2136 additions and 318 deletions

View File

@@ -25,6 +25,19 @@ function paginateData(
this.submit();
},
sortByColumn(field) {
if (this.orderBy === field) {
// Toggle order if same column
this.order = this.order === "ASC" ? "DESC" : "ASC";
} else {
// New column, default to DESC
this.orderBy = field;
this.order = "DESC";
}
this.page = 1; // Reset to first page when sorting
this.submit();
},
setPerPage(n) {
this.perPage = n;
this.page = 1; // Reset to first page when changing per page