Renamed PlannedRaidRole to RaidRole

This commit is contained in:
t.ruspekhofer 2022-04-06 23:20:29 +02:00
parent 7533d5a704
commit dcdc891925
17 changed files with 65 additions and 46 deletions

View file

@ -8,7 +8,7 @@
@inject IJSRuntime JsRuntime
<h3>BuildEdit</h3>
<h3>Build Edit</h3>
<AuthorizeView Policy="@Constants.Roles.Admin.Name" Context="authorizationContext">
<EditForm Model="@_build" OnValidSubmit="@HandleValidSubmit">

View file

@ -4,7 +4,7 @@
@inject GuildWars2BuildService GuildWars2BuildService
<h3>BuildOverview</h3>
<h3>Build Overview</h3>
<AuthorizeView Policy="@Constants.Roles.Admin.Name">

View file

@ -8,7 +8,7 @@
@inject AuthenticationStateProvider AuthenticationStateProvider
<h3>RaidLogs</h3>
<h3>Raid Logs</h3>
<select value=@_selectedLogFolder @onchange="args => ChangeShownLogs(args)">
@if (_logGroups.Contains(TRAINING))

View file

@ -13,7 +13,7 @@
@inject IJSRuntime JsRuntime
<h3>CreateRaid</h3>
<h3>Create Raid</h3>
<AuthorizeView Policy="@Constants.Roles.RaidLead.Name" Context="authorizationContext">
<EditForm Model="@_raid" OnValidSubmit="@HandleValidSubmit">
@ -128,7 +128,7 @@
</tr>
@foreach( RaidRole role in _raid.Roles)
{
bool disableEdit = _raid.SignUps.Where(s => s.PlannedRaidRoleId == role.RaidRoleId).Any();
bool disableEdit = _raid.SignUps.Where(s => s.RaidRoleId == role.RaidRoleId).Any();
<tr>
<td><InputNumber @bind-Value="role.Spots" disabled="@disableEdit" /></td>
<td><InputText @bind-Value="role.Name" disabled="@disableEdit" /></td>

View file

@ -8,7 +8,7 @@
@inject AuthenticationStateProvider AuthenticationStateProvider
<h3>RaidOverview</h3>
<h3>Raid Overview</h3>
<AuthorizeView Policy="@Constants.Roles.RaidLead.Name">
@ -21,11 +21,11 @@
<br />
<label>
Filter From:
From:
<input type="date" value="@_startDate.ToString("yyyy-MM-dd")" @onchange="args => StartFilterChanged(args)" />
To:
<input type="date" value="@_endDate.ToString("yyyy-MM-dd")" @onchange="args => EndFilterChanged(args)" />
RaidGroup:
Raid Group:
<select @onchange="args => GroupFilterChanged(args)" >
<option value="">All</option>
<option value="No Group">No Group</option>
@ -73,13 +73,23 @@
private void StartFilterChanged(ChangeEventArgs e)
{
_startDate = DateTime.Parse(e.Value.ToString());
if(!DateTime.TryParse(e.Value.ToString(), out _startDate))
{
_startDate = DateTime.UnixEpoch;
}
ApplyFilter();
}
private void EndFilterChanged(ChangeEventArgs e)
{
_endDate = DateTime.Parse(e.Value.ToString()).AddDays(1).AddSeconds(-1);
if(DateTime.TryParse(e.Value.ToString(), out _endDate))
{
_endDate.AddDays(1).AddSeconds(-1);
}
else
{
_endDate = DateTime.MaxValue.Date;
}
ApplyFilter();
}

View file

@ -0,0 +1,7 @@
body {
}
input {
margin-right: 20px;
width: fit-content;
}

View file

@ -46,7 +46,7 @@
{
<span class="oi oi-chevron-bottom" style="margin-right:7px"> </span>
}
<b>@role.Role.Name</b> (@_raid.SignUps.Where(s => s.PlannedRaidRoleId == role.Role.RaidRoleId && s.SignUpType == SignUpType.SignedUp).Count() / @role.Role.Spots)
<b>@role.Role.Name</b> (@_raid.SignUps.Where(s => s.RaidRoleId == role.Role.RaidRoleId && s.SignUpType == SignUpType.SignedUp).Count() / @role.Role.Spots)
@if (@role.IsRowExpanded)
{
<br> @role.Role.Description

View file

@ -6,7 +6,7 @@
<table>
@{RaidSignUp[] signUps = _raid.SignUps.Where(s => s.PlannedRaidRoleId == _currentRoleId).ToArray();}
@{RaidSignUp[] signUps = _raid.SignUps.Where(s => s.RaidRoleId == _currentRoleId).ToArray();}
@foreach (var signUp in signUps.OrderBy(s => s.SignUpType))
{
@if(_signUpTypes.Contains(signUp.SignUpType))

View file

@ -8,7 +8,7 @@
@inject NavigationManager NavigationManager
@inject AuthenticationStateProvider AuthenticationStateProvider
<h3>ManageAccount</h3>
<h3>Manage Account</h3>
<AuthorizeView Context="authorizationContext">
<Authorized>

View file

@ -12,7 +12,7 @@
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject IJSRuntime JsRuntime
<h3>ManageGuildWars2Account</h3>
<h3>Manage Guild Wars 2 Account</h3>
<AuthorizeView Context="authorizationContext">
<Authorized>

View file

@ -10,7 +10,7 @@
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject IJSRuntime JsRuntime
<h3>UserEdit</h3>
<h3>User Edit</h3>
<EditForm Model="@_user" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />

View file

@ -5,7 +5,7 @@
@inject UserService UserService
<h3>UserOverview</h3>
<h3>User Overview</h3>
<AuthorizeView Policy="@Constants.Roles.Admin.Name">