diff --git a/src/Koogle.Web/Components/Layout/NavMenu.razor b/src/Koogle.Web/Components/Layout/NavMenu.razor index 337dc62..4f43215 100644 --- a/src/Koogle.Web/Components/Layout/NavMenu.razor +++ b/src/Koogle.Web/Components/Layout/NavMenu.razor @@ -1,23 +1,54 @@ -@inherits FluxorComponent +@using Koogle.Web.Store.ClubState +@inherits FluxorComponent @inject IState AuthState +@inject IState ClubState @inject NavigationManager NavigationManager + @* Dashboard - visible to all authenticated users *@ + + Dashboard + + + @if (AuthState.Value.IsAuthenticated && HasSelectedClub) + { + @* Club-specific navigation - requires selected club *@ + + Spieltage + + + + Personen + + + @if (AuthState.Value.IsClubEditor || AuthState.Value.IsSuperAdmin) + { + + + Kostenvorlagen + + + } + } + @if (AuthState.Value.IsClubEditor || AuthState.Value.IsSuperAdmin) { - @* // Tage und Auswertungen des ausgewählten Vereins *@ - - - - @* // Stammdaten des ausgewählten Vereins *@ - - @* // mandantenübergreifende Verwaltung *@ @if (AuthState.Value.IsSuperAdmin) { } - } + + + + @* Profile - visible to all authenticated users *@ + @if (AuthState.Value.IsAuthenticated) + { + + Profil + + } @code { - + private bool HasSelectedClub => ClubState.Value.SelectedClub != null || + AuthState.Value.CurrentUser?.ClubMemberships?.Any(c => c.IsDefault) == true; }