11< hr >
22
3- @if (groupAnalysisData?.length > 0) {
4- < div class ="mt-3 ">
5- @for (groupSummary of groupAnalysisData; track groupSummary; let i = $index) {
6- < div >
7- < h4 > {{groupSummary.groupId | groupName}} Analysis</ h4 >
8- < table class ="table utility-data table-sm table-bordered table-hover mt-5 " #savingsTable >
9- < thead >
10- < tr class ="table-mh ">
11- < th class ="text-center sortable-header " (click) ="setOrderDataField('year') "
12- [ngClass] ="{'active': orderDataField == 'year'} ">
13- Year
14- </ th >
15- < th class ="text-center sortable-header " (click) ="setOrderDataField('savings') "
16- [ngClass] ="{'active': orderDataField == 'savings'} ">
17- Savings
18- </ th >
19- < th class ="text-center sortable-header " (click) ="setOrderDataField('totalSavingsPercentImprovement') "
20- [ngClass] ="{'active': orderDataField == 'totalSavingsPercentImprovement'} ">
21- % Savings
22- </ th >
23- < th class ="text-center sortable-header " (click) ="setOrderDataField('contributionPercent') "
24- [ngClass] ="{'active': orderDataField == 'contributionPercent'} ">
25- % Contribution
26- </ th >
27- </ tr >
28- </ thead >
29- < tbody class ="table-group-divider ">
30- @for (data of groupSummary.data | orderBy: orderDataField: orderByDirection; track data; let i = $index) {
31- < tr
32- >
33- < td class ="text-center "> {{data.year}} </ td >
34- @if (data.savings) {
35- < td class ="text-center ">
36- < span [ngClass] ="{'red': data.savings < 0} ">
37- {{data.savings | number:'1.0-2'}}
38- </ span >
39- </ td >
40- }
41- @if (!data.savings || data.savings == null) {
42- < td class ="text-center ">
43- —
44- </ td >
45- }
46- @if (data.totalSavingsPercentImprovement) {
47- < td class ="text-center "
48- >
49- < span [ngClass] ="{'red': data.totalSavingsPercentImprovement < 0} ">
50- {{data.totalSavingsPercentImprovement | number:'1.0-3'}} %
51- </ span >
52- </ td >
53- }
54- @if (!data.totalSavingsPercentImprovement) {
55- < td class ="text-center "
56- >
57- —
58- </ td >
59- }
60- @if (data.savings && annualAnalysisSummary[i]?.adjusted) {
61- < td class ="text-center "
62- >
63- < span
64- [ngClass] ="{'red': (data.savings / annualAnalysisSummary[i].adjusted) < 0} ">
65- {{(data.savings / annualAnalysisSummary[i].adjusted) | number:'1.0-3'}} %</ span >
66- </ td >
67- }
68- @if (!data.savings || !annualAnalysisSummary[i]?.adjusted) {
69- < td class ="text-center "
70- >
71- —
72- </ td >
73- }
74- </ tr >
75- }
76- </ tbody >
77- </ table >
78- < button class ="btn action-btn btn-sm mt-3 " (click) ="copyTable(i) ">
79- < span class ="fa fa-copy "> </ span > Copy Table
80- </ button >
81- < hr >
82- </ div >
3+ @if (groupAnalysisData?.length > 0) {
4+ < div class ="mt-3 ">
5+ @for (groupSummary of groupAnalysisData; track groupSummary; let i = $index) {
6+ < div >
7+ < h4 > {{groupSummary.groupId | groupName}} Analysis</ h4 >
8+ < table class ="table utility-data table-sm table-bordered table-hover mt-5 " #savingsTable >
9+ < thead >
10+ < tr class ="table-mh ">
11+ < th class ="text-center sortable-header " (click) ="setOrderDataField('year') "
12+ [ngClass] ="{'active': orderDataField == 'year'} ">
13+ Year
14+ </ th >
15+ < th class ="text-center sortable-header " (click) ="setOrderDataField('savings') "
16+ [ngClass] ="{'active': orderDataField == 'savings'} ">
17+ Savings
18+ </ th >
19+ < th class ="text-center sortable-header " (click) ="setOrderDataField('totalSavingsPercentImprovement') "
20+ [ngClass] ="{'active': orderDataField == 'totalSavingsPercentImprovement'} ">
21+ % Savings
22+ </ th >
23+ < th class ="text-center sortable-header " (click) ="setOrderDataField('contributionPercent') "
24+ [ngClass] ="{'active': orderDataField == 'contributionPercent'} ">
25+ % Contribution
26+ </ th >
27+ </ tr >
28+ </ thead >
29+ < tbody class ="table-group-divider ">
30+ @for (data of groupSummary.data | orderBy: orderDataField: orderByDirection; track data; let i = $index) {
31+ < tr >
32+ < td class ="text-center "> {{data.year}} </ td >
33+ @if (data.savings) {
34+ < td class ="text-center ">
35+ < span [ngClass] ="{'red': data.savings < 0} ">
36+ {{data.savings | number:'1.0-2'}}
37+ </ span >
38+ </ td >
39+ }
40+ @if (!data.savings || data.savings == null) {
41+ < td class ="text-center ">
42+ —
43+ </ td >
44+ }
45+ @if (data.totalSavingsPercentImprovement) {
46+ < td class ="text-center ">
47+ < span [ngClass] ="{'red': data.totalSavingsPercentImprovement < 0} ">
48+ {{data.totalSavingsPercentImprovement | number:'1.0-3'}} %
49+ </ span >
50+ </ td >
51+ }
52+ @if (!data.totalSavingsPercentImprovement) {
53+ < td class ="text-center ">
54+ —
55+ </ td >
56+ }
57+ @if (data.contributionPercent) {
58+ < td class ="text-center ">
59+ < span [ngClass] ="{'red': data.contributionPercent < 0} ">
60+ {{data.contributionPercent | number:'1.0-3'}} %</ span >
61+ </ td >
62+ }
63+ @if (!data.contributionPercent) {
64+ < td class ="text-center ">
65+ —
66+ </ td >
67+ }
68+ </ tr >
8369 }
84- </ div >
85- }
70+ </ tbody >
71+ </ table >
72+ < button class ="btn action-btn btn-sm mt-3 " (click) ="copyTable(i) ">
73+ < span class ="fa fa-copy "> </ span > Copy Table
74+ </ button >
75+ < hr >
76+ </ div >
77+ }
78+ </ div >
79+ }
0 commit comments