From 43c51420c30ec6f46fe5cbbfd6fc0dcc4d071d9c Mon Sep 17 00:00:00 2001 From: Andre Beging Date: Wed, 2 Apr 2025 08:54:45 +0200 Subject: [PATCH] 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. --- .../Model/AppSettings.cs | 2 ++ .../Controls/ProspectContainer.razor | 25 +++++++++++-------- .../Controls/ProspectFilterControl.razor | 13 ++++++---- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/FoodsharingSiegen.Contracts/Model/AppSettings.cs b/FoodsharingSiegen.Contracts/Model/AppSettings.cs index 3ce1f23..30bb9d4 100644 --- a/FoodsharingSiegen.Contracts/Model/AppSettings.cs +++ b/FoodsharingSiegen.Contracts/Model/AppSettings.cs @@ -4,6 +4,8 @@ { #region Public Properties + public bool DisableStepIn { get; set; } + public TermSettings Terms { get; set; } = new(); public bool TestMode { get; set; } diff --git a/FoodsharingSiegen.Server/Controls/ProspectContainer.razor b/FoodsharingSiegen.Server/Controls/ProspectContainer.razor index 0faba7e..2edda8b 100644 --- a/FoodsharingSiegen.Server/Controls/ProspectContainer.razor +++ b/FoodsharingSiegen.Server/Controls/ProspectContainer.razor @@ -51,27 +51,30 @@ - - + @if (!AppSettings.DisableStepIn) + { + + + }
- @* WITHOUT STEP IN BRIEFING *@ - @if (new[] { ProspectStateFilter.All, ProspectStateFilter.OnBoarding, ProspectStateFilter.Completed }.Contains(StateFilter)) + @if (!AppSettings.DisableStepIn) { -
- Ohne @AppSettings.Terms.StepInName -
+ @* WITHOUT STEP IN BRIEFING *@ + @if (new[] { ProspectStateFilter.All, ProspectStateFilter.OnBoarding, ProspectStateFilter.Completed }.Contains(StateFilter)) + { +
+ Ohne @AppSettings.Terms.StepInName +
+ } } @* WITHOUT ID CHECK *@