Skip to content

Commit 32cf58b

Browse files
authored
Merge pull request #2271 from ORNL-AMO/issue-2263-other-impacts
Issue 2263: other impacts
2 parents 77a81ba + bbf19d3 commit 32cf58b

File tree

46 files changed

+954
-1021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+954
-1021
lines changed

src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export class AppComponent {
338338
}
339339

340340
async initializeCustomEmissions(account: IdbAccount) {
341-
this.loadingMessage = 'Loading Emissions Rates...';
341+
// this.loadingMessage = 'Loading Emissions Rates...';
342342
let customEmissionsItems: Array<IdbCustomEmissionsItem> = await this.customEmissionsDbService.getAllAccountCustomEmissions(account.guid);
343343
if (customEmissionsItems.length != 0) {
344344
for (let i = 0; i < customEmissionsItems.length; i++) {
@@ -372,7 +372,7 @@ export class AppComponent {
372372
}
373373

374374
async initializeCustomGWPs(account: IdbAccount) {
375-
this.loadingMessage = 'Loading Custom GWPs...';
375+
// this.loadingMessage = 'Loading Custom GWPs...';
376376
let customGWPs: Array<IdbCustomGWP> = await this.customGWPDbService.getAllAccountCustomGWP(account.guid);
377377
for (let i = 0; i < customGWPs.length; i++) {
378378
let updateGWP = this.updateDbEntryService.updateCustomGWP(customGWPs[i]);

src/app/core-components/create-report-modal/create-report-modal.component.html

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,53 @@
22
<div class="popup" [ngClass]="{'open': showModal}">
33
<div class="popup-header">Create New
44
@if (isOverviewReport) {
5-
Data Overview
5+
Data Overview
66
}
77
@if (!isOverviewReport) {
8-
Better Plants
8+
Better Plants
99
}
1010
Report
1111
<button class="item-right" (click)="cancelCreateReport()">x</button>
1212
</div>
1313
@if (isOverviewReport) {
14-
<div class="popup-body">
15-
<form>
16-
<label class="semibold larger">Sections to Include in Report</label>
17-
<div class="section-options">
18-
<div class="form-check">
19-
<input type="checkbox" class="form-check-input" name="includeEnergySection"
20-
id="includeEnergySection"
21-
[(ngModel)]="accountReport.dataOverviewReportSetup.includeEnergySection">
22-
<label class="form-check-label" for="includeEnergySection">Energy Use</label>
23-
</div>
24-
<div class="form-check">
25-
<input type="checkbox" class="form-check-input" name="includeCostsSection" id="includeCostsSection"
26-
[(ngModel)]="accountReport.dataOverviewReportSetup.includeCostsSection">
27-
<label class="form-check-label" for="includeCostsSection">Costs</label>
28-
</div>
29-
<div class="form-check">
30-
<input type="checkbox" class="form-check-input" name="includeEmissionsSection"
31-
id="includeEmissionsSection"
32-
[(ngModel)]="accountReport.dataOverviewReportSetup.includeEmissionsSection">
33-
<label class="form-check-label" for="includeEmissionsSection">Emissions</label>
34-
</div>
35-
@if (showWater) {
36-
<div class="form-check">
37-
<input type="checkbox" class="form-check-input" name="includeWaterSection" id="includeWaterSection"
38-
[(ngModel)]="accountReport.dataOverviewReportSetup.includeWaterSection">
39-
<label class="form-check-label" for="includeWaterSection">Water</label>
40-
</div>
41-
}
42-
@if (inAccount) {
43-
<div class="form-check">
44-
<input type="checkbox" class="form-check-input" name="includeFacilityReports" id="includeFacilityReports"
45-
[(ngModel)]="accountReport.dataOverviewReportSetup.includeFacilityReports">
46-
<label class="form-check-label" for="includeFacilityReports">Individual Facility Reports</label>
47-
</div>
48-
}
14+
<div class="popup-body">
15+
<form>
16+
<label class="semibold larger">Sections to Include in Report</label>
17+
<div class="section-options">
18+
<div class="form-check">
19+
<input type="checkbox" class="form-check-input" name="includeEnergySection" id="includeEnergySection"
20+
[(ngModel)]="accountReport.dataOverviewReportSetup.includeEnergySection">
21+
<label class="form-check-label" for="includeEnergySection">Energy Use</label>
4922
</div>
50-
</form>
51-
</div>
23+
<div class="form-check">
24+
<input type="checkbox" class="form-check-input" name="includeCostsSection" id="includeCostsSection"
25+
[(ngModel)]="accountReport.dataOverviewReportSetup.includeCostsSection">
26+
<label class="form-check-label" for="includeCostsSection">Costs</label>
27+
</div>
28+
@if(account.displayEmissions){
29+
<div class="form-check">
30+
<input type="checkbox" class="form-check-input" name="includeEmissionsSection" id="includeEmissionsSection"
31+
[(ngModel)]="accountReport.dataOverviewReportSetup.includeEmissionsSection">
32+
<label class="form-check-label" for="includeEmissionsSection">Emissions</label>
33+
</div>
34+
}
35+
@if (showWater) {
36+
<div class="form-check">
37+
<input type="checkbox" class="form-check-input" name="includeWaterSection" id="includeWaterSection"
38+
[(ngModel)]="accountReport.dataOverviewReportSetup.includeWaterSection">
39+
<label class="form-check-label" for="includeWaterSection">Water</label>
40+
</div>
41+
}
42+
@if (inAccount) {
43+
<div class="form-check">
44+
<input type="checkbox" class="form-check-input" name="includeFacilityReports" id="includeFacilityReports"
45+
[(ngModel)]="accountReport.dataOverviewReportSetup.includeFacilityReports">
46+
<label class="form-check-label" for="includeFacilityReports">Individual Facility Reports</label>
47+
</div>
48+
}
49+
</div>
50+
</form>
51+
</div>
5252
}
5353
<div class="popup-footer text-end">
5454
<button class="btn btn-secondary" (click)="cancelCreateReport()">Cancel</button>

src/app/core-components/create-report-modal/create-report-modal.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export class CreateReportModalComponent {
3333
isOverviewReport: boolean;
3434
showWater: boolean;
3535
inAccount: boolean;
36+
account: IdbAccount;
37+
accountSub: Subscription;
3638
constructor(private sharedDataService: SharedDataService, private router: Router,
3739
private accountReportDbService: AccountReportDbService,
3840
private dbChangesService: DbChangesService,
@@ -48,6 +50,9 @@ export class CreateReportModalComponent {
4850
}
4951

5052
ngOnInit() {
53+
this.accountSub = this.accountDbService.selectedAccount.subscribe(account => {
54+
this.account = account;
55+
});
5156
this.showModalSub = this.sharedDataService.openCreateReportModal.subscribe(val => {
5257
if (val == true) {
5358
this.accountReport = this.getNewReport();
@@ -62,6 +67,7 @@ export class CreateReportModalComponent {
6267

6368
ngOnDestroy() {
6469
this.showModalSub.unsubscribe();
70+
this.accountSub.unsubscribe();
6571
}
6672

6773
cancelCreateReport() {

src/app/data-evaluation/account/account-overview/account-overview-banner/account-overview-banner.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
</span>
2929
</a>
3030
</li>
31+
@if(selectedAccount.displayEmissions){
3132
<li class="nav-item">
3233
<a class="nav-link" routerLink="emissions" [routerLinkActive]="['active']">
3334
<i class="fa fa-smog"></i>
@@ -36,6 +37,7 @@
3637
</span>
3738
</a>
3839
</li>
40+
}
3941
</ul>
4042
</div>
4143
<app-account-overview-options></app-account-overview-options>

src/app/data-evaluation/account/account-overview/account-overview-banner/account-overview-options/account-overview-options.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
<label class="form-check-label" for="siteEnergy">Site Energy</label>
5757
</div>
5858
</li>
59+
@if(selectedAccount.displayEmissions){
5960
<li>
6061
<hr class="dropdown-divider">
6162
</li>
@@ -72,5 +73,6 @@
7273
<label class="form-check-label" for="market">Market</label>
7374
</div>
7475
</li>
76+
}
7577
</ul>
7678
</div>

src/app/data-evaluation/account/account-reports/account-report-setup/data-overview-setup/data-overview-setup.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,13 @@
9999
[(ngModel)]="reportSetup.includeCostsSection" (change)="save()">
100100
<label class="form-check-label" for="includeCostsSection">Costs</label>
101101
</div>
102+
@if(account.displayEmissions){
102103
<div class="form-check">
103104
<input type="checkbox" class="form-check-input" name="includeEmissionsSection" id="includeEmissionsSection"
104105
[(ngModel)]="reportSetup.includeEmissionsSection" (change)="save()">
105106
<label class="form-check-label" for="includeEmissionsSection">Emissions</label>
106107
</div>
108+
}
107109
@if (showWater) {
108110
<div class="form-check">
109111
<input type="checkbox" class="form-check-input" name="includeWaterSection" id="includeWaterSection"

src/app/data-evaluation/account/account-reports/account-reports-dashboard/account-reports-dashboard.component.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ <h4 class="pt-0">
4545
id="dataOverview" [(ngModel)]="newReportType">
4646
<label class="form-check-label" for="dataOverview">Data Overview Report</label>
4747
</div>
48+
@if(selectedAccount.displayEmissions){
4849
<div class="form-check">
4950
<input type="radio" class="form-check-input" name="reportType" [value]="'betterClimate'"
5051
id="betterClimate" [(ngModel)]="newReportType">
5152
<label class="form-check-label" for="betterClimate">Emissions Report</label>
5253
</div>
54+
}
5355
<div class="form-check">
5456
<input type="radio" class="form-check-input" name="reportType" [value]="'analysis'"
5557
id="analysis" [(ngModel)]="newReportType">
@@ -60,11 +62,13 @@ <h4 class="pt-0">
6062
id="accountSavings" [(ngModel)]="newReportType">
6163
<label class="form-check-label" for="accountSavings">Savings Report</label>
6264
</div>
63-
<div class="form-check">
64-
<input type="radio" class="form-check-input" name="reportType" [value]="'accountEmissionFactors'"
65-
id="accountEmissionFactors" [(ngModel)]="newReportType">
65+
@if(selectedAccount.displayEmissions){
66+
<div class="form-check">
67+
<input type="radio" class="form-check-input" name="reportType"
68+
[value]="'accountEmissionFactors'" id="accountEmissionFactors" [(ngModel)]="newReportType">
6669
<label class="form-check-label" for="accountEmissionFactors">Emission Factors Report</label>
6770
</div>
71+
}
6872
</div>
6973
</div>
7074
</form>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div class="text-center">
32
<span class="facility-icon">
43
<i class="fa fa-industry" [ngStyle]="{'color': facility.color}"></i>
@@ -10,45 +9,38 @@ <h1 class="text-center">
109
<div class="w-100 text-center">
1110
<!--ADDRESS-->
1211
@if (facility.address) {
13-
<span>{{facility.address}}, {{facility.city}}, {{facility.state}} {{facility.zip}}
12+
<span>{{facility.address}}, {{facility.city}}, {{facility.state}} {{facility.zip}}
1413
{{facility.country}}</span>
1514
}
1615
<!--NAICS CODE-->
1716
@if ((facility | naicsDisplay)) {
17+
<br>
18+
<span>NAICs: {{facility | naicsDisplay}}</span>
19+
}
20+
<!--GLOBAL WARMING POTENTIAL-->
21+
@if (facility.eGridSubregion) {
22+
<span>
1823
<br>
19-
<span>NAICs: {{facility | naicsDisplay}}</span>
20-
}
21-
<!--GLOBAL WARMING POTENTIAL-->
22-
@if (facility.eGridSubregion) {
23-
<span>
24-
<br>
25-
eGridSubregion: {{facility.eGridSubregion}}
26-
</span>
27-
}
28-
<!--SITE/SOURCE-->
29-
<!--NOTES-->
30-
@if (facility.notes) {
31-
<div class="pt-3">
32-
<br>
33-
<span [innerHTML]="facility.notes"></span>
34-
</div>
35-
}
36-
37-
38-
<!--ADD NEXT TWO AT LATER DATE WHEN USED-->
39-
<!--SUSTAINABILITY QUESTIONS-->
40-
41-
<!--FISCAL YEAR-->
42-
43-
</div>
24+
eGridSubregion: {{facility.eGridSubregion}}
25+
</span>
26+
}
27+
<!--SITE/SOURCE-->
28+
<!--NOTES-->
29+
@if (facility.notes) {
30+
<div class="pt-3">
31+
<br>
32+
<span [innerHTML]="facility.notes"></span>
33+
</div>
34+
}
35+
</div>
4436

45-
<div class="w-100 text-center pt-5 pb-3">
46-
<h2>Data Overview Report
47-
<br>
48-
({{dateRange.startDate | date: 'MMM, y'}} -
49-
{{dateRange.endDate | date: 'MMM, y'}})
50-
</h2>
51-
<p class="pt-2">
52-
This report was generated by VERIFI {{currentDate | date: 'short'}}.
53-
</p>
54-
</div>
37+
<div class="w-100 text-center pt-5 pb-3">
38+
<h2>Data Overview Report
39+
<br>
40+
({{dateRange.startDate | date: 'MMM, y'}} -
41+
{{dateRange.endDate | date: 'MMM, y'}})
42+
</h2>
43+
<p class="pt-2">
44+
This report was generated by VERIFI {{currentDate | date: 'short'}}.
45+
</p>
46+
</div>

src/app/data-evaluation/account/account-settings/account-settings.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="wrapper">
1+
<div class="wrapper pb-3">
22
<div class="row">
33
<div class="col-lg-7">
44
<h4>Corporate Information</h4>
@@ -15,7 +15,7 @@ <h4>Corporate Units</h4>
1515
<hr>
1616
<div class="row">
1717
<div class="col-lg-7">
18-
<h4>Sustainability Questions</h4>
18+
<h4>Organizational Goals</h4>
1919
<br>
2020
<app-sustainability-questions-form [inAccount]="true">
2121
</app-sustainability-questions-form>

src/app/data-evaluation/facility/facility-overview/facility-overview-banner/facility-overview-banner.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@
2626
Costs</span>
2727
</a>
2828
</li>
29+
@if(account.displayEmissions){
2930
<li class="nav-item">
3031
<a class="nav-link" routerLink="emissions" [routerLinkActive]="['active']">
3132
<i class="fa fa-smog"></i>
3233
<span class="nav-text">
3334
Emissions</span>
3435
</a>
3536
</li>
37+
}
3638
</ul>
3739
</div>
3840
<app-facility-overview-options></app-facility-overview-options>

0 commit comments

Comments
 (0)