disabled raid signup buttons are now hidden

Fixed crash caused by external users
This commit is contained in:
Sarah Faey 2022-12-11 13:16:18 +01:00
parent ba7cf120d0
commit 6d86176d0f
3 changed files with 4 additions and 5 deletions

View file

@ -76,9 +76,9 @@
{
bool notIsRoleSignUpAllowed = !RaidService.IsRoleSignUpAllowed(_raid.RaidId, _liebUserId, role.Role.RaidRoleId, SignUpType.SignedUp, false);
bool notIsBackupAllowed = _raid.RaidType != RaidType.Planned && notIsRoleSignUpAllowed;
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.SignedUp)" disabled="@notIsRoleSignUpAllowed">Sign Up</button></td>
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.Maybe)" disabled="@notIsRoleSignUpAllowed">Maybe</button></td>
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.Backup)" disabled="@notIsBackupAllowed">Backup</button></td>
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.SignedUp)" disabled="@notIsRoleSignUpAllowed" hidden="@notIsRoleSignUpAllowed">Sign Up</button></td>
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.Maybe)" disabled="@notIsRoleSignUpAllowed" hidden="@notIsRoleSignUpAllowed">Maybe</button></td>
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.Backup)" disabled="@notIsBackupAllowed" hidden="@notIsBackupAllowed">Backup</button></td>
@if (isSignedUp && _raid.RaidType == RaidType.Planned)
{
<td><button class="raidButton" @onclick="() => SignUpClicked(role.Role, SignUpType.Flex)">Flex</button></td>