Skip to content

Commit

Permalink
Remove unused check
Browse files Browse the repository at this point in the history
  • Loading branch information
lkleisa committed Dec 4, 2023
1 parent b821dc5 commit f17903a
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions frontend/src/app/shared/custom/scoring/scoring.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit f17903a

Please sign in to comment.