diff --git a/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts b/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts index 986e552522..5ef50d929c 100644 --- a/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts +++ b/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts @@ -62,7 +62,7 @@ export class KeyresultDialogComponent { id: this.data.keyResult?.id } as KeyResultOrdinalDTO; keyResult.id = this.data.keyResult?.id; - keyResult.version = this.data.keyResult?.version!; + keyResult.version = this.data.keyResult.version!; keyResult.actionList = keyResult.actionList!.filter((action: Action) => action.action !== ''); this.keyResultService.saveKeyResult(keyResult) .subscribe((returnValue) => { diff --git a/frontend/src/app/shared/common.ts b/frontend/src/app/shared/common.ts index b77d641991..a8f1e975bb 100644 --- a/frontend/src/app/shared/common.ts +++ b/frontend/src/app/shared/common.ts @@ -46,7 +46,7 @@ export function isLastCheckInNegative(baseline: number, stretchGoal: number, val } export function calculateCurrentPercentage(keyResultMetric: KeyResultMetricMin): number { - const value: number = +keyResultMetric.lastCheckIn?.value!; + const value: number = +keyResultMetric.lastCheckIn!.value!; const baseline: number = +keyResultMetric.baseline; const stretchGoal: number = +keyResultMetric.stretchGoal; if (isLastCheckInNegative(baseline, stretchGoal, value)) { diff --git a/frontend/src/app/shared/custom/scoring/scoring.component.spec.ts b/frontend/src/app/shared/custom/scoring/scoring.component.spec.ts index 7c331b9f75..2e227d1125 100644 --- a/frontend/src/app/shared/custom/scoring/scoring.component.spec.ts +++ b/frontend/src/app/shared/custom/scoring/scoring.component.spec.ts @@ -163,7 +163,7 @@ describe('ScoringComponent', () => { component.failPercent = 0; // Set zone - (component.keyResult.lastCheckIn as CheckInOrdinalMin)!.zone! = object.zoneValue; + (component.keyResult.lastCheckIn as CheckInOrdinalMin)!.zone = object.zoneValue; component.calculatePercentageOrdinal(); // Verify if percentage was set correctly