feat(usability): preserve reporting year and locate outside-period bookings (U04)

This commit is contained in:
2026-11-02 06:28:36 +01:00
parent 122d4de809
commit 9c41856b5b
16 changed files with 169 additions and 26 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ public partial class Dashboard
private bool showEditClubName;
private bool showRestoreConfirm;
private bool showYearFilterDialog;
private int? selectedYear = DateTime.Now.Year;
private int? selectedYear { get => Period.Year; set => Period.Year = value; }
private List<int> availableYears = [];
private string clubName = string.Empty;
private string? savedPdfPath;
@@ -67,7 +67,7 @@ public partial class Dashboard
private async Task LoadAll()
{
await LoadAccounts();
availableYears = await EntryService.GetAllEntryYearsAsync();
availableYears = Period.Choices(await EntryService.GetAllEntryYearsAsync());
}
private async Task LoadAccounts()
@@ -207,7 +207,7 @@ public partial class Dashboard
return amount.ToString("N2", CultureInfo.GetCultureInfo("de-DE")) + " €";
}
private string GetFilterLabel() => selectedYear?.ToString() ?? "Alle";
private string GetFilterLabel() => Period.Label;
private string ThemeButtonLabel => currentTheme == "dark" ? "Hell" : "Dunkel";