mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
added low energy lighting to front end
This commit is contained in:
parent
39f6f1ec62
commit
44624e5996
4 changed files with 11 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ const TitleMap = {
|
|||
roof_insulation: "Roof Insulation",
|
||||
mechanical_ventilation: "Mechanical Ventilation",
|
||||
sealing_open_fireplace: "Sealing Open Fireplace",
|
||||
low_energy_lighting: "Low Energy Lighting",
|
||||
};
|
||||
|
||||
export default function RecommendationCard({
|
||||
|
|
|
|||
|
|
@ -58,6 +58,11 @@ export default function RecommendationContainer({
|
|||
(rec: Recommendation) => rec.default
|
||||
) || { estimatedCost: 0, sapPoints: 0 };
|
||||
|
||||
const defaultLightingRecommendations =
|
||||
categorizedRecommendations.low_energy_lighting?.find(
|
||||
(rec: Recommendation) => rec.default
|
||||
) || { estimatedCost: 0, sapPoints: 0 };
|
||||
|
||||
const [costMap, setCostMap] = useState<RecommendationMetricMap>({
|
||||
wall_insulation: defaultWallsRecommendations?.estimatedCost || 0,
|
||||
floor_insulation: defaultFloorRecommendations?.estimatedCost || 0,
|
||||
|
|
@ -65,6 +70,7 @@ export default function RecommendationContainer({
|
|||
mechanical_ventilation:
|
||||
defaultVentiliationRecommendations?.estimatedCost || 0,
|
||||
sealing_open_fireplace: defaultFireplaceRecommendations?.estimatedCost || 0,
|
||||
low_energy_lighting: defaultLightingRecommendations?.estimatedCost || 0,
|
||||
});
|
||||
|
||||
const [sapMap, setSapMap] = useState<RecommendationMetricMap>({
|
||||
|
|
@ -73,6 +79,7 @@ export default function RecommendationContainer({
|
|||
roof_insulation: defaultRoofRecommendations.sapPoints || 0,
|
||||
mechanical_ventilation: defaultVentiliationRecommendations.sapPoints || 0,
|
||||
sealing_open_fireplace: defaultFireplaceRecommendations.sapPoints || 0,
|
||||
low_energy_lighting: defaultLightingRecommendations.sapPoints || 0,
|
||||
});
|
||||
|
||||
const [totalEstimatedCost, setTotalEstimatedCost] = useState(
|
||||
|
|
|
|||
|
|
@ -100,7 +100,8 @@ export type RecommendationType =
|
|||
| "floor_insulation"
|
||||
| "roof_insulation"
|
||||
| "mechanical_ventilation"
|
||||
| "sealing_open_fireplace";
|
||||
| "sealing_open_fireplace"
|
||||
| "low_energy_lighting";
|
||||
|
||||
export type UnnestedRecommendation = {
|
||||
quantity: number;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ export interface RecommendationMetricMap {
|
|||
roof_insulation: number;
|
||||
mechanical_ventilation: number;
|
||||
sealing_open_fireplace: number;
|
||||
low_energy_lighting: number;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue