From c1dabfd171349a1a0d440a7c72832ddde583416b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20K=C3=B6ves?= <3187531+vkoves@users.noreply.github.com> Date: Tue, 4 Jun 2024 21:14:23 -0500 Subject: [PATCH] Render Total GHG Emissions in Historical Data --- src/components/HistoricalBuildingDataTable.vue | 12 ++++++++++++ src/templates/BuildingDetails.vue | 1 + 2 files changed, 13 insertions(+) diff --git a/src/components/HistoricalBuildingDataTable.vue b/src/components/HistoricalBuildingDataTable.vue index 87954ad..3d63d82 100644 --- a/src/components/HistoricalBuildingDataTable.vue +++ b/src/components/HistoricalBuildingDataTable.vue @@ -27,6 +27,9 @@ GHG Intensity kg CO2e / sqft + + GHG Emissions metric tons CO2e + Source EUI kBtu / sqft @@ -61,6 +64,7 @@ {{ benchmark.ENERGYSTARScore || '-' }} {{ benchmark.GHGIntensity }} + {{ benchmark.TotalGHGEmissions | optionalFloat }} {{ benchmark.SourceEUI }} @@ -99,6 +103,14 @@ import {IHistoricData} from '../common-functions.vue'; return parseInt(value).toLocaleString(); }, + + optionalFloat(value: string) { + if (!value) { + return '-'; + } + + return parseFloat(value).toLocaleString(); + }, }, }) export default class BuildingImage extends Vue { diff --git a/src/templates/BuildingDetails.vue b/src/templates/BuildingDetails.vue index a8ec5ce..68a2c01 100644 --- a/src/templates/BuildingDetails.vue +++ b/src/templates/BuildingDetails.vue @@ -56,6 +56,7 @@ query ($id: ID!, $ID: String) { ENERGYSTARScore SourceEUI GHGIntensity + TotalGHGEmissions ElectricityUse NaturalGasUse DistrictSteamUse