Display existing schedules in forgetten schedules scheduler
All checks were successful
Java CI with Maven / test (push) Successful in 34s
Java CI with Maven / build-and-push-frontend (push) Successful in 8s
Java CI with Maven / build-and-push-backend (push) Successful in 8s

This commit is contained in:
Sebastian Böckelmann 2023-11-18 18:38:11 +01:00
parent ed89c18f93
commit edcd0f6c77
3 changed files with 23 additions and 2 deletions

View File

@ -17,7 +17,7 @@ public abstract class ScheduleInfo {
@JsonProperty @JsonProperty
private LocalDateTime startTime; private LocalDateTime startTime;
@JsonProperty @JsonProperty
private LocalDateTime stopTime; private LocalDateTime finishedTime;
@JsonProperty @JsonProperty
private int activeMinutes; private int activeMinutes;
@JsonProperty @JsonProperty
@ -29,7 +29,7 @@ public abstract class ScheduleInfo {
this.scheduleID = scheduleID; this.scheduleID = scheduleID;
this.scheduleType = scheduleType; this.scheduleType = scheduleType;
this.startTime = startTime; this.startTime = startTime;
this.stopTime = stopTime; this.finishedTime = stopTime;
this.activeMinutes = activeMinutes; this.activeMinutes = activeMinutes;
this.task = new TaskShortInfo(task); this.task = new TaskShortInfo(task);
this.taskgroupPath = taskgroupPath; this.taskgroupPath = taskgroupPath;

View File

@ -39,6 +39,7 @@ public class Task {
private int workTime; private int workTime;
public Task() { public Task() {
this.basicTaskSchedules = new ArrayList<>();
} }
public Task(Taskgroup taskgroup, TaskFieldInfo taskFieldInfo) { public Task(Taskgroup taskgroup, TaskFieldInfo taskFieldInfo) {

View File

@ -61,7 +61,27 @@ export class ForgottenTaskStartDialogComponent implements OnInit{
} }
ngOnInit() { ngOnInit() {
this.scheduleService.schedulesDateStartableGet(moment().format("yyyy-MM-DD"), false).subscribe({
next: resp => {
resp.forEach(schedule => {
console.log(schedule.startTime)
console.log(schedule.finishedTime)
this.events.push({
title: this.computeTaskPath(schedule.taskgroupPath, schedule.task),
color: colors['red'],
start: new Date(schedule.startTime),
end: new Date(schedule.finishedTime!),
draggable: false,
resizable: {
beforeStart: false,
afterEnd: false
}
})
})
this.refresh.next()
}
})
} }