frontend: sort by title

This commit is contained in:
Paul Mathieu 2023-08-03 20:18:43 +02:00
parent b838c79cdb
commit 5efcee12a9

View File

@ -82,7 +82,7 @@ $(document).ready(async () => {
url: backend_api + 'list', url: backend_api + 'list',
timeout: 1000, timeout: 1000,
}); });
loadAll(resp.tikettes); loadAll(resp.tikettes.sort((a, b) => (a.title < b.title) ? -1 : 1));
} catch(e) { } catch(e) {
const appbody = $("#appbody"); const appbody = $("#appbody");
appbody.append(`<li>Could not reach backend server`); appbody.append(`<li>Could not reach backend server`);