From 96b64ba1dc998c2892a9de77d47b9bba3fda31b5 Mon Sep 17 00:00:00 2001 From: test Date: Thu, 2 Jul 2020 17:07:50 +0200 Subject: [PATCH] . --- src/app/userstory-form/userstory-form.component.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/userstory-form/userstory-form.component.ts b/src/app/userstory-form/userstory-form.component.ts index 08fdceb..69a003c 100644 --- a/src/app/userstory-form/userstory-form.component.ts +++ b/src/app/userstory-form/userstory-form.component.ts @@ -19,7 +19,7 @@ export class UserstoryFormComponent implements OnInit { public allStatus: any[] = []; public status: ScrumStatus = { title: "", description: "" }; public allUser: any[] = []; - public user : ScrumUser = {name:""}; + public user: ScrumUser = { name: "" }; private editing: boolean; @@ -111,7 +111,17 @@ export class UserstoryFormComponent implements OnInit { return status.title; } - // Methods for choosing a creator in userstory. + // Methods for choosing creator of a userstory. + + getAllUsers() { + this.backendService.getUsers().subscribe((response) => { + if (response.status > 399) { + alert('Fehler'); + } else { + this.allUser.push(...response.body); + } + }); + } getAuthorById(id: number): string { if (!id) {