diff --git a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.html b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.html
index f1a0eab..52d88a9 100644
--- a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.html
+++ b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.html
@@ -18,7 +18,7 @@
-
+
diff --git a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts
index 2bb3ab3..9f30de6 100644
--- a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts
+++ b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import {Component, OnInit, ViewChild} from '@angular/core';
import {MatDialog as MatDialog} from "@angular/material/dialog";
import {TaskgroupCreationComponent} from "../taskgroup-creation/taskgroup-creation.component";
import {TaskgroupEntityInfo, TaskgroupService} from "../../../api";
@@ -6,6 +6,7 @@ import {TaskgroupDeletionComponent} from "../taskgroup-deletion/taskgroup-deleti
import {ActivatedRoute} from "@angular/router";
import {TaskEditorComponent} from "../../tasks/task-editor/task-editor.component";
import {TaskEditorData} from "../../tasks/task-editor/TaskEditorData";
+import {TaskDashboardComponent} from "../../tasks/task-dashboard/task-dashboard.component";
@Component({
selector: 'app-taskgroup-dashboard',
@@ -20,6 +21,7 @@ export class TaskgroupDashboardComponent implements OnInit {
taskgroups: TaskgroupEntityInfo[] = []
taskgroupID: number = -1;
+ @ViewChild("taskDashboard") taskDashboard: TaskDashboardComponent | undefined
ngOnInit(): void {
this.activatedRoute.paramMap.subscribe(params => {
@@ -73,6 +75,11 @@ export class TaskgroupDashboardComponent implements OnInit {
task: undefined,
taskgroupID: this.taskgroupID
}
- const dialogRef = this.dialog.open(TaskEditorComponent, {data: editorData, minWidth: "400px"})
+ const dialogRef = this.dialog.open(TaskEditorComponent, {data: editorData, width: "600px"})
+ dialogRef.afterClosed().subscribe(res => {
+ if(res != undefined) {
+ this.taskDashboard!.addTask(res);
+ }
+ })
}
}
diff --git a/frontend/src/app/tasks/task-dashboard/task-dashboard.component.ts b/frontend/src/app/tasks/task-dashboard/task-dashboard.component.ts
index 077858a..ba18818 100644
--- a/frontend/src/app/tasks/task-dashboard/task-dashboard.component.ts
+++ b/frontend/src/app/tasks/task-dashboard/task-dashboard.component.ts
@@ -94,4 +94,9 @@ export class TaskDashboardComponent implements OnChanges{
}
})
}
+ addTask(task: TaskEntityInfo) {
+ const data = this.datasource.data;
+ data.push(task)
+ this.datasource.data = data;
+ }
}
diff --git a/frontend/src/app/tasks/task-editor/task-editor.component.css b/frontend/src/app/tasks/task-editor/task-editor.component.css
index ddb52c2..7b1c648 100644
--- a/frontend/src/app/tasks/task-editor/task-editor.component.css
+++ b/frontend/src/app/tasks/task-editor/task-editor.component.css
@@ -4,5 +4,12 @@
.date-form {
width: 49%;
- margin-right: 9px;
+}
+#startDate {
+ float: left;
+}
+
+
+#endDate {
+ float: right;
}
diff --git a/frontend/src/app/tasks/task-editor/task-editor.component.html b/frontend/src/app/tasks/task-editor/task-editor.component.html
index 317a467..cc264a0 100644
--- a/frontend/src/app/tasks/task-editor/task-editor.component.html
+++ b/frontend/src/app/tasks/task-editor/task-editor.component.html
@@ -10,14 +10,14 @@
ETA
-
+
Startdate
MM/DD/YYYY
-
+
Deadline
MM/DD/YYYY