58 lines
1.9 KiB
Text
58 lines
1.9 KiB
Text
@using Lieb.Data
|
|
@using Lieb.Models
|
|
@using Lieb.Models.GuildWars2
|
|
@using Lieb.Models.GuildWars2.Raid
|
|
@inject RaidService RaidService
|
|
|
|
|
|
<table>
|
|
@{RaidSignUp[] signUps = _raid.SignUps.Where(s => s.PlannedRaidRoleId == _currentRoleId).ToArray();}
|
|
@foreach (var signUp in signUps)
|
|
{
|
|
@if(signUp.SignUpType != SignUpType.SignedOff)
|
|
{
|
|
<tr>
|
|
@{
|
|
bool isUser = signUp.LiebUserId == _liebUserId;
|
|
string signUpStatus = string.Empty;
|
|
@if (signUp.SignUpType != SignUpType.SignedUp) signUpStatus = $" - {signUp.SignUpType}";
|
|
}
|
|
|
|
@if (isUser && _usableAccounts.Count > 1 && signUp.SignUpType != SignUpType.Flex)
|
|
{
|
|
<td>
|
|
<select value=@signUp.GuildWars2AccountId @onchange="args => _Parent.ChangeAccount(args)">
|
|
@foreach (var account in _usableAccounts)
|
|
{
|
|
<option value=@account.GuildWars2AccountId>@account.AccountName</option>
|
|
}
|
|
</select> @signUpStatus
|
|
</td>
|
|
}
|
|
else
|
|
{
|
|
<td class="nametooltip">
|
|
@signUp.GuildWars2Account.AccountName @signUpStatus
|
|
<span class="tooltiptext">@signUp.LiebUser.Name</span>
|
|
</td>
|
|
}
|
|
</tr>
|
|
}
|
|
}
|
|
</table>
|
|
@code {
|
|
[CascadingParameter]
|
|
public RaidRoles _Parent { get; set; }
|
|
|
|
[Parameter]
|
|
public Raid _raid { get; set; }
|
|
|
|
[Parameter]
|
|
public int _liebUserId { get; set; } = -1;
|
|
|
|
[Parameter]
|
|
public List<GuildWars2Account> _usableAccounts { get; set; }
|
|
|
|
[Parameter]
|
|
public int _currentRoleId { get; set; }
|
|
}
|