diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs index 1c2a9dcd6..d9c8f4b14 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs @@ -29,7 +29,7 @@ public async Task GetAllProjectsAsync(AcademyConversionSear { return await AcademisationClient.PostAsync(PathFor.GetAllProjects, JsonContent.Create(searchModel)); } - public async Task DownloadProjectExport(AcademyConversionSearchModel searchModel) + public async Task DownloadProjectExport(AcademyConversionSearchModelV2 searchModel) { return await AcademisationClient.PostAsync(PathFor.DownloadProjectExport, JsonContent.Create(searchModel)); } @@ -70,4 +70,9 @@ public async Task SetProjectExternalApplicationForm(int id, return await AcademisationClient.PutAsync(string.Format(PathFor.SetExternalApplicationForm, id), JsonContent.Create(payload)); } + + public async Task GetAllProjectsV2Async(AcademyConversionSearchModelV2 searchModel) + { + return await AcademisationClient.PostAsync(PathFor.GetAllProjectsV2, JsonContent.Create(searchModel)); + } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs index 70800c179..327250d0c 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs @@ -7,7 +7,8 @@ namespace Dfe.PrepareConversions.Data.Features; public interface IApiClient { Task GetAllProjectsAsync(AcademyConversionSearchModel searchModel); - Task DownloadProjectExport(AcademyConversionSearchModel searchModel); + Task DownloadProjectExport(AcademyConversionSearchModelV2 searchModel); + Task GetAllProjectsV2Async(AcademyConversionSearchModelV2 searchModel); Task GetProjectByIdAsync(int id); Task UpdateProjectAsync(int id, UpdateAcademyConversionProject updateProject); Task GetFilterParametersAsync(); diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs index 123591ef1..9aee66b58 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs @@ -18,4 +18,6 @@ public PathFor(IFeatureManager features) public static string GetFilterParameters => "/legacy/projects/status"; public static string AddProjectNote => "/legacy/project/{0}/notes"; public static string SetExternalApplicationForm => "/conversion-project/{0}/setExternalApplicationForm"; + + public static string GetAllProjectsV2 => "/conversion-project/projects"; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionSearchModelV2.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionSearchModelV2.cs new file mode 100644 index 000000000..ec7f5d8fb --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionSearchModelV2.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; + +namespace Dfe.PrepareConversions.Data.Models; + +public class AcademyConversionSearchModelV2 +{ + public int Page { get; set; } + public int Count { get; set; } + public string TitleFilter { get; set; } + public IEnumerable DeliveryOfficerQueryString { get; set; } + public IEnumerable RegionQueryString { get; set; } + public IEnumerable StatusQueryString { get; set; } + public IEnumerable LocalAuthoritiesQueryString { get; set; } + public IEnumerable AdvisoryBoardDatesQueryString { get; set; } +} diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/ProjectFilterParameters.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/ProjectFilterParameters.cs index a7629ccc0..d5fea9d6a 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/ProjectFilterParameters.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/ProjectFilterParameters.cs @@ -7,4 +7,6 @@ public class ProjectFilterParameters public List Statuses { get; set; } = new(); public List AssignedUsers { get; set; } = new(); public List Regions { get; set; } = new(); + public List LocalAuthorities { get; set; } = new(); + public List AdvisoryBoardDates { get; set; } = new(); } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs index 4154dfd23..79cb7e905 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs @@ -142,9 +142,9 @@ public async Task> DownloadProjectExport( IEnumerable regionsFilter = default, IEnumerable applicationReferences = default) { - AcademyConversionSearchModel searchModel = new() { TitleFilter = titleFilter, Page = page, Count = count }; + AcademyConversionSearchModelV2 searchModel = new() { TitleFilter = titleFilter, Page = page, Count = count }; - ProcessFilters(statusFilters, deliveryOfficerFilter, searchModel, regionsFilter, applicationReferences); + ProcessFiltersV2(statusFilters, deliveryOfficerFilter, searchModel, regionsFilter, applicationReferences); HttpResponseMessage response = await _apiClient.DownloadProjectExport(searchModel); if (!response.IsSuccessStatusCode) @@ -188,6 +188,41 @@ private void ProcessFilters(IEnumerable statusFilters, } } + private void ProcessFiltersV2(IEnumerable statusFilters, + IEnumerable deliveryOfficerFilter, + AcademyConversionSearchModelV2 searchModel, + IEnumerable regionsFilter = default, + IEnumerable localAuthoritiesFilter = default, + IEnumerable advisoryBoardDateFilter = default + ) + { + if (deliveryOfficerFilter != default) + { + searchModel.DeliveryOfficerQueryString = deliveryOfficerFilter; + } + if (statusFilters != null) + { + IEnumerable projectedStatuses = statusFilters.SelectMany(x => + _invertedAliasedStatuses.ContainsKey(x.ToLowerInvariant()) + ? new[] { x, _invertedAliasedStatuses[x.ToLowerInvariant()] } + : new[] { x }); + + searchModel.StatusQueryString = projectedStatuses.ToArray(); + } + if (regionsFilter != default) + { + searchModel.RegionQueryString = regionsFilter.Select(x => x.ToLower()).ToList(); + } + if (localAuthoritiesFilter != default) + { + searchModel.LocalAuthoritiesQueryString = localAuthoritiesFilter.Select(x => x.ToLower()).ToList(); + } + if (advisoryBoardDateFilter != default) + { + searchModel.AdvisoryBoardDatesQueryString = advisoryBoardDateFilter.Select(x => x.ToLower()).ToList(); + } + } + private async Task ReadFromJsonAndThrowIfNull(HttpContent content) { T responseObj = await content.ReadFromJsonAsync(); @@ -203,4 +238,22 @@ public async Task SetProjectExternalApplicationForm(int id, bool externalApplica HttpResponseMessage result = await _apiClient.SetProjectExternalApplicationForm(id, externalApplicationFormSaved, externalApplicationFormUrl); if (result.IsSuccessStatusCode is false) throw new ApiResponseException($"Request to Api failed | StatusCode - {result.StatusCode}"); } + + public async Task>>> GetAllProjectsV2(int page, int count, string titleFilter = "", IEnumerable statusFilters = null, IEnumerable deliveryOfficerFilter = null, IEnumerable regionsFilter = null, IEnumerable localAuthoritiesFilter = null, IEnumerable advisoryBoardDatesFilter = null) + { + AcademyConversionSearchModelV2 searchModel = new() { TitleFilter = titleFilter, Page = page, Count = count }; + + ProcessFiltersV2(statusFilters, deliveryOfficerFilter, searchModel, regionsFilter, localAuthoritiesFilter, advisoryBoardDatesFilter); + + HttpResponseMessage response = await _apiClient.GetAllProjectsV2Async(searchModel); + if (!response.IsSuccessStatusCode) + { + return new ApiResponse>>(response.StatusCode, + new ApiV2Wrapper> { Data = Enumerable.Empty() }); + } + + ApiV2Wrapper> outerResponse = await response.Content.ReadFromJsonAsync>>(); + + return new ApiResponse>>(response.StatusCode, outerResponse); + } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs index 3b6954b3d..4b1d92250 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs @@ -27,6 +27,17 @@ Task> DownloadProjectExport( IEnumerable applicationReferences = default ); + Task>>> GetAllProjectsV2( + int page, + int count, + string titleFilter = "", + IEnumerable statusFilters = default, + IEnumerable deliveryOfficerFilter = default, + IEnumerable regionsFilter = default, + IEnumerable localAuthoritiesFilter = default, + IEnumerable advisoryBoardDatesFilter = default +); + Task> GetProjectById(int id); Task> UpdateProject(int id, UpdateAcademyConversionProject updateProject); Task CreateProject(CreateNewProject newProject); diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs index e29df88f4..2fd9a230b 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs @@ -22,7 +22,7 @@ public abstract partial class BaseIntegrationTests protected IEnumerable AddGetProjects(Action postSetup = null, int? recordCount = null, - AcademyConversionSearchModel searchModel = null) + AcademyConversionSearchModelV2 searchModel = null) { List projects = _fixture .Build() @@ -41,17 +41,19 @@ protected IEnumerable AddGetProjects(Action(), DeliveryOfficerQueryString = Array.Empty(), - RegionQueryString = Array.Empty() + RegionQueryString = Array.Empty(), + LocalAuthoritiesQueryString = Array.Empty(), + AdvisoryBoardDatesQueryString = Array.Empty() }; - _factory.AddPostWithJsonRequest(PathFor.GetAllProjects, searchModel, response); + _factory.AddPostWithJsonRequest(PathFor.GetAllProjectsV2, searchModel, response); return projects; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListFilteringIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListFilteringIntegrationTests.cs index 20799f782..84790464b 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListFilteringIntegrationTests.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListFilteringIntegrationTests.cs @@ -54,12 +54,6 @@ public void Should_display_all_projects_by_default() FilterCount.TextContent.Should().NotContainEquivalentOf("Filtered projects"); } - [Fact] - public void Should_not_display_the_filter_options_by_default() - { - FilterOptions.HasAttribute("open").Should().BeFalse(); - } - [Fact] public async Task Should_display_filtered_banner_when_filter_is_active() { @@ -70,26 +64,19 @@ public async Task Should_display_filtered_banner_when_filter_is_active() FilterBanner.InnerHtml.Should().ContainEquivalentOf("Projects filtered."); } - [Fact] - public async Task Should_keep_filter_options_visible_when_filter_is_active() - { - FilterStatuses.First().IsChecked = true; - await FilterApply.SubmitAsync(); - - FilterOptions.HasAttribute("open").Should().BeTrue(); - } - [Fact] public async Task Should_display_filtered_projects_in_place_of_all_projects_when_filter_is_active() { - AcademyConversionSearchModel searchModel = new() + AcademyConversionSearchModelV2 searchModel = new() { Page = 1, Count = 10, StatusQueryString = new[] { "Accepted" }, TitleFilter = string.Empty, DeliveryOfficerQueryString = Array.Empty(), - RegionQueryString = Array.Empty() + RegionQueryString = Array.Empty(), + LocalAuthoritiesQueryString = Array.Empty(), + AdvisoryBoardDatesQueryString = Array.Empty(), }; AddGetProjects(recordCount: _recordCount, searchModel: searchModel); @@ -106,7 +93,7 @@ public async Task Should_keep_the_filter_options_visible_when_title_filter_is_sp FilterTitle.Value = "something"; await FilterApply.SubmitAsync(); - FilterOptions.HasAttribute("open").Should().BeTrue(); + FilterTitle.Value.Should().Be("something"); } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/ProjectList/ProjectListFilters.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/ProjectList/ProjectListFilters.cs index dc31a16fa..591355567 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/ProjectList/ProjectListFilters.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/ProjectList/ProjectListFilters.cs @@ -14,6 +14,8 @@ public class ProjectListFilters public const string FilterStatuses = nameof(FilterStatuses); public const string FilterOfficers = nameof(FilterOfficers); public const string FilterRegions = nameof(FilterRegions); + public const string FilterLocalAuthorities = nameof(FilterLocalAuthorities); + public const string FilterAdvisoryBoardDates = nameof(FilterAdvisoryBoardDates); private IDictionary _store = null!; @@ -21,6 +23,9 @@ public class ProjectListFilters public List AvailableDeliveryOfficers { get; set; } = new(); public List AvailableRegions { get; set; } = new(); + public List AvailableLocalAuthorities { get; set; } = new(); + public List AvailableAdvisoryBoardDates { get; set; } = new(); + [BindProperty] public string? Title { get; set; } @@ -33,10 +38,18 @@ public class ProjectListFilters [BindProperty] public string[] SelectedRegions { get; set; } = Array.Empty(); + [BindProperty] + public string[] SelectedLocalAuthorities { get; set; } = Array.Empty(); + + [BindProperty] + public string[] SelectedAdvisoryBoardDates { get; set; } = Array.Empty(); + public bool IsVisible => string.IsNullOrWhiteSpace(Title) is false || SelectedStatuses.Length > 0 || SelectedOfficers.Length > 0 || - SelectedRegions.Length > 0; + SelectedRegions.Length > 0 || + SelectedLocalAuthorities.Length > 0 || + SelectedAdvisoryBoardDates.Length > 0; public ProjectListFilters PersistUsing(IDictionary store) { @@ -46,6 +59,8 @@ public ProjectListFilters PersistUsing(IDictionary store) SelectedStatuses = Get(FilterStatuses); SelectedOfficers = Get(FilterOfficers); SelectedRegions = Get(FilterRegions); + SelectedLocalAuthorities = Get(FilterLocalAuthorities); + SelectedAdvisoryBoardDates = Get(FilterAdvisoryBoardDates); return this; } @@ -62,6 +77,8 @@ public void PopulateFrom(IEnumerable> request SelectedStatuses = Array.Empty(); SelectedOfficers = Array.Empty(); SelectedRegions = Array.Empty(); + SelectedLocalAuthorities = Array.Empty(); + SelectedAdvisoryBoardDates = Array.Empty(); return; } @@ -69,7 +86,9 @@ public void PopulateFrom(IEnumerable> request bool activeFilterChanges = query.ContainsKey(nameof(Title)) || query.ContainsKey(nameof(SelectedStatuses)) || query.ContainsKey(nameof(SelectedOfficers)) || - query.ContainsKey(nameof(SelectedRegions)); + query.ContainsKey(nameof(SelectedRegions)) || + query.ContainsKey(nameof(SelectedLocalAuthorities)) || + query.ContainsKey(nameof(SelectedAdvisoryBoardDates)); if (activeFilterChanges) { @@ -77,6 +96,8 @@ public void PopulateFrom(IEnumerable> request SelectedStatuses = Cache(FilterStatuses, GetFromQuery(nameof(SelectedStatuses))); SelectedOfficers = Cache(FilterOfficers, GetFromQuery(nameof(SelectedOfficers))); SelectedRegions = Cache(FilterRegions, GetFromQuery(nameof(SelectedRegions))); + SelectedLocalAuthorities = Cache(FilterLocalAuthorities, GetFromQuery(nameof(SelectedLocalAuthorities))); + SelectedAdvisoryBoardDates = Cache(FilterAdvisoryBoardDates, GetFromQuery(nameof(SelectedAdvisoryBoardDates))); } else { @@ -84,6 +105,8 @@ public void PopulateFrom(IEnumerable> request SelectedStatuses = Get(FilterStatuses, true); SelectedOfficers = Get(FilterOfficers, true); SelectedRegions = Get(FilterRegions, true); + SelectedLocalAuthorities = Get(FilterLocalAuthorities, true); + SelectedAdvisoryBoardDates = Get(FilterAdvisoryBoardDates, true); } string[] GetFromQuery(string key) @@ -118,6 +141,8 @@ private void ClearFilters() Cache(FilterStatuses, default); Cache(FilterOfficers, default); Cache(FilterRegions, default); + Cache(FilterLocalAuthorities, default); + Cache(FilterAdvisoryBoardDates, default); } /// diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml index d8e5a46dd..e979b0fe3 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml @@ -3,50 +3,56 @@ @using Microsoft.FeatureManagement.Mvc.TagHelpers @model Dfe.PrepareConversions.Pages.ProjectList.IndexModel @{ - ViewData["Title"] = "Project list"; + ViewData["Title"] = "Project list"; }
-
-

Manage an academy conversion

-

Use this service to start a new conversion project

- + +
- + +
+
-
-
There are no matching results.
-

Improve your results by:

-
    -
  • double-checking your spelling
  • -
  • searching again with another school
  • -
  • removing some filters
  • -
-
+

@(Model.TotalProjects) projects found

-
-
- -
+
+
There are no matching results.
+

Improve your results by:

+
    +
  • double-checking your spelling
  • +
  • searching again with another school
  • +
  • removing some filters
  • +
+
+ +
+ Download as a spreadsheet +
+ +
@@ -62,7 +68,7 @@
Projects (@Model.ProjectCount)
- -
-
+ +
+
\ No newline at end of file diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs index 549620cae..1058cd602 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs @@ -37,7 +37,7 @@ public async Task OnGetAsync() Filters.PersistUsing(TempData).PopulateFrom(Request.Query); ApiResponse>> response = - await _repository.GetAllProjects(CurrentPage, PageSize, Filters.Title, Filters.SelectedStatuses, Filters.SelectedOfficers, Filters.SelectedRegions); + await _repository.GetAllProjectsV2(CurrentPage, PageSize, Filters.Title, Filters.SelectedStatuses, Filters.SelectedOfficers, Filters.SelectedRegions, Filters.SelectedLocalAuthorities, Filters.SelectedAdvisoryBoardDates); Paging = response.Body?.Paging; Projects = response.Body?.Data.Select(ProjectListHelper.Build).ToList(); @@ -50,6 +50,8 @@ public async Task OnGetAsync() Filters.AvailableStatuses = filterParametersResponse.Body.Statuses.ConvertAll(r => r.ToSentenceCase()); Filters.AvailableDeliveryOfficers = filterParametersResponse.Body.AssignedUsers; Filters.AvailableRegions = filterParametersResponse.Body.Regions; + Filters.AvailableLocalAuthorities = filterParametersResponse.Body.LocalAuthorities; + Filters.AvailableAdvisoryBoardDates = filterParametersResponse.Body.AdvisoryBoardDates; } } public async Task OnGetDownload() diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectListFilters.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectListFilters.cshtml index 3e5f586d3..66d16e8a4 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectListFilters.cshtml +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectListFilters.cshtml @@ -1,149 +1,271 @@ @using Dfe.PrepareConversions.Utils @model Dfe.PrepareConversions.Models.ProjectList.ProjectListFilters +
+ +
+ +
+

Filter

+
+ +
+
+ +
+ +
+
+ +
+ +
+

Selected filters

+
+ + -
- - - Filter projects - - Download as a spreadsheet - -
-
-
-
-
-

- -

- -
- For example, Bolton Spa Primary -
- - -
- @*REGIONS*@ -
-
-
- - - Project Region - - - -
- Select all that apply. -
- -
- @{ - foreach (var region in Model.AvailableRegions) - { -
- - -
- } + @if (Model.SelectedOfficers.Length > 0) + { +

Assigned to

+ +
-
-
-
- @*STATUS*@ -
-
-
- - - Project status - - - -
- Select all that apply. -
- -
- @{ - foreach (var status in Model.AvailableStatuses) - { -
- - -
- } + } + + + } + @if (Model.SelectedRegions.Length > 0) + { +

Region

+ +
-
-
-
- @*DELIVERY OFFICERS*@ -
-
-
- - - Delivery officers - - - -
- Select all that apply. -
- -
- @{ -
- - -
- foreach (var officer in Model.AvailableDeliveryOfficers) - { -
- - -
- } + } + + + } + @if (Model.SelectedLocalAuthorities.Length > 0) + { +

Local Authority

+ +
-
-
-
-
+ } -
-
-
- + + } + @if (Model.SelectedStatuses.Length > 0) + { +

Project status

- Clear filters -
-
-
-
-
-
\ No newline at end of file + + } + @if (Model.SelectedAdvisoryBoardDates.Length > 0) + { +

Advisory board date

+ + + } +
+ +
+
+ + +
+ + You can search by school name, academy name, trust name and URN + + +
+ +
+ +
+
+
+
+

+ + Assigned to + +

+
+
+ @{ +
+ + +
+ foreach (var officer in Model.AvailableDeliveryOfficers) + { +
+ + +
+ } + } +
+
+
+
+

+ + Region + +

+
+
+
+ @{ + foreach (var region in Model.AvailableRegions) + { +
+ + +
+ } + } +
+
+
+
+
+

+ + Local Authority + +

+
+
+
+ @{ + foreach (var localAuthority in Model.AvailableLocalAuthorities) + { +
+ + +
+ } + } +
+
+
+ +
+
+

+ + Project status + +

+
+
+
+ @{ + foreach (var status in Model.AvailableStatuses) + { +
+ + +
+ } + } +
+
+
+ + +
+
+

+ + Advisory board date + +

+
+
+ @{ + foreach (var boardDates in Model.AvailableAdvisoryBoardDates) + { +
+ + +
+ } + } +
+
+ +
+ + +
+ +
+
+
+ +
+ +
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs index 957b1ed75..c4caa964f 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs @@ -86,4 +86,9 @@ public async Task SetProjectExternalApplicationForm(int id, bool externalApplica { await _innerRepository.SetProjectExternalApplicationForm(id, externalApplicationFormSaved, externalApplicationFormUrl); } + + public async Task>>> GetAllProjectsV2(int page, int count, string titleFilter = "", IEnumerable statusFilters = null, IEnumerable deliveryOfficerFilter = null, IEnumerable regionsFilter = null, IEnumerable localAuthoritiesFilter = null, IEnumerable advisoryBoardDatesFilter = null) + { + return await _innerRepository.GetAllProjectsV2(page, count, titleFilter, statusFilters, deliveryOfficerFilter, regionsFilter, localAuthoritiesFilter, advisoryBoardDatesFilter); + } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/libman.json b/Dfe.PrepareConversions/Dfe.PrepareConversions/libman.json new file mode 100644 index 000000000..ceee2710f --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/libman.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "defaultProvider": "cdnjs", + "libraries": [] +} \ No newline at end of file diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package-lock.json b/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package-lock.json index cb7a442da..a34dd1f54 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package-lock.json +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package-lock.json @@ -5,10 +5,10 @@ "packages": { "": { "dependencies": { - "@ministryofjustice/frontend": "^0.2.6", + "@ministryofjustice/frontend": "^1.8.1", "accessible-autocomplete": "^2.0.4", "dfe-frontend-alpha": "^1.0.1", - "govuk-frontend": "^3.14.0", + "govuk-frontend": "^4.7.0", "jquery": "^3.6.1" }, "devDependencies": { @@ -2356,14 +2356,18 @@ } }, "node_modules/@ministryofjustice/frontend": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-0.2.6.tgz", - "integrity": "sha512-Q7VxqmOm/uFUpD2/EZjVgaAJ2EgKjNWZPFQN74HkSQ24ZK+tQERGfWkw5DM8molmtnwNns9XBL3E0lVJ/moJnA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-1.8.1.tgz", + "integrity": "sha512-HNl8XXbNje/NtQRlGM57CTLlAGBTW+ziGTBkxXHDn7VauKNz418PnErDlKRWeaHIyc6V9twI5EbOj4lFCsvasw==", "dependencies": { + "govuk-frontend": "^3.0.0 || ^4.0.0", "moment": "^2.27.0" }, "engines": { "node": ">= 4.2.0" + }, + "peerDependencies": { + "jquery": "^3.6.0" } }, "node_modules/@nodelib/fs.scandir": { @@ -5010,14 +5014,6 @@ "node": "18.x" } }, - "node_modules/dfe-frontend-alpha/node_modules/govuk-frontend": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", - "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==", - "engines": { - "node": ">= 4.2.0" - } - }, "node_modules/diff-sequences": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", @@ -6597,9 +6593,9 @@ } }, "node_modules/govuk-frontend": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.14.0.tgz", - "integrity": "sha512-y7FTuihCSA8Hty+e9h0uPhCoNanCAN+CLioNFlPmlbeHXpbi09VMyxTcH+XfnMPY4Cp++7096v0rLwwdapTXnA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", + "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==", "engines": { "node": ">= 4.2.0" } @@ -17714,10 +17710,11 @@ } }, "@ministryofjustice/frontend": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-0.2.6.tgz", - "integrity": "sha512-Q7VxqmOm/uFUpD2/EZjVgaAJ2EgKjNWZPFQN74HkSQ24ZK+tQERGfWkw5DM8molmtnwNns9XBL3E0lVJ/moJnA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-1.8.1.tgz", + "integrity": "sha512-HNl8XXbNje/NtQRlGM57CTLlAGBTW+ziGTBkxXHDn7VauKNz418PnErDlKRWeaHIyc6V9twI5EbOj4lFCsvasw==", "requires": { + "govuk-frontend": "^3.0.0 || ^4.0.0", "moment": "^2.27.0" } }, @@ -19867,13 +19864,6 @@ "wait-on": "^6.0.0", "webpack": "^5.74.0", "webpack-stream": "^5.2.1" - }, - "dependencies": { - "govuk-frontend": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", - "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==" - } } }, "diff-sequences": { @@ -21110,9 +21100,9 @@ } }, "govuk-frontend": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.14.0.tgz", - "integrity": "sha512-y7FTuihCSA8Hty+e9h0uPhCoNanCAN+CLioNFlPmlbeHXpbi09VMyxTcH+XfnMPY4Cp++7096v0rLwwdapTXnA==" + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", + "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==" }, "graceful-fs": { "version": "4.2.10", diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package.json b/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package.json index b654ea78d..ada6dc7a5 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package.json +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/wwwroot/package.json @@ -17,10 +17,10 @@ "webpack-cli": "^4.10.0" }, "dependencies": { - "@ministryofjustice/frontend": "^0.2.6", + "@ministryofjustice/frontend": "^1.8.1", "accessible-autocomplete": "^2.0.4", "dfe-frontend-alpha": "^1.0.1", - "govuk-frontend": "^3.14.0", + "govuk-frontend": "^4.7.0", "jquery": "^3.6.1" } }