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 { SecondaryFlags } from '@/lib/schoolSections';
|
||||
import { OfstedSection } from './OfstedSection';
|
||||
import { InspectionNotice } from './InspectionNotice';
|
||||
import { hasReportCard } from '@/lib/ofstedStatus';
|
||||
import { GcseSection } from './GcseSection';
|
||||
import { DestinationsSection } from './DestinationsSection';
|
||||
import { Post16DestinationsSection } from './Post16DestinationsSection';
|
||||
@@ -60,7 +62,8 @@ export function SecondarySchoolSections({
|
||||
}: SecondarySchoolSectionsProps) {
|
||||
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);
|
||||
const ofstedInspectedDate = isReportCard
|
||||
? ofsted?.rc_inspection_date ?? null
|
||||
: ofsted?.latest_visit?.date ?? null;
|
||||
@@ -74,7 +77,7 @@ export function SecondarySchoolSections({
|
||||
|
||||
return (
|
||||
<div className={styles.secondaryScope}>
|
||||
{ofsted && (
|
||||
{ofsted ? (
|
||||
<OfstedSection
|
||||
ofsted={ofsted}
|
||||
urn={schoolInfo.urn}
|
||||
@@ -83,7 +86,7 @@ export function SecondarySchoolSections({
|
||||
oeifAllSameGrade={oeifAllSameGrade}
|
||||
oeifAreas={oeifAreas}
|
||||
/>
|
||||
)}
|
||||
) : <InspectionNotice school={schoolInfo} />}
|
||||
|
||||
{flags.hasResults && flags.latestResults && (
|
||||
<GcseSection
|
||||
|
||||
Reference in new issue
Block a user