feat: Sort members by first name and then last name in member lists
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s

This commit is contained in:
Torsten Schulz (local)
2026-05-28 18:03:11 +02:00
parent 7ba25b2572
commit d6e51cd8d2

View File

@@ -227,14 +227,14 @@ export default {
const filteredMembers = members.filter(m => m != null);
// Sortiere alphabetisch nach Nachname, dann Vorname
this.members = filteredMembers.sort((a, b) => {
const lastNameA = (a.lastName || '').toLowerCase();
const lastNameB = (b.lastName || '').toLowerCase();
if (lastNameA !== lastNameB) {
return lastNameA.localeCompare(lastNameB);
}
const firstNameA = (a.firstName || '').toLowerCase();
const firstNameB = (b.firstName || '').toLowerCase();
return firstNameA.localeCompare(firstNameB);
if (firstNameA !== firstNameB) {
return firstNameA.localeCompare(firstNameB);
}
const lastNameA = (a.lastName || '').toLowerCase();
const lastNameB = (b.lastName || '').toLowerCase();
return lastNameA.localeCompare(lastNameB);
});
console.log('[loadMembers] Loaded', this.members.length, 'active members');
} catch (error) {