fix: Briefe Kontaktauswahl
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
2026-09-16 01:49:46 +02:00
parent 03a5e0dd9c
commit ef3e9dbbb6
9 changed files with 163 additions and 18 deletions
@@ -44,6 +44,8 @@ public partial class CreateLetterDialogViewModel : ObservableObject
public bool HasCustomPlaceholders => CustomPlaceholders.Count > 0;
public bool HasNoTemplates => Templates.Count == 0;
public bool HasNoContacts => Contacts.Count == 0;
public string AddressPreview => LetterPlaceholderBuilder.FormatAddress(SelectedContact?.Model);
public bool HasAddressPreview => !string.IsNullOrWhiteSpace(AddressPreview);
public bool UsesAttendanceAdvancedContent => UsesAttendanceCalendar || UsesAbsenceDayList;
public string SuggestedFileName => SanitizeFileName(
$"{SelectedTemplate?.Name ?? "Elternbrief"}_{_student.LastName}_{_student.FirstName}.pdf");
@@ -82,6 +84,8 @@ public partial class CreateLetterDialogViewModel : ObservableObject
partial void OnSelectedContactChanged(LetterContactChoice? value)
{
Anrede = value?.Model.LetterSalutation ?? "";
OnPropertyChanged(nameof(AddressPreview));
OnPropertyChanged(nameof(HasAddressPreview));
RefreshValidation();
}
partial void OnAnredeChanged(string value) => RefreshValidation();