@@ -180,7 +210,7 @@ export default function ConditionReport({
0}
roomsWithIssues={roomsWithDamp}
@@ -212,6 +242,12 @@ export default function ConditionReport({
passed={bathroomsOk}
alert={!bathroomsOk}
/>
+
diff --git a/src/app/portfolio/[slug]/building-passport/[propertyId]/assessment/page.tsx b/src/app/portfolio/[slug]/building-passport/[propertyId]/assessment/page.tsx
index 7368036..ddce32a 100644
--- a/src/app/portfolio/[slug]/building-passport/[propertyId]/assessment/page.tsx
+++ b/src/app/portfolio/[slug]/building-passport/[propertyId]/assessment/page.tsx
@@ -143,7 +143,7 @@ export default async function PreAssessmentReport(
conditionReport = await getEnergyAssessmentFromS3(conditionReportMeta.s3JsonUri);
}
- console.log("conditionReport", conditionReport.rooms.kitchen)
+ // console.log("conditionReport", conditionReport.rooms.utility)
const nonIntrusiveSurvey = await getNonIntrusiveSurvey(propertyMeta.uprn);
@@ -151,6 +151,12 @@ export default async function PreAssessmentReport(
const heatingDemand = formatHeatDemandFeatures(conditionReportData);
+ // If total floor area is missing, we have a problem
+ if (conditionReportData.totalFloorArea == null) {
+ console.error("Total floor area is missing");
+ return null;
+ }
+
return (
@@ -172,7 +178,7 @@ export default async function PreAssessmentReport(
{
- Object.keys(conditionReportMeta).length > 0 &&
+ Object.keys(conditionReportMeta).length > 0 &&
}
{nonIntrusiveSurvey && (