issue-18 #28
@ -5,13 +5,8 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Define Entity BasicTaskSchedule and Taskcontroller">
|
||||
<change afterPath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleEntityInfo.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleFieldInfo.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/main/java/core/repositories/timemanager/BasicTaskScheduleRepository.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.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/api/controller/TaskController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/api/controller/TaskController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/tasks/TaskEntityInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/tasks/TaskEntityInfo.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/core/entities/timemanager/Task.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/entities/timemanager/Task.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@ -48,31 +43,31 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "issue-11-angular-update",
|
||||
"last_directory_selection": "D:/Programmierprojekte/TimeManager/backend/src/main/java/core/api/models/timemanager",
|
||||
"last_opened_file_path": "D:/Programmierprojekte/Dicewars/client",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"settings.editor.selected.configurable": "swagger",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "issue-11-angular-update",
|
||||
"last_directory_selection": "D:/Programmierprojekte/TimeManager/backend/src/main/java/core/api/models/timemanager",
|
||||
"last_opened_file_path": "D:/Programmierprojekte/Dicewars/client",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"settings.editor.selected.configurable": "swagger",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
},
|
||||
"keyToStringList": {
|
||||
"DatabaseDriversLRU": [
|
||||
"mariadb"
|
||||
"keyToStringList": {
|
||||
"DatabaseDriversLRU": [
|
||||
"mariadb"
|
||||
]
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="DemoApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
|
||||
<module name="demo" />
|
||||
@ -99,7 +94,8 @@
|
||||
<workItem from="1697958018921" duration="91000" />
|
||||
<workItem from="1697958118995" duration="5749000" />
|
||||
<workItem from="1697969480767" duration="6407000" />
|
||||
<workItem from="1697989716016" duration="3813000" />
|
||||
<workItem from="1697989716016" duration="3814000" />
|
||||
<workItem from="1698067098771" duration="307000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
|
||||
<option name="closed" value="true" />
|
||||
|
@ -20,6 +20,8 @@ public class TaskEntityInfo {
|
||||
|
||||
private boolean finished;
|
||||
|
||||
private int workTime;
|
||||
|
||||
public TaskEntityInfo(Task task) {
|
||||
this.taskID = task.getTaskID();
|
||||
this.taskName = task.getTaskName();
|
||||
@ -28,6 +30,7 @@ public class TaskEntityInfo {
|
||||
this.deadline = task.getDeadline();
|
||||
this.overdue = LocalDate.now().isAfter(task.getDeadline());
|
||||
this.finished = task.isFinished();
|
||||
this.workTime = task.getWorkTime();
|
||||
}
|
||||
|
||||
public long getTaskID() {
|
||||
@ -85,4 +88,12 @@ public class TaskEntityInfo {
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
public int getWorkTime() {
|
||||
return workTime;
|
||||
}
|
||||
|
||||
public void setWorkTime(int workTime) {
|
||||
this.workTime = workTime;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,8 @@ public class Task {
|
||||
@OneToMany(mappedBy = "task", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||
private Set<BasicTaskSchedule> basicTaskSchedules;
|
||||
|
||||
private int workTime;
|
||||
|
||||
public Task(Taskgroup taskgroup, String taskName, LocalDate startDate, LocalDate deadline, int eta) {
|
||||
this.taskgroup = taskgroup;
|
||||
this.taskName = taskName;
|
||||
@ -97,6 +99,18 @@ public class Task {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
public int getWorkTime() {
|
||||
return workTime;
|
||||
}
|
||||
|
||||
public void setWorkTime(int workTime) {
|
||||
this.workTime = workTime;
|
||||
}
|
||||
|
||||
public void addWorkTime(int workTime) {
|
||||
this.workTime += workTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
@ -23,10 +23,14 @@ export interface BasicScheduleEntityInfo {
|
||||
/**
|
||||
* date on which the task schedule was started
|
||||
*/
|
||||
startTime: string;
|
||||
startTime?: string;
|
||||
/**
|
||||
* date on which the tasks schedule was finished
|
||||
*/
|
||||
finishedTime: string;
|
||||
finishedTime?: string;
|
||||
/**
|
||||
* number in minutes that the schedule was active
|
||||
*/
|
||||
activeTime?: number;
|
||||
}
|
||||
|
||||
|
@ -40,5 +40,9 @@ export interface TaskEntityInfo {
|
||||
* determines whether the task is finished
|
||||
*/
|
||||
finished: boolean;
|
||||
/**
|
||||
* number in minutes that was already worked on this task
|
||||
*/
|
||||
workTime: number;
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import {MainComponent} from "./main/main.component";
|
||||
import {UserSettingsComponent} from "./user-settings/user-settings.component";
|
||||
import {TaskgroupDashboardComponent} from "./taskgroups/taskgroup-dashboard/taskgroup-dashboard.component";
|
||||
import {TaskDetailOverviewComponent} from "./tasks/task-detail-overview/task-detail-overview.component";
|
||||
import {SchedulerComponent} from "./schedules/scheduler/scheduler.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{path: '', component: MainComponent},
|
||||
@ -13,7 +14,8 @@ const routes: Routes = [
|
||||
{path: 'user/settings', component: UserSettingsComponent},
|
||||
{path: 'taskgroups', component: TaskgroupDashboardComponent},
|
||||
{path: 'taskgroups/:taskgroupID', component: TaskgroupDashboardComponent},
|
||||
{path: 'taskgroups/:taskgroupID/tasks/:taskID', component: TaskDetailOverviewComponent}
|
||||
{path: 'taskgroups/:taskgroupID/tasks/:taskID', component: TaskDetailOverviewComponent},
|
||||
{path: 'taskgroups/:taskgroupID/tasks/:taskID/schedule', component: SchedulerComponent}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@ -56,6 +56,7 @@ import { NavigationLinkListComponent } from './navigation-link-list/navigation-l
|
||||
import { TaskDetailOverviewComponent } from './tasks/task-detail-overview/task-detail-overview.component';
|
||||
import {MatProgressBarModule} from "@angular/material/progress-bar";
|
||||
import {MatExpansionModule} from "@angular/material/expansion";
|
||||
import { SchedulerComponent } from './schedules/scheduler/scheduler.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -80,7 +81,8 @@ import {MatExpansionModule} from "@angular/material/expansion";
|
||||
TaskDashboardComponent,
|
||||
ClearTaskDialogComponent,
|
||||
NavigationLinkListComponent,
|
||||
TaskDetailOverviewComponent
|
||||
TaskDetailOverviewComponent,
|
||||
SchedulerComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -14,7 +14,7 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p>ETA: {{task!.eta}} Minuten - Deadline: {{task!.deadline}}</p>
|
||||
<mat-progress-bar [mode]="'determinate'" value="40"></mat-progress-bar>
|
||||
<mat-progress-bar [mode]="'determinate'" [value]="task!.workTime"></mat-progress-bar>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div style="width: 100%">
|
||||
@ -38,7 +38,7 @@
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header>Schedules</mat-expansion-panel-header>
|
||||
<div>
|
||||
<button style="float: right" mat-raised-button color="primary">Add</button>
|
||||
<button style="float: right" mat-raised-button color="primary" [routerLink]="['/taskgroups', taskgroup!.taskgroupID, 'tasks', task!.taskID, 'schedule']">Add</button>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
|
11
openapi.yaml
11
openapi.yaml
@ -1462,6 +1462,7 @@ components:
|
||||
- deadline
|
||||
- overdue
|
||||
- finished
|
||||
- workTime
|
||||
additionalProperties: false
|
||||
properties:
|
||||
taskID:
|
||||
@ -1493,6 +1494,10 @@ components:
|
||||
type: boolean
|
||||
description: determines whether the task is finished
|
||||
example: True
|
||||
workTime:
|
||||
type: number
|
||||
description: number in minutes that was already worked on this task
|
||||
example: 10
|
||||
TaskFieldInfo:
|
||||
required:
|
||||
- taskName
|
||||
@ -1522,8 +1527,6 @@ components:
|
||||
required:
|
||||
- scheduleID
|
||||
- scheduleDate
|
||||
- startTime
|
||||
- finishedTime
|
||||
additionalProperties: false
|
||||
properties:
|
||||
scheduleID:
|
||||
@ -1542,6 +1545,10 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
description: date on which the tasks schedule was finished
|
||||
activeTime:
|
||||
type: number
|
||||
description: number in minutes that the schedule was active
|
||||
example: 10
|
||||
BasicScheduleFieldInfo:
|
||||
required:
|
||||
- scheduleDate
|
||||
|
Loading…
Reference in New Issue
Block a user