Skip to content

Commit

Permalink
Merge pull request #271 from NREL/issue-267
Browse files Browse the repository at this point in the history
Report Quick Fixes
  • Loading branch information
RLiNREL authored Oct 10, 2024
2 parents ac12b4c + 1c531f2 commit 783b365
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class PerformanceMetricsChartComponent {

var trace1 = {
x: kpiReportItems.map(kpiReport => {
return kpiReport.keyPerformanceMetric.htmlLabel
return kpiReport.keyPerformanceMetric.label
}),
y: kpiReportItems.map(kpiReportItem => {
return kpiReportItem.keyPerformanceMetric.baselineCost - kpiReportItem.performanceMetricImpact.costAdjustment
Expand All @@ -42,7 +42,7 @@ export class PerformanceMetricsChartComponent {

var trace2 = {
x: kpiReportItems.map(kpiReport => {
return kpiReport.keyPerformanceMetric.htmlLabel
return kpiReport.keyPerformanceMetric.label
}),
y: kpiReportItems.map(kpiReportItem => {
return kpiReportItem.performanceMetricImpact.costAdjustment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<tbody>
<tr *ngFor="let kpiReportItem of keyPerformanceIndicatorReport.kpiReportItems">
<td class="">
{{kpiReportItem.keyPerformanceMetric.kpiValue | kpiValueDisplay: keyPerformanceIndicators}}
<span
[innerHTML]="kpiReportItem.keyPerformanceMetric.kpiValue | kpiValueDisplay: keyPerformanceIndicators"></span>
</td>
<td class="">
<span [innerHTML]="kpiReportItem.keyPerformanceMetric.htmlLabel"></span>
Expand All @@ -45,8 +46,7 @@
[isCurrency]="true"></app-single-cell-item>
</td>
<td class="text-right">
<app-single-cell-item
[numValue]="kpiReportItem.performanceMetricImpact.percentSavings"
<app-single-cell-item [numValue]="kpiReportItem.performanceMetricImpact.percentSavings"
[isCurrency]="false" [units]="'%'"></app-single-cell-item>
</td>
</ng-template>
Expand All @@ -62,24 +62,22 @@
<th colspan="2">
Totals
</th>
<td class="text-right">
<th class="text-right">
<app-single-cell-item [numValue]="keyPerformanceIndicatorReport.total.baselineCost"
[isCurrency]="true"></app-single-cell-item>
</td>
<td class="text-right">
<app-single-cell-item
[numValue]="keyPerformanceIndicatorReport.total.annualSavings"
</th>
<th class="text-right">
<app-single-cell-item [numValue]="keyPerformanceIndicatorReport.total.annualSavings"
[isCurrency]="true"></app-single-cell-item>
</td>
<td class="text-right">
</th>
<th class="text-right">
<app-single-cell-item [numValue]="keyPerformanceIndicatorReport.total.modifiedCost"
[isCurrency]="true"></app-single-cell-item>
</td>
<td class="text-right">
<app-single-cell-item
[numValue]="keyPerformanceIndicatorReport.total.percentSavings"
</th>
<th class="text-right">
<app-single-cell-item [numValue]="keyPerformanceIndicatorReport.total.percentSavings"
[isCurrency]="false" [units]="'%'"></app-single-cell-item>
</td>
</th>
</tr>
</tfoot>
</table>
2 changes: 1 addition & 1 deletion src/app/shared/reports/calculations/assessmentReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function getAssessmentReport(assessment: IdbAssessment, energyOpportuniti
if (totalPaybackWithNebs == Infinity) {
totalPaybackWithNebs = 0;
}
let totalPaybackWithoutNebs: number = (implementationCost / totalNonOpportunitySavings);
let totalPaybackWithoutNebs: number = (implementationCost / totalEnergyCostSavings);
if (totalPaybackWithoutNebs == Infinity) {
totalPaybackWithoutNebs = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

<ng-template #numValueBlock>
<ng-template [ngIf]="!isCurrency" [ngIfElse]="currencyBlock">
{{numValue | number}}
{{numValue | number:'1.0-2'}}
</ng-template>
<ng-template #currencyBlock>
{{numValue | currency}}
{{numValue | currency : 'USD' : 'symbol' : '1.0-0'}}
</ng-template>
<ng-template [ngIf]="units && !per">
<span [innerHTML]="units | unitsDisplay"></span>
Expand Down

0 comments on commit 783b365

Please sign in to comment.