From d6e51cd8d2757000bb113d01a38ce919f80818da Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 28 May 2026 18:03:11 +0200 Subject: [PATCH] feat: Sort members by first name and then last name in member lists --- frontend/src/components/TrainingGroupsTab.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/TrainingGroupsTab.vue b/frontend/src/components/TrainingGroupsTab.vue index 016f788f..efcc547f 100644 --- a/frontend/src/components/TrainingGroupsTab.vue +++ b/frontend/src/components/TrainingGroupsTab.vue @@ -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) {