Darstellung der Prospects fragmentiert
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<nav class="flex-column">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-logo"></div>
|
||||
<div class="row px-3">
|
||||
<div class="col">
|
||||
@@ -18,14 +18,29 @@
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="fas fa-tasks mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> Übersicht
|
||||
<span class="fas fa-user-plus mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> Neue Foodsaver
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3 mt-3">
|
||||
<NavLink class="nav-link" href="users" Match="NavLinkMatch.All">
|
||||
<span class="fas fa-users mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> Benutzer
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="todo" Match="NavLinkMatch.All">
|
||||
<span class="fas fa-user-clock mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> ToDo
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="done" Match="NavLinkMatch.All">
|
||||
<span class="fas fa-user-shield mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> Abgeschlossen
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
@if (CurrentUser.IsAdmin())
|
||||
{
|
||||
<div class="nav-item px-3 mt-3">
|
||||
<NavLink class="nav-link" href="users" Match="NavLinkMatch.All">
|
||||
<span class="fas fa-users mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> Benutzer
|
||||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="audit" Match="NavLinkMatch.All">
|
||||
<span class="fa-solid fa-clock-rotate-left mr-1" aria-hidden="true" style="font-size: 1.4em;"></span> Aktivitäten
|
||||
|
||||
43
FoodsharingSiegen.Server/Shared/NavMenu.razor.cs
Normal file
43
FoodsharingSiegen.Server/Shared/NavMenu.razor.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
using FoodsharingSiegen.Server.Auth;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Shared
|
||||
{
|
||||
/// <summary>
|
||||
/// The nav menu class (a. beging, 07.02.2023)
|
||||
/// </summary>
|
||||
public partial class NavMenu
|
||||
{
|
||||
#region Dependencies
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the auth service (ab)
|
||||
/// </summary>
|
||||
[Inject] protected AuthService AuthService { get; set; } = null!;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the current user (ab)
|
||||
/// </summary>
|
||||
private User CurrentUser => AuthService.User ?? new User();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnInitializedAsync
|
||||
|
||||
/// <summary>
|
||||
/// Ons the initialized (a. beging, 07.02.2023)
|
||||
/// </summary>
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await AuthService.Initialize();
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user