canged EditRaid to a button
This commit is contained in:
parent
b714249e4c
commit
51333f93bc
2 changed files with 21 additions and 14 deletions
|
@ -6,6 +6,7 @@
|
||||||
@inject RaidService RaidService
|
@inject RaidService RaidService
|
||||||
@inject TimeZoneService TimeZoneService
|
@inject TimeZoneService TimeZoneService
|
||||||
@inject RaidRandomizerService RaidRandomizerService
|
@inject RaidRandomizerService RaidRandomizerService
|
||||||
|
@inject NavigationManager NavigationManager
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -43,20 +44,16 @@
|
||||||
|
|
||||||
<RaidRoles _raid=@_raid _user=@_user/>
|
<RaidRoles _raid=@_raid _user=@_user/>
|
||||||
|
|
||||||
|
<div class="controlButtons">
|
||||||
<AuthorizeView Policy="@Constants.Roles.RaidLead">
|
<button @onclick="() => SignOffClicked()">Sign Off</button>
|
||||||
<td><button @onclick="() => SignOffClicked()">Sign Off</button></td>
|
<AuthorizeView Policy="@Constants.Roles.RaidLead">
|
||||||
<div class="nav-item px-3">
|
<button @onclick="() => EditClicked()">Edit</button>
|
||||||
@{string navLink = $"raidedit/{_raid.RaidId}";}
|
@if(_raid.RaidType != RaidType.Planned)
|
||||||
<NavLink class="nav-link" href="@navLink">
|
{
|
||||||
<span class="oi oi-plus" aria-hidden="true"></span> Edit
|
<button type=button @onclick="() => RandomizeClicked()">Randomize</button>
|
||||||
</NavLink>
|
}
|
||||||
</div>
|
</AuthorizeView>
|
||||||
@if(_raid.RaidType != RaidType.Planned)
|
</div>
|
||||||
{
|
|
||||||
<button type=button @onclick="() => RandomizeClicked()">Randomize</button>
|
|
||||||
}
|
|
||||||
</AuthorizeView>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
@ -89,6 +86,11 @@
|
||||||
_raid = RaidService.GetRaid(_raid.RaidId);
|
_raid = RaidService.GetRaid(_raid.RaidId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async Task EditClicked()
|
||||||
|
{
|
||||||
|
NavigationManager.NavigateTo($"raidedit/{_raid.RaidId}");
|
||||||
|
}
|
||||||
|
|
||||||
async Task RandomizeClicked()
|
async Task RandomizeClicked()
|
||||||
{
|
{
|
||||||
await RaidRandomizerService.RandomizeRaid(_raid.RaidId);
|
await RaidRandomizerService.RandomizeRaid(_raid.RaidId);
|
||||||
|
|
|
@ -26,6 +26,11 @@ h5 {
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.controlButtons {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
column-width: auto;
|
column-width: auto;
|
||||||
color: lightgray;
|
color: lightgray;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue