Implemented sort and updated sync button layout

This commit is contained in:
Glenn de Haan
2024-10-09 09:58:13 +02:00
parent 89aeab936b
commit 1fc446c72d
2 changed files with 18 additions and 3 deletions

View File

@@ -401,6 +401,21 @@ if(variables.serviceWeb) {
}
return true;
}).sort((a, b) => {
if(req.query.sort === 'code') {
if (a.code > b.code) return -1;
if (a.code < b.code) return 1;
}
if(req.query.sort === 'duration') {
if (a.duration > b.duration) return -1;
if (a.duration < b.duration) return 1;
}
if(req.query.sort === 'status') {
if (a.used > b.used) return -1;
if (a.used < b.used) return 1;
}
}),
updated: cache.updated,
filters: {