feat(building-passport): show longitude/latitude in Location & Status

Local authority and constituency have no data source for new-approach
properties (not on epc_property; null on the property row). Replace them with
longitude/latitude from property_details_spatial (already fetched on the page),
keeping Tenure.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-23 11:44:57 +00:00
parent 1aeb33762e
commit a89e6bfe30

View file

@ -218,9 +218,15 @@ export default async function BuildingPassportHome(props: {
{/* Location & Status */}
<div className="bg-white rounded-2xl p-7 shadow-sm border border-gray-100">
<p className="font-manrope text-xs font-bold text-brandmidblue uppercase tracking-widest mb-4">Location & Status</p>
<DetailRow label="Local authority" value={propertyMeta.localAuthority ?? "—"} />
<DetailRow label="Constituency" value={propertyMeta.constituency ?? "—"} />
<DetailRow label="Tenure" value={propertyMeta.tenure ?? "—"} />
<DetailRow
label="Longitude"
value={spatial?.longitude != null ? spatial.longitude.toFixed(6) : "—"}
/>
<DetailRow
label="Latitude"
value={spatial?.latitude != null ? spatial.latitude.toFixed(6) : "—"}
/>
</div>
{/* Annual Energy Costs */}