From c393afb7b8ce280f0c5e4b6755845697b187b145 Mon Sep 17 00:00:00 2001 From: test Date: Fri, 3 Jul 2020 11:17:37 +0200 Subject: [PATCH 1/8] created dropdown to choose a user assigned to the task. --- src/app/task-form/task-form.component.html | 165 +++++++++++++-------- src/app/task-form/task-form.component.ts | 26 ++++ 2 files changed, 126 insertions(+), 65 deletions(-) diff --git a/src/app/task-form/task-form.component.html b/src/app/task-form/task-form.component.html index 2e688ac..872a86a 100644 --- a/src/app/task-form/task-form.component.html +++ b/src/app/task-form/task-form.component.html @@ -1,83 +1,118 @@ -
+
-
-
- -
-
-
-

Neuen Task anlegen

- +
-

Sprint-Backlog

+

Sprint-Backlog - y

@@ -196,7 +111,7 @@ - +
{{userstory.id}} {{userstory.title}} diff --git a/src/app/backlog-table/backlog.component.ts b/src/app/backlog-table/backlog.component.ts index 24b87cd..8c21895 100644 --- a/src/app/backlog-table/backlog.component.ts +++ b/src/app/backlog-table/backlog.component.ts @@ -26,30 +26,19 @@ export class BacklogComponent extends TableComponentBase< > { public tasks: ScrumTask[] = []; public filterPriority: string | null = null; - public highlightId: number; public status: ScrumStatus[] = []; public categories: ScrumCategory[] = []; + public currentSprint: ScrumSprint; public choosen: ScrumUserstory[] = []; - public get filteredItems() { - return this.items.filter( - (task) => - this.filterPriority === null || task.priority === this.filterPriority - ); - } - constructor( private backendService: BackendService, private modalService: NgbModal, private route: ActivatedRoute, - private router: Router ) { super(); - this.applyFilterParameters(this.route.snapshot.paramMap); - this.route.paramMap.subscribe((map) => this.applyFilterParameters(map)); - backendService.getUserstories().subscribe((response) => { if (response.status > 399) { alert('Fehler'); @@ -78,12 +67,7 @@ export class BacklogComponent extends TableComponentBase< this.categories.push(...response.body); } }); - } - - private applyFilterParameters(params: ParamMap) { - if (params.has('id')) { - this.highlightId = parseInt(params.get('id')); - } + this.getCurrentSprint(); } public deleteUserstory(userstory: ScrumUserstory) { @@ -135,6 +119,7 @@ export class BacklogComponent extends TableComponentBase< sortByStatus() { this.doNumericSort('statusid', (us) => us.statusid); } + sortByCategory() { this.doNumericSort('categoryid', (us) => us.categoryid); } @@ -159,6 +144,7 @@ export class BacklogComponent extends TableComponentBase< public addToSprintBacklog(userstory: ScrumUserstory) { this.choosen.push(userstory); + } public deleteFromSprintBacklog(userstory: ScrumUserstory){ @@ -166,8 +152,15 @@ export class BacklogComponent extends TableComponentBase< this.choosen.splice(index, 1); } - public addToSprint(choosen: ScrumUserstory[]){ - + public getCurrentSprint() + { + this.backendService.getSprints().subscribe((response) => { + if (response.status > 399) { + } else { + var currentDate = new Date(); + this.currentSprint = response.body.find(x => x.startDate < currentDate); + alert(this.currentSprint); + }}); } public openSprintForm(editSprint?: ScrumSprint) { From 6adb0c0401e51b42338b37fd0ca7ff1e47e6f369 Mon Sep 17 00:00:00 2001 From: Niggl Date: Fri, 3 Jul 2020 17:23:49 +0200 Subject: [PATCH 7/8] Now adding works (in UI only) --- src/app/backlog-table/backlog.component.html | 2 +- src/app/backlog-table/backlog.component.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/backlog-table/backlog.component.html b/src/app/backlog-table/backlog.component.html index 75d1fea..091a1a3 100644 --- a/src/app/backlog-table/backlog.component.html +++ b/src/app/backlog-table/backlog.component.html @@ -11,7 +11,7 @@

Backlog

-
+

{{story.title}}

diff --git a/src/app/backlog-table/backlog.component.ts b/src/app/backlog-table/backlog.component.ts index 8c21895..19b1e3d 100644 --- a/src/app/backlog-table/backlog.component.ts +++ b/src/app/backlog-table/backlog.component.ts @@ -30,6 +30,7 @@ export class BacklogComponent extends TableComponentBase< public categories: ScrumCategory[] = []; public currentSprint: ScrumSprint; + public backlog: ScrumUserstory[] = []; public choosen: ScrumUserstory[] = []; constructor( @@ -44,6 +45,7 @@ export class BacklogComponent extends TableComponentBase< alert('Fehler'); } else { this.items.push(...response.body); + this.backlog = this.items; } }); backendService.getTasks().subscribe((response) => { @@ -144,12 +146,15 @@ export class BacklogComponent extends TableComponentBase< public addToSprintBacklog(userstory: ScrumUserstory) { this.choosen.push(userstory); + const index = this.backlog.indexOf(userstory); + this.backlog.splice(index, 1); } public deleteFromSprintBacklog(userstory: ScrumUserstory){ const index = this.choosen.indexOf(userstory); this.choosen.splice(index, 1); + this.backlog.push(userstory); } public getCurrentSprint() From cfb2b7f98bffed95307537755baa7af7f8580bb7 Mon Sep 17 00:00:00 2001 From: Niggl Date: Fri, 3 Jul 2020 17:27:19 +0200 Subject: [PATCH 8/8] Both sides w/ cards --- src/app/backlog-table/backlog.component.html | 122 +++---------------- src/app/backlog-table/backlog.component.ts | 1 - 2 files changed, 19 insertions(+), 104 deletions(-) diff --git a/src/app/backlog-table/backlog.component.html b/src/app/backlog-table/backlog.component.html index 091a1a3..486e3df 100644 --- a/src/app/backlog-table/backlog.component.html +++ b/src/app/backlog-table/backlog.component.html @@ -36,109 +36,25 @@

Sprint-Backlog - y

- - - - - - - - - - - - - - - - - - - - - - - - - - -
- ID - - - - - - - Titel - - - - - - - Tasks - - - - - - - Status - - - - - - -
-
- Priorität: -
- {{filterPriority || "All"}} -
- - -
-
- - - - - -
-
-
- Category - - - - - -
{{userstory.id}}{{userstory.title}} - - {{getNumberOfTasks(userstory)}} Tasks - - - - {{getStatusTitleById(userstory.statusid)}} - - {{userstory.priority}} - - {{getCategoryTitleById(userstory.categoryid)}} - - - -
+
+
+
+

{{story.title}}

+
Prio: {{story.priority}}
+

{{story.content}}

+
+ Category: {{story.categoryid || "N/A"}} + Status: {{story.statusid || "N/A"}} +
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/app/backlog-table/backlog.component.ts b/src/app/backlog-table/backlog.component.ts index 19b1e3d..54769ea 100644 --- a/src/app/backlog-table/backlog.component.ts +++ b/src/app/backlog-table/backlog.component.ts @@ -164,7 +164,6 @@ export class BacklogComponent extends TableComponentBase< } else { var currentDate = new Date(); this.currentSprint = response.body.find(x => x.startDate < currentDate); - alert(this.currentSprint); }}); }