From f17903a85d1803aee66e72bdff744977ece5f571 Mon Sep 17 00:00:00 2001 From: Lias Kleisa Date: Mon, 4 Dec 2023 13:41:11 +0100 Subject: [PATCH] Remove unused check --- .../custom/scoring/scoring.component.ts | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/frontend/src/app/shared/custom/scoring/scoring.component.ts b/frontend/src/app/shared/custom/scoring/scoring.component.ts index 49cec78624..d7464e4ce7 100644 --- a/frontend/src/app/shared/custom/scoring/scoring.component.ts +++ b/frontend/src/app/shared/custom/scoring/scoring.component.ts @@ -57,32 +57,30 @@ export class ScoringComponent implements OnInit, AfterViewInit, OnChanges { } ngAfterViewInit(): void { - if (this.keyResult.lastCheckIn) { - //Define width of scoring elements - this.failElement!.nativeElement.style.width = this.failPercent + '%'; - this.commitElement!.nativeElement.style.width = this.commitPercent + '%'; - this.targetElement!.nativeElement.style.width = this.targetPercent + '%'; - - if (this.valueLabel != undefined && this.keyResult.keyResultType == 'metric') { - this.labelPercentage.subscribe((value) => { - this.valueLabel!.nativeElement.style.width = value + '%'; - this.changeDetectionRef.detectChanges(); - }); - } + //Define width of scoring elements + this.failElement!.nativeElement.style.width = this.failPercent + '%'; + this.commitElement!.nativeElement.style.width = this.commitPercent + '%'; + this.targetElement!.nativeElement.style.width = this.targetPercent + '%'; + + if (this.valueLabel != undefined && this.keyResult.keyResultType == 'metric') { + this.labelPercentage.subscribe((value) => { + this.valueLabel!.nativeElement.style.width = value + '%'; + this.changeDetectionRef.detectChanges(); + }); + } - // Set color of scoring component - let scoringClass = this.getScoringColorClassAndSetBorder(); - if (scoringClass !== null) { - this.targetElement!.nativeElement.classList.add(scoringClass); - this.commitElement!.nativeElement.classList.add(scoringClass); - this.failElement!.nativeElement.classList.add(scoringClass); - } + // Set color of scoring component + let scoringClass = this.getScoringColorClassAndSetBorder(); + if (scoringClass !== null) { + this.targetElement!.nativeElement.classList.add(scoringClass); + this.commitElement!.nativeElement.classList.add(scoringClass); + this.failElement!.nativeElement.classList.add(scoringClass); + } - //Fill out icon if target percent has reached 100 percent or more - if (this.stretched) { - this.iconPath = 'filled'; - this.changeDetectionRef.detectChanges(); - } + //Fill out icon if target percent has reached 100 percent or more + if (this.stretched) { + this.iconPath = 'filled'; + this.changeDetectionRef.detectChanges(); } }