Interaction Alert
This commit is contained in:
@@ -34,12 +34,15 @@
|
||||
private bool Done => Interactions.Count >= Minimum;
|
||||
|
||||
private bool NotNeeded => Interactions.Any(x => x.NotNeeded);
|
||||
|
||||
private bool Alert => Interactions.Any(x => x.Alert);
|
||||
}
|
||||
|
||||
@{
|
||||
var rowClass = "";
|
||||
if (Done) rowClass += " done";
|
||||
if (NotNeeded) rowClass += " notneeded";
|
||||
if (Alert) rowClass += " fs-alert";
|
||||
}
|
||||
|
||||
<tr class="@rowClass" style="border-top: 5px solid transparent;">
|
||||
|
||||
@@ -4,4 +4,9 @@
|
||||
|
||||
tr.notneeded {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
tr.fs-alert,
|
||||
tr.fs-alert th {
|
||||
color: orange;
|
||||
}
|
||||
@@ -12,7 +12,12 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<Field>
|
||||
<Switch TValue="bool" @bind-Checked="Interaction.NotNeeded" >Nicht benötigt</Switch>
|
||||
<Switch TValue="bool" @bind-Checked="Interaction.NotNeeded">Nicht benötigt</Switch>
|
||||
</Field>
|
||||
</div>
|
||||
<div class="col">
|
||||
<Field>
|
||||
<Switch TValue="bool" @bind-Checked="Interaction.Alert">Achtung!</Switch>
|
||||
</Field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
private string _header;
|
||||
private string _infoName;
|
||||
private bool _showInfo;
|
||||
private bool _showAlert;
|
||||
private bool _showNotNeeded;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
@@ -34,6 +35,8 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
{
|
||||
if (prospectId == null) return;
|
||||
_showInfo = false;
|
||||
_showNotNeeded = false;
|
||||
_showAlert = false;
|
||||
_infoName = "Kommentar";
|
||||
|
||||
switch (type)
|
||||
@@ -41,6 +44,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
case InteractionType.EinAb:
|
||||
_header = "Einführung eintragen";
|
||||
_showInfo = true;
|
||||
_showAlert = true;
|
||||
_infoName = "Welcher Betrieb?";
|
||||
break;
|
||||
case InteractionType.Welcome:
|
||||
@@ -48,6 +52,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
break;
|
||||
case InteractionType.IdCheck:
|
||||
_header = "Ausweisprüfung eintragen";
|
||||
_showAlert = true;
|
||||
_showInfo = true;
|
||||
break;
|
||||
case InteractionType.PrintPass:
|
||||
@@ -68,7 +73,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
_showInfo = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Interaction = new Interaction
|
||||
{
|
||||
Type = type,
|
||||
|
||||
@@ -9,4 +9,5 @@
|
||||
@using FoodsharingSiegen.Server
|
||||
@using FoodsharingSiegen.Server.Shared
|
||||
@using Blazorise
|
||||
@using Blazorise.DataGrid
|
||||
@using Blazorise.DataGrid
|
||||
@using Blazorise.Components
|
||||
Reference in New Issue
Block a user