From 804286245c96c184241d611d5f63775c422d60aa Mon Sep 17 00:00:00 2001 From: plockwood Date: Tue, 23 Jan 2024 14:55:34 +0000 Subject: [PATCH] bugfix: download was not using local authority or advisory board date filters --- .../AcademyConversionProjectRepository.cs | 17 +++++++++-------- .../IAcademyConversionProjectRepository.cs | 3 ++- .../Pages/ProjectList/Index.cshtml.cs | 2 +- ...ademyConversionProjectItemsCacheDecorator.cs | 5 +++-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs index 678027f19..28764374a 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs @@ -134,17 +134,18 @@ public async Task> AddProjectNote(int id, AddProjectNot : new ApiResponse(response.StatusCode, null); } public async Task> DownloadProjectExport( - int page, - int count, - string titleFilter = "", - IEnumerable statusFilters = default, - IEnumerable deliveryOfficerFilter = default, - IEnumerable regionsFilter = default, - IEnumerable applicationReferences = default) + int page, + int count, + string titleFilter = "", + IEnumerable statusFilters = default, + IEnumerable deliveryOfficerFilter = default, + IEnumerable regionsFilter = default, + IEnumerable localAuthoritiesFilter = default, + IEnumerable advisoryBoardDatesFilter = default) { AcademyConversionSearchModelV2 searchModel = new() { TitleFilter = titleFilter, Page = page, Count = count }; - ProcessFiltersV2(statusFilters, deliveryOfficerFilter, searchModel, regionsFilter, applicationReferences); + ProcessFiltersV2(statusFilters, deliveryOfficerFilter, searchModel, regionsFilter, localAuthoritiesFilter, advisoryBoardDatesFilter); HttpResponseMessage response = await _apiClient.DownloadProjectExport(searchModel); if (!response.IsSuccessStatusCode) diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs index aec6ab943..3c2971e03 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs @@ -24,7 +24,8 @@ Task> DownloadProjectExport( IEnumerable statusFilters = default, IEnumerable deliveryOfficerFilter = default, IEnumerable regionsFilter = default, - IEnumerable applicationReferences = default + IEnumerable localAuthoritiesFilter = default, + IEnumerable advisoryBoardDatesFilter = default ); Task>>> GetAllProjectsV2( diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs index 1058cd602..b2d98642b 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/ProjectList/Index.cshtml.cs @@ -57,7 +57,7 @@ public async Task OnGetAsync() public async Task OnGetDownload() { Filters.PersistUsing(TempData).PopulateFrom(Request.Query); - ApiResponse response = await _repository.DownloadProjectExport(CurrentPage, PageSize, Filters.Title, Filters.SelectedStatuses, Filters.SelectedOfficers, Filters.SelectedRegions); + ApiResponse response = await _repository.DownloadProjectExport(CurrentPage, PageSize, Filters.Title, Filters.SelectedStatuses, Filters.SelectedOfficers, Filters.SelectedRegions, Filters.SelectedLocalAuthorities, Filters.SelectedAdvisoryBoardDates); if (response.Success) { diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs index 916d64f02..ce96a2631 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs @@ -34,10 +34,11 @@ public async Task> DownloadProjectExport( IEnumerable statusFilters = default, IEnumerable deliveryOfficerFilter = default, IEnumerable regionsFilter = default, - IEnumerable applicationReferences = default + IEnumerable localAuthoritiesFilter = default, + IEnumerable advisoryBoardDatesFilter = default ) { - return await _innerRepository.DownloadProjectExport(page, count, titleFilter, statusFilters, deliveryOfficerFilter, regionsFilter, applicationReferences); + return await _innerRepository.DownloadProjectExport(page, count, titleFilter, statusFilters, deliveryOfficerFilter, regionsFilter, localAuthoritiesFilter, advisoryBoardDatesFilter); } public async Task> GetProjectById(int id) {