mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Added secondary heating recommendation
This commit is contained in:
parent
5b2647730e
commit
fb4a96dbc8
5 changed files with 19 additions and 3 deletions
|
|
@ -36,6 +36,7 @@ const TitleMap = {
|
|||
// Heating
|
||||
heating: "Heating Systems",
|
||||
heating_control: "Heating Controls",
|
||||
secondary_heating: "Secondary Heating System",
|
||||
// Hot water tank
|
||||
hot_water_tank_insulation: "Hot Water Tank Insulation",
|
||||
// Default options when no recommendation is selected
|
||||
|
|
|
|||
|
|
@ -117,6 +117,11 @@ export default function RecommendationContainer({
|
|||
(rec: Recommendation) => rec.default
|
||||
) || emptyImpactState;
|
||||
|
||||
const defaultSecondaryHeatingRecommendations =
|
||||
categorizedRecommendations.secondary_heating?.find(
|
||||
(rec: Recommendation) => rec.default
|
||||
) || emptyImpactState;
|
||||
|
||||
const [costMap, setCostMap] = useState<RecommendationMetricMap>({
|
||||
wall_insulation: defaultWallsRecommendations.estimatedCost || 0,
|
||||
floor_insulation: defaultFloorRecommendations.estimatedCost || 0,
|
||||
|
|
@ -131,6 +136,8 @@ export default function RecommendationContainer({
|
|||
hot_water_tank_insulation:
|
||||
defaultHotWaterTankRecommendations.estimatedCost || 0,
|
||||
heating_control: defaultHeatingControlRecommendations.estimatedCost || 0,
|
||||
secondary_heating:
|
||||
defaultSecondaryHeatingRecommendations.estimatedCost || 0,
|
||||
});
|
||||
|
||||
const [sapMap, setSapMap] = useState<RecommendationMetricMap>({
|
||||
|
|
@ -146,6 +153,7 @@ export default function RecommendationContainer({
|
|||
hot_water_tank_insulation:
|
||||
defaultHotWaterTankRecommendations.sapPoints || 0,
|
||||
heating_control: defaultHeatingControlRecommendations.sapPoints || 0,
|
||||
secondary_heating: defaultSecondaryHeatingRecommendations.sapPoints || 0,
|
||||
});
|
||||
|
||||
const [labourDaysMap, setLabourDaysMap] = useState<RecommendationMetricMap>({
|
||||
|
|
@ -161,6 +169,7 @@ export default function RecommendationContainer({
|
|||
hot_water_tank_insulation:
|
||||
defaultHotWaterTankRecommendations.labourDays || 0,
|
||||
heating_control: defaultHeatingControlRecommendations.labourDays || 0,
|
||||
secondary_heating: defaultSecondaryHeatingRecommendations.labourDays || 0,
|
||||
});
|
||||
|
||||
const [co2SavingsMap, setCo2SavingsMap] = useState<RecommendationMetricMap>({
|
||||
|
|
@ -180,6 +189,8 @@ export default function RecommendationContainer({
|
|||
defaultHotWaterTankRecommendations.co2EquivalentSavings || 0,
|
||||
heating_control:
|
||||
defaultHeatingControlRecommendations.co2EquivalentSavings || 0,
|
||||
secondary_heating:
|
||||
defaultSecondaryHeatingRecommendations.co2EquivalentSavings || 0,
|
||||
});
|
||||
|
||||
const [energyCostSavingsMap, setEnergyCostSavingsMap] =
|
||||
|
|
@ -200,6 +211,8 @@ export default function RecommendationContainer({
|
|||
defaultHotWaterTankRecommendations.energyCostSavings || 0,
|
||||
heating_control:
|
||||
defaultHeatingControlRecommendations.energyCostSavings || 0,
|
||||
secondary_heating:
|
||||
defaultSecondaryHeatingRecommendations.energyCostSavings || 0,
|
||||
});
|
||||
|
||||
const [heatDemandMap, setHeatDemandMap] = useState<RecommendationMetricMap>({
|
||||
|
|
@ -218,6 +231,8 @@ export default function RecommendationContainer({
|
|||
defaultHotWaterTankRecommendations.adjustedHeatDemand || 0,
|
||||
heating_control:
|
||||
defaultHeatingControlRecommendations.adjustedHeatDemand || 0,
|
||||
secondary_heating:
|
||||
defaultSecondaryHeatingRecommendations.adjustedHeatDemand || 0,
|
||||
});
|
||||
|
||||
const [totalEstimatedCost, setTotalEstimatedCost] = useState(
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ export type RecommendationType =
|
|||
| "solar_pv"
|
||||
| "heating"
|
||||
| "hot_water_tank_insulation"
|
||||
| "heating_control";
|
||||
| "heating_control"
|
||||
| "secondary_heating";
|
||||
|
||||
export type UnnestedRecommendation = {
|
||||
quantity: number;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@ export default async function BuildingPassportHome({
|
|||
// the response is cached so we just gain access to the data
|
||||
const propertyMeta = await getPropertyMeta(params.propertyId);
|
||||
|
||||
console.log(propertyMeta);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center mt-4">
|
||||
<div className="flex justify-center mt-4 space-x-2">
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ export interface RecommendationMetricMap {
|
|||
heating: number;
|
||||
hot_water_tank_insulation: number;
|
||||
heating_control: number;
|
||||
secondary_heating: number;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue