Refactor onboarding and verification workflows.

Adjusted interaction types and state filters to better streamline onboarding and verification processes. Updated UI labels, navigation, and modal dialogs to reflect new terminology and improve usability. Enhanced filtering logic and added new interaction types to support the revised process.
This commit is contained in:
Andre Beging
2025-03-27 17:12:28 +01:00
parent 572a35fd3f
commit 19796928e7
15 changed files with 148 additions and 91 deletions

View File

@@ -21,7 +21,7 @@
<div style="white-space: nowrap;">
<span title="@interaction.User.Memo">@interaction.User.Name</span> (@interaction.Date.ToShortDateString())
@if ((Prospect is not { Complete: true } || interaction.Type == InteractionType.Complete) && AllowAddInteraction)
@if ((Prospect is not { Complete: true } || interaction.Type == InteractionType.Complete) && AllowInteraction)
{
<span>&nbsp;<a href=""><i class="fa-solid fa-square-xmark" @onclick="async () => await RemoveClick.InvokeAsync(interaction.Id)" @onclick:preventDefault></i></a></span>
}
@@ -35,7 +35,7 @@
}
}
@if (Prospect is not {Complete: true } && (Interactions.Count == 0 || Multiple) && AllowAddInteraction)
@if (Prospect is not {Complete: true } && (Interactions.Count == 0 || Multiple) && AllowInteraction)
{
if (Multiple) ButtonIconClass = "fa-solid fa-plus";
<div class="m-auto">

View File

@@ -20,7 +20,7 @@ namespace FoodsharingSiegen.Server.Controls
/// Gets or sets the value of the allow add interaction (ab)
/// </summary>
[Parameter]
public bool AllowAddInteraction { get; set; }
public bool AllowInteraction { get; set; }
/// <summary>
/// Gets or sets the value of the button text (ab)

View File

@@ -1,11 +1,8 @@
@using FoodsharingSiegen.Contracts.Entity
@using FoodsharingSiegen.Contracts.Helper
@using FoodsharingSiegen.Server.BaseClasses
@inherits FsBase
@inherits FsBase
@{
var divClass = $"{CssClass} pc-main";
if (Prospect is {Complete: true }) divClass += " complete";
if (Prospect is { Complete: true }) divClass += " complete";
}
<div class="@divClass">
@@ -14,30 +11,30 @@
{
<a href=""><i class="fa-solid fa-pen-to-square" @onclick="() => ProspectModal.Show(Prospect)" @onclick:preventDefault></i> </a>
}
@Prospect?.Name
<small style="font-size: .9rem; opacity: .7;">
<a class="invert" href="@(CurrentUser.NetworkLink)/profile/@Prospect?.FsId" target="_blank">Profil öffnen</a>
</small>
</h5>
@if (!string.IsNullOrWhiteSpace(Prospect?.Memo) || Prospect?.Warning is true)
{
var alertColor = Prospect?.Warning is true ? Color.Warning : Color.Info;
var alertIconClass = Prospect?.Warning is true ? "fa-solid fa-triangle-exclamation" : "fa-solid fa-circle-info";
<Alert Color="alertColor" Visible Class="p-2 mb-1">
<AlertDescription><i class="@alertIconClass"></i> @Prospect?.Memo</AlertDescription>
</Alert>
}
<table style="width: 100%;">
<InteractionRow
Prospect="Prospect"
Type="InteractionType.Welcome"
AllowAddInteraction="@CurrentUser.IsInGroup(UserGroup.WelcomeTeam)"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam))"
AddClick="() => AddInteraction(InteractionType.Welcome)"
RemoveClick="@RemoveInteraction"
Caption="Begrüßung"
@@ -45,10 +42,21 @@
IconClass="fa-solid fa-handshake-simple">
</InteractionRow>
<InteractionRow
Prospect="Prospect"
Type="InteractionType.StepInBriefing"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam))"
AddClick="() => AddInteraction(InteractionType.StepInBriefing)"
RemoveClick="@RemoveInteraction"
Caption="Neulingstreffen"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-graduation-cap">
</InteractionRow>
<InteractionRow
Prospect="Prospect"
Type="InteractionType.EinAb"
AllowAddInteraction="@CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.StoreManager, UserGroup.Ambassador)"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.StoreManager, UserGroup.Ambassador))"
AddClick="() => AddInteraction(InteractionType.EinAb)"
RemoveClick="@RemoveInteraction"
Caption="Einführungen"
@@ -63,56 +71,73 @@
<hr style="margin: 10px 0;">
</td>
</tr>
<InteractionRow
Prospect="Prospect"
Type="InteractionType.IdCheck"
AllowAddInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
AddClick="() => AddInteraction(InteractionType.IdCheck)"
RemoveClick="@RemoveInteraction"
Caption="Perso checken"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-magnifying-glass">
</InteractionRow>
<InteractionRow
Prospect="Prospect"
Type="InteractionType.PrintPass"
AllowAddInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
AddClick="() => AddInteraction(InteractionType.PrintPass)"
Type="InteractionType.ReleasedForVerification"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam))"
AddClick="() => AddInteraction(InteractionType.ReleasedForVerification)"
RemoveClick="@RemoveInteraction"
Caption="FS-Ausweis (print)"
Caption="Freigabe zur Verifizierung"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-id-card">
</InteractionRow>
<InteractionRow
Prospect="Prospect"
AllowAddInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
Type="InteractionType.Verify"
AddClick="() => AddInteraction(InteractionType.Verify)"
RemoveClick="@RemoveInteraction"
Caption="Verifizieren"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-user-check">
</InteractionRow>
@if (CurrentUser.IsInGroup(UserGroup.Ambassador))
{
<InteractionRow
Prospect="Prospect"
Type="InteractionType.IdCheck"
AllowInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
AddClick="() => AddInteraction(InteractionType.IdCheck)"
RemoveClick="@RemoveInteraction"
Caption="Perso checken"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-magnifying-glass">
</InteractionRow>
}
<tr>
<td colspan="3">
<hr style="margin: 10px 0;">
</td>
</tr>
<InteractionRow
Prospect="Prospect"
AllowAddInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
Type="InteractionType.Complete"
AddClick="() => AddInteraction(InteractionType.Complete)"
RemoveClick="@RemoveInteraction"
Caption="Fertig"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-flag-checkered">
</InteractionRow>
@if (StateFilter > ProspectStateFilter.OnBoarding)
{
<InteractionRow
Prospect="Prospect"
Type="InteractionType.PrintPass"
AllowInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
AddClick="() => AddInteraction(InteractionType.PrintPass)"
RemoveClick="@RemoveInteraction"
Caption="FS-Ausweis (print)"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-id-card">
</InteractionRow>
<InteractionRow
Prospect="Prospect"
AllowInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
Type="InteractionType.Verify"
AddClick="() => AddInteraction(InteractionType.Verify)"
RemoveClick="@RemoveInteraction"
Caption="Verifizieren"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-user-check">
</InteractionRow>
<tr>
<td colspan="3">
<hr style="margin: 10px 0;">
</td>
</tr>
<InteractionRow
Prospect="Prospect"
AllowInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
Type="InteractionType.Complete"
AddClick="() => AddInteraction(InteractionType.Complete)"
RemoveClick="@RemoveInteraction"
Caption="Fertig"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-flag-checkered">
</InteractionRow>
}
</table>

View File

@@ -14,6 +14,8 @@ namespace FoodsharingSiegen.Server.Controls
[Parameter] public EventCallback<Guid> RemoveInteraction { get; set; }
[Parameter] public ProspectStateFilter StateFilter { get; set; }
[Parameter] public string? CssClass { get; set; }

View File

@@ -18,7 +18,7 @@
flex-grow: 1;
max-width: 480px;
border: 1px solid #533a20;
border-radius: 7px;
border-radius: 3px;
margin: 5px;
padding: 16px;
}