changing the Account now updates Flex roles in the UI
This commit is contained in:
parent
bca069db78
commit
408f09f650
4 changed files with 50 additions and 33 deletions
|
@ -24,7 +24,9 @@
|
|||
<br> @role.Description
|
||||
</td>
|
||||
<td class="tdSignUp">
|
||||
<SignedUpUsers _raid=@_raid _usableAccounts=@_usableAccounts _liebUserId=@_liebUserId _currentRoleId=@role.PlannedRaidRoleId></SignedUpUsers>
|
||||
<CascadingValue Value="this">
|
||||
<SignedUpUsers _raid=@_raid _usableAccounts=@_usableAccounts _liebUserId=@_liebUserId _currentRoleId=@role.PlannedRaidRoleId></SignedUpUsers>
|
||||
</CascadingValue>
|
||||
</td>
|
||||
@if(_liebUserId > 0)
|
||||
{
|
||||
|
@ -60,7 +62,14 @@
|
|||
{
|
||||
if (_user != null)
|
||||
{
|
||||
_usableAccounts = _user.GuildWars2Accounts.Where(a => a.EquippedBuilds.Count > 0).ToList();
|
||||
if (_raid.RaidType == RaidType.Planned)
|
||||
{
|
||||
_usableAccounts = _user.GuildWars2Accounts.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
_usableAccounts = _user.GuildWars2Accounts.Where(a => a.EquippedBuilds.Count > 0).ToList();
|
||||
}
|
||||
_liebUserId = _user.LiebUserId;
|
||||
}
|
||||
}
|
||||
|
@ -77,4 +86,12 @@
|
|||
}
|
||||
_raid = RaidService.GetRaid(_raid.RaidId);
|
||||
}
|
||||
|
||||
public async Task ChangeAccount(ChangeEventArgs e)
|
||||
{
|
||||
int accountId = int.Parse(e.Value.ToString());
|
||||
await RaidService.ChangeAccount(_raid.RaidId, _liebUserId, accountId);
|
||||
_raid = RaidService.GetRaid(_raid.RaidId);
|
||||
this.StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue