Skip to content

Commit

Permalink
Resolve conversations
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelMoeri committed Jan 24, 2025
1 parent 226b0b6 commit 0f6222f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { KeyResultMetric } from '../../../shared/types/model/key-result-metric';
import { CheckInMin } from '../../../shared/types/model/check-in-min';
import { formInputCheck, hasFormFieldErrors } from '../../../shared/common';
import { formInputCheck } from '../../../shared/common';
import { TranslateService } from '@ngx-translate/core';
import { CheckInMetricMin } from '../../../shared/types/model/check-in-metric-min';

Expand All @@ -24,8 +24,6 @@ export class CheckInFormMetricComponent {

protected readonly formInputCheck = formInputCheck;

protected readonly hasFormFieldErrors = hasFormFieldErrors;

constructor(private translate: TranslateService) {}

generateUnitLabel(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ describe('CheckInFormComponent', () => {
component.keyResult = keyResultOrdinal;
component.ngOnInit();
component.setDefaultValues();
console.log(component.dialogForm.value);
expect(component.dialogForm.value)
.toStrictEqual({
confidence: keyResultOrdinal.lastCheckIn!.confidence,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,15 @@ export class CheckInFormComponent implements OnInit {

const actionList: Action[] = this.actionList$.value as Action[];
this.dialogForm.patchValue({ actionList: actionList });

const baseCheckIn: any = {
id: this.checkIn.id,
version: this.checkIn.version,
keyResultId: this.keyResult.id,
confidence: this.dialogForm.controls.confidence.value,
changeInfo: this.dialogForm.controls.changeInfo.value,
initiatives: this.dialogForm.controls.initiatives.value
...this.dialogForm.value
};
this.keyResult.keyResultType === 'metric'
? baseCheckIn.value = this.dialogForm.controls.metricValue.value
: baseCheckIn.zone = this.dialogForm.controls.ordinalZone.value;

baseCheckIn.value = this.dialogForm.controls.metricValue.value;
baseCheckIn.zone = this.dialogForm.controls.ordinalZone.value;

this.checkInService.saveCheckIn(baseCheckIn)
.subscribe(() => {
Expand Down

0 comments on commit 0f6222f

Please sign in to comment.