issue-18 #28
@ -21,7 +21,7 @@
|
||||
<div style="float: left">
|
||||
<button mat-flat-button class="borderless-btn" color="primary" [routerLink]="['/taskgroups', taskgroup!.taskgroupID, 'tasks', task!.taskID, 'schedule']">Schedule</button>
|
||||
<button mat-flat-button class="yellowBtn">Start now</button>
|
||||
<button mat-flat-button class="grayBtn" >Edit</button>
|
||||
<button mat-flat-button class="grayBtn" (click)="openTaskEditor()">Edit</button>
|
||||
<!--<button mat-raised-button>Copy</button>-->
|
||||
<button mat-flat-button class="greenBtn" >Finished</button>
|
||||
</div>
|
||||
|
@ -3,6 +3,9 @@ import {NavigationLink, NavigationLinkListComponent} from "../../navigation-link
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {TaskEntityInfo, TaskgroupEntityInfo, TaskgroupService, TaskService} from "../../../api";
|
||||
import {TaskDashboardComponent} from "../task-dashboard/task-dashboard.component";
|
||||
import {MatDialog} from "@angular/material/dialog";
|
||||
import {TaskEditorComponent} from "../task-editor/task-editor.component";
|
||||
import {TaskEditorData} from "../task-editor/TaskEditorData";
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-detail-overview',
|
||||
@ -31,7 +34,8 @@ export class TaskDetailOverviewComponent implements OnInit {
|
||||
|
||||
constructor(private activatedRoute: ActivatedRoute,
|
||||
private taskgroupService: TaskgroupService,
|
||||
private taskService: TaskService) {
|
||||
private taskService: TaskService,
|
||||
private dialog: MatDialog) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -65,4 +69,15 @@ export class TaskDetailOverviewComponent implements OnInit {
|
||||
return "green";
|
||||
|
||||
}
|
||||
|
||||
openTaskEditor() {
|
||||
if(this.task != undefined) {
|
||||
const taskEditorInfo: TaskEditorData = {
|
||||
task: this.task!,
|
||||
taskgroupID: this.taskgroupID!
|
||||
};
|
||||
this.dialog.open(TaskEditorComponent, {data: taskEditorInfo, width: "600px"})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user