diff --git a/src/Koogle.Web/Components/Layout/NavMenu.razor b/src/Koogle.Web/Components/Layout/NavMenu.razor
index 1cce34c..c044e55 100644
--- a/src/Koogle.Web/Components/Layout/NavMenu.razor
+++ b/src/Koogle.Web/Components/Layout/NavMenu.razor
@@ -44,7 +44,7 @@
- Auslöser
+ Ausl�ser
Gifs
-
+
+
+ Vereins-Einstellungen
+
+
}
}
@@ -79,7 +85,7 @@
- Auslöser
+ Ausl�ser
}
diff --git a/src/Koogle.Web/Components/Pages/Settings.razor b/src/Koogle.Web/Components/Pages/Settings.razor
new file mode 100644
index 0000000..d085ea4
--- /dev/null
+++ b/src/Koogle.Web/Components/Pages/Settings.razor
@@ -0,0 +1,137 @@
+@page "/settings"
+@attribute [Authorize(Policy = "ClubAdmin")]
+
+@inherits Fluxor.Blazor.Web.Components.FluxorComponent
+
+@using Fluxor
+@using Koogle.Application.DTOs
+@using Koogle.Application.Interfaces
+@using Koogle.Domain.Enums
+@using Koogle.Web.Store.ClubState
+@using Koogle.Web.Components.Pages.Admin
+@using Microsoft.AspNetCore.Authorization
+
+@inject IClubService ClubService
+@inject ICurrentClubContext CurrentClubContext
+@inject IState ClubState
+@inject IDispatcher Dispatcher
+@inject ISnackbar Snackbar
+@inject IDialogService DialogService
+
+Vereins-Einstellungen
+
+Vereins-Einstellungen
+
+@if (ClubState.Value.Error is not null)
+{
+
+ @ClubState.Value.Error
+
+}
+
+@if (_isLoading)
+{
+
+}
+else if (_club is null)
+{
+ Kein Club ausgewählt
+}
+else
+{
+
+
+
+
+ Name
+ @_club.Name
+
+
+ Login-Name
+ @_club.LoginName
+
+
+ Kostenberechnung
+
+ @GetCalculationLabel(_club.ExpenseCalculation)
+
+
+
+
+
+
+ Bearbeiten
+
+
+
+}
+
+@code {
+ private ClubDto? _club;
+ private bool _isLoading = true;
+
+ protected override async Task OnInitializedAsync()
+ {
+ await base.OnInitializedAsync();
+ await LoadClubAsync();
+ }
+
+ private async Task LoadClubAsync()
+ {
+ _isLoading = true;
+ try
+ {
+ var clubId = CurrentClubContext.ClubId;
+ if (clubId != Guid.Empty)
+ {
+ _club = await ClubService.GetByIdAsync(clubId);
+ }
+ }
+ finally
+ {
+ _isLoading = false;
+ }
+ }
+
+ private void ClearError()
+ {
+ Dispatcher.Dispatch(new ClearClubErrorAction());
+ }
+
+ private static string GetCalculationLabel(ExpenseCalculation calculation) => calculation switch
+ {
+ ExpenseCalculation.None => "Keine",
+ ExpenseCalculation.Average => "Durchschnitt",
+ ExpenseCalculation.Maximum => "Maximum",
+ _ => calculation.ToString()
+ };
+
+ private static Color GetCalculationColor(ExpenseCalculation calculation) => calculation switch
+ {
+ ExpenseCalculation.None => Color.Default,
+ ExpenseCalculation.Average => Color.Info,
+ ExpenseCalculation.Maximum => Color.Warning,
+ _ => Color.Default
+ };
+
+ private async Task OpenEditDialog()
+ {
+ if (_club is null) return;
+
+ var parameters = new DialogParameters
+ {
+ { "Club", _club }
+ };
+
+ var dialog = await DialogService.ShowAsync("Vereins-Einstellungen bearbeiten", parameters);
+ var result = await dialog.Result;
+
+ if (result != null && !result.Canceled && result.Data is UpdateClubDto dto)
+ {
+ Dispatcher.Dispatch(new UpdateClubAction(dto));
+ Snackbar.Add("Einstellungen werden gespeichert...", Severity.Info);
+ await LoadClubAsync();
+ }
+ }
+}