mod Club-Editor for demo
This commit is contained in:
parent
fc9dfcaca0
commit
c25fa0c0ec
|
|
@ -44,7 +44,7 @@
|
|||
<MudNavLink Href="/expensetriggers"
|
||||
Match="NavLinkMatch.Prefix"
|
||||
Icon="@Icons.Material.Filled.FlashOn">
|
||||
Ausl<EFBFBD>ser
|
||||
Auslöser
|
||||
</MudNavLink>
|
||||
|
||||
<MudNavLink Href="/admin/gifs"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<MudNavLink Href="/admin/triggers"
|
||||
Match="NavLinkMatch.Prefix"
|
||||
Icon="@Icons.Material.Filled.FlashOn">
|
||||
Ausl<EFBFBD>ser
|
||||
Auslöser
|
||||
</MudNavLink>
|
||||
}
|
||||
</MudNavGroup>
|
||||
|
|
|
|||
|
|
@ -12,16 +12,18 @@
|
|||
<DialogContent>
|
||||
<MudForm @ref="_form" @bind-IsValid="_isValid">
|
||||
<MudTextField @bind-Value="_name"
|
||||
Label="Name"
|
||||
Required="true"
|
||||
RequiredError="Name ist erforderlich"
|
||||
Immediate="true"
|
||||
Class="mb-4" />
|
||||
Label="Name"
|
||||
Disabled="@IsDemoClub"
|
||||
Required="true"
|
||||
RequiredError="Name ist erforderlich"
|
||||
Immediate="true"
|
||||
Class="mb-4" />
|
||||
|
||||
<MudTextField @bind-Value="_loginName"
|
||||
Label="Login-Name"
|
||||
Required="true"
|
||||
MaxLength="10"
|
||||
Disabled="@IsDemoClub"
|
||||
InputAttributes="@_inputAttrs"
|
||||
RequiredError="Login-Name ist erforderlich"
|
||||
Style="text-transform: lowercase;"
|
||||
|
|
@ -31,8 +33,8 @@
|
|||
Class="mb-4" />
|
||||
|
||||
<MudSelect T="ExpenseCalculation" @bind-Value="_expenseCalculation"
|
||||
Label="Kostenberechnung"
|
||||
AnchorOrigin="Origin.BottomCenter">
|
||||
Label="Kostenberechnung"
|
||||
AnchorOrigin="Origin.BottomCenter">
|
||||
<MudSelectItem Value="ExpenseCalculation.None">Keine</MudSelectItem>
|
||||
<MudSelectItem Value="ExpenseCalculation.Average">Durchschnitt</MudSelectItem>
|
||||
<MudSelectItem Value="ExpenseCalculation.Maximum">Maximum</MudSelectItem>
|
||||
|
|
@ -42,6 +44,11 @@
|
|||
@GetCalculationDescription(_expenseCalculation)
|
||||
</MudText>
|
||||
</MudForm>
|
||||
|
||||
@if (IsDemoClub)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info">Namen im Demo-Modus nicht ändernbar</MudAlert>
|
||||
}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton OnClick="Cancel">Abbrechen</MudButton>
|
||||
|
|
@ -103,6 +110,7 @@
|
|||
}
|
||||
|
||||
private ExpenseCalculation _expenseCalculation = ExpenseCalculation.None;
|
||||
private bool IsDemoClub => Club?.LoginName == "demo";
|
||||
|
||||
private bool IsEditMode => Club is not null;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue