diff --git a/src/app/components/sprint-form/sprint-form.component.ts b/src/app/components/sprint-form/sprint-form.component.ts index 9a1028c..8489d2e 100644 --- a/src/app/components/sprint-form/sprint-form.component.ts +++ b/src/app/components/sprint-form/sprint-form.component.ts @@ -46,6 +46,9 @@ export class SprintFormComponent implements OnInit { console.log('Sprint gespeichert!'); if (response.status > 399) { alert('Fehler'); + } else { + // Copy properties returned by the API + Object.assign(this.sprint, response.body); } }); } diff --git a/src/app/components/task-form/task-form.component.ts b/src/app/components/task-form/task-form.component.ts index 129b08f..04af383 100644 --- a/src/app/components/task-form/task-form.component.ts +++ b/src/app/components/task-form/task-form.component.ts @@ -69,6 +69,9 @@ export class TaskFormComponent implements OnInit { this.backendService.postTask(this.task).subscribe((response) => { if (response.status > 399) { alert('Fehler'); + } else { + // Copy properties returned by the API + Object.assign(this.task, response.body); } }); } diff --git a/src/app/components/userstory-form/userstory-form.component.ts b/src/app/components/userstory-form/userstory-form.component.ts index 81c57bc..3d74d93 100644 --- a/src/app/components/userstory-form/userstory-form.component.ts +++ b/src/app/components/userstory-form/userstory-form.component.ts @@ -29,7 +29,7 @@ export class UserstoryFormComponent implements OnInit { public user: ScrumUser = { name: '' }; public allCategories: any[] = []; public category: ScrumCategory = { title: '' }; - private editing: boolean; + public editing: boolean; constructor( private backendService: BackendService, @@ -67,6 +67,9 @@ export class UserstoryFormComponent implements OnInit { .subscribe((response) => { if (response.status > 399) { alert('Fehler'); + } else { + // Copy properties returned by the API + Object.assign(this.userstory, response.body); } }); }