issue-18 #28
@ -4,14 +4,10 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Start task now from Taskoverview in Dashboard">
|
||||
<change afterPath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/taskSchedule/ActiveMinutesInformation.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../frontend/src/api/api/schedule.service.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/api/api/schedule.service.ts" afterDir="false" />
|
||||
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Load worked minutes when reloading dashboard">
|
||||
<change beforePath="$PROJECT_DIR$/../frontend/src/app/dashboard/dashboard.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/dashboard/dashboard.component.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../openapi.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/../openapi.yaml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../frontend/src/app/dashboard/task-overview/task-overview.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/dashboard/task-overview/task-overview.component.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../frontend/src/app/dashboard/task-overview/task-overview.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/dashboard/task-overview/task-overview.component.ts" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -108,7 +104,7 @@
|
||||
<workItem from="1698298897364" duration="4242000" />
|
||||
<workItem from="1698426430946" duration="665000" />
|
||||
<workItem from="1698474363766" duration="3686000" />
|
||||
<workItem from="1698499063683" duration="6495000" />
|
||||
<workItem from="1698499063683" duration="7085000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
|
||||
<option name="closed" value="true" />
|
||||
@ -222,7 +218,23 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1698500028161</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="15" />
|
||||
<task id="LOCAL-00015" summary="Load worked minutes when reloading dashboard">
|
||||
<option name="closed" value="true" />
|
||||
<created>1698512058945</created>
|
||||
<option name="number" value="00015" />
|
||||
<option name="presentableId" value="LOCAL-00015" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1698512058945</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00016" summary="Load worked minutes when reloading dashboard">
|
||||
<option name="closed" value="true" />
|
||||
<created>1698512069065</created>
|
||||
<option name="number" value="00016" />
|
||||
<option name="presentableId" value="LOCAL-00016" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1698512069065</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="17" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@ -245,7 +257,8 @@
|
||||
<MESSAGE value="Fix starting schedule and returning active time of schedule after stop" />
|
||||
<MESSAGE value="Remove update spamming in console" />
|
||||
<MESSAGE value="Start task now from Taskoverview in Dashboard" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Start task now from Taskoverview in Dashboard" />
|
||||
<MESSAGE value="Load worked minutes when reloading dashboard" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Load worked minutes when reloading dashboard" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
.taskgroup-overview {
|
||||
width: 30%;
|
||||
width: 35%;
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
</div>
|
||||
<div class="taskgroup-overview">
|
||||
<app-task-overview [tasks]="tasks" (onStartNow)="onStartTaskNow($event)" (onFinished)="onFinishTask($event)"></app-task-overview>
|
||||
<app-task-overview [tasks]="tasks" (onStartNow)="onStartTaskNow($event)" [taskgroupID]="selectedTaskgroupID" (onFinished)="onFinishTask($event)"></app-task-overview>
|
||||
</div>
|
||||
|
||||
<div class="taskgroup-overview">
|
||||
|
@ -3,6 +3,7 @@ import {BasicScheduleEntityInfo, ScheduleInfo, ScheduleService, TaskOverviewInfo
|
||||
import {ActiveScheduleComponent} from "./active-schedule/active-schedule.component";
|
||||
import {StopActiveScheduleInfo} from "./active-schedule/StopActiveScheduleInfo";
|
||||
import {TaskOverviewComponent} from "./task-overview/task-overview.component";
|
||||
import {TaskOverviewData} from "./taskgroup-overview/taskgroup-overview.component";
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
@ -16,6 +17,7 @@ export class DashboardComponent implements OnInit{
|
||||
workedMinutesToday: number = 0
|
||||
|
||||
tasks: TaskOverviewInfo[] = []
|
||||
selectedTaskgroupID: number | undefined
|
||||
|
||||
@ViewChild('activeSchedule') activeScheduleComponent: ActiveScheduleComponent | undefined
|
||||
constructor(private scheduleService: ScheduleService) {
|
||||
@ -55,8 +57,9 @@ export class DashboardComponent implements OnInit{
|
||||
|
||||
protected readonly TaskOverviewComponent = TaskOverviewComponent;
|
||||
|
||||
onSelectTaskgroup(tasks: TaskOverviewInfo[]) {
|
||||
this.tasks = tasks;
|
||||
onSelectTaskgroup(taskOverviewData: TaskOverviewData) {
|
||||
this.tasks = taskOverviewData.tasks;
|
||||
this.selectedTaskgroupID = taskOverviewData.taskgroupID;
|
||||
}
|
||||
|
||||
onStartTaskNow(schedule: ScheduleInfo) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" class="btn-without-radius" (click)="startTaskNow(task)">Start now</button>
|
||||
<button mat-raised-button class="yellowBtn btn-without-radius">Schedule</button>
|
||||
<button *ngIf="taskgroupID != undefined" mat-raised-button class="yellowBtn btn-without-radius" [routerLink]="['/taskgroups', taskgroupID!, 'tasks', task.taskID, 'schedule']">Schedule</button>
|
||||
<button mat-raised-button class="greenBtn btn-without-radius" (click)="finishTask(task)">Finish</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
@ -10,6 +10,7 @@ import {MatSnackBar} from "@angular/material/snack-bar";
|
||||
export class TaskOverviewComponent {
|
||||
|
||||
@Input() tasks: TaskOverviewInfo[] = []
|
||||
@Input() taskgroupID: number | undefined
|
||||
@Output('onStartNow') startNowEmitter: EventEmitter<ScheduleInfo> = new EventEmitter<ScheduleInfo>();
|
||||
@Output('onFinished') finishedEmitter: EventEmitter<TaskOverviewInfo> = new EventEmitter<TaskOverviewInfo>();
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<!-- use a disabled button to provide padding for tree leaf -->
|
||||
<button mat-icon-button disabled></button>
|
||||
<div class="treenode-content-container">
|
||||
<button mat-button class="node-name" (click)="onSelectTaskgroup(node.tasks)">{{node.name}}</button>
|
||||
<button mat-button class="node-name" (click)="onSelectTaskgroup(node.tasks, node.taskgroupID)">{{node.name}}</button>
|
||||
<span class="spacer"></span>
|
||||
<div class="task-number">{{node.activeTasks}}</div>
|
||||
</div>
|
||||
@ -21,7 +21,7 @@
|
||||
</mat-icon>
|
||||
</button>
|
||||
<div class="treenode-content-container">
|
||||
<button mat-button class="node-name" (click)="onSelectTaskgroup(node.tasks)">{{node.name}}</button>
|
||||
<button mat-button class="node-name" (click)="onSelectTaskgroup(node.tasks, node.taskgroupID)">{{node.name}}</button>
|
||||
<span class="spacer"></span>
|
||||
<div class="task-number">{{node.activeTasks}}</div>
|
||||
</div>
|
||||
|
@ -17,6 +17,12 @@ interface ExampleFlatNode {
|
||||
activeTasks: number;
|
||||
hasOverdueTask: boolean;
|
||||
tasks: TaskOverviewInfo[];
|
||||
taskgroupID: number
|
||||
}
|
||||
|
||||
export interface TaskOverviewData {
|
||||
tasks: TaskOverviewInfo[],
|
||||
taskgroupID: number
|
||||
}
|
||||
@Component({
|
||||
selector: 'app-taskgroup-overview',
|
||||
@ -25,7 +31,7 @@ interface ExampleFlatNode {
|
||||
})
|
||||
export class TaskgroupOverviewComponent {
|
||||
|
||||
@Output('taskgroupSelected') taskgroupSelected: EventEmitter<TaskOverviewInfo[]> = new EventEmitter<TaskOverviewInfo[]>();
|
||||
@Output('taskgroupSelected') taskgroupSelected: EventEmitter<TaskOverviewData> = new EventEmitter<TaskOverviewData>();
|
||||
private _transformer = (node: RecursiveTaskgroupInfo, level: number) => {
|
||||
return {
|
||||
expandable: !!node.childTaskgroups && node.childTaskgroups.length > 0,
|
||||
@ -33,7 +39,8 @@ export class TaskgroupOverviewComponent {
|
||||
level: level,
|
||||
activeTasks: node.amountActiveTasks,
|
||||
hasOverdueTask: node.hasOverdueTask,
|
||||
tasks: node.activeTasks
|
||||
tasks: node.activeTasks,
|
||||
taskgroupID: node.taskgroupID
|
||||
};
|
||||
};
|
||||
|
||||
@ -65,7 +72,10 @@ export class TaskgroupOverviewComponent {
|
||||
|
||||
hasChild = (_: number, node: ExampleFlatNode) => node.expandable;
|
||||
|
||||
onSelectTaskgroup(tasks: TaskOverviewInfo[]) {
|
||||
this.taskgroupSelected.emit(tasks)
|
||||
onSelectTaskgroup(tasks: TaskOverviewInfo[], taskgroupID: number) {
|
||||
this.taskgroupSelected.emit({
|
||||
tasks: tasks,
|
||||
taskgroupID: taskgroupID
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user