reorganized Raid pages
This commit is contained in:
parent
f40903851e
commit
d0ff8251a2
16 changed files with 174 additions and 53 deletions
90
Lieb/Pages/Raids/RaidOverview/SignedUpUsers.razor
Normal file
90
Lieb/Pages/Raids/RaidOverview/SignedUpUsers.razor
Normal file
|
@ -0,0 +1,90 @@
|
|||
@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.RaidRoleId == _currentRoleId).ToArray();}
|
||||
@foreach (var signUp in signUps.OrderBy(s => s.SignUpType))
|
||||
{
|
||||
@if(_signUpTypes.Contains(signUp.SignUpType))
|
||||
{
|
||||
<tr>
|
||||
@{
|
||||
bool isLoggedInUser = signUp.LiebUserId == _liebUserId;
|
||||
string signUpStatus = string.Empty;
|
||||
@if (signUp.SignUpType != SignUpType.SignedUp && _signUpTypes.Count > 1) signUpStatus = $" - {signUp.SignUpType}";
|
||||
}
|
||||
|
||||
@if (isLoggedInUser && _usableAccounts.Count > 1 && signUp.SignUpType != SignUpType.Flex)
|
||||
{
|
||||
<td>
|
||||
<select class="accountselect" value=@signUp.GuildWars2AccountId @onchange="args => _Parent.ChangeAccount(args)">
|
||||
@foreach (var account in _usableAccounts)
|
||||
{
|
||||
<option value=@account.GuildWars2AccountId>@account.AccountName</option>
|
||||
}
|
||||
</select> @signUpStatus
|
||||
</td>
|
||||
}
|
||||
else if(isLoggedInUser && _showUserColor)
|
||||
{
|
||||
<td class="nametooltip username">
|
||||
@signUp.GuildWars2Account.AccountName @signUpStatus
|
||||
@if(_showToolTip)
|
||||
{
|
||||
<span class="tooltiptext">@signUp.LiebUser.Name</span>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
else if(!signUp.IsExternalUser)
|
||||
{
|
||||
<td class="nametooltip">
|
||||
@signUp.GuildWars2Account.AccountName @signUpStatus
|
||||
@if(_showToolTip)
|
||||
{
|
||||
<span class="tooltiptext">@signUp.LiebUser.Name</span>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td class="nametooltip">
|
||||
@signUp.ExternalUserName @signUpStatus
|
||||
@if(_showToolTip)
|
||||
{
|
||||
<span class="tooltiptext">external user</span>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
public RaidRoles _Parent { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public Raid _raid { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public ulong _liebUserId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public List<GuildWars2Account> _usableAccounts { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int _currentRoleId { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<SignUpType> _signUpTypes { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public bool _showToolTip { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public bool _showUserColor { get; set; } = false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue