issue-18 #28

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

View File

@ -5,15 +5,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Define Entity BasicTaskSchedule and Taskcontroller">
<change beforePath="$PROJECT_DIR$/../frontend/angular.json" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/angular.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/app.module.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/app.module.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/index.html" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -101,7 +95,7 @@
<workItem from="1697958118995" duration="5749000" />
<workItem from="1697969480767" duration="6407000" />
<workItem from="1697989716016" duration="3814000" />
<workItem from="1698067098771" duration="909000" />
<workItem from="1698067098771" duration="2156000" />
</task>
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
<option name="closed" value="true" />
@ -175,6 +169,11 @@
<line>52</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.java</url>
<line>36</line>
<option name="timeStamp" value="2" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

View File

@ -19,6 +19,6 @@
>
</mwl-calendar-week-view>
<app-basic-scheduler #basicScheduler [task]="task" (onSchedule)="onBasicSchedule($event)"></app-basic-scheduler>
<app-basic-scheduler *ngIf="scheduleStrategy === 1" #basicScheduler [task]="task" (onSchedule)="onBasicSchedule($event)"></app-basic-scheduler>
</div>

View File

@ -1,7 +1,7 @@
import {Component, OnInit, ViewChild} from '@angular/core';
import {NavigationLink, NavigationLinkListComponent} from "../../navigation-link-list/navigation-link-list.component";
import {
BasicScheduleEntityInfo,
BasicScheduleEntityInfo, ScheduleService,
TaskEntityInfo,
TaskgroupEntityInfo,
TaskgroupService,
@ -80,7 +80,8 @@ export class SchedulerComponent implements OnInit{
constructor(private activatedRoute: ActivatedRoute,
private taskgroupService: TaskgroupService,
private taskService: TaskService) {
private taskService: TaskService,
private scheduleService: ScheduleService) {
}
ngOnInit(): void {
@ -102,6 +103,7 @@ export class SchedulerComponent implements OnInit{
next: resp => {
this.task = resp;
this.initializeNavigationLinkList()
this.fetchBasicSchedules();
}
})
}
@ -135,6 +137,22 @@ export class SchedulerComponent implements OnInit{
allDay: true
})
this.refresh.next();
console.log(this.events)
}
fetchBasicSchedules() {
this.scheduleService.schedulesTaskIDScheduleTypeGet(this.task!.taskID, "BASIC").subscribe({
next: resp => {
resp.forEach(basicSchedule => {
this.events.push({
start: new Date(basicSchedule.scheduleDate),
title: this.task!.taskName,
color: colors['red'],
allDay: true
})
})
this.refresh.next();
}
})
}
}