Add DisableStepIn flag to control StepIn-related interactions

Introduced the `DisableStepIn` flag in AppSettings to toggle StepIn-related features. Updated UI components to conditionally render StepIn interactions and filtering options based on this flag. Refactored group permissions for interactions to include Ambassadors where applicable.
This commit is contained in:
Andre Beging
2025-04-02 08:54:45 +02:00
parent 6389da4bc1
commit 43c51420c3
3 changed files with 24 additions and 16 deletions

View File

@@ -4,6 +4,8 @@
{
#region Public Properties
public bool DisableStepIn { get; set; }
public TermSettings Terms { get; set; } = new();
public bool TestMode { get; set; }

View File

@@ -51,27 +51,30 @@
<InteractionRow
Prospect="Prospect"
Type="InteractionType.Welcome"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam))"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador))"
AddClick="AddInteraction"
RemoveClick="@RemoveInteraction"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-handshake-simple">
</InteractionRow>
@if (!AppSettings.DisableStepIn)
{
<InteractionRow
Prospect="Prospect"
Type="InteractionType.StepInBriefing"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam))"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador))"
AddClick="AddInteraction"
RemoveClick="@RemoveInteraction"
ButtonIconClass="fa-solid fa-check"
IconClass="fa-solid fa-graduation-cap">
</InteractionRow>
}
<InteractionRow
Prospect="Prospect"
Type="InteractionType.EinAb"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.StoreManager, UserGroup.Ambassador))"
AllowInteraction="@(StateFilter == ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador))"
AddClick="AddInteraction"
RemoveClick="@RemoveInteraction"
Multiple="true"

View File

@@ -54,6 +54,8 @@
</div>
<div class="card-body" style="padding: .5rem;">
@if (!AppSettings.DisableStepIn)
{
@* WITHOUT STEP IN BRIEFING *@
@if (new[] { ProspectStateFilter.All, ProspectStateFilter.OnBoarding, ProspectStateFilter.Completed }.Contains(StateFilter))
{
@@ -61,6 +63,7 @@
<Switch TValue="bool" Checked="Filter.WithoutStepInBriefing" CheckedChanged="WithoutStepInBriefingChangedAsync" Color="Color.Primary">Ohne @AppSettings.Terms.StepInName</Switch>
</div>
}
}
@* WITHOUT ID CHECK *@
@if (new[] { ProspectStateFilter.All, ProspectStateFilter.Verification, ProspectStateFilter.Completed }.Contains(StateFilter))