From 7b51aaa444153378c406015d724f50a5169cb916 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jun 2020 10:46:19 +0200 Subject: [PATCH] try of readings status --- src/app/task-form/task-form.component.html | 8 ++++++-- src/app/task-form/task-form.component.ts | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/app/task-form/task-form.component.html b/src/app/task-form/task-form.component.html index 7e07ece..8b03606 100644 --- a/src/app/task-form/task-form.component.html +++ b/src/app/task-form/task-form.component.html @@ -52,8 +52,12 @@
- + +
diff --git a/src/app/task-form/task-form.component.ts b/src/app/task-form/task-form.component.ts index bd663eb..4a574db 100644 --- a/src/app/task-form/task-form.component.ts +++ b/src/app/task-form/task-form.component.ts @@ -23,6 +23,7 @@ export class TaskFormComponent implements OnInit { public editing: Boolean; public userstoryId: string; public userstories: any[] = []; + public allStatus: any[] = []; constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) { this.getUserStories(); @@ -79,4 +80,14 @@ export class TaskFormComponent implements OnInit { } }); } + + getTaskStatus() { + this.backendService.getAllStatus().subscribe((response) => { + if (response.status > 399) { + alert('Fehler'); + } else { + this.allStatus.push(...response.body); + } + }); + } }