feat(customers): sortable table columns + default ascending ID order

- Customer list now defaults to ascending ID order instead of newest-first,
  so the table starts at customer #1 instead of the highest ID
- Add sort_by/sort_order query params to GET /customers (whitelisted column
  map to prevent SQL injection via arbitrary column names)
- Make ID/Name/Subdomain/Status/Devices/Created column headers clickable,
  toggling asc/desc with a visual arrow indicator

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-07-23 15:16:31 +02:00
co-authored by Claude Sonnet 5
parent a5988af6a3
commit 0e2b292408
5 changed files with 74 additions and 10 deletions
+20
View File
@@ -1,5 +1,25 @@
/* NetBird MSP Appliance - Custom Styles */
/* Sortable table headers */
.sortable-th {
cursor: pointer;
user-select: none;
white-space: nowrap;
}
.sortable-th:hover {
color: var(--bs-primary);
}
.sortable-th .sort-icon {
opacity: 0.35;
}
.sortable-th.sort-asc .sort-icon,
.sortable-th.sort-desc .sort-icon {
opacity: 1;
}
/* i18n FOUC prevention */
body.i18n-loading #login-page,
body.i18n-loading #app-page {