From 77a0f5b674525e76aae3c4744a6c6f529983840a Mon Sep 17 00:00:00 2001 From: Tudor Date: Sun, 29 Mar 2026 10:59:30 +0100 Subject: [PATCH] =?UTF-8?q?fix(detail):=20enrich=20secondary=20overview=20?= =?UTF-8?q?tab=20=E2=80=94=20show=20Ofsted=20grades,=20admissions,=20SEN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The overview tab was sparse for schools without parent view data, showing only 2 cards. Now shows: - Individual Ofsted grades when no overall effectiveness (post-Sept 2024) - Admissions summary card (PAN, applications, 1st choice rate) - School context card (pupils, capacity, SEN support, EHCP) Co-Authored-By: Claude Opus 4.6 --- .../components/SecondarySchoolDetailView.tsx | 85 ++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/nextjs-app/components/SecondarySchoolDetailView.tsx b/nextjs-app/components/SecondarySchoolDetailView.tsx index 8deb5c6..30a6ddd 100644 --- a/nextjs-app/components/SecondarySchoolDetailView.tsx +++ b/nextjs-app/components/SecondarySchoolDetailView.tsx @@ -232,12 +232,33 @@ export function SecondarySchoolDetailView({

From November 2025, Ofsted replaced single overall grades with Report Cards.

- ) : ( + ) : ofsted.overall_effectiveness ? (
- {ofsted.overall_effectiveness ? OFSTED_LABELS[ofsted.overall_effectiveness] : 'Not rated'} + {OFSTED_LABELS[ofsted.overall_effectiveness]}
+ ) : ( + <> +

+ From September 2024, Ofsted no longer gives a single overall grade. +

+
+ {[ + { label: 'Quality of Education', value: ofsted.quality_of_education }, + { label: 'Behaviour & Attitudes', value: ofsted.behaviour_attitudes }, + { label: 'Personal Development', value: ofsted.personal_development }, + { label: 'Leadership & Management', value: ofsted.leadership_management }, + ].filter(({ value }) => value != null).map(({ label, value }) => ( +
+
{label}
+
+ {OFSTED_LABELS[value!]} +
+
+ ))} +
+ )} {parentView?.q_recommend_pct != null && parentView.total_responses != null && parentView.total_responses > 0 && (

@@ -288,6 +309,66 @@ export function SecondarySchoolDetailView({ )} + {/* Admissions summary */} + {admissions && (admissions.published_admission_number != null || admissions.total_applications != null) && ( +

+

Admissions at a Glance

+
+ {admissions.published_admission_number != null && ( +
+
Year 7 places (PAN)
+
{admissions.published_admission_number}
+
+ )} + {admissions.total_applications != null && ( +
+
Total applications
+
{admissions.total_applications.toLocaleString()}
+
+ )} + {admissions.first_preference_offer_pct != null && ( +
+
1st choice offer rate
+
{admissions.first_preference_offer_pct}%
+
+ )} +
+ +
+ )} + + {/* SEN & school context summary */} + {(latestResults?.sen_support_pct != null || latestResults?.sen_ehcp_pct != null || latestResults?.total_pupils != null) && ( +
+

School Context

+
+ {latestResults?.total_pupils != null && ( +
+
Total pupils
+
{latestResults.total_pupils.toLocaleString()}
+ {schoolInfo.capacity != null && ( +
Capacity: {schoolInfo.capacity}
+ )} +
+ )} + {latestResults?.sen_support_pct != null && ( +
+
SEN support
+
{formatPercentage(latestResults.sen_support_pct)}
+
+ )} + {latestResults?.sen_ehcp_pct != null && ( +
+
EHCP
+
{formatPercentage(latestResults.sen_ehcp_pct)}
+
+ )} +
+
+ )} + {/* Top Parent View scores */} {parentView != null && parentView.total_responses != null && parentView.total_responses > 0 && (