Added NAvogation to Raid Overview and Strike Overview
This commit is contained in:
parent
6358a02aa4
commit
2216565d9e
2 changed files with 35 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
@page "/raidoverview"
|
@page "/raidoverview"
|
||||||
|
@page "/raidoverview/{_eventType}"
|
||||||
@using Lieb.Data
|
@using Lieb.Data
|
||||||
@using System.Security.Claims
|
@using System.Security.Claims
|
||||||
@using Lieb.Models
|
@using Lieb.Models
|
||||||
|
@ -37,14 +38,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
Event Type:
|
@if(string.IsNullOrEmpty(_eventType))
|
||||||
<select @onchange="args => EventTypeFilterChanged(args)" >
|
{
|
||||||
<option value="">All</option>
|
<label>Event Type:</label>
|
||||||
@foreach(EventType eventType in (EventType[]) Enum.GetValues(typeof(EventType)))
|
<select @onchange="args => EventTypeFilterChanged(args)" >
|
||||||
{
|
<option value="">All</option>
|
||||||
<option value="@eventType">@eventType.ToString()</option>
|
@foreach(EventType eventType in (EventType[]) Enum.GetValues(typeof(EventType)))
|
||||||
}
|
{
|
||||||
</select>
|
<option value="@eventType">@eventType.ToString()</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
@ -58,6 +62,9 @@
|
||||||
|
|
||||||
@code
|
@code
|
||||||
{
|
{
|
||||||
|
[Parameter]
|
||||||
|
public string _eventType { get; set; } = string.Empty;
|
||||||
|
|
||||||
private List<Raid> _raids;
|
private List<Raid> _raids;
|
||||||
private LiebUser? _user;
|
private LiebUser? _user;
|
||||||
private DateTime _startDate = DateTime.Now.Date;
|
private DateTime _startDate = DateTime.Now.Date;
|
||||||
|
@ -76,10 +83,17 @@
|
||||||
_user = UserService.GetLiebUser(discordId);
|
_user = UserService.GetLiebUser(discordId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_filterEventType = _eventType;
|
||||||
_raids = RaidService.GetRaids();
|
_raids = RaidService.GetRaids();
|
||||||
ApplyFilter();
|
ApplyFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
_filterEventType = _eventType;
|
||||||
|
ApplyFilter();
|
||||||
|
}
|
||||||
|
|
||||||
private void StartFilterChanged(ChangeEventArgs e)
|
private void StartFilterChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
if(!DateTime.TryParse(e.Value.ToString(), out _startDate))
|
if(!DateTime.TryParse(e.Value.ToString(), out _startDate))
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
@using Lieb.Data
|
@using Lieb.Data
|
||||||
|
@inject NavigationManager NavigationManager;
|
||||||
|
|
||||||
<div class="top-row ps-3 navbar navbar-dark">
|
<div class="top-row ps-3 navbar navbar-dark">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="">Lieb</a>
|
<a class="navbar-brand" href="">Lieb</a>
|
||||||
|
@ -16,10 +18,20 @@
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-item px-3">
|
<div class="nav-item px-3">
|
||||||
<NavLink class="nav-link" href="raidoverview">
|
<NavLink class="nav-link" href="raidoverview/Raid" Match="NavLinkMatch.All">
|
||||||
<span class="oi oi-plus" aria-hidden="true"></span> Raid Overview
|
<span class="oi oi-plus" aria-hidden="true"></span> Raid Overview
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="nav-item px-3">
|
||||||
|
<NavLink class="nav-link" href="raidoverview/Strike" Match="NavLinkMatch.All">
|
||||||
|
<span class="oi oi-plus" aria-hidden="true"></span> Strike Overview
|
||||||
|
</NavLink>
|
||||||
|
</div>
|
||||||
|
<div class="nav-item px-3">
|
||||||
|
<NavLink class="nav-link" href="raidoverview" Match="NavLinkMatch.All">
|
||||||
|
<span class="oi oi-plus" aria-hidden="true"></span> All Events
|
||||||
|
</NavLink>
|
||||||
|
</div>
|
||||||
<AuthorizeView Policy="@Constants.Roles.RaidLead.Name">
|
<AuthorizeView Policy="@Constants.Roles.RaidLead.Name">
|
||||||
<Authorized>
|
<Authorized>
|
||||||
<div class="nav-item px-3">
|
<div class="nav-item px-3">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue