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/{_eventType}"
|
||||
@using Lieb.Data
|
||||
@using System.Security.Claims
|
||||
@using Lieb.Models
|
||||
|
@ -37,14 +38,17 @@
|
|||
}
|
||||
}
|
||||
</select>
|
||||
Event Type:
|
||||
<select @onchange="args => EventTypeFilterChanged(args)" >
|
||||
<option value="">All</option>
|
||||
@foreach(EventType eventType in (EventType[]) Enum.GetValues(typeof(EventType)))
|
||||
{
|
||||
<option value="@eventType">@eventType.ToString()</option>
|
||||
}
|
||||
</select>
|
||||
@if(string.IsNullOrEmpty(_eventType))
|
||||
{
|
||||
<label>Event Type:</label>
|
||||
<select @onchange="args => EventTypeFilterChanged(args)" >
|
||||
<option value="">All</option>
|
||||
@foreach(EventType eventType in (EventType[]) Enum.GetValues(typeof(EventType)))
|
||||
{
|
||||
<option value="@eventType">@eventType.ToString()</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
@ -58,6 +62,9 @@
|
|||
|
||||
@code
|
||||
{
|
||||
[Parameter]
|
||||
public string _eventType { get; set; } = string.Empty;
|
||||
|
||||
private List<Raid> _raids;
|
||||
private LiebUser? _user;
|
||||
private DateTime _startDate = DateTime.Now.Date;
|
||||
|
@ -76,10 +83,17 @@
|
|||
_user = UserService.GetLiebUser(discordId);
|
||||
}
|
||||
|
||||
_filterEventType = _eventType;
|
||||
_raids = RaidService.GetRaids();
|
||||
ApplyFilter();
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
_filterEventType = _eventType;
|
||||
ApplyFilter();
|
||||
}
|
||||
|
||||
private void StartFilterChanged(ChangeEventArgs e)
|
||||
{
|
||||
if(!DateTime.TryParse(e.Value.ToString(), out _startDate))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue