issue-18 #28

Merged
sebastian merged 55 commits from issue-18 into master 2023-10-28 19:36:14 +02:00
2 changed files with 17 additions and 2 deletions
Showing only changes of commit b8664124ca - Show all commits

View File

@ -21,7 +21,7 @@
<div style="float: left"> <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="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="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-raised-button>Copy</button>-->
<button mat-flat-button class="greenBtn" >Finished</button> <button mat-flat-button class="greenBtn" >Finished</button>
</div> </div>

View File

@ -3,6 +3,9 @@ import {NavigationLink, NavigationLinkListComponent} from "../../navigation-link
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute} from "@angular/router";
import {TaskEntityInfo, TaskgroupEntityInfo, TaskgroupService, TaskService} from "../../../api"; import {TaskEntityInfo, TaskgroupEntityInfo, TaskgroupService, TaskService} from "../../../api";
import {TaskDashboardComponent} from "../task-dashboard/task-dashboard.component"; 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({ @Component({
selector: 'app-task-detail-overview', selector: 'app-task-detail-overview',
@ -31,7 +34,8 @@ export class TaskDetailOverviewComponent implements OnInit {
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private taskgroupService: TaskgroupService, private taskgroupService: TaskgroupService,
private taskService: TaskService) { private taskService: TaskService,
private dialog: MatDialog) {
} }
ngOnInit(): void { ngOnInit(): void {
@ -65,4 +69,15 @@ export class TaskDetailOverviewComponent implements OnInit {
return "green"; return "green";
} }
openTaskEditor() {
if(this.task != undefined) {
const taskEditorInfo: TaskEditorData = {
task: this.task!,
taskgroupID: this.taskgroupID!
};
this.dialog.open(TaskEditorComponent, {data: taskEditorInfo, width: "600px"})
}
}
} }