From 941e2f7ee571cfbc4cb39048465ec41fad0d0ebd Mon Sep 17 00:00:00 2001 From: test Date: Thu, 2 Jul 2020 16:33:33 +0200 Subject: [PATCH] design modifications. added author dropdown --- .../userstory-form.component.html | 24 +++++++++++++++++++ .../userstory-form.component.ts | 18 ++++++++++++++ .../userstory-table.component.ts | 1 + 3 files changed, 43 insertions(+) diff --git a/src/app/userstory-form/userstory-form.component.html b/src/app/userstory-form/userstory-form.component.html index 28ed99e..c140325 100644 --- a/src/app/userstory-form/userstory-form.component.html +++ b/src/app/userstory-form/userstory-form.component.html @@ -67,6 +67,30 @@ + +
+ + +
+
diff --git a/src/app/userstory-form/userstory-form.component.ts b/src/app/userstory-form/userstory-form.component.ts index d94b164..08fdceb 100644 --- a/src/app/userstory-form/userstory-form.component.ts +++ b/src/app/userstory-form/userstory-form.component.ts @@ -18,6 +18,8 @@ export class UserstoryFormComponent implements OnInit { @Input() public userstory: ScrumUserstory; public allStatus: any[] = []; public status: ScrumStatus = { title: "", description: "" }; + public allUser: any[] = []; + public user : ScrumUser = {name:""}; private editing: boolean; @@ -55,6 +57,8 @@ export class UserstoryFormComponent implements OnInit { this.activeModalService.dismiss(this.userstory); } + // Methods for adding, choosing and deleting random status tags. + getUserstoryStatus() { this.backendService.getAllStatus().subscribe((response) => { if (response.status > 399) { @@ -95,6 +99,7 @@ export class UserstoryFormComponent implements OnInit { getAllPriorities(): string[] { return Object.values(Priority); } + getStatusTitleById(id: number): string { if (!id) { return null; @@ -106,4 +111,17 @@ export class UserstoryFormComponent implements OnInit { return status.title; } + // Methods for choosing a creator in userstory. + + getAuthorById(id: number): string { + if (!id) { + return null; + } + var user = this.allUser.find((x) => x.id === id); + if (!user) { + return null; + } + return user.name; + } + } diff --git a/src/app/userstory-table/userstory-table.component.ts b/src/app/userstory-table/userstory-table.component.ts index ac42ac5..2baa7bd 100644 --- a/src/app/userstory-table/userstory-table.component.ts +++ b/src/app/userstory-table/userstory-table.component.ts @@ -96,6 +96,7 @@ export class UserstoryTableComponent extends TableComponentBase< const modalRef = this.modalService.open(UserstoryFormComponent, { backdrop: 'static', keyboard: true, + size: 'lg' }); if (editUserstory === null) { modalRef.result.then((result) => {