Implement birthdate input in member profile management. Update API to handle birthdate data for user profiles and enhance visibility settings for birthday display in member lists.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 1m4s

This commit is contained in:
Torsten Schulz (local)
2026-04-01 11:19:23 +02:00
parent 0fb58af194
commit daabeec33c
5 changed files with 39 additions and 6 deletions

View File

@@ -223,7 +223,7 @@
<div class="mt-3 bg-blue-50 rounded-lg p-3">
<p class="text-xs text-blue-800">
<strong>Hinweis:</strong> Ohne <code>id</code> wird ein neues Mitglied erstellt. Mit <code>id</code> wird ein bestehendes Mitglied aktualisiert. <code>geburtsdatum</code> ist Pflichtfeld zur Duplikatsprüfung (Format: YYYY-MM-DD).
<strong>Hinweis:</strong> Ohne <code>id</code> wird ein neues Mitglied erstellt. Mit <code>id</code> wird ein bestehendes Mitglied aktualisiert. Bei neuen Mitgliedern ist <code>geburtsdatum</code> zur Duplikatsprüfung Pflicht (Format: YYYY-MM-DD). Altdaten ohne Geburtsdatum koennen weiter bearbeitet werden.
</p>
</div>
</div>

View File

@@ -77,6 +77,25 @@
>
</div>
<div>
<label
for="geburtsdatum"
class="block text-sm font-medium text-gray-700 mb-2"
>
Geburtsdatum
</label>
<input
id="geburtsdatum"
v-model="formData.geburtsdatum"
type="date"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"
:disabled="isSaving"
>
<p class="mt-1 text-xs text-gray-500">
Sichtbar ist in der Mitgliederliste nur der Geburtstag, wenn Sie ihn unten freigeben.
</p>
</div>
<!-- Sichtbarkeits-Einstellungen -->
<div class="mt-4 border-t border-gray-100 pt-4">
<h3 class="text-sm font-medium text-gray-900 mb-2">Sichtbarkeit für andere Mitglieder</h3>
@@ -299,7 +318,8 @@ if (process.client) {
const formData = ref({
name: '',
email: '',
phone: ''
phone: '',
geburtsdatum: ''
})
// Visibility preferences for other logged-in members
@@ -326,7 +346,8 @@ const loadProfile = async () => {
formData.value = {
name: response.user.name,
email: response.user.email,
phone: response.user.phone || ''
phone: response.user.phone || '',
geburtsdatum: response.user.geburtsdatum || ''
}
visibility.value = response.user.visibility || visibility.value
} catch {
@@ -430,7 +451,8 @@ const handleSave = async () => {
name: formData.value.name,
email: formData.value.email,
phone: formData.value.phone,
visibility: visibility.value,
geburtsdatum: formData.value.geburtsdatum,
visibility: visibility.value,
currentPassword: passwordData.value.current || undefined,
newPassword: passwordData.value.new || undefined
}