Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
RLiNREL committed Aug 22, 2024
2 parents 83b5e72 + 4f7f9d6 commit 23da11b
Show file tree
Hide file tree
Showing 16 changed files with 332 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class AddNebsModalComponent {
displayAllNebs: boolean = true;
selectedNebs: Array<IdbNonEnergyBenefit>;
nebSearchStr: string = '';
orderByDir: 'asc' | 'desc' = 'desc';
orderByDir: 'asc' | 'desc' = 'asc';

constructor(private setupWizardService: SetupWizardService, private keyPerformanceIndicatorIdbService: KeyPerformanceIndicatorsIdbService,
private nonEnergyBenefitIdbService: NonEnergyBenefitsIdbService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@

/* .accordion-button:hover{
background-color: var(--bs-btn-hover-bg);
} */
} */

.accordion-button:not(.collapsed), .accordion-body{
border-left: solid var(--energy-opp-color) 5px;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="d-flex w-100 justify-content-end pt-2 pb-2">
<button class="btn btn-dark btn-sm add-opportunity-btn" (click)="addEnergyOpportunity()"><fa-icon [icon]="faPlus"
<button class="btn btn-outline-energy-opp btn-sm" (click)="addEnergyOpportunity()"><fa-icon [icon]="faPlus"
class="me-1"></fa-icon>Add Energy Opportunity</button>
</div>
<ng-template [ngIf]="assessmentEnergyOpportunityGuids.length > 0" [ngIfElse]="noOpportunitiesBlock">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
<div class="d-flex w-100 justify-content-end pb-2">
<button class="me-2 btn btn-secondary btn-sm add-neb-btn" (click)="addNEB()">
<fa-icon [icon]="faPlus"></fa-icon> Add NEB
</button>
<button class="btn btn-dark btn-sm add-neb-btn me-2" (click)="showSuggestedNEBs()">
<fa-icon [icon]="faSearchPlus"></fa-icon> Search NEBs
</button>
<button class="btn btn-danger btn-sm" (click)="showDeleteModal()">
<fa-icon [icon]="faTrash"></fa-icon> Delete
</button>
</div>
<h6>
<div class="d-flex w-100 justify-content-between">
<div class="mt-auto bold">
Opportunity Details
</div>
<div class="d-flex">
<button class="btn btn-danger btn-sm" (click)="showDeleteModal()">
<fa-icon [icon]="faTrash"></fa-icon> Delete
</button>
</div>
</div>
</h6>

<p class="fw-light small">
Provide details about the energy opportunity in this assessment. Providing an implementation cost will allow for
payback calculations. These details will be rolled up to generate a final report on the assessment.
</p>


<form>
<div class="row">
<label class="col-sm-5 col-form-label" for="{{'energyOpportunityName_'+energyOpportunity.guid}}">Energy Opportunity Name</label>
<label class="col-sm-5 col-form-label" for="{{'energyOpportunityName_'+energyOpportunity.guid}}">Energy
Opportunity Name</label>
<div class="col-sm-7">
<input name="{{'energyOpportunityName_'+energyOpportunity.guid}}" type="text" class="form-control" [(ngModel)]="energyOpportunity.name"
minlength="1" maxlength="42" id="{{'energyOpportunityName_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
<input name="{{'energyOpportunityName_'+energyOpportunity.guid}}" type="text" class="form-control"
[(ngModel)]="energyOpportunity.name" minlength="1" maxlength="42"
id="{{'energyOpportunityName_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
</div>
</div>
<div class="row">
<label class="col-sm-5 col-form-label" for="{{'opportunityType_'+energyOpportunity.guid}}">Opportunity Type</label>
<label class="col-sm-5 col-form-label" for="{{'opportunityType_'+energyOpportunity.guid}}">Opportunity
Type</label>
<div class="col-sm-7">
<select name="{{'opportunityType_'+energyOpportunity.guid}}" class="form-select" id="{{'opportunityType_'+energyOpportunity.guid}}"
[(ngModel)]="energyOpportunity.opportunityType" (change)="saveEnergyOpportunity()">
<select name="{{'opportunityType_'+energyOpportunity.guid}}" class="form-select"
id="{{'opportunityType_'+energyOpportunity.guid}}" [(ngModel)]="energyOpportunity.opportunityType"
(change)="saveEnergyOpportunity()">
<option [ngValue]="undefined">
Other
</option>
Expand All @@ -33,30 +44,33 @@
</div>
</div>
<div class="row">
<label class="col-sm-5 col-form-label" for="{{'implementationCost_'+energyOpportunity.guid}}">Implementation Cost</label>
<label class="col-sm-5 col-form-label" for="{{'implementationCost_'+energyOpportunity.guid}}">Implementation
Cost</label>
<div class="col-sm-7">
<div class="input-group">
<input name="{{'implementationCost_'+energyOpportunity.guid}}" type="number" class="form-control"
[(ngModel)]="energyOpportunity.implementationCost" id="{{'implementationCost_'+energyOpportunity.guid}}"
(input)="saveEnergyOpportunity()">
[(ngModel)]="energyOpportunity.implementationCost"
id="{{'implementationCost_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
<span class="input-group-text">&dollar;</span>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="{{'includeSavings_'+energyOpportunity.guid}}"
[(ngModel)]="energyOpportunity.includeSavings" name="{{'includeSavings_'+energyOpportunity.guid}}"
(input)="saveEnergyOpportunity()">
<label class="form-check-label" for="{{'includeSavings_'+energyOpportunity.guid}}">Include Savings</label>
<input class="form-check-input" type="checkbox" role="switch"
id="{{'includeSavings_'+energyOpportunity.guid}}" [(ngModel)]="energyOpportunity.includeSavings"
name="{{'includeSavings_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
<label class="form-check-label" for="{{'includeSavings_'+energyOpportunity.guid}}">Include
Savings</label>
</div>
</div>
</div>

<ng-container *ngIf="energyOpportunity.includeSavings">
<div class="row">
<label class="col-sm-5 col-form-label" for="{{'energySavings_'+energyOpportunity.guid}}">Energy Savings</label>
<label class="col-sm-5 col-form-label" for="{{'energySavings_'+energyOpportunity.guid}}">Energy
Savings</label>
<div class="col-sm-7">
<div class="input-group">
<input name="{{'energySavings_'+energyOpportunity.guid}}" type="number" class="form-control"
Expand All @@ -71,7 +85,8 @@
<div class="col-sm-7">
<div class="input-group">
<input name="{{'costSavings_'+energyOpportunity.guid}}" type="number" class="form-control"
[(ngModel)]="energyOpportunity.costSavings" id="{{'costSavings_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
[(ngModel)]="energyOpportunity.costSavings" id="{{'costSavings_'+energyOpportunity.guid}}"
(input)="saveEnergyOpportunity()">
<span class="input-group-text">&dollar;</span>
</div>
</div>
Expand All @@ -80,16 +95,52 @@
<div class="row">
<div class="col-sm-12 col-form-label">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="{{'includeNotes_'+energyOpportunity.guid}}"
[(ngModel)]="energyOpportunity.includeNote" name="{{'includeNotes_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
<label class="form-check-label" for="{{'includeNotes_'+energyOpportunity.guid}}">Energy Opportunity Notes</label>
<input class="form-check-input" type="checkbox" role="switch"
id="{{'includeNotes_'+energyOpportunity.guid}}" [(ngModel)]="energyOpportunity.includeNote"
name="{{'includeNotes_'+energyOpportunity.guid}}" (input)="saveEnergyOpportunity()">
<label class="form-check-label" for="{{'includeNotes_'+energyOpportunity.guid}}">Energy Opportunity
Notes</label>
</div>
</div>
<div class="col-sm-12 mb-1" *ngIf="energyOpportunity.includeNote">
<textarea name="opportunityNotes" type="number" class="form-control" [(ngModel)]="energyOpportunity.notes"
id="opportunityNotes"></textarea>
</div>
</div>

<!--NEBs-->
<h6>
<div class="d-flex w-100 justify-content-between">
<div class="mt-auto bold">
Non-Energy Benefits
</div>
<div class="dropdown">
<button class="btn btn-outline-neb btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<fa-icon [icon]="faPlus"></fa-icon> Add NEB
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" (click)="addNEB()">
<fa-icon [icon]="faPlus"></fa-icon> Add Custom NEB
</a>
</li>
<li>
<a class="dropdown-item" (click)="showSuggestedNEBs()">
<fa-icon [icon]="faSearchPlus"></fa-icon> Search NEBs Database
</a>
</li>
</ul>
</div>
</div>
</h6>
<p class="fw-light small">
Use this section to add Non-Energy Benefits (<fa-icon [icon]="faWeightHanging"></fa-icon>) that are <span
class="bold">directly
associated with this energy opportunity</span>. Use the "<fa-icon [icon]="faPlus"></fa-icon> Add NEB"
dropdown to select adding a "Custom NEB" or searching our database for potential known NEBs.
</p>

<app-neb-forms-accordion [energyOpportunity]="energyOpportunity"></app-neb-forms-accordion>
</form>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, Input } from '@angular/core';
import { SetupWizardService } from 'src/app/setup-wizard/setup-wizard.service';
import { IconDefinition, faFileLines, faPlus, faSearchPlus, faTrash } from '@fortawesome/free-solid-svg-icons';
import { IconDefinition, faFileLines, faPlus, faSearchPlus, faTrash, faWeightHanging } from '@fortawesome/free-solid-svg-icons';
import { EnergyOpportunityType, FanOpportunities } from 'src/app/shared/constants/energyOpportunityOptions';
import { DbChangesService } from 'src/app/indexed-db/db-changes.service';
import { IdbEnergyOpportunity } from 'src/app/models/energyOpportunity';
Expand All @@ -25,6 +25,7 @@ export class EnergyOpportunitySetupFormComponent {
faTrash: IconDefinition = faTrash;
faSearchPlus: IconDefinition = faSearchPlus;
faPlus: IconDefinition = faPlus;
faWeightHanging: IconDefinition = faWeightHanging;

opportunityTypes: Array<EnergyOpportunityType> = [{value: 'other', label: 'Other'}];
displayDeleteModal: boolean = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
<div class="d-flex w-100 justify-content-end pt-2 pb-2">
<button class="me-2 btn btn-secondary btn-sm add-neb-btn" (click)="addNEB()">
<fa-icon [icon]="faPlus"></fa-icon> Add Custom NEB
</button>
<button class="btn btn-secondary btn-sm add-neb-btn" (click)="openNebModal()">
<fa-icon [icon]="faSearchPlus"></fa-icon> Search NEBs
</button>
</div>
<h6 class="pt-2 pb-2">
<div class="d-flex w-100 justify-content-between">
<div class="mt-auto bold">
Assessment Non-Energy Benefits
</div>
<div class="dropdown">
<button class="btn btn-outline-neb btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<fa-icon [icon]="faPlus"></fa-icon> Add NEB
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" (click)="addNEB()">
<fa-icon [icon]="faPlus"></fa-icon> Add Custom NEB
</a>
</li>
<li>
<a class="dropdown-item" (click)="openNebModal()">
<fa-icon [icon]="faSearchPlus"></fa-icon> Search NEBs Database
</a>
</li>
</ul>
</div>
</div>
</h6>
<p class="fw-light small">
Use this section to add Non-Energy Benefits (<fa-icon [icon]="faWeightHanging"></fa-icon>) to this assessment that
are <span class="bold">not associated with a specific energy opportunity</span>. Use the "<fa-icon
[icon]="faPlus"></fa-icon> Add NEB"
dropdown to select adding a "Custom NEB" or searching our database for potential known NEBs.
</p>

<app-neb-forms-accordion [assessment]="assessment"></app-neb-forms-accordion>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { IconDefinition, faPlus, faSearchPlus } from '@fortawesome/free-solid-svg-icons';
import { IconDefinition, faPlus, faSearchPlus, faWeightHanging } from '@fortawesome/free-solid-svg-icons';
import { firstValueFrom, Subscription } from 'rxjs';
import { AssessmentIdbService } from 'src/app/indexed-db/assessment-idb.service';
import { NonEnergyBenefitsIdbService } from 'src/app/indexed-db/non-energy-benefits-idb.service';
Expand All @@ -16,6 +16,7 @@ export class AssessmentNebsFormComponent {

faSearchPlus: IconDefinition = faSearchPlus;
faPlus: IconDefinition = faPlus;
faWeightHanging: IconDefinition = faWeightHanging;

assessment: IdbAssessment;
assessmentSub: Subscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@

/* .accordion-button:hover{
background-color: var(--bs-btn-hover-bg);
} */
} */

.accordion-button:not(.collapsed), .accordion-body{
border-left: solid var(--neb-color) 5px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ ul {
.metric-block{
padding-left: 1rem;
padding-right: 1rem;
}


.metric-border{
border-left: dashed 5px var(--metric-color);
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ <h6>
</p>
<div class="row">
<div class="col">
<hr class="metric-hr mt-0">
<div class="metric-block">
<hr class="metric-hr mt-0">
</div>
</div>
</div>

<ng-template [ngIf]="performanceMetricImpactGuids.length > 0" [ngIfElse]="noIncludedMetricsBlock">
<div class="metric-block">
<ng-container *ngFor="let impactGuid of performanceMetricImpactGuids">
<app-performance-metric-impact-form [impactGuid]="impactGuid"
[nonEnergyBenefit]="nonEnergyBenefit"></app-performance-metric-impact-form>
<div class="metric-border">
<app-performance-metric-impact-form [impactGuid]="impactGuid"
[nonEnergyBenefit]="nonEnergyBenefit"></app-performance-metric-impact-form>
</div>
<div class="row">
<div class="col">
<hr class="metric-hr">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.alert-info{
padding: .25rem;
margin-bottom: 0px;
}


Expand Down
Loading

0 comments on commit 23da11b

Please sign in to comment.