Skip to content

Commit

Permalink
Order users list alphabetically on team calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
anarute committed Sep 12, 2023
1 parent 3e623a1 commit dab2ee0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/js/holidayManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit dab2ee0

Please sign in to comment.