fix(school, compare): ISI, not-yet-inspected and further-education states (H4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab25d83b9d
commit
9feb37b974
12 files changed
+143
-16
No files matched your search
@@ -19,6 +19,8 @@ import type {
|
||||
import { ofstedLegacyAreas } from '@/lib/utils';
|
||||
import type { SchoolFlags } from '@/lib/schoolSections';
|
||||
import { OfstedSection } from './OfstedSection';
|
||||
import { InspectionNotice } from './InspectionNotice';
|
||||
import { hasReportCard } from '@/lib/ofstedStatus';
|
||||
import { ResultsSection } from './ResultsSection';
|
||||
import { AdmissionsSection } from './AdmissionsSection';
|
||||
import { DistanceSection } from './DistanceSection';
|
||||
@@ -54,7 +56,8 @@ export function PrimarySchoolSections({
|
||||
const primaryAvg = nationalAvg?.primary ?? {};
|
||||
const secondaryAvg = nationalAvg?.secondary ?? {};
|
||||
|
||||
const isReportCard = !!(ofsted?.report_card && Object.keys(ofsted.report_card).length > 0);
|
||||
// By date as well as area labels: an FE report card has only a safeguarding result (audit H4).
|
||||
const isReportCard = !!ofsted && hasReportCard(ofsted);
|
||||
// Report cards are dated by their own inspection (rc_inspection_date);
|
||||
// anything else by the school's latest visit, never the older inspection a
|
||||
// grade may come from.
|
||||
@@ -71,7 +74,7 @@ export function PrimarySchoolSections({
|
||||
|
||||
return (
|
||||
<>
|
||||
{ofsted && (
|
||||
{ofsted ? (
|
||||
<OfstedSection
|
||||
ofsted={ofsted}
|
||||
urn={schoolInfo.urn}
|
||||
@@ -80,7 +83,7 @@ export function PrimarySchoolSections({
|
||||
oeifAllSameGrade={oeifAllSameGrade}
|
||||
oeifAreas={oeifAreas}
|
||||
/>
|
||||
)}
|
||||
) : <InspectionNotice school={schoolInfo} />}
|
||||
|
||||
{flags.hasAnyResults && flags.latestResults && (
|
||||
<ResultsSection
|
||||
|
||||
Reference in new issue
Block a user