Füge Skript hinzu, um das Sichtbarkeitsflag für Geburtstage aller Mitglieder auf true zu setzen
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 52s

This commit is contained in:
Torsten Schulz (local)
2026-02-14 02:48:30 +01:00
parent e665495003
commit 64baaf8535
2 changed files with 69 additions and 10 deletions

View File

@@ -115,7 +115,12 @@
>
<td class="px-4 py-3 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">
{{ member.name }}
<template v-if="member.lastName || member.firstName">
{{ member.firstName }} {{ member.lastName }}
</template>
<template v-else>
{{ member.name }}
</template>
</div>
<div v-if="member.showBirthday && member.birthday" class="text-xs text-gray-500">
🎂 {{ formatBirthday(member.birthday) }}
@@ -254,7 +259,12 @@
<div class="flex-1">
<div class="flex items-center mb-2">
<h3 class="text-xl font-semibold text-gray-900">
{{ member.name }}
<template v-if="member.lastName || member.firstName">
{{ member.firstName }} {{ member.lastName }}
</template>
<template v-else>
{{ member.name }}
</template>
<span v-if="member.showBirthday && member.birthday" class="text-xs text-gray-500 ml-2">
🎂 {{ formatBirthday(member.birthday) }}
</span>
@@ -765,18 +775,23 @@ const sortedMembers = computed(() => {
const arr = [...members.value]
if (sortMode.value === 'name') {
arr.sort((a, b) => {
const an = (a.name || '').toLocaleLowerCase()
const bn = (b.name || '').toLocaleLowerCase()
return an.localeCompare(bn)
// Sortiere nach Vorname Nachname (firstName lastName), fallback auf name
const af = (a.firstName || (a.name ? a.name.split(' ')[0] : '') || '').toLocaleLowerCase()
const bf = (b.firstName || (b.name ? b.name.split(' ')[0] : '') || '').toLocaleLowerCase()
const al = (a.lastName || (a.name ? a.name.split(' ').slice(-1)[0] : '') || '').toLocaleLowerCase()
const bl = (b.lastName || (b.name ? b.name.split(' ').slice(-1)[0] : '') || '').toLocaleLowerCase()
if (af === bf) return al.localeCompare(bl)
return af.localeCompare(bf)
})
} else if (sortMode.value === 'lastname') {
arr.sort((a, b) => {
// Fallback: lastName, dann firstName
const al = (a.lastName || a.name?.split(' ').slice(-1)[0] || '').toLocaleLowerCase()
const bl = (b.lastName || b.name?.split(' ').slice(-1)[0] || '').toLocaleLowerCase()
// Sortiere nach Nachname, fallback auf letzten Teil von name
const al = (a.lastName || (a.name ? a.name.split(' ').slice(-1)[0] : '') || '').toLocaleLowerCase()
const bl = (b.lastName || (b.name ? b.name.split(' ').slice(-1)[0] : '') || '').toLocaleLowerCase()
if (al === bl) {
const af = (a.firstName || a.name?.split(' ')[0] || '').toLocaleLowerCase()
const bf = (b.firstName || b.name?.split(' ')[0] || '').toLocaleLowerCase()
// Bei gleichem Nachnamen nach Vorname sortieren
const af = (a.firstName || (a.name ? a.name.split(' ')[0] : '') || '').toLocaleLowerCase()
const bf = (b.firstName || (b.name ? b.name.split(' ')[0] : '') || '').toLocaleLowerCase()
return af.localeCompare(bf)
}
return al.localeCompare(bl)