diff --git a/client/stillbox/src/app/incidents/incident/incident-editor-dialog.component.html b/client/stillbox/src/app/incidents/incident/incident-editor-dialog.component.html index d939a2d..f1f01d9 100644 --- a/client/stillbox/src/app/incidents/incident/incident-editor-dialog.component.html +++ b/client/stillbox/src/app/incidents/incident/incident-editor-dialog.component.html @@ -35,6 +35,7 @@ matInput name="description" placeholder="Description" + formControlName="description" rows="8" cols="200" >{{ inc.description }} { - this.form.patchValue(inc, { - onlySelf: false, - emitEvent: false, - } - ); - this.form.markAsPristine(); + this.form.patchValue(inc); }), ); } } save() { - console.log(this.form.value); this.incSvc.updateIncident(this.data.incID, { name: this.form.controls['name'].dirty ? this.form.controls['name'].value : null, startTime: this.form.controls['start'].dirty ? this.form.controls['start'].value : null, @@ -167,7 +161,7 @@ export class IncidentComponent { ngOnInit() { this.incID = this.route.snapshot.paramMap.get('id')!; - this.inc$ = this.incPrime.pipe(map((inc) => inc)); + this.inc$ = this.incPrime.pipe(); this.incSvc .getIncident(this.incID) .pipe( @@ -176,8 +170,7 @@ export class IncidentComponent { this.callsResult.data = inc.calls; } }), - ) - .subscribe(this.incPrime); + ).subscribe(this.incPrime); } editIncident(incID: string) { @@ -190,6 +183,7 @@ export class IncidentComponent { dialogRef.afterClosed().subscribe((res) => { if (res !== undefined) { + console.log(res); this.incPrime.next(res); } });