Interaction Alert

This commit is contained in:
Andre Beging
2022-04-08 16:12:25 +02:00
parent 7fb5ecf04a
commit 38eec13a1b
5 changed files with 22 additions and 3 deletions

View File

@@ -34,12 +34,15 @@
private bool Done => Interactions.Count >= Minimum; private bool Done => Interactions.Count >= Minimum;
private bool NotNeeded => Interactions.Any(x => x.NotNeeded); private bool NotNeeded => Interactions.Any(x => x.NotNeeded);
private bool Alert => Interactions.Any(x => x.Alert);
} }
@{ @{
var rowClass = ""; var rowClass = "";
if (Done) rowClass += " done"; if (Done) rowClass += " done";
if (NotNeeded) rowClass += " notneeded"; if (NotNeeded) rowClass += " notneeded";
if (Alert) rowClass += " fs-alert";
} }
<tr class="@rowClass" style="border-top: 5px solid transparent;"> <tr class="@rowClass" style="border-top: 5px solid transparent;">

View File

@@ -4,4 +4,9 @@
tr.notneeded { tr.notneeded {
filter: grayscale(100%); filter: grayscale(100%);
}
tr.fs-alert,
tr.fs-alert th {
color: orange;
} }

View File

@@ -12,7 +12,12 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<Field> <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> </Field>
</div> </div>
</div> </div>

View File

@@ -21,6 +21,7 @@ namespace FoodsharingSiegen.Server.Dialogs
private string _header; private string _header;
private string _infoName; private string _infoName;
private bool _showInfo; private bool _showInfo;
private bool _showAlert;
private bool _showNotNeeded; private bool _showNotNeeded;
protected override async Task OnParametersSetAsync() protected override async Task OnParametersSetAsync()
@@ -34,6 +35,8 @@ namespace FoodsharingSiegen.Server.Dialogs
{ {
if (prospectId == null) return; if (prospectId == null) return;
_showInfo = false; _showInfo = false;
_showNotNeeded = false;
_showAlert = false;
_infoName = "Kommentar"; _infoName = "Kommentar";
switch (type) switch (type)
@@ -41,6 +44,7 @@ namespace FoodsharingSiegen.Server.Dialogs
case InteractionType.EinAb: case InteractionType.EinAb:
_header = "Einführung eintragen"; _header = "Einführung eintragen";
_showInfo = true; _showInfo = true;
_showAlert = true;
_infoName = "Welcher Betrieb?"; _infoName = "Welcher Betrieb?";
break; break;
case InteractionType.Welcome: case InteractionType.Welcome:
@@ -48,6 +52,7 @@ namespace FoodsharingSiegen.Server.Dialogs
break; break;
case InteractionType.IdCheck: case InteractionType.IdCheck:
_header = "Ausweisprüfung eintragen"; _header = "Ausweisprüfung eintragen";
_showAlert = true;
_showInfo = true; _showInfo = true;
break; break;
case InteractionType.PrintPass: case InteractionType.PrintPass:
@@ -68,7 +73,7 @@ namespace FoodsharingSiegen.Server.Dialogs
_showInfo = true; _showInfo = true;
break; break;
} }
Interaction = new Interaction Interaction = new Interaction
{ {
Type = type, Type = type,

View File

@@ -9,4 +9,5 @@
@using FoodsharingSiegen.Server @using FoodsharingSiegen.Server
@using FoodsharingSiegen.Server.Shared @using FoodsharingSiegen.Server.Shared
@using Blazorise @using Blazorise
@using Blazorise.DataGrid @using Blazorise.DataGrid
@using Blazorise.Components