Füge Sichtbarkeitspräferenzen für Mitgliederprofile hinzu: Ermögliche Benutzern, ihre E-Mail, Telefonnummer und Adresse für andere eingeloggte Mitglieder sichtbar zu machen. Aktualisiere die API, um diese Einstellungen zu respektieren und bei der Profildatenrückgabe zu berücksichtigen.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 47s

This commit is contained in:
Torsten Schulz (local)
2026-02-11 13:04:45 +01:00
parent 8a1e309eba
commit 677140bd33
4 changed files with 81 additions and 29 deletions

View File

@@ -77,6 +77,25 @@
>
</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>
<div class="flex flex-col gap-2 text-sm text-gray-700">
<label class="inline-flex items-center">
<input type="checkbox" class="mr-2" v-model="visibility.showEmail" :disabled="isSaving" />
E-Mail für alle eingeloggten Mitglieder sichtbar
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="mr-2" v-model="visibility.showPhone" :disabled="isSaving" />
Telefonnummer für alle eingeloggten Mitglieder sichtbar
</label>
<label class="inline-flex items-center">
<input type="checkbox" class="mr-2" v-model="visibility.showAddress" :disabled="isSaving" />
Adresse für alle eingeloggten Mitglieder sichtbar
</label>
</div>
</div>
<!-- Passwort ändern -->
<div class="border-t border-gray-200 pt-6 mt-6">
<h3 class="text-lg font-semibold text-gray-900 mb-4">
@@ -279,6 +298,13 @@ const formData = ref({
phone: ''
})
// Visibility preferences for other logged-in members
const visibility = ref({
showEmail: true,
showPhone: true,
showAddress: false
})
const passwordData = ref({
current: '',
new: '',
@@ -297,6 +323,7 @@ const loadProfile = async () => {
email: response.user.email,
phone: response.user.phone || ''
}
visibility.value = response.user.visibility || visibility.value
} catch {
errorMessage.value = 'Fehler beim Laden des Profils.'
} finally {
@@ -398,6 +425,7 @@ const handleSave = async () => {
name: formData.value.name,
email: formData.value.email,
phone: formData.value.phone,
visibility: visibility.value,
currentPassword: passwordData.value.current || undefined,
newPassword: passwordData.value.new || undefined
}