mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Added finishing touches to the solar page
This commit is contained in:
parent
b622ec3250
commit
9d6235bc81
3 changed files with 16 additions and 15 deletions
BIN
public/pfp_solar_image.png
Normal file
BIN
public/pfp_solar_image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 952 KiB |
|
|
@ -24,7 +24,7 @@ export default async function SolarAnalysisPage({
|
|||
}) {
|
||||
const propertyMeta = await getPropertyMeta(params.propertyId);
|
||||
const solarData = await getSolarData(Number(propertyMeta.uprn));
|
||||
const solarScenarioData = await getSolarScenarioData(String(solarData.id));
|
||||
// If there's no solar data, we cannot display the page
|
||||
|
||||
if (!solarData) {
|
||||
return (
|
||||
|
|
@ -39,6 +39,8 @@ export default async function SolarAnalysisPage({
|
|||
);
|
||||
}
|
||||
|
||||
const solarScenarioData = await getSolarScenarioData(String(solarData.id));
|
||||
|
||||
const {
|
||||
panelWidthMeters,
|
||||
panelHeightMeters,
|
||||
|
|
@ -80,6 +82,13 @@ export default async function SolarAnalysisPage({
|
|||
return (
|
||||
<div className="leading-loose tracking-wider">
|
||||
<div className="py-8 max-w-7xl mx-auto">
|
||||
<div className="flex items-center text-gray-700 font-semibold mt-4 text-lg mb-4">
|
||||
<InformationCircleIcon className="w-6 h-6 text-brandgold mr-2" />
|
||||
{solarScenarioData.scenrioType === "building"
|
||||
? "These figures are for the building as a whole"
|
||||
: "These figures are for the individual property"}
|
||||
</div>
|
||||
|
||||
<div className="bg-white shadow-md rounded-lg p-6 mb-8 w-full">
|
||||
<h2 className="text-l font-semibold text-gray-800 mb-4">
|
||||
Simulation Panel Configuration
|
||||
|
|
@ -143,11 +152,11 @@ export default async function SolarAnalysisPage({
|
|||
</div>
|
||||
|
||||
<div className="bg-white shadow-md rounded-lg p-6 mb-8 w-full">
|
||||
<h2 className="text-l font-semibold text-gray-800 mb-4">
|
||||
Solar PV Simulation
|
||||
</h2>
|
||||
<div className="flex">
|
||||
<div className="flex flex-col space-y-4 w-1/2">
|
||||
<h2 className="text-l font-semibold text-gray-800 mb-4">
|
||||
Solar PV Simulation
|
||||
</h2>
|
||||
<ul className="list-none pl-5 text-gray-700">
|
||||
<li className="flex items-center">
|
||||
<HomeIcon className="w-5 h-5 text-blue-500 mr-2" />
|
||||
|
|
@ -201,9 +210,9 @@ export default async function SolarAnalysisPage({
|
|||
</div>
|
||||
<div className="w-1/2 flex items-center justify-center">
|
||||
<img
|
||||
src="/static/solar_image.png"
|
||||
src="/pfp_solar_image.png"
|
||||
alt="Solar Image"
|
||||
className="w-3/4 h-auto"
|
||||
className="w-full h-full"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,10 +12,6 @@ export async function getSolarData(uprn: number): Promise<SolarInterface> {
|
|||
where: eq(solar.uprn, BigInt(uprn)),
|
||||
});
|
||||
|
||||
if (!data) {
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
|
||||
return data as SolarInterface;
|
||||
}
|
||||
|
||||
|
|
@ -30,9 +26,5 @@ export async function getSolarScenarioData(
|
|||
),
|
||||
});
|
||||
|
||||
if (!data) {
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
|
||||
return data;
|
||||
return data as SolarScenario;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue