diff --git a/alcs-frontend/src/app/features/application/decision/conditions/condition/condition.component.ts b/alcs-frontend/src/app/features/application/decision/conditions/condition/condition.component.ts index a45a2eccb..b982928d6 100644 --- a/alcs-frontend/src/app/features/application/decision/conditions/condition/condition.component.ts +++ b/alcs-frontend/src/app/features/application/decision/conditions/condition/condition.component.ts @@ -81,6 +81,7 @@ export class ConditionComponent implements OnInit, AfterViewInit { constructor( private conditionService: ApplicationDecisionConditionService, private conditionLotService: ApplicationDecisionComponentToConditionLotService, + private decisionService: ApplicationDecisionV2Service, ) {} async ngOnInit() { @@ -290,6 +291,9 @@ export class ConditionComponent implements OnInit, AfterViewInit { this.dataSource = new MatTableDataSource( this.addIndex(this.sortDates(this.dates)), ); + const conditionNewStatus = await this.decisionService.getStatus(this.condition.uuid); + this.condition.status = conditionNewStatus.status; + this.setPillLabel(this.condition.status); } else { console.error('Date with specified UUID not found'); } @@ -305,6 +309,9 @@ export class ConditionComponent implements OnInit, AfterViewInit { this.dataSource = new MatTableDataSource( this.addIndex(this.sortDates(this.dates)), ); + const conditionNewStatus = await this.decisionService.getStatus(this.condition.uuid); + this.condition.status = conditionNewStatus.status; + this.setPillLabel(this.condition.status); } } } diff --git a/alcs-frontend/src/app/features/notice-of-intent/decision/conditions/condition/condition.component.ts b/alcs-frontend/src/app/features/notice-of-intent/decision/conditions/condition/condition.component.ts index dc401865a..251c60c68 100644 --- a/alcs-frontend/src/app/features/notice-of-intent/decision/conditions/condition/condition.component.ts +++ b/alcs-frontend/src/app/features/notice-of-intent/decision/conditions/condition/condition.component.ts @@ -68,7 +68,10 @@ export class ConditionComponent implements OnInit, AfterViewInit { dataSource: MatTableDataSource = new MatTableDataSource(); - constructor(private conditionService: NoticeOfIntentDecisionConditionService) {} + constructor( + private conditionService: NoticeOfIntentDecisionConditionService, + private decisionService: NoticeOfIntentDecisionV2Service, + ) {} async ngOnInit() { this.stringIndex = countToString(this.index); @@ -206,6 +209,10 @@ export class ConditionComponent implements OnInit, AfterViewInit { this.dataSource = new MatTableDataSource( this.addIndex(this.sortDates(this.dates)), ); + + const conditionNewStatus = await this.decisionService.getStatus(this.condition.uuid); + this.condition.status = conditionNewStatus.status; + this.setPillLabel(this.condition.status); } else { console.error('Date with specified UUID not found'); } @@ -221,6 +228,10 @@ export class ConditionComponent implements OnInit, AfterViewInit { this.dataSource = new MatTableDataSource( this.addIndex(this.sortDates(this.dates)), ); + + const conditionNewStatus = await this.decisionService.getStatus(this.condition.uuid); + this.condition.status = conditionNewStatus.status; + this.setPillLabel(this.condition.status); } } }