diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs index d9c8f4b14..4f2e5cd26 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/ApiClient.cs @@ -1,7 +1,6 @@ using Dfe.PrepareConversions.Data.Models; using Dfe.PrepareConversions.Data.Services; using Microsoft.FeatureManagement; -using System.Dynamic; using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; @@ -70,6 +69,28 @@ public async Task SetProjectExternalApplicationForm(int id, return await AcademisationClient.PutAsync(string.Format(PathFor.SetExternalApplicationForm, id), JsonContent.Create(payload)); } + public async Task SetSchoolOverview(int id, SetSchoolOverviewModel updatedSchoolOverview) + { + var payload = new + { + id = updatedSchoolOverview.Id, + publishedAdmissionNumber = updatedSchoolOverview.PublishedAdmissionNumber ?? string.Empty, + viabilityIssues = updatedSchoolOverview.ViabilityIssues ?? string.Empty, + partOfPfiScheme = updatedSchoolOverview.PartOfPfiScheme ?? string.Empty, + financialDeficit = updatedSchoolOverview.FinancialDeficit ?? string.Empty, + numberOfPlacesFundedFor = updatedSchoolOverview.NumberOfPlacesFundedFor ?? null, + numberOfResidentialPlaces = updatedSchoolOverview.NumberOfResidentialPlaces ?? null, + numberOfFundedResidentialPlaces = updatedSchoolOverview.NumberOfFundedResidentialPlaces ?? null, + pfiSchemeDetails = updatedSchoolOverview.PfiSchemeDetails ?? string.Empty, + distanceFromSchoolToTrustHeadquarters = updatedSchoolOverview.DistanceFromSchoolToTrustHeadquarters ?? 0, + distanceFromSchoolToTrustHeadquartersAdditionalInformation = updatedSchoolOverview.DistanceFromSchoolToTrustHeadquartersAdditionalInformation ?? string.Empty, + memberOfParliamentNameAndParty = updatedSchoolOverview.MemberOfParliamentNameAndParty ?? string.Empty + }; + + var formattedString = string.Format(PathFor.SetSchoolOverview, id); + return await AcademisationClient.PutAsync(formattedString, JsonContent.Create(payload)); + } + public async Task GetAllProjectsV2Async(AcademyConversionSearchModelV2 searchModel) { diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs index 327250d0c..f0b3f5327 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/IApiClient.cs @@ -16,4 +16,5 @@ public interface IApiClient Task AddProjectNote(int id, AddProjectNote projectNote); Task SetProjectExternalApplicationForm(int id, bool externalApplicationFormSaved, string externalApplicationFormUrl); + Task SetSchoolOverview(int id, SetSchoolOverviewModel updatedSchoolOverview); } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs index 9aee66b58..4070206eb 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Features/PathFor.cs @@ -18,6 +18,7 @@ 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 SetSchoolOverview => "/conversion-project/{0}/SetSchoolOverview"; public static string GetAllProjectsV2 => "/conversion-project/projects"; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionProject.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionProject.cs index df5cba080..9290efa85 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionProject.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionProject.cs @@ -64,6 +64,9 @@ public class AcademyConversionProject public string PartOfPfiScheme { get; set; } public string PfiSchemeDetails { get; set; } public string ViabilityIssues { get; set; } + public decimal? NumberOfPlacesFundedFor { get; set; } + public decimal? NumberOfResidentialPlaces { get; set; } + public decimal? NumberOfFundedResidentialPlaces { get; set; } public string FinancialDeficit { get; set; } public decimal? DistanceFromSchoolToTrustHeadquarters { get; set; } public string DistanceFromSchoolToTrustHeadquartersAdditionalInformation { get; set; } @@ -120,5 +123,5 @@ public class AcademyConversionProject // notes public ICollection Notes { get; set; } = new List(); - + } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/SetSchoolOverviewModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/SetSchoolOverviewModel.cs new file mode 100644 index 000000000..a14095549 --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/SetSchoolOverviewModel.cs @@ -0,0 +1,48 @@ +namespace Dfe.PrepareConversions.Data.Models +{ + public class SetSchoolOverviewModel + { + public int Id { get; set; } + public string PublishedAdmissionNumber { get; set; } + public string ViabilityIssues { get; set; } + public string FinancialDeficit { get; set; } + public decimal? NumberOfPlacesFundedFor { get; set; } + public decimal? NumberOfResidentialPlaces { get; set; } + public decimal? NumberOfFundedResidentialPlaces { get; set; } + public string PartOfPfiScheme { get; set; } + public string PfiSchemeDetails { get; set; } + public decimal? DistanceFromSchoolToTrustHeadquarters { get; set; } + public string DistanceFromSchoolToTrustHeadquartersAdditionalInformation { get; set; } + public string MemberOfParliamentNameAndParty { get; set; } + + public SetSchoolOverviewModel() { } + + public SetSchoolOverviewModel( + int id, + string publishedAdmissionNumber, + string viabilityIssues, + string financialDeficit, + decimal? numberOfPlacesFundedFor, + decimal? numberOfResidentialPlaces, + decimal? numberOfFundedResidentialPlaces, + string partOfPfiScheme, + string pfiSchemeDetails, + decimal? distanceFromSchoolToTrustHeadquarters, + string distanceFromSchoolToTrustHeadquartersAdditionalInformation, + string memberOfParliamentNameAndParty) + { + Id = id; + PublishedAdmissionNumber = publishedAdmissionNumber; + ViabilityIssues = viabilityIssues; + FinancialDeficit = financialDeficit; + NumberOfPlacesFundedFor = numberOfPlacesFundedFor; + NumberOfResidentialPlaces = numberOfResidentialPlaces; + NumberOfFundedResidentialPlaces = numberOfFundedResidentialPlaces; + PartOfPfiScheme = partOfPfiScheme; + PfiSchemeDetails = pfiSchemeDetails; + DistanceFromSchoolToTrustHeadquarters = distanceFromSchoolToTrustHeadquarters; + DistanceFromSchoolToTrustHeadquartersAdditionalInformation = distanceFromSchoolToTrustHeadquartersAdditionalInformation; + MemberOfParliamentNameAndParty = memberOfParliamentNameAndParty; + } + } +} diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/UpdateAcademyConversionProject.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/UpdateAcademyConversionProject.cs index 7d30b7e90..60f71d0ef 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/UpdateAcademyConversionProject.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/UpdateAcademyConversionProject.cs @@ -40,6 +40,9 @@ public class UpdateAcademyConversionProject // School Overview public string PublishedAdmissionNumber { get; set; } public string ViabilityIssues { get; set; } + public decimal? NumberOfPlacesFundedFor { get; set; } + public decimal? NumberOfResidentialPlaces { get; set; } + public decimal? NumberOfFundedResidentialPlaces { get; set; } public string FinancialDeficit { get; set; } public bool? IsThisADiocesanTrust { get; set; } public string PartOfPfiScheme { get; set; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs index 79cb7e905..678027f19 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/AcademyConversionProjectRepository.cs @@ -238,6 +238,11 @@ 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 SetSchoolOverview(int id, SetSchoolOverviewModel updatedSchoolOverview) + { + HttpResponseMessage result = await _apiClient.SetSchoolOverview(id, updatedSchoolOverview); + 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) { diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs index 4b1d92250..aec6ab943 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Services/IAcademyConversionProjectRepository.cs @@ -42,6 +42,7 @@ Task>>> GetAllPro Task> UpdateProject(int id, UpdateAcademyConversionProject updateProject); Task CreateProject(CreateNewProject newProject); Task SetProjectExternalApplicationForm(int id, bool externalApplicationFormSaved, string externalApplicationFormUrl); + Task SetSchoolOverview(int id, SetSchoolOverviewModel updatedSchoolOverview); Task> GetFilterParameters(); Task> AddProjectNote(int id, AddProjectNote addProjectNote); } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Models/HtbTemplateTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Models/HtbTemplateTests.cs index 4a163f24d..e8c4aa644 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Models/HtbTemplateTests.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Models/HtbTemplateTests.cs @@ -2,7 +2,6 @@ using Dfe.Academisation.ExtensionMethods; using Dfe.PrepareConversions.Data.Models; using Dfe.PrepareConversions.Data.Models.KeyStagePerformance; -using Dfe.PrepareConversions.Extensions; using Dfe.PrepareConversions.Models; using System; using System.Linq; @@ -94,6 +93,9 @@ public void ItBuildstheSchoolOverviewSuccessfully() Assert.Equal(_template.PercentageFreeSchoolMeals, $"{_schoolOverview.PercentageFreeSchoolMeals}%"); Assert.Equal(_template.PartOfPfiScheme, _project.PartOfPfiScheme); Assert.Equal(_template.ViabilityIssues, _project.ViabilityIssues); + Assert.Equal(_template.NumberOfPlacesFundedFor, _project.NumberOfPlacesFundedFor.ToString()); + Assert.Equal(_template.NumberOfResidentialPlaces, _project.NumberOfResidentialPlaces.ToString()); + Assert.Equal(_template.NumberOfFundedResidentialPlaces, _project.NumberOfFundedResidentialPlaces.ToString()); Assert.Equal(_template.FinancialDeficit, _project.FinancialDeficit); Assert.Equal(_template.IsSchoolLinkedToADiocese, _schoolOverview.IsSchoolLinkedToADiocese); Assert.Equal(_template.DistanceFromSchoolToTrustHeadquarters, $"{_project.DistanceFromSchoolToTrustHeadquarters.ToSafeString()} miles"); @@ -178,6 +180,9 @@ public void ItDealsWithNullValuesWhenPopulatingTheFieldsForTheSchoolOverview() Assert.Equal("", template.PercentageFreeSchoolMeals); Assert.Null(template.PartOfPfiScheme); Assert.Null(template.ViabilityIssues); + Assert.Null(template.NumberOfPlacesFundedFor); + Assert.Null(template.NumberOfResidentialPlaces); + Assert.Null(template.NumberOfFundedResidentialPlaces); Assert.Null(template.FinancialDeficit); Assert.Null(template.IsSchoolLinkedToADiocese); Assert.Null(template.DistanceFromSchoolToTrustHeadquarters); diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs index b43b2a202..e06f04d00 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs @@ -115,6 +115,9 @@ public async Task Should_be_not_started_and_display_empty_when_school_overview_n project.PublishedAdmissionNumber = null; project.PartOfPfiScheme = "No"; project.PfiSchemeDetails = null; + project.NumberOfPlacesFundedFor = null; + project.NumberOfResidentialPlaces = null; + project.NumberOfFundedResidentialPlaces = null; project.ViabilityIssues = null; project.FinancialDeficit = null; project.DistanceFromSchoolToTrustHeadquarters = null; diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/AcademyConversionProjectPostModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/AcademyConversionProjectPostModel.cs index db35994fa..7a823d03b 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/AcademyConversionProjectPostModel.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/AcademyConversionProjectPostModel.cs @@ -100,7 +100,7 @@ public class AcademyConversionProjectPostModel [BindProperty(Name = "conversion-support-grant-change-reason")] [DisplayFormat(ConvertEmptyStringToNull = false)] - + public string ConversionSupportGrantChangeReason { get; set; } [BindProperty(Name = "conversion-support-grant-type")] [DisplayFormat(ConvertEmptyStringToNull = false)] @@ -123,6 +123,12 @@ public class AcademyConversionProjectPostModel [BindProperty(Name = "viability-issues")] public string ViabilityIssues { get; set; } + [BindProperty(Name = "number-of-places-funded-for")] + public int? NumberOfPlacesFundedFor { get; set; } + [BindProperty(Name = "number-of-residential-places")] + public int? NumberOResidentialPlaces { get; set; } + [BindProperty(Name = "number-of-funded-residential-places")] + public int? NumberOfFundedResidentialPlaces { get; set; } [BindProperty(Name = "financial-deficit")] public string FinancialDeficit { get; set; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/HtbTemplate.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/HtbTemplate.cs index 909956a83..7a833d12d 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/HtbTemplate.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/HtbTemplate.cs @@ -1,8 +1,7 @@ -using Dfe.PrepareConversions.Data.Models; +using Dfe.Academisation.ExtensionMethods; +using Dfe.PrepareConversions.Data.Models; using Dfe.PrepareConversions.Data.Models.KeyStagePerformance; using Dfe.PrepareConversions.DocumentGeneration; -using Dfe.PrepareConversions.Extensions; -using Dfe.Academisation.ExtensionMethods; using Dfe.PrepareConversions.ViewModels; using System; using System.Collections.Generic; @@ -109,6 +108,12 @@ public class HtbTemplate [DocumentText("ViabilityIssues")] public string ViabilityIssues { get; set; } + [DocumentText("NumberOfPlacesFundedFor")] + public string NumberOfPlacesFundedFor { get; set; } + [DocumentText("NumberOfResidentialPlaces")] + public string NumberOfResidentialPlaces { get; set; } + [DocumentText("NumberOfFundedResidentialPlaces")] + public string NumberOfFundedResidentialPlaces { get; set; } [DocumentText("FinancialDeficit")] public string FinancialDeficit { get; set; } @@ -254,6 +259,9 @@ public static HtbTemplate Build(AcademyConversionProject project, PercentageFreeSchoolMeals = !string.IsNullOrEmpty(schoolOverview.PercentageFreeSchoolMeals) ? $"{schoolOverview.PercentageFreeSchoolMeals}%" : "", PartOfPfiScheme = project.PartOfPfiScheme, ViabilityIssues = project.ViabilityIssues, + NumberOfPlacesFundedFor = project.NumberOfPlacesFundedFor.ToStringOrDefault(), + NumberOfResidentialPlaces = project.NumberOfResidentialPlaces.ToStringOrDefault(), + NumberOfFundedResidentialPlaces = project.NumberOfFundedResidentialPlaces.ToStringOrDefault(), FinancialDeficit = project.FinancialDeficit, IsSchoolLinkedToADiocese = schoolOverview.IsSchoolLinkedToADiocese, DistanceFromSchoolToTrustHeadquarters = project.DistanceFromSchoolToTrustHeadquarters != null diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs index 640efc35a..9518a15f8 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs @@ -120,6 +120,9 @@ public static class SchoolOverviewSection public static readonly LinkItem ConfirmSchoolOverview = AddLinkItem(page: "/TaskList/SchoolOverview/SchoolOverview"); public static readonly LinkItem PublishedAdmissionNumber = AddLinkItem(page: "/TaskList/SchoolOverview/PublishedAdmissionNumber"); public static readonly LinkItem ViabilityIssues = AddLinkItem(page: "/TaskList/SchoolOverview/ViabilityIssues"); + public static readonly LinkItem NumberOfPlacesFundedFor = AddLinkItem(page: "/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor"); + public static readonly LinkItem NumberOfResidentialPlaces = AddLinkItem(page: "/TaskList/SchoolOverview/SENNumberOfResidentialPlaces"); + public static readonly LinkItem NumberOfFundedResidentialPlaces = AddLinkItem(page: "/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces"); public static readonly LinkItem FinancialDeficit = AddLinkItem(page: "/TaskList/SchoolOverview/FinancialDeficit"); public static readonly LinkItem DistanceFromTrustHeadquarters = AddLinkItem(page: "/TaskList/SchoolOverview/DistanceFromTrustHeadquarters"); public static readonly LinkItem MPDetails = AddLinkItem(page: "/TaskList/SchoolOverview/MPDetails"); diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolOverview/default.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolOverview/default.cshtml index 11f3f693d..340e56de6 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolOverview/default.cshtml +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolOverview/default.cshtml @@ -18,6 +18,9 @@ + + + diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces.cshtml new file mode 100644 index 000000000..6a4c533ab --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces.cshtml @@ -0,0 +1,16 @@ +@page "/task-list/{id:int}/confirm-school-overview/number-of-funded-residential-places" +@using Dfe.PrepareConversions.TagHelpers +@model Dfe.PrepareConversions.Pages.TaskList.SchoolOverview.SENNumberOfFundedResidentialPlaces +@{ + ViewData["Title"] = (ViewData.ModelState.IsValid ? "" : "Error: ") + "Number of funded residential places"; + Layout = "_QuestionLayout"; + ViewData["ProjectId"] = Model.Project.Id; + ViewData["AcademyTypeAndRoute"] = Model.Project.AcademyTypeAndRoute; +} + +@section BeforeMain + { + +} + + \ No newline at end of file diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces.cshtml.cs new file mode 100644 index 000000000..10f7ea3cf --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfFundedResidentialPlaces.cshtml.cs @@ -0,0 +1,69 @@ +using AngleSharp.Text; +using Dfe.PrepareConversions.Data.Models; +using Dfe.PrepareConversions.Data.Services; +using Dfe.PrepareConversions.Models; +using Dfe.PrepareConversions.Services; +using Dfe.PrepareConversions.ViewModels; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; + +namespace Dfe.PrepareConversions.Pages.TaskList.SchoolOverview; + +public class SENNumberOfFundedResidentialPlaces : BaseAcademyConversionProjectPageModel +{ + private readonly ErrorService _errorService; + + public SENNumberOfFundedResidentialPlaces(IAcademyConversionProjectRepository repository, ErrorService errorService) : base(repository) + { + _errorService = errorService; + } + public bool ShowError => _errorService.HasErrors(); + + [BindProperty(Name = "number-of-funded-residential-places")] + public decimal? NumberOfFundedResidentialPlaces { get; set; } + + public override async Task OnGetAsync(int id) + { + await base.OnGetAsync(id); + NumberOfFundedResidentialPlaces = Project.NumberOfFundedResidentialPlaces ?? null; + return Page(); + } + + public override async Task OnPostAsync(int id) + { + await base.OnGetAsync(id); + if (NumberOfFundedResidentialPlaces is null) + { + _errorService.AddError(nameof(NumberOfFundedResidentialPlaces), "Enter a number. No letters or special characters."); + } + + if (ModelState.IsValid) + { + SetSchoolOverviewModel updatedSchoolOverview = CreateUpdateSchoolOverview(Project); + updatedSchoolOverview.Id = id; + updatedSchoolOverview.NumberOfFundedResidentialPlaces = NumberOfFundedResidentialPlaces; + await _repository.SetSchoolOverview(id, updatedSchoolOverview); + + return RedirectToPage(Links.SchoolOverviewSection.ConfirmSchoolOverview.Page, new { id }); + } + + return await base.OnGetAsync(id); + } + public static SetSchoolOverviewModel CreateUpdateSchoolOverview(ProjectViewModel projectViewModel) + { + return new SetSchoolOverviewModel( + projectViewModel.Id.ToInteger(0), + projectViewModel.PublishedAdmissionNumber, + projectViewModel.ViabilityIssues, + projectViewModel.FinancialDeficit, + projectViewModel.NumberOfPlacesFundedFor, + projectViewModel.NumberOfResidentialPlaces, + projectViewModel.NumberOfFundedResidentialPlaces, + projectViewModel.PartOfPfiScheme, + projectViewModel.PfiSchemeDetails, + projectViewModel.DistanceFromSchoolToTrustHeadquarters, + projectViewModel.DistanceFromSchoolToTrustHeadquartersAdditionalInformation, + projectViewModel.MemberOfParliamentNameAndParty + ); + } +} diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor.cshtml new file mode 100644 index 000000000..25124cd1d --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor.cshtml @@ -0,0 +1,16 @@ +@page "/task-list/{id:int}/confirm-school-overview/number-of-places-funded-for" +@using Dfe.PrepareConversions.TagHelpers +@model Dfe.PrepareConversions.Pages.TaskList.SchoolOverview.SENNumberOfPlacesFundedFor +@{ + ViewData["Title"] = (ViewData.ModelState.IsValid ? "" : "Error: ") + "Number of places funded for"; + Layout = "_QuestionLayout"; + ViewData["ProjectId"] = Model.Project.Id; + ViewData["AcademyTypeAndRoute"] = Model.Project.AcademyTypeAndRoute; +} + +@section BeforeMain + { + +} + + \ No newline at end of file diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor.cshtml.cs new file mode 100644 index 000000000..d82bb3b39 --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfPlacesFundedFor.cshtml.cs @@ -0,0 +1,71 @@ +using AngleSharp.Text; +using Dfe.PrepareConversions.Data.Models; +using Dfe.PrepareConversions.Data.Services; +using Dfe.PrepareConversions.Models; +using Dfe.PrepareConversions.Services; +using Dfe.PrepareConversions.ViewModels; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; + +namespace Dfe.PrepareConversions.Pages.TaskList.SchoolOverview; + +public class SENNumberOfPlacesFundedFor : BaseAcademyConversionProjectPageModel +{ + private readonly ErrorService _errorService; + + public SENNumberOfPlacesFundedFor(IAcademyConversionProjectRepository repository, ErrorService errorService) : base(repository) + { + _errorService = errorService; + } + public bool ShowError => _errorService.HasErrors(); + + [BindProperty(Name = "number-of-places-funded-for")] + public decimal? NumberOfPlacesFundedFor { get; set; } + + public override async Task OnGetAsync(int id) + { + await base.OnGetAsync(id); + NumberOfPlacesFundedFor = Project.NumberOfPlacesFundedFor ?? null; + return Page(); + } + + public override async Task OnPostAsync(int id) + { + await base.OnGetAsync(id); + if (NumberOfPlacesFundedFor is null) + { + _errorService.AddError(nameof(NumberOfPlacesFundedFor), "Enter a number. No letters or special characters."); + } + + + if (ModelState.IsValid) + { + SetSchoolOverviewModel updatedSchoolOverview = CreateUpdateSchoolOverview(Project); + updatedSchoolOverview.Id = id; + updatedSchoolOverview.NumberOfPlacesFundedFor = NumberOfPlacesFundedFor; + await _repository.SetSchoolOverview(id, updatedSchoolOverview); + + return RedirectToPage(Links.SchoolOverviewSection.ConfirmSchoolOverview.Page, new { id }); + } + + + return await base.OnGetAsync(id); + } + public static SetSchoolOverviewModel CreateUpdateSchoolOverview(ProjectViewModel projectViewModel) + { + return new SetSchoolOverviewModel( + projectViewModel.Id.ToInteger(0), + projectViewModel.PublishedAdmissionNumber, + projectViewModel.ViabilityIssues, + projectViewModel.FinancialDeficit, + projectViewModel.NumberOfPlacesFundedFor, + projectViewModel.NumberOfResidentialPlaces, + projectViewModel.NumberOfFundedResidentialPlaces, + projectViewModel.PartOfPfiScheme, + projectViewModel.PfiSchemeDetails, + projectViewModel.DistanceFromSchoolToTrustHeadquarters, + projectViewModel.DistanceFromSchoolToTrustHeadquartersAdditionalInformation, + projectViewModel.MemberOfParliamentNameAndParty + ); + } +} diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfResidentialPlaces.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfResidentialPlaces.cshtml new file mode 100644 index 000000000..8e549ec2d --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfResidentialPlaces.cshtml @@ -0,0 +1,16 @@ +@page "/task-list/{id:int}/confirm-school-overview/number-of-residential-places" +@using Dfe.PrepareConversions.TagHelpers +@model Dfe.PrepareConversions.Pages.TaskList.SchoolOverview.SENNumberOfResidentialPlaces +@{ + ViewData["Title"] = (ViewData.ModelState.IsValid ? "" : "Error: ") + "Number of residential places"; + Layout = "_QuestionLayout"; + ViewData["ProjectId"] = Model.Project.Id; + ViewData["AcademyTypeAndRoute"] = Model.Project.AcademyTypeAndRoute; +} + +@section BeforeMain + { + +} + + \ No newline at end of file diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfResidentialPlaces.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfResidentialPlaces.cshtml.cs new file mode 100644 index 000000000..a23b4f661 --- /dev/null +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SENNumberOfResidentialPlaces.cshtml.cs @@ -0,0 +1,70 @@ +using AngleSharp.Text; +using Dfe.PrepareConversions.Data.Models; +using Dfe.PrepareConversions.Data.Services; +using Dfe.PrepareConversions.Models; +using Dfe.PrepareConversions.Services; +using Dfe.PrepareConversions.ViewModels; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; + +namespace Dfe.PrepareConversions.Pages.TaskList.SchoolOverview; + +public class SENNumberOfResidentialPlaces : BaseAcademyConversionProjectPageModel +{ + private readonly ErrorService _errorService; + + public SENNumberOfResidentialPlaces(IAcademyConversionProjectRepository repository, ErrorService errorService) : base(repository) + { + _errorService = errorService; + } + public bool ShowError => _errorService.HasErrors(); + + [BindProperty(Name = "number-of-residential-places")] + public decimal? NumberOfResidentialPlaces { get; set; } + + public override async Task OnGetAsync(int id) + { + await base.OnGetAsync(id); + NumberOfResidentialPlaces = Project.NumberOfResidentialPlaces ?? null; + return Page(); + } + + public override async Task OnPostAsync(int id) + { + await base.OnGetAsync(id); + if (NumberOfResidentialPlaces is null) + { + _errorService.AddError(nameof(NumberOfResidentialPlaces), "Enter a number. No letters or special characters."); + } + + + if (ModelState.IsValid) + { + SetSchoolOverviewModel updatedSchoolOverview = CreateUpdateSchoolOverview(Project); + updatedSchoolOverview.Id = id; + updatedSchoolOverview.NumberOfResidentialPlaces = NumberOfResidentialPlaces; + await _repository.SetSchoolOverview(id, updatedSchoolOverview); + + return RedirectToPage(Links.SchoolOverviewSection.ConfirmSchoolOverview.Page, new { id }); + } + + return await base.OnGetAsync(id); + } + public static SetSchoolOverviewModel CreateUpdateSchoolOverview(ProjectViewModel projectViewModel) + { + return new SetSchoolOverviewModel( + projectViewModel.Id.ToInteger(0), + projectViewModel.PublishedAdmissionNumber, + projectViewModel.ViabilityIssues, + projectViewModel.FinancialDeficit, + projectViewModel.NumberOfPlacesFundedFor, + projectViewModel.NumberOfResidentialPlaces, + projectViewModel.NumberOfFundedResidentialPlaces, + projectViewModel.PartOfPfiScheme, + projectViewModel.PfiSchemeDetails, + projectViewModel.DistanceFromSchoolToTrustHeadquarters, + projectViewModel.DistanceFromSchoolToTrustHeadquartersAdditionalInformation, + projectViewModel.MemberOfParliamentNameAndParty + ); + } +} diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/UpdateAcademyConversionProjectPageModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/UpdateAcademyConversionProjectPageModel.cs index e0f4be844..5d38a7d88 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/UpdateAcademyConversionProjectPageModel.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/UpdateAcademyConversionProjectPageModel.cs @@ -3,7 +3,6 @@ using Dfe.PrepareConversions.Data.Services; using Dfe.PrepareConversions.Models; using Dfe.PrepareConversions.Services; -using Dfe.PrepareConversions.ViewModels; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Primitives; using System; @@ -19,7 +18,7 @@ public UpdateAcademyConversionProjectPageModel(IAcademyConversionProjectReposito { _errorService = errorService; } - + [BindProperty] public AcademyConversionProjectPostModel AcademyConversionProject { get; set; } @@ -49,7 +48,7 @@ public override async Task OnPostAsync(int id) AcademyConversionProject.LocalAuthorityInformationTemplateReturnedDate.HasValue && AcademyConversionProject.LocalAuthorityInformationTemplateSentDate > AcademyConversionProject.LocalAuthorityInformationTemplateReturnedDate) { - _errorService.AddError("returnedDateBeforeSentDateError","The returned template date be must on or after sent date"); + _errorService.AddError("returnedDateBeforeSentDateError", "The returned template date be must on or after sent date"); } if (AcademyConversionProject.EndOfCurrentFinancialYear.HasValue && @@ -116,7 +115,7 @@ private void RePopDatePickerModelsAfterValidationFail() } // Else return default £25k - return 25000; + return 25000; } protected UpdateAcademyConversionProject Build() @@ -151,6 +150,9 @@ protected UpdateAcademyConversionProject Build() SchoolAndTrustInformationSectionComplete = AcademyConversionProject.SchoolAndTrustInformationSectionComplete, PublishedAdmissionNumber = AcademyConversionProject.PublishedAdmissionNumber, ViabilityIssues = AcademyConversionProject.ViabilityIssues, + NumberOfPlacesFundedFor = AcademyConversionProject.NumberOfPlacesFundedFor, + NumberOfResidentialPlaces = AcademyConversionProject.NumberOResidentialPlaces, + NumberOfFundedResidentialPlaces = AcademyConversionProject.NumberOfFundedResidentialPlaces, FinancialDeficit = AcademyConversionProject.FinancialDeficit, IsThisADiocesanTrust = AcademyConversionProject.IsThisADiocesanTrust, DistanceFromSchoolToTrustHeadquarters = AcademyConversionProject.DistanceFromSchoolToTrustHeadquarters, diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs index c4caa964f..916d64f02 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/AcademyConversionProjectItemsCacheDecorator.cs @@ -91,4 +91,8 @@ public async Task { return await _innerRepository.GetAllProjectsV2(page, count, titleFilter, statusFilters, deliveryOfficerFilter, regionsFilter, localAuthoritiesFilter, advisoryBoardDatesFilter); } + public async Task SetSchoolOverview(int id, SetSchoolOverviewModel updatedSchoolOverview) + { + await _innerRepository.SetSchoolOverview(id, updatedSchoolOverview); + } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/DocumentGenerator/SchoolOverviewGenerator.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/DocumentGenerator/SchoolOverviewGenerator.cs index d95cae1b7..1e0a1d504 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/DocumentGenerator/SchoolOverviewGenerator.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Services/DocumentGenerator/SchoolOverviewGenerator.cs @@ -12,31 +12,46 @@ public static void AddSchoolOverview(IDocumentBuilder builder, HtbTemplate docum builder.ReplacePlaceholderWithContent("SchoolOverview", build => { build.AddHeading("School overview", HeadingLevel.One); - build.AddTable(new List - { - new[] { new TextElement { Value = "School type", Bold = true }, new TextElement { Value = document.SchoolType } }, - new[] { new TextElement { Value = "School phase", Bold = true }, new TextElement { Value = document.SchoolPhase } }, - new[] { new TextElement { Value = "Age range", Bold = true }, new TextElement { Value = document.AgeRange } }, - new[] { new TextElement { Value = "Capacity", Bold = true }, new TextElement { Value = document.SchoolCapacity } }, - new[] { new TextElement { Value = "Published admission number (PAN)", Bold = true }, new TextElement { Value = document.PublishedAdmissionNumber } }, - new[] { new TextElement { Value = "Number on roll (NOR)", Bold = true }, new TextElement { Value = document.NumberOnRoll } }, - new[] { new TextElement { Value = "Percentage of the school is full", Bold = true }, new TextElement { Value = document.PercentageSchoolFull } }, - new[] - { - new TextElement { Value = "Percentage of free school meals at the school (%FSM)", Bold = true }, new TextElement { Value = document.PercentageFreeSchoolMeals } - }, - new[] { new TextElement { Value = "Viability issues", Bold = true }, new TextElement { Value = document.ViabilityIssues } }, - new[] { new TextElement { Value = "Financial deficit", Bold = true }, new TextElement { Value = document.FinancialDeficit } }, - new[] { new TextElement { Value = "Private finance initiative (PFI) scheme", Bold = true }, new TextElement { Value = document.PartOfPfiScheme } }, - new[] { new TextElement { Value = "Is the school linked to a diocese?", Bold = true }, new TextElement { Value = document.IsSchoolLinkedToADiocese } }, - new[] + var schoolOverviewTable = new List(); + schoolOverviewTable.AddRange(new List { + new[] { new TextElement { Value = "School type", Bold = true }, new TextElement { Value = document.SchoolType } }, + new[] { new TextElement { Value = "School phase", Bold = true }, new TextElement { Value = document.SchoolPhase } }, + new[] { new TextElement { Value = "Age range", Bold = true }, new TextElement { Value = document.AgeRange } }, + new[] { new TextElement { Value = "Capacity", Bold = true }, new TextElement { Value = document.SchoolCapacity } }, + new[] { new TextElement { Value = "Published admission number (PAN)", Bold = true }, new TextElement { Value = document.PublishedAdmissionNumber } }, + new[] { new TextElement { Value = "Number on roll (NOR)", Bold = true }, new TextElement { Value = document.NumberOnRoll } }, + new[] { new TextElement { Value = "Percentage of the school is full", Bold = true }, new TextElement { Value = document.PercentageSchoolFull } }, + new[] + { + new TextElement { Value = "Percentage of free school meals at the school (%FSM)", Bold = true }, + new TextElement { Value = document.PercentageFreeSchoolMeals } + }, + new[] { new TextElement { Value = "Viability issues", Bold = true }, new TextElement { Value = document.ViabilityIssues } }}); + + // Specific SEN fields + if (document.SchoolType.ToLower().Contains("special")) { - new TextElement { Value = "Distance from the converting school to the trust or other schools in the trust", Bold = true }, - new TextElement { Value = $"{document.DistanceFromSchoolToTrustHeadquarters} {document.DistanceFromSchoolToTrustHeadquartersAdditionalInformation}" } - }, - new[] { new TextElement { Value = "Parliamentary constituency", Bold = true }, new TextElement { Value = document.ParliamentaryConstituency } }, - new[] { new TextElement { Value = "MP name and political party", Bold = true }, new TextElement { Value = document.MemberOfParliamentNameAndParty } } - }); + schoolOverviewTable.AddRange(new List { + new[] { new TextElement { Value = "Number of places funded for", Bold = true }, new TextElement { Value = document.NumberOfPlacesFundedFor } }, + new[] { new TextElement { Value = "Number of residential places", Bold = true }, new TextElement { Value = document.NumberOfResidentialPlaces } }, + new[] { new TextElement { Value = "Number of funded residential places", Bold = true }, new TextElement { Value = document.NumberOfFundedResidentialPlaces } }, + }); + } + + schoolOverviewTable.AddRange(new List { + new[] { new TextElement { Value = "Financial deficit", Bold = true }, new TextElement { Value = document.FinancialDeficit } }, + new[] { new TextElement { Value = "Private finance initiative (PFI) scheme", Bold = true }, new TextElement { Value = document.PartOfPfiScheme } }, + new[] { new TextElement { Value = "Is the school linked to a diocese?", Bold = true }, new TextElement { Value = document.IsSchoolLinkedToADiocese } }, + new[] + { + new TextElement { Value = "Distance from the converting school to the trust or other schools in the trust", Bold = true }, + new TextElement { Value = $"{document.DistanceFromSchoolToTrustHeadquarters} {document.DistanceFromSchoolToTrustHeadquartersAdditionalInformation}" } + }, + new[] { new TextElement { Value = "Parliamentary constituency", Bold = true }, new TextElement { Value = document.ParliamentaryConstituency } }, + new[] { new TextElement { Value = "MP name and political party", Bold = true }, new TextElement { Value = document.MemberOfParliamentNameAndParty } } + }); + + build.AddTable(schoolOverviewTable); }); } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolOverviewViewComponent.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolOverviewViewComponent.cs index 81ed67b98..7c84c382a 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolOverviewViewComponent.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolOverviewViewComponent.cs @@ -2,7 +2,6 @@ using Dfe.PrepareConversions.Data; using Dfe.PrepareConversions.Data.Models; using Dfe.PrepareConversions.Data.Services; -using Dfe.PrepareConversions.Extensions; using Dfe.PrepareConversions.ViewModels; using Microsoft.AspNetCore.Mvc; using System; @@ -46,6 +45,9 @@ public async Task InvokeAsync() PercentageSchoolFull = schoolOverview.NumberOnRoll.AsPercentageOf(schoolOverview.SchoolCapacity), SchoolCapacity = schoolOverview.SchoolCapacity?.ToString(), PublishedAdmissionNumber = project.PublishedAdmissionNumber, + NumberOfPlacesFundedFor = project.NumberOfPlacesFundedFor, + NumberOfResidentialPlaces = project.NumberOfResidentialPlaces, + NumberOfFundedResidentialPlaces = project.NumberOfFundedResidentialPlaces, PercentageFreeSchoolMeals = !string.IsNullOrEmpty(schoolOverview.PercentageFreeSchoolMeals) ? $"{schoolOverview.PercentageFreeSchoolMeals}%" : "", PartOfPfiScheme = project.PartOfPfiScheme, PfiSchemeDetails = project.PfiSchemeDetails, @@ -57,6 +59,7 @@ public async Task InvokeAsync() DistanceFromSchoolToTrustHeadquartersAdditionalInformation = project.DistanceFromSchoolToTrustHeadquartersAdditionalInformation, ParliamentaryConstituency = schoolOverview.ParliamentaryConstituency, MemberOfParliamentNameAndParty = project.MemberOfParliamentNameAndParty, + IsSpecial = schoolOverview?.SchoolType?.ToLower().Contains("special") ?? false, }; return View(viewModel); diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/ProjectViewModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/ProjectViewModel.cs index c2d699c73..96f8b84de 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/ProjectViewModel.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/ProjectViewModel.cs @@ -1,13 +1,12 @@ using Dfe.Academisation.ExtensionMethods; using Dfe.PrepareConversions.Data.Models; -using Dfe.PrepareConversions.Extensions; using Dfe.PrepareConversions.Utils; using System; using System.Collections.Generic; namespace Dfe.PrepareConversions.ViewModels; -public class ProjectViewModel: ProjectTypeBase +public class ProjectViewModel : ProjectTypeBase { public ProjectViewModel(AcademyConversionProject project) { @@ -63,6 +62,9 @@ public ProjectViewModel(AcademyConversionProject project) PfiSchemeDetails = project.PfiSchemeDetails; PublishedAdmissionNumber = project.PublishedAdmissionNumber; ViabilityIssues = project.ViabilityIssues; + NumberOfPlacesFundedFor = project.NumberOfPlacesFundedFor; + NumberOfResidentialPlaces = project.NumberOfResidentialPlaces; + NumberOfFundedResidentialPlaces = project.NumberOfFundedResidentialPlaces; FinancialDeficit = project.FinancialDeficit; DistanceFromSchoolToTrustHeadquarters = project.DistanceFromSchoolToTrustHeadquarters; DistanceFromSchoolToTrustHeadquartersAdditionalInformation = project.DistanceFromSchoolToTrustHeadquartersAdditionalInformation; @@ -169,6 +171,9 @@ public ProjectViewModel(AcademyConversionProject project) public string PfiSchemeDetails { get; set; } public string ViabilityIssues { get; set; } public string FinancialDeficit { get; set; } + public decimal? NumberOfPlacesFundedFor { get; set; } + public decimal? NumberOfResidentialPlaces { get; set; } + public decimal? NumberOfFundedResidentialPlaces { get; set; } public decimal? DistanceFromSchoolToTrustHeadquarters { get; set; } public string DistanceFromSchoolToTrustHeadquartersAdditionalInformation { get; set; } public string MemberOfParliamentNameAndParty { get; set; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/SchoolOverviewViewModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/SchoolOverviewViewModel.cs index 253cda6dd..e9fb91e25 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/SchoolOverviewViewModel.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/SchoolOverviewViewModel.cs @@ -10,6 +10,9 @@ public class SchoolOverviewViewModel public string PercentageSchoolFull { get; set; } public string SchoolCapacity { get; set; } public string PublishedAdmissionNumber { get; set; } + public decimal? NumberOfPlacesFundedFor { get; set; } + public decimal? NumberOfResidentialPlaces { get; set; } + public decimal? NumberOfFundedResidentialPlaces { get; set; } public string PercentageFreeSchoolMeals { get; set; } public string PartOfPfiScheme { get; set; } public string PfiSchemeDetails { get; set; } @@ -22,4 +25,5 @@ public class SchoolOverviewViewModel public string ParliamentaryConstituency { get; set; } public string MemberOfParliamentNameAndParty { get; set; } public bool? SchoolOverviewSectionComplete { get; set; } + public bool IsSpecial { get; set; } } diff --git a/release-notes.md b/release-notes.md index b14f09720..e5e67cfca 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,10 @@ ## NEXT +* Ability to add Conversion projects within the application +* SEN Specific additions to the school overview + +## 1.3.0 + * Sponsored Conversions inital MVP prepared * Sponsored grants now take into account the different tracks and school phase * User Story 136870 : hyperlink fixes