From dab2ee0c3964d84d60d638e4d5d87daf2407a15c Mon Sep 17 00:00:00 2001 From: Ana Rute Mendes Date: Mon, 4 Sep 2023 19:03:27 +0200 Subject: [PATCH] Order users list alphabetically on team calendar --- web/js/holidayManagement.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/js/holidayManagement.js b/web/js/holidayManagement.js index 8e21733ca..577fd2bc8 100644 --- a/web/js/holidayManagement.js +++ b/web/js/holidayManagement.js @@ -222,6 +222,15 @@ var app = new Vue({ name: users[i].children[1].innerHTML, }); } + parsedUsers.sort((a, b) => { + if (a.name < b.name) { + return -1; + } + if (a.name > b.name) { + return 1; + } + return 0; + }); this.usersList = parsedUsers; this.users = parsedUsers; },