update to v2.1.0 #5

Merged
crimsen merged 6 commits from develop into main 2024-10-08 13:23:44 +00:00
1 changed files with 12 additions and 1 deletions
Showing only changes of commit 5bd837c11f - Show all commits

View File

@ -31,7 +31,18 @@ export const useUserStore = defineStore({
getters: {
users(state) {
return state._users.filter((u) => !u.deleted);
const u = state._users.filter((u) => !u.deleted);
u.sort((a, b) => {
const a_lastname = a.lastname.toLowerCase();
const b_lastname = b.lastname.toLowerCase();
const a_firstname = a.firstname.toLowerCase();
const b_firstname = b.firstname.toLowerCase();
if (a_lastname === b_lastname) {
return a_firstname < b_firstname ? -1 : 1;
}
return a_lastname < b_lastname ? -1 : 1;
});
return u;
},
},