split the role tables from RaidDetails into their own razor files
This commit is contained in:
parent
75b8fd13fc
commit
c298f4d20e
5 changed files with 204 additions and 107 deletions
35
Lieb/Pages/Raids/RaidRolesNoSignUp.razor
Normal file
35
Lieb/Pages/Raids/RaidRolesNoSignUp.razor
Normal file
|
@ -0,0 +1,35 @@
|
|||
@using Lieb.Models.GuildWars2.Raid
|
||||
|
||||
<div>
|
||||
<table class="roleTable">
|
||||
<tbody>
|
||||
@foreach (var role in _raid.Roles)
|
||||
{
|
||||
Models.GuildWars2.Raid.RaidSignUp[] signUps = _raid.SignUps.Where(s => s.PlannedRaidRoleId == role.PlannedRaidRoleId).ToArray();
|
||||
int usedSpots = signUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count();
|
||||
|
||||
<tr>
|
||||
<td><h5>@role.Name: @role.Description (@usedSpots /@role.Spots)</h5></td>
|
||||
</tr>
|
||||
@foreach (var signUp in signUps)
|
||||
{
|
||||
if(signUp.SignUpType != SignUpType.SignedOff)
|
||||
{
|
||||
string signUpStatus = string.Empty;
|
||||
if (signUp.SignUpType != SignUpType.SignedUp) signUpStatus = $" - {signUp.SignUpType}";
|
||||
<tr>
|
||||
<td>@signUp.LiebUser.Name (@signUp.GuildWars2Account.AccountName) @signUpStatus</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public Raid _raid { get; set; }
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue