diff --git a/SAPData/GenerateViews.cs b/SAPData/GenerateViews.cs index 5e224cc55..e7b07867c 100644 --- a/SAPData/GenerateViews.cs +++ b/SAPData/GenerateViews.cs @@ -531,6 +531,7 @@ private static string GenerateEstablishmentDimensionView( sb.AppendLine(" to_tsvector('english', normalize_text(coalesce(t.\"establishmentname\", ''))) AS \"EstablishmentNameFTS\","); sb.AppendLine(" ST_Transform(\r\n ST_SetSRID(ST_MakePoint(clean_int(t.\"easting\"), clean_int(t.\"northing\")), 27700), 4326\r\n)::geography AS \"geom\","); sb.AppendLine($" {BuildSenTypes()} AS \"SenTypes\","); + sb.AppendLine(" t.\"nurseryprovision__name_\" AS \"NurseryProvisionName\","); bool hasWraparound = TryResolveRawTable(tableMap, "ks2_wraparound_care", out var wraparoundTable) && !string.IsNullOrWhiteSpace(wraparoundTable); if (hasWraparound) diff --git a/SAPPub.Core/Entities/Establishment.cs b/SAPPub.Core/Entities/Establishment.cs index 01a8388ef..41738478c 100644 --- a/SAPPub.Core/Entities/Establishment.cs +++ b/SAPPub.Core/Entities/Establishment.cs @@ -109,6 +109,10 @@ public class Establishment public string? KS2WraparoundCare { get; set; } = string.Empty; + public bool FreeBreakfastClubProgramme { get; set; } + + public string? NurseryProvisionName { get; set; } + [IgnoreDataMember] public bool IsKS2 { get; set; } @@ -175,7 +179,9 @@ public static EstablishmentServiceModel MapToServiceModel(Establishment e) IsKS2 = e.IsKS2, IsKS4 = e.IsKS4, IsKS5 = e.IsKS5, - KS2WraparoundCare = e.KS2WraparoundCare + KS2WraparoundCare = e.KS2WraparoundCare, + FreeBreakfastClubProgramme = e.FreeBreakfastClubProgramme, + NurseryProvisionName = e.NurseryProvisionName }; } } diff --git a/SAPPub.Core/ServiceModels/EstablishmentServiceModel.cs b/SAPPub.Core/ServiceModels/EstablishmentServiceModel.cs index 810108c87..4a426160b 100644 --- a/SAPPub.Core/ServiceModels/EstablishmentServiceModel.cs +++ b/SAPPub.Core/ServiceModels/EstablishmentServiceModel.cs @@ -111,6 +111,12 @@ public class EstablishmentServiceModel public string? KS2WraparoundCare { get; set; } = string.Empty; + public bool FreeBreakfastClubProgramme { get; set; } + + public string? NurseryProvisionName { get; set; } = string.Empty; + + public bool HasNurseryProvision => NurseryProvisionName == "Has Nursery Classes"; + public bool IsKS2 { get; set; } public bool IsKS4 { get; set; } @@ -130,6 +136,7 @@ TypeOfEstablishment.FreeSchoolsSpecial or TypeOfEstablishment.OtherIndependentSchool or TypeOfEstablishment.OtherIndependentSpecialSchool; + public EstablishmentPerformance KS4Performance { get; set; } = new(); public LAPerformance LAPerformance { get; set; } = new(); diff --git a/SAPPub.Core/ServiceModels/KS4/AboutSchool/AboutSchoolModel.cs b/SAPPub.Core/ServiceModels/KS4/AboutSchool/AboutSchoolModel.cs index 2ca099950..11fd8a994 100644 --- a/SAPPub.Core/ServiceModels/KS4/AboutSchool/AboutSchoolModel.cs +++ b/SAPPub.Core/ServiceModels/KS4/AboutSchool/AboutSchoolModel.cs @@ -56,6 +56,12 @@ public class AboutSchoolModel public string? SenTypes { get; set; } + public string? KS2WraparoundCare { get; set; } + + public bool FreeBreakfastClubProgramme { get; set; } + + public bool HasNurseryProvision { get; set; } + public bool IsKS2 { get; set; } public bool IsKS4 { get; set; } diff --git a/SAPPub.Core/Services/KS4/AboutSchool/AboutSchoolService.cs b/SAPPub.Core/Services/KS4/AboutSchool/AboutSchoolService.cs index 9072eda69..ed18d7f9b 100644 --- a/SAPPub.Core/Services/KS4/AboutSchool/AboutSchoolService.cs +++ b/SAPPub.Core/Services/KS4/AboutSchool/AboutSchoolService.cs @@ -80,6 +80,9 @@ public async Task GetAboutSchoolDetailsAsync(string urn, Cance SenTypes = establishment.SenTypes, Predecessors = predecessorLinks, Successors = sucessorLinks, + KS2WraparoundCare = establishment.KS2WraparoundCare, + FreeBreakfastClubProgramme = establishment.FreeBreakfastClubProgramme, + HasNurseryProvision = establishment.HasNurseryProvision, IsKS2 = establishment.IsKS2, IsKS4 = establishment.IsKS4, IsKS5 = establishment.IsKS5 diff --git a/SAPPub.Infrastructure/Repositories/Helpers/DapperHelpers.cs b/SAPPub.Infrastructure/Repositories/Helpers/DapperHelpers.cs index dfe6ac66d..287ff96b1 100644 --- a/SAPPub.Infrastructure/Repositories/Helpers/DapperHelpers.cs +++ b/SAPPub.Infrastructure/Repositories/Helpers/DapperHelpers.cs @@ -68,7 +68,9 @@ public static class DapperHelpers "ISKS2", "ISKS4", "ISKS5", - "KS2WraparoundCare" + "KS2WraparoundCare", + "FreeBreakfastClubProgramme", + "NurseryProvisionName" """; private const string EstablishmentAbsenceColumns = """ diff --git a/SAPPub.Web/Areas/Profiles/Controllers/AdmissionsController.cs b/SAPPub.Web/Areas/Profiles/Controllers/AdmissionsController.cs index 7616790ef..0b1895846 100644 --- a/SAPPub.Web/Areas/Profiles/Controllers/AdmissionsController.cs +++ b/SAPPub.Web/Areas/Profiles/Controllers/AdmissionsController.cs @@ -47,7 +47,7 @@ public async Task KS2( CancellationToken ct) { var admissionsDetails = await admissionsService.GetAdmissionsDetailsAsync(urn, ct); - var model = AdmissionsViewModel.MapFrom(admissionsDetails, urn, true); + var model = AdmissionsViewModel.MapFrom(admissionsDetails, urn); return View(model); } @@ -60,8 +60,7 @@ public async Task KS4( CancellationToken ct) { var admissionsDetails = await admissionsService.GetAdmissionsDetailsAsync(urn, ct); - var isPrimaryFeatureEnabled = await featureManager.IsEnabledAsync(Constants.Constants.EnablePrimary); - var model = AdmissionsViewModel.MapFrom(admissionsDetails, urn, isPrimaryFeatureEnabled); + var model = AdmissionsViewModel.MapFrom(admissionsDetails, urn); return View(model); } } diff --git a/SAPPub.Web/Areas/Profiles/Controllers/CurriculumController.cs b/SAPPub.Web/Areas/Profiles/Controllers/CurriculumController.cs index d558ac159..0a98b02c4 100644 --- a/SAPPub.Web/Areas/Profiles/Controllers/CurriculumController.cs +++ b/SAPPub.Web/Areas/Profiles/Controllers/CurriculumController.cs @@ -55,8 +55,7 @@ public async Task KS4( string urn, string schoolName, CancellationToken ct) { var establishmentDetails = await establishmentService.GetEstablishmentAsync(urn, ct); - var isPrimaryFeatureEnabled = await featureManager.IsEnabledAsync(Constants.Constants.EnablePrimary); - var model = ViewModels.KS4.CurriculumAndExtraCurricularActivitiesViewModel.Map(establishmentDetails, isPrimaryFeatureEnabled); + var model = ViewModels.KS4.CurriculumAndExtraCurricularActivitiesViewModel.Map(establishmentDetails); return View(model); } } diff --git a/SAPPub.Web/Areas/Profiles/ViewModels/AboutSchool/AboutSchoolViewModel.cs b/SAPPub.Web/Areas/Profiles/ViewModels/AboutSchool/AboutSchoolViewModel.cs index da371692d..d31a30719 100644 --- a/SAPPub.Web/Areas/Profiles/ViewModels/AboutSchool/AboutSchoolViewModel.cs +++ b/SAPPub.Web/Areas/Profiles/ViewModels/AboutSchool/AboutSchoolViewModel.cs @@ -13,7 +13,6 @@ public class AboutSchoolViewModel : ProfileBaseViewModel private const string SENUnit = "SEN unit"; private const string ResourcedProvisionAndSENUnit = "Resourced provision and SEN unit"; private const string ResourcedProvisionText = "Resourced provision"; - private const int LocalAuthorityEstablishmentGroupTypeId = 4; private const int AcademyOpenReasonId = 10; public record School(string Name, double Lat, double Lon); @@ -79,6 +78,11 @@ public record School(string Name, double Lat, double Lon); public string? EducationPhase { get; set; } + public required DisplayField KS2WraparoundCare { get; set; } + + public required DisplayField FreeBreakfastClubProgramme { get; set; } + + public required DisplayField HasNurseryProvision { get; set; } public static AboutSchoolViewModel Map(AboutSchoolModel schoolDetails) { @@ -117,6 +121,9 @@ public static AboutSchoolViewModel Map(AboutSchoolModel schoolDetails) Predecessors = schoolDetails.Predecessors?.Select(p => SuccessorOrPredecessorDetailsModel.Map(p)).ToList(), Successors = schoolDetails.Successors?.Select(s => SuccessorOrPredecessorDetailsModel.Map(s)).ToList(), EducationPhase = EducationPhaseFormatter.Format(schoolDetails.IsKS2, schoolDetails.IsKS4, schoolDetails.IsKS5), + KS2WraparoundCare = schoolDetails.KS2WraparoundCare.ToDisplayField(), + FreeBreakfastClubProgramme = schoolDetails.FreeBreakfastClubProgramme.ToDisplayField(), + HasNurseryProvision = schoolDetails.HasNurseryProvision.ToDisplayField(), IsKS2 = schoolDetails.IsKS2, IsKS4 = schoolDetails.IsKS4, IsKS5 = schoolDetails.IsKS5 diff --git a/SAPPub.Web/Areas/Profiles/ViewModels/Admissions/AdmissionsViewModel.cs b/SAPPub.Web/Areas/Profiles/ViewModels/Admissions/AdmissionsViewModel.cs index 4ad303f57..096e05267 100644 --- a/SAPPub.Web/Areas/Profiles/ViewModels/Admissions/AdmissionsViewModel.cs +++ b/SAPPub.Web/Areas/Profiles/ViewModels/Admissions/AdmissionsViewModel.cs @@ -15,12 +15,9 @@ public class AdmissionsViewModel : BaseViewModel public bool IsSchoolClosed { get; init; } - public bool IsIndependentSchool { get; init; } - public bool IsPrimaryFeatureEnabled { get; set; } - // Computed property - show sub-navigation only when school has both KS2 & KS4 AND primary feature is enabled - public bool ShowSubNavigation => IsKS2 && IsKS4 && IsPrimaryFeatureEnabled; + public bool IsIndependentSchool { get; init; } - public static AdmissionsViewModel MapFrom(AdmissionsServiceModel serviceModel, string urn, bool isPrimaryFeatureEnabled) + public static AdmissionsViewModel MapFrom(AdmissionsServiceModel serviceModel, string urn) { return new AdmissionsViewModel { @@ -33,8 +30,7 @@ public static AdmissionsViewModel MapFrom(AdmissionsServiceModel serviceModel, s IsIndependentSchool = serviceModel.IsIndependentSchool, IsKS2 = serviceModel.IsKS2, IsKS4 = serviceModel.IsKS4, - IsKS5 = serviceModel.IsKS5, - IsPrimaryFeatureEnabled = isPrimaryFeatureEnabled + IsKS5 = serviceModel.IsKS5 }; } } diff --git a/SAPPub.Web/Areas/Profiles/ViewModels/KS4/CurriculumAndExtraCurricularActivitiesViewModel.cs b/SAPPub.Web/Areas/Profiles/ViewModels/KS4/CurriculumAndExtraCurricularActivitiesViewModel.cs index 121d9ec86..733b5a129 100644 --- a/SAPPub.Web/Areas/Profiles/ViewModels/KS4/CurriculumAndExtraCurricularActivitiesViewModel.cs +++ b/SAPPub.Web/Areas/Profiles/ViewModels/KS4/CurriculumAndExtraCurricularActivitiesViewModel.cs @@ -7,12 +7,8 @@ namespace SAPPub.Web.Areas.Profiles.ViewModels.KS4; public class CurriculumAndExtraCurricularActivitiesViewModel : BaseViewModel { public required DisplayField SchoolWebsite { get; set; } - public bool IsPrimaryFeatureEnabled { get; set; } - // Computed property - show sub-navigation only when school has both KS2 & KS4 AND primary feature is enabled - public bool ShowSubNavigation => IsKS2 && IsKS4 && IsPrimaryFeatureEnabled; - - public static CurriculumAndExtraCurricularActivitiesViewModel Map(EstablishmentServiceModel establishment, bool isPrimaryFeatureEnabled) + public static CurriculumAndExtraCurricularActivitiesViewModel Map(EstablishmentServiceModel establishment) { return new CurriculumAndExtraCurricularActivitiesViewModel { @@ -21,8 +17,7 @@ public static CurriculumAndExtraCurricularActivitiesViewModel Map(EstablishmentS SchoolWebsite = establishment.Website.ToDisplayField(), IsKS2 = establishment.IsKS2, IsKS4 = establishment.IsKS4, - IsKS5 = establishment.IsKS5, - IsPrimaryFeatureEnabled = isPrimaryFeatureEnabled + IsKS5 = establishment.IsKS5 }; } } diff --git a/SAPPub.Web/Areas/Profiles/Views/About/AboutSchool.cshtml b/SAPPub.Web/Areas/Profiles/Views/About/AboutSchool.cshtml index 3803b1380..a07a70522 100644 --- a/SAPPub.Web/Areas/Profiles/Views/About/AboutSchool.cshtml +++ b/SAPPub.Web/Areas/Profiles/Views/About/AboutSchool.cshtml @@ -362,8 +362,56 @@

+ + @if (Model.IsKS2) + { +

Primary school features

+ + + Nursery + + @Model.HasNurseryProvision.DisplayText(formatter: value => value ? Yes : NotAvailable) + + + + Free breakfast club programme + + @Model.FreeBreakfastClubProgramme.DisplayText(formatter: value => value ? Yes : NotAvailable) + + + + Wraparound care + + @Model.KS2WraparoundCare.DisplayText(notAvailableText: NotRecorded) + + + + + + What is wraparound care and the free breakfast club programme? + + +

Wraparound care

+

Wraparound childcare is before and after school care for primary school aged children in England during term time delivered on or near the school site.

+

+ Wraparound care is different from out-of-school activities, or school clubs, which are less frequent and can be a one-off activity. +

+

Contact the school for more information about what they provide.

- +

Free breakfast club programme

+

The free breakfast club programme is a government-funded initiative being introduced in all state-funded schools with primary-aged children in England. Schools will join the programme in stages between 2026 and 2028.

+

These clubs are:

+
    +
  • open to all pupils on roll at the school in reception to year 6
  • +
  • at least 30 minutes in duration, immediately before the start of each compulsory school day
  • +
  • free to access
  • +
  • offering a breakfast that adheres to the school food standards for England
  • +
  • on, or in the vicinity of, the school site
  • +
+
+
+ } +
@if (Model.IsExclusivelyKS5) { diff --git a/SAPPub.Web/Areas/Profiles/Views/Admissions/KS2.cshtml b/SAPPub.Web/Areas/Profiles/Views/Admissions/KS2.cshtml index 0ed042825..46b122f03 100644 --- a/SAPPub.Web/Areas/Profiles/Views/Admissions/KS2.cshtml +++ b/SAPPub.Web/Areas/Profiles/Views/Admissions/KS2.cshtml @@ -15,7 +15,7 @@ { URN = Model.URN, SchoolName = Model.SchoolName, - ActivePage = RouteConstants.PrimaryAdmissions, + ActivePage = RouteConstants.AdmissionsRoot, IsKS2 = Model.IsKS2, IsKS4 = Model.IsKS4, IsKS5 = Model.IsKS5 diff --git a/SAPPub.Web/Areas/Profiles/Views/Admissions/KS4.cshtml b/SAPPub.Web/Areas/Profiles/Views/Admissions/KS4.cshtml index 9f6304839..5fa72e8f3 100644 --- a/SAPPub.Web/Areas/Profiles/Views/Admissions/KS4.cshtml +++ b/SAPPub.Web/Areas/Profiles/Views/Admissions/KS4.cshtml @@ -15,7 +15,7 @@ { URN = Model.URN, SchoolName = Model.SchoolName, - ActivePage = RouteConstants.SecondaryAdmissions, + ActivePage = RouteConstants.AdmissionsRoot, IsKS2 = Model.IsKS2, IsKS4 = Model.IsKS4, IsKS5 = Model.IsKS5 @@ -24,9 +24,10 @@
@Model.SchoolName

@ViewData["Header"]

- @if (Model.ShowSubNavigation) + + @if (Model.IsKS2) { -