updates for secondary schools
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 46s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m15s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 32s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s

This commit is contained in:
2026-03-28 22:36:00 +00:00
parent f3a8ebdb4b
commit e8175561d5
16 changed files with 2170 additions and 42 deletions

View File

@@ -68,7 +68,7 @@ export default async function HomePage({ searchParams }: HomePageProps) {
return (
<HomeView
initialSchools={schoolsData}
filters={filtersData || { local_authorities: [], school_types: [], years: [], phases: [] }}
filters={filtersData || { local_authorities: [], school_types: [], years: [], phases: [], genders: [], admissions_policies: [] }}
totalSchools={dataInfo?.total_schools ?? null}
/>
);
@@ -79,7 +79,7 @@ export default async function HomePage({ searchParams }: HomePageProps) {
return (
<HomeView
initialSchools={{ schools: [], page: 1, page_size: 50, total: 0, total_pages: 0 }}
filters={{ local_authorities: [], school_types: [], years: [], phases: [] }}
filters={{ local_authorities: [], school_types: [], years: [], phases: [], genders: [], admissions_policies: [] }}
totalSchools={null}
/>
);

View File

@@ -49,7 +49,7 @@ export default async function RankingsPage({ searchParams }: RankingsPageProps)
return (
<RankingsView
rankings={rankingsResponse?.rankings || []}
filters={filtersResponse || { local_authorities: [], school_types: [], years: [], phases: [] }}
filters={filtersResponse || { local_authorities: [], school_types: [], years: [], phases: [], genders: [], admissions_policies: [] }}
metrics={metricsArray}
selectedMetric={metric}
selectedArea={local_authority}
@@ -63,7 +63,7 @@ export default async function RankingsPage({ searchParams }: RankingsPageProps)
return (
<RankingsView
rankings={[]}
filters={{ local_authorities: [], school_types: [], years: [], phases: [] }}
filters={{ local_authorities: [], school_types: [], years: [], phases: [], genders: [], admissions_policies: [] }}
metrics={[]}
selectedMetric={metric}
selectedArea={local_authority}

View File

@@ -6,6 +6,7 @@
import { fetchSchoolDetails } from '@/lib/api';
import { notFound } from 'next/navigation';
import { SchoolDetailView } from '@/components/SchoolDetailView';
import { SecondarySchoolDetailView } from '@/components/SecondarySchoolDetailView';
import type { Metadata } from 'next';
interface SchoolPageProps {
@@ -26,13 +27,18 @@ export async function generateMetadata({ params }: SchoolPageProps): Promise<Met
const data = await fetchSchoolDetails(urn);
const { school_info } = data;
const isSecondary = (school_info.phase ?? '').toLowerCase().includes('secondary');
const title = `${school_info.school_name} | ${school_info.local_authority || 'England'}`;
const description = `View KS2 performance data, results, and statistics for ${school_info.school_name}${school_info.local_authority ? ` in ${school_info.local_authority}` : ''}. Compare reading, writing, and maths results.`;
const description = isSecondary
? `View GCSE results, Attainment 8, Progress 8 and school statistics for ${school_info.school_name}${school_info.local_authority ? ` in ${school_info.local_authority}` : ''}.`
: `View KS2 performance data, results, and statistics for ${school_info.school_name}${school_info.local_authority ? ` in ${school_info.local_authority}` : ''}. Compare reading, writing, and maths results.`;
return {
title,
description,
keywords: `${school_info.school_name}, KS2 results, primary school, ${school_info.local_authority}, school performance, SATs results`,
keywords: isSecondary
? `${school_info.school_name}, GCSE results, secondary school, ${school_info.local_authority}, Attainment 8, Progress 8`
: `${school_info.school_name}, KS2 results, primary school, ${school_info.local_authority}, school performance, SATs results`,
openGraph: {
title,
description,
@@ -79,6 +85,8 @@ export default async function SchoolPage({ params }: SchoolPageProps) {
const { school_info, yearly_data, absence_data, ofsted, parent_view, census, admissions, sen_detail, phonics, deprivation, finance } = data;
const isSecondary = (school_info.phase ?? '').toLowerCase().includes('secondary');
// Generate JSON-LD structured data for SEO
const structuredData = {
'@context': 'https://schema.org',
@@ -112,19 +120,35 @@ export default async function SchoolPage({ params }: SchoolPageProps) {
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
/>
<SchoolDetailView
schoolInfo={school_info}
yearlyData={yearly_data}
absenceData={absence_data}
ofsted={ofsted ?? null}
parentView={parent_view ?? null}
census={census ?? null}
admissions={admissions ?? null}
senDetail={sen_detail ?? null}
phonics={phonics ?? null}
deprivation={deprivation ?? null}
finance={finance ?? null}
/>
{isSecondary ? (
<SecondarySchoolDetailView
schoolInfo={school_info}
yearlyData={yearly_data}
absenceData={absence_data}
ofsted={ofsted ?? null}
parentView={parent_view ?? null}
census={census ?? null}
admissions={admissions ?? null}
senDetail={sen_detail ?? null}
phonics={phonics ?? null}
deprivation={deprivation ?? null}
finance={finance ?? null}
/>
) : (
<SchoolDetailView
schoolInfo={school_info}
yearlyData={yearly_data}
absenceData={absence_data}
ofsted={ofsted ?? null}
parentView={parent_view ?? null}
census={census ?? null}
admissions={admissions ?? null}
senDetail={sen_detail ?? null}
phonics={phonics ?? null}
deprivation={deprivation ?? null}
finance={finance ?? null}
/>
)}
</>
);
}