diff --git a/frontend/src/app/shared/custom/scoring/scoring.component.ts b/frontend/src/app/shared/custom/scoring/scoring.component.ts index de635c75d6..d5ae44b1d1 100644 --- a/frontend/src/app/shared/custom/scoring/scoring.component.ts +++ b/frontend/src/app/shared/custom/scoring/scoring.component.ts @@ -84,7 +84,7 @@ export class ScoringComponent implements OnInit, AfterViewInit, OnChanges { this.targetElement.nativeElement.style.width = this.targetPercent + '%'; } - if (this.keyResult.keyResultType == 'metric') { + if (this.keyResult.keyResultType === 'metric') { this.labelPercentage.subscribe((value) => { if (this.valueLabel) { this.valueLabel.nativeElement.style.width = value + '%'; @@ -164,9 +164,9 @@ export class ScoringComponent implements OnInit, AfterViewInit, OnChanges { getScoringColorClassAndSetBorder(): string | null { if (this.targetPercent > 100) { return 'score-stretch'; - } else if (this.targetPercent > 0 || this.commitPercent == 100 && this.keyResult.keyResultType === 'metric') { + } else if (this.targetPercent > 0 || this.commitPercent === 100 && this.keyResult.keyResultType === 'metric') { return 'score-green'; - } else if (this.commitPercent > 0 || this.failPercent == 100 && this.keyResult.keyResultType === 'metric') { + } else if (this.commitPercent > 0 || this.failPercent === 100 && this.keyResult.keyResultType === 'metric') { return 'score-yellow'; } else if (this.failPercent >= 3.3333) { // 3.3333% because if lower fail is not visible in overview and we display ! diff --git a/frontend/src/app/shared/dialog/complete-dialog/complete-dialog.component.ts b/frontend/src/app/shared/dialog/complete-dialog/complete-dialog.component.ts index cc08e50be9..0850991a50 100644 --- a/frontend/src/app/shared/dialog/complete-dialog/complete-dialog.component.ts +++ b/frontend/src/app/shared/dialog/complete-dialog/complete-dialog.component.ts @@ -21,15 +21,16 @@ export class CompleteDialogComponent { constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: { objectiveTitle: string }, - private translate: TranslateService) {} + private translate: TranslateService) { + } switchSuccessState(input: string) { this.removeStandardHover(); let successfulValue = this.completeForm.value.isSuccessful; if ( successfulValue == null || - input == 'successful' && !successfulValue || - input == 'notSuccessful' && successfulValue + input === 'successful' || + input === 'notSuccessful' ) { successfulValue = input == 'successful'; this.completeForm.patchValue({ isSuccessful: successfulValue });