added adjusted energy to db

This commit is contained in:
Khalim Conn-Kowlessar 2023-11-29 00:34:06 +00:00
parent 44624e5996
commit c196e913b0
6 changed files with 1394 additions and 2 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "property_details_epc" ADD COLUMN "adjusted_energy_consumption" real;

File diff suppressed because it is too large Load diff

View file

@ -372,6 +372,13 @@
"when": 1701190168990,
"tag": "0052_married_silver_sable",
"breakpoints": true
},
{
"idx": 53,
"version": "5",
"when": 1701217628773,
"tag": "0053_reflective_virginia_dare",
"breakpoints": true
}
]
}

View file

@ -158,6 +158,7 @@ export const propertyDetailsEpc = pgTable("property_details_epc", {
energyTariff: text("energy_tariff"),
primaryEnergyConsumption: real("primary_energy_consumption"),
co2Emissions: real("co2_emissions"),
adjustedEnergyConsumption: real("adjusted_energy_consumption"),
});
export const propertyDetailsMeter = pgTable("property_details_meter", {

View file

@ -83,7 +83,7 @@ function SummaryBox({
if (energy === null) {
return "-";
} else {
return formatNumber(energy) + " Kwh";
return formatNumber(energy) + " kWh";
}
}
@ -106,6 +106,10 @@ function SummaryBox({
upperBound = lowerBound;
}
if (lowerBound === 1 && upperBound === 1) {
return "1-2 weeks";
}
// Format the output
return lowerBound === upperBound
? `${lowerBound} weeks`

View file

@ -92,7 +92,7 @@ function PropertyDetailsCard({
<td className={rowValueStyle}>{propertyMeta.tenure}</td>
</tr>
<tr>
<td className={rowTitleStyle}>Number of rooms:</td>
<td className={rowTitleStyle}>Number of Habitable Rooms:</td>
<td className={rowValueStyle}>
{propertyMeta.numberOfRooms || "unkown"}
</td>