fix permissions
This commit is contained in:
parent
c5d0f67c0d
commit
fbf0d81aff
|
|
@ -27,6 +27,7 @@
|
|||
@inject IDialogService DialogService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject GameHubService HubService
|
||||
@inject IState<AuthState> AuthState
|
||||
|
||||
<PageTitle>Spieltag Details</PageTitle>
|
||||
|
||||
|
|
@ -68,35 +69,38 @@ else
|
|||
</MudStack>
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="6" Class="d-flex justify-end align-center flex-wrap gap-2">
|
||||
@if (Day.Status == DayStatus.Started && !GameState.Value.IsGameActive)
|
||||
@if (AuthState.Value.IsClubEditor || AuthState.Value.IsClubAdmin || AuthState.Value.IsSuperAdmin)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Success"
|
||||
StartIcon="@Icons.Material.Filled.SportsScore"
|
||||
OnClick="OpenGameSetupDialog"
|
||||
Disabled="DayState.Value.IsLoading || Day.Participants.Count == 0">
|
||||
Neues Spiel
|
||||
</MudButton>
|
||||
}
|
||||
@if (GameState.Value.IsGameActive)
|
||||
{
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Warning"
|
||||
StartIcon="@Icons.Material.Filled.Stop"
|
||||
OnClick="EndGame"
|
||||
Disabled="DayState.Value.IsLoading">
|
||||
Spiel beenden
|
||||
</MudButton>
|
||||
}
|
||||
@if (Day.Status != DayStatus.Closed && !GameState.Value.IsGameActive)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="GetNextStatusColor(Day.Status)"
|
||||
StartIcon="@GetNextStatusIcon(Day.Status)"
|
||||
OnClick="AdvanceStatus"
|
||||
Disabled="DayState.Value.IsLoading">
|
||||
@GetNextStatusLabel(Day.Status)
|
||||
</MudButton>
|
||||
@if (Day.Status == DayStatus.Started && !GameState.Value.IsGameActive)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Success"
|
||||
StartIcon="@Icons.Material.Filled.SportsScore"
|
||||
OnClick="OpenGameSetupDialog"
|
||||
Disabled="DayState.Value.IsLoading || Day.Participants.Count == 0">
|
||||
Neues Spiel
|
||||
</MudButton>
|
||||
}
|
||||
@if (GameState.Value.IsGameActive)
|
||||
{
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Warning"
|
||||
StartIcon="@Icons.Material.Filled.Stop"
|
||||
OnClick="EndGame"
|
||||
Disabled="DayState.Value.IsLoading">
|
||||
Spiel beenden
|
||||
</MudButton>
|
||||
}
|
||||
@if (Day.Status != DayStatus.Closed && !GameState.Value.IsGameActive)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="GetNextStatusColor(Day.Status)"
|
||||
StartIcon="@GetNextStatusIcon(Day.Status)"
|
||||
OnClick="AdvanceStatus"
|
||||
Disabled="DayState.Value.IsLoading">
|
||||
@GetNextStatusLabel(Day.Status)
|
||||
</MudButton>
|
||||
}
|
||||
}
|
||||
@if (Day.Status == DayStatus.New)
|
||||
{
|
||||
|
|
@ -346,29 +350,36 @@ else
|
|||
</MudTd>
|
||||
<MudTd DataLabel="Aktionen" Style="text-align: right">
|
||||
<MudStack Row="true" Spacing="1" Justify="Justify.FlexEnd">
|
||||
@if (context.PersonExpenseStatus == PersonExpenseStatus.Open)
|
||||
@if (AuthState.Value.IsClubEditor || AuthState.Value.IsClubAdmin || AuthState.Value.IsSuperAdmin)
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Check"
|
||||
Size="Size.Small"
|
||||
Color="Color.Success"
|
||||
OnClick="@(() => MarkAsPaid(context))"
|
||||
Title="Als bezahlt markieren"/>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Undo"
|
||||
Size="Size.Small"
|
||||
Color="Color.Warning"
|
||||
OnClick="@(() => MarkAsOpen(context))"
|
||||
Title="Als offen markieren"/>
|
||||
}
|
||||
@if (Day.Status != DayStatus.Closed)
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
||||
Size="Size.Small"
|
||||
Color="Color.Error"
|
||||
OnClick="@(() => ConfirmDeleteExpense(context))"
|
||||
Title="Löschen"/>
|
||||
@if (@context.ExpenseType == ExpenseType.Material)
|
||||
{
|
||||
@if (context.PersonExpenseStatus == PersonExpenseStatus.Open)
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Check"
|
||||
Size="Size.Small"
|
||||
Color="Color.Success"
|
||||
OnClick="@(() => MarkAsPaid(context))"
|
||||
Title="Als bezahlt markieren"/>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Undo"
|
||||
Size="Size.Small"
|
||||
Color="Color.Warning"
|
||||
OnClick="@(() => MarkAsOpen(context))"
|
||||
Title="Als offen markieren"/>
|
||||
}
|
||||
}
|
||||
|
||||
@if (Day.Status != DayStatus.Closed)
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
||||
Size="Size.Small"
|
||||
Color="Color.Error"
|
||||
OnClick="@(() => ConfirmDeleteExpense(context))"
|
||||
Title="Löschen"/>
|
||||
}
|
||||
}
|
||||
</MudStack>
|
||||
</MudTd>
|
||||
|
|
|
|||
|
|
@ -83,28 +83,37 @@
|
|||
OnClick="@(() => NavigateToDayDetails(context))"
|
||||
OnClick:stopPropagation="true"/>
|
||||
</MudTooltip>
|
||||
<MudTooltip Text="Bearbeiten">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Edit"
|
||||
Size="Size.Small"
|
||||
Disabled="context.Status == DayStatus.Closed"
|
||||
OnClick="@(() => OpenEditDialog(context))"
|
||||
OnClick:stopPropagation="true"/>
|
||||
</MudTooltip>
|
||||
<MudTooltip Text="Löschen">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
||||
Size="Size.Small"
|
||||
Color="Color.Error"
|
||||
Disabled="context.Status == DayStatus.Closed"
|
||||
OnClick="@(() => ConfirmDelete(context))"
|
||||
OnClick:stopPropagation="true"/>
|
||||
</MudTooltip>
|
||||
<MudTooltip Text="Protokolle versenden">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Mail"
|
||||
Size="Size.Small"
|
||||
Disabled="context.Status != DayStatus.Closed"
|
||||
OnClick="@(() => SentProtocol(context))"
|
||||
OnClick:stopPropagation="true" />
|
||||
</MudTooltip>
|
||||
@if (AuthState.Value.IsClubEditor || AuthState.Value.IsClubAdmin || AuthState.Value.IsSuperAdmin)
|
||||
{
|
||||
<MudTooltip Text="Bearbeiten">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Edit"
|
||||
Size="Size.Small"
|
||||
Disabled="context.Status == DayStatus.Closed"
|
||||
OnClick="@(() => OpenEditDialog(context))"
|
||||
OnClick:stopPropagation="true"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
@if (AuthState.Value.IsClubAdmin || AuthState.Value.IsSuperAdmin)
|
||||
{
|
||||
<MudTooltip Text="Löschen">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
||||
Size="Size.Small"
|
||||
Color="Color.Error"
|
||||
Disabled="context.Status == DayStatus.Closed"
|
||||
OnClick="@(() => ConfirmDelete(context))"
|
||||
OnClick:stopPropagation="true"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
@if (AuthState.Value.IsClubEditor || AuthState.Value.IsClubAdmin || AuthState.Value.IsSuperAdmin)
|
||||
{
|
||||
<MudTooltip Text="Protokolle versenden">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Mail"
|
||||
Size="Size.Small"
|
||||
Disabled="context.Status != DayStatus.Closed"
|
||||
OnClick="@(() => SentProtocol(context))"
|
||||
OnClick:stopPropagation="true" />
|
||||
</MudTooltip>
|
||||
}
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
<PagerContent>
|
||||
|
|
|
|||
Loading…
Reference in New Issue