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