Skip to content

Commit

Permalink
fix: ce navigation bugfixes. Missing confirm button on baseline and p…
Browse files Browse the repository at this point in the history
…remix calc exit state
  • Loading branch information
Bean, Andrew K committed Dec 3, 2024
1 parent 7089ca9 commit 925a81f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@
[dirtyIndexes]="dirtyIndexes" [includeCopyRightButton]="!omitCopyButton"
[changeFunction]="updateTotals(year)"></app-ce-input-field>
<span *ngIf="dialogData.dataIn.capitalCosts && element.labelText.startsWith('Annualized')">

<input type="text" appDecimalInput required value="element['year'
<input type="text" disabled="true" appDecimalInput required [value]="element['year'
+ year] | number:'1.0-0'" class="copy-input">

{{element['year'
+ year] | number:'1.0-0'}}</span>
</span>
</td>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,11 @@ tr:last-child {
}
}
}

input {
&:disabled {
background-color: #a0a0a0;
border: 0px;
color: white !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class SectionRecurringCostReviewDialogComponent {
void this.interventionDataService
.getInterventionRecurringCosts(activeInterventionId)
.then((data: InterventionRecurringCosts) => {
this.dataSource = new MatTableDataSource(data.recurringCosts[0]['costs'][0].costBreakdown);
this.dataSource = new MatTableDataSource(data.recurringCosts[2]['costs'][0].costBreakdown);
this.isReloading = false;
//this.recurringCosts = data.recurringCosts;
// console.debug('initial: ', this.recurringCosts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export class InterventionSideNavContentComponent {
public currentStepPosition = 0;

public ngOnInit() {
// print array of CustomComponent objects
void this.interventionDataService.getIntervention(this.activeInterventionId).then((intervention: Intervention) => {
this.currentInterventionType = intervention.fortificationTypeId;
this.sections = this.intSideNavService.getSections(this.currentInterventionType);
this.inferSidebarStepPosition(this.router.url);
});
this.stepperSubscription = this.router.events
.pipe(filter((e: RouterEvent) => e instanceof NavigationEnd))
.subscribe((e: RouterEvent) => {
Expand All @@ -59,6 +65,7 @@ export class InterventionSideNavContentComponent {
}
return i >= 0;
});
console.log('set pos to ', count + 1);
this.intSideNavService.setCurrentStepperPosition(count + i, this.currentInterventionType);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Injectable, Pipe, PipeTransform } from '@angular/core';
import { reject } from 'cypress/types/bluebird';
import { BehaviorSubject } from 'rxjs';
import { AppRoute, AppRoutes } from 'src/app/routes/routes';

Expand All @@ -13,6 +14,9 @@ export class InterventionSideNavContentService {

public sections = [];

private readonly readySrc = new BehaviorSubject<null>(null);
public readyObs = this.stepperPositionSrc.asObservable();

public BfDSections = [
{
title: 'Test',
Expand Down Expand Up @@ -119,6 +123,7 @@ export class InterventionSideNavContentService {
} else if (interventionType === 'BF') {
this.sections = this.BfDSections;
}
this.readySrc.next(null);
return this.sections;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ export class InterventionBaselineComponent implements AfterViewInit {
});
this.initFocusMnTable();

this.nextRoutes = this.intSideNavService.getNextRoutes();
this.previousRoute = this.intSideNavService.getPreviousRoute();
this.intSideNavService.readyObs.subscribe(() => {
this.nextRoutes = this.intSideNavService.getNextRoutes();
this.previousRoute = this.intSideNavService.getPreviousRoute();
});
}

public ngAfterViewInit(): void {
Expand Down

0 comments on commit 925a81f

Please sign in to comment.