Add IdCheckPossible filter and UI toggle: enhance ProspectFilter and ProspectSortControl for IdCheck functionality
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
public bool WithoutStepInBriefing { get; set; }
|
||||
|
||||
public bool WithoutIdCheck { get; set; }
|
||||
|
||||
public bool IdCheckPossible { get; set; }
|
||||
|
||||
public bool NoActivity { get; set; }
|
||||
|
||||
|
||||
@@ -49,4 +49,8 @@
|
||||
{
|
||||
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.DeletedOnly)))">Gelöschte</Badge>
|
||||
}
|
||||
@if(Filter.IdCheckPossible)
|
||||
{
|
||||
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.IdCheckPossible)))">Perso-Prüfung möglich</Badge>
|
||||
}
|
||||
</div>
|
||||
@@ -78,6 +78,7 @@ public partial class ProspectSortControl
|
||||
case nameof(Filter.RecentActivity): Filter.RecentActivity = false; break;
|
||||
case nameof(Filter.NoActivity): Filter.NoActivity = false; break;
|
||||
case nameof(Filter.DeletedOnly): Filter.DeletedOnly = false; break;
|
||||
case nameof(Filter.IdCheckPossible): Filter.IdCheckPossible = false; break;
|
||||
}
|
||||
await FilterChanged.InvokeAsync(Filter);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(new[] { ProspectStateFilter.OnBoarding, ProspectStateFilter.Verification }.Contains(StateFilter))
|
||||
{
|
||||
<div style="margin-left: 1rem;">
|
||||
<Switch TValue="bool" Checked="ModalFilter.IdCheckPossible" CheckedChanged="(v) => { ModalFilter.IdCheckPossible = v; StateHasChanged(); }" Color="Color.Primary">
|
||||
Perso-Prüfung möglich
|
||||
</Switch>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (new[] { ProspectStateFilter.All, ProspectStateFilter.OnBoarding, ProspectStateFilter.Verification }.Contains(StateFilter))
|
||||
{
|
||||
<div style="margin-left: 1rem;">
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
WithoutIdCheck = CurrentFilter.WithoutIdCheck,
|
||||
NoActivity = CurrentFilter.NoActivity,
|
||||
RecentActivity = CurrentFilter.RecentActivity,
|
||||
DeletedOnly = CurrentFilter.DeletedOnly
|
||||
DeletedOnly = CurrentFilter.DeletedOnly,
|
||||
IdCheckPossible = CurrentFilter.IdCheckPossible
|
||||
};
|
||||
base.OnInitialized();
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@ namespace FoodsharingSiegen.Shared.Helper
|
||||
if (filter.DeletedOnly)
|
||||
filterListQ = filterListQ.Where(x => x.RecordState == RecordState.Archived);
|
||||
|
||||
// Show only prospects with possible IdCheck
|
||||
if (filter.IdCheckPossible)
|
||||
filterListQ = filterListQ.Where(x => x.Images != null && x.Images.Count > 0);
|
||||
|
||||
// No Activity Filter
|
||||
if (filter.NoActivity)
|
||||
filterListQ = filterListQ.Where(x => DateTime.Now - x.Modified > TimeSpan.FromDays(180));
|
||||
|
||||
Reference in New Issue
Block a user