diff --git a/FoodsharingSiegen.Server/Auth/AuthService.cs b/FoodsharingSiegen.Server/Auth/AuthService.cs index 6ebc4c9..58a31e6 100644 --- a/FoodsharingSiegen.Server/Auth/AuthService.cs +++ b/FoodsharingSiegen.Server/Auth/AuthService.cs @@ -106,7 +106,7 @@ namespace FoodsharingSiegen.Server.Auth { Name = "Andre", Mail = "fs@beging.de", - GroupsList = new List { UserGroup.Ambassador }, + GroupsList = [UserGroup.Ambassador], Type = UserType.Admin, Created = DateTime.UtcNow, EncryptedPassword = "qSIxTZo7J8M=" diff --git a/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj b/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj index 420c8e1..a4f6944 100644 --- a/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj +++ b/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj @@ -4,8 +4,18 @@ net9.0 enable enable + Linux + + $([System.DateTime]::Now.ToString("yyyyMMdd")) + ..\Publish\Server + + + + + + diff --git a/FoodsharingSiegen.Server/Pages/Prospects.razor b/FoodsharingSiegen.Server/Pages/Prospects.razor index 5dd7397..b517f32 100644 --- a/FoodsharingSiegen.Server/Pages/Prospects.razor +++ b/FoodsharingSiegen.Server/Pages/Prospects.razor @@ -2,6 +2,7 @@ @page "/prospect" @page "/prospects" +@using FoodsharingSiegen.Shared.Helper @inherits FsBase Neue Foodsaver - @AppSettings.Title @@ -15,28 +16,15 @@ @{ - var filterListQ = ProspectList?.AsQueryable(); - if (!string.IsNullOrWhiteSpace(Filter.Text)) - { - filterListQ = filterListQ? - .Where(x => - x.Name.Contains(Filter.Text, StringComparison.OrdinalIgnoreCase) || - (!string.IsNullOrWhiteSpace(x.Memo) && x.Memo.Contains(Filter.Text, StringComparison.OrdinalIgnoreCase) == true) || - x.FsId.ToString().Contains(Filter.Text, StringComparison.OrdinalIgnoreCase)).AsQueryable(); - } - - if (Filter.WithoutStepInBriefing) - filterListQ = filterListQ?.Where(x => x.Interactions.All(i => i.Type != InteractionType.StepInBriefing)); - - var filterList = filterListQ?.ToList(); + var filterList = ProspectList.ApplyFilter(Filter); }

-
@(filterList?.Count ?? 0) Einträge
+
@(filterList.Count) Einträge
-@if (filterList?.Any() == true) +@if (filterList.Any()) {
diff --git a/FoodsharingSiegen.Server/Pages/Prospects.razor.cs b/FoodsharingSiegen.Server/Pages/Prospects.razor.cs index 6c9e537..a0e0f80 100644 --- a/FoodsharingSiegen.Server/Pages/Prospects.razor.cs +++ b/FoodsharingSiegen.Server/Pages/Prospects.razor.cs @@ -80,6 +80,7 @@ namespace FoodsharingSiegen.Server.Pages { CannotHaveInteractions = [InteractionType.Complete, InteractionType.Verify, InteractionType.ReleasedForVerification] }; + var prospectsR = await ProspectService.GetProspectsAsync(parameter); if (prospectsR.Success) ProspectList = prospectsR.Data; diff --git a/FoodsharingSiegen.Server/Pages/ProspectsDone.razor b/FoodsharingSiegen.Server/Pages/ProspectsDone.razor index c0d8e8a..20e5bb3 100644 --- a/FoodsharingSiegen.Server/Pages/ProspectsDone.razor +++ b/FoodsharingSiegen.Server/Pages/ProspectsDone.razor @@ -1,32 +1,20 @@ @page "/done" +@using FoodsharingSiegen.Shared.Helper @inherits FsBase Abgeschlossene Einarbeitungen - @AppSettings.Title

Abgeschlossene Einarbeitungen

@{ - var filterListQ = ProspectList?.AsQueryable(); - if (!string.IsNullOrWhiteSpace(Filter.Text)) - { - filterListQ = filterListQ? - .Where(x => - x.Name.Contains(Filter.Text, StringComparison.OrdinalIgnoreCase) || - (!string.IsNullOrWhiteSpace(x.Memo) && x.Memo.Contains(Filter.Text, StringComparison.OrdinalIgnoreCase) == true) || - x.FsId.ToString().Contains(Filter.Text, StringComparison.OrdinalIgnoreCase)).AsQueryable(); - } - - if (Filter.WithoutStepInBriefing) - filterListQ = filterListQ?.Where(x => x.Interactions.All(i => i.Type != InteractionType.StepInBriefing)); - - var filterList = filterListQ?.ToList(); + var filterList = ProspectList.ApplyFilter(Filter); }

-
@(filterList?.Count ?? 0) Einträge
-@if (filterList?.Any() == true) +
@(filterList.Count) Einträge
+@if (filterList.Any()) {
diff --git a/FoodsharingSiegen.Server/Pages/ProspectsTodo.razor b/FoodsharingSiegen.Server/Pages/ProspectsTodo.razor deleted file mode 100644 index f91d8f8..0000000 --- a/FoodsharingSiegen.Server/Pages/ProspectsTodo.razor +++ /dev/null @@ -1,40 +0,0 @@ -@page "/todo" - -@inherits FsBase - -Freischalten - @AppSettings.Title - -

Freischalten

- -@{ - var filterListQ = ProspectList?.AsQueryable(); - if (!string.IsNullOrWhiteSpace(Filter.Text)) - { - filterListQ = filterListQ? - .Where(x => - x.Name.Contains(Filter.Text, StringComparison.OrdinalIgnoreCase) || - (!string.IsNullOrWhiteSpace(x.Memo) && x.Memo.Contains(Filter.Text, StringComparison.OrdinalIgnoreCase) == true) || - x.FsId.ToString().Contains(Filter.Text, StringComparison.OrdinalIgnoreCase)).AsQueryable(); - } - - if (Filter.WithoutStepInBriefing) - filterListQ = filterListQ?.Where(x => x.Interactions.All(i => i.Type != InteractionType.StepInBriefing)); - - var filterList = filterListQ?.ToList(); -} - -
- -
-
@(filterList?.Count ?? 0) Einträge
-@if (filterList?.Any() == true) -{ -
- - - -
-} - - - \ No newline at end of file diff --git a/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor b/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor new file mode 100644 index 0000000..2817029 --- /dev/null +++ b/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor @@ -0,0 +1,28 @@ +@page "/verify" + +@using FoodsharingSiegen.Shared.Helper +@inherits FsBase + +Freischalten - @AppSettings.Title + +

Freischalten

+ +@{ + var filterList = ProspectList.ApplyFilter(Filter); +} + +
+ +
+
@(filterList.Count) Einträge
+@if (filterList.Any()) +{ +
+ + + +
+} + + + \ No newline at end of file diff --git a/FoodsharingSiegen.Server/Pages/ProspectsTodo.razor.cs b/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor.cs similarity index 99% rename from FoodsharingSiegen.Server/Pages/ProspectsTodo.razor.cs rename to FoodsharingSiegen.Server/Pages/ProspectsVerify.razor.cs index 46873f8..b7f8b06 100644 --- a/FoodsharingSiegen.Server/Pages/ProspectsTodo.razor.cs +++ b/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor.cs @@ -9,7 +9,7 @@ namespace FoodsharingSiegen.Server.Pages /// /// The prospects done class (a. beging, 07.02.2023) /// - public partial class ProspectsTodo + public partial class ProspectsVerify { #region Dependencies diff --git a/FoodsharingSiegen.Server/Shared/NavMenu.razor b/FoodsharingSiegen.Server/Shared/NavMenu.razor index f55586a..13d5bee 100644 --- a/FoodsharingSiegen.Server/Shared/NavMenu.razor +++ b/FoodsharingSiegen.Server/Shared/NavMenu.razor @@ -1,4 +1,4 @@ -
+ + @if (CurrentUser.IsAdmin()) + { +
+ + }
@if (CurrentUser.IsAdmin()) { -