From 1f74c1737a5ebb2cf142f5b0515230d423d1f68e Mon Sep 17 00:00:00 2001 From: Carl Sixsmith Date: Mon, 16 Sep 2024 12:14:59 +0100 Subject: [PATCH 1/2] CFODEV-740 This adds pagination and searching to the PQA screen. --- .../EnrolmentPqaQueueEntrySpecification.cs | 2 ++ src/Server.UI/Pages/QA/Enrolments/PqaList.razor | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs b/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs index 0d39ffcc..6e77a9ad 100644 --- a/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs +++ b/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs @@ -19,6 +19,8 @@ public EnrolmentQa1QueueEntrySpecification(QueueEntryFilter filter) Query.Where(e => e.TenantId .StartsWith(filter.CurrentUser!.TenantId!)) .Where(e => e.IsCompleted == false); + + Query.Where(e => e.ParticipantId.Contains(filter.Keyword!), string.IsNullOrWhiteSpace(filter.Keyword) == false); } } diff --git a/src/Server.UI/Pages/QA/Enrolments/PqaList.razor b/src/Server.UI/Pages/QA/Enrolments/PqaList.razor index 2361e1e8..01096628 100644 --- a/src/Server.UI/Pages/QA/Enrolments/PqaList.razor +++ b/src/Server.UI/Pages/QA/Enrolments/PqaList.razor @@ -103,15 +103,16 @@ - @* - - - @ConstantString.View - - - - *@ + + @ConstantString.NoRecords + + + @ConstantString.Loading + + + + @code { From 5ac64b64faf9b9c915a930d6d0d270a66bd94ae7 Mon Sep 17 00:00:00 2001 From: Carl Sixsmith Date: Mon, 16 Sep 2024 13:56:29 +0100 Subject: [PATCH 2/2] Address issues in https://github.com/ministryofjustice/CFO-CaseAssessmentTrackingSystem/pull/248#pullrequestreview-2306535911 --- .../EnrolmentPqaQueueEntrySpecification.cs | 20 ------------------- .../EnrolmentQa1QueueEntrySpecification.cs | 15 ++++++++++++++ .../EnrolmentQa2QueueEntrySpecification.cs | 15 ++++++++++++++ .../Pages/Participants/Participants.razor | 9 +++++++++ .../QA/Enrolments/Components/QA1List.razor | 9 +++++++++ .../QA/Enrolments/Components/QA2List.razor | 9 +++++++++ .../Pages/QA/Enrolments/PqaList.razor | 2 +- 7 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 src/Application/Features/QualityAssurance/Queries/EnrolmentQa1QueueEntrySpecification.cs create mode 100644 src/Application/Features/QualityAssurance/Queries/EnrolmentQa2QueueEntrySpecification.cs diff --git a/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs b/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs index 6e77a9ad..fd483a36 100644 --- a/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs +++ b/src/Application/Features/QualityAssurance/Queries/EnrolmentPqaQueueEntrySpecification.cs @@ -5,16 +5,6 @@ namespace Cfo.Cats.Application.Features.QualityAssurance.Queries; public class EnrolmentPqaQueueEntrySpecification : Specification { public EnrolmentPqaQueueEntrySpecification(QueueEntryFilter filter) - { - Query.Where(e => e.TenantId - .StartsWith(filter.CurrentUser!.TenantId!)) - .Where(e => e.IsCompleted == false); - } -} - -public class EnrolmentQa1QueueEntrySpecification : Specification -{ - public EnrolmentQa1QueueEntrySpecification(QueueEntryFilter filter) { Query.Where(e => e.TenantId .StartsWith(filter.CurrentUser!.TenantId!)) @@ -23,13 +13,3 @@ public EnrolmentQa1QueueEntrySpecification(QueueEntryFilter filter) Query.Where(e => e.ParticipantId.Contains(filter.Keyword!), string.IsNullOrWhiteSpace(filter.Keyword) == false); } } - -public class EnrolmentQa2QueueEntrySpecification : Specification -{ - public EnrolmentQa2QueueEntrySpecification(QueueEntryFilter filter) - { - Query.Where(e => e.TenantId - .StartsWith(filter.CurrentUser!.TenantId!)) - .Where(e => e.IsCompleted == false); - } -} \ No newline at end of file diff --git a/src/Application/Features/QualityAssurance/Queries/EnrolmentQa1QueueEntrySpecification.cs b/src/Application/Features/QualityAssurance/Queries/EnrolmentQa1QueueEntrySpecification.cs new file mode 100644 index 00000000..b0664441 --- /dev/null +++ b/src/Application/Features/QualityAssurance/Queries/EnrolmentQa1QueueEntrySpecification.cs @@ -0,0 +1,15 @@ +using Cfo.Cats.Domain.Entities.Participants; + +namespace Cfo.Cats.Application.Features.QualityAssurance.Queries; + +public class EnrolmentQa1QueueEntrySpecification : Specification +{ + public EnrolmentQa1QueueEntrySpecification(QueueEntryFilter filter) + { + Query.Where(e => e.TenantId + .StartsWith(filter.CurrentUser!.TenantId!)) + .Where(e => e.IsCompleted == false); + + Query.Where(e => e.ParticipantId.Contains(filter.Keyword!), string.IsNullOrWhiteSpace(filter.Keyword) == false); + } +} diff --git a/src/Application/Features/QualityAssurance/Queries/EnrolmentQa2QueueEntrySpecification.cs b/src/Application/Features/QualityAssurance/Queries/EnrolmentQa2QueueEntrySpecification.cs new file mode 100644 index 00000000..47cefbc2 --- /dev/null +++ b/src/Application/Features/QualityAssurance/Queries/EnrolmentQa2QueueEntrySpecification.cs @@ -0,0 +1,15 @@ +using Cfo.Cats.Domain.Entities.Participants; + +namespace Cfo.Cats.Application.Features.QualityAssurance.Queries; + +public class EnrolmentQa2QueueEntrySpecification : Specification +{ + public EnrolmentQa2QueueEntrySpecification(QueueEntryFilter filter) + { + Query.Where(e => e.TenantId + .StartsWith(filter.CurrentUser!.TenantId!)) + .Where(e => e.IsCompleted == false); + + Query.Where(e => e.ParticipantId.Contains(filter.Keyword!), string.IsNullOrWhiteSpace(filter.Keyword) == false); + } +} \ No newline at end of file diff --git a/src/Server.UI/Pages/Participants/Participants.razor b/src/Server.UI/Pages/Participants/Participants.razor index b0fe1c7b..fc1e7a13 100644 --- a/src/Server.UI/Pages/Participants/Participants.razor +++ b/src/Server.UI/Pages/Participants/Participants.razor @@ -176,6 +176,15 @@ + + @ConstantString.NoRecords + + + @ConstantString.Loading + + + + @code { diff --git a/src/Server.UI/Pages/QA/Enrolments/Components/QA1List.razor b/src/Server.UI/Pages/QA/Enrolments/Components/QA1List.razor index 2f4b48b5..77b03245 100644 --- a/src/Server.UI/Pages/QA/Enrolments/Components/QA1List.razor +++ b/src/Server.UI/Pages/QA/Enrolments/Components/QA1List.razor @@ -113,6 +113,15 @@ + + @ConstantString.NoRecords + + + @ConstantString.Loading + + + + @code { diff --git a/src/Server.UI/Pages/QA/Enrolments/Components/QA2List.razor b/src/Server.UI/Pages/QA/Enrolments/Components/QA2List.razor index 3b798504..e5b332c0 100644 --- a/src/Server.UI/Pages/QA/Enrolments/Components/QA2List.razor +++ b/src/Server.UI/Pages/QA/Enrolments/Components/QA2List.razor @@ -112,6 +112,15 @@ + + @ConstantString.NoRecords + + + @ConstantString.Loading + + + + @code { diff --git a/src/Server.UI/Pages/QA/Enrolments/PqaList.razor b/src/Server.UI/Pages/QA/Enrolments/PqaList.razor index 01096628..f569efd1 100644 --- a/src/Server.UI/Pages/QA/Enrolments/PqaList.razor +++ b/src/Server.UI/Pages/QA/Enrolments/PqaList.razor @@ -104,7 +104,7 @@ - + @ConstantString.NoRecords