mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-07-12 13:28:55 +00:00
added adjusted energy to db
This commit is contained in:
parent
44624e5996
commit
c196e913b0
6 changed files with 1394 additions and 2 deletions
1
src/app/db/migrations/0053_reflective_virginia_dare.sql
Normal file
1
src/app/db/migrations/0053_reflective_virginia_dare.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE "property_details_epc" ADD COLUMN "adjusted_energy_consumption" real;
|
||||
1379
src/app/db/migrations/meta/0053_snapshot.json
Normal file
1379
src/app/db/migrations/meta/0053_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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", {
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue