issue-77 #105

Merged
sebastian merged 17 commits from issue-77 into master 2024-03-16 10:12:35 +01:00
4 changed files with 20 additions and 1 deletions
Showing only changes of commit f3c491826b - Show all commits

View File

@ -28,6 +28,7 @@ public class TaskEntityInfo {
private boolean hasActiveSchedules;
private boolean hasPlannedSchedules;
private boolean hasTaskSerie;
public TaskEntityInfo(Task task) {
this.taskID = task.getTaskID();
@ -47,6 +48,7 @@ public class TaskEntityInfo {
this.finishable = task.isFinishable();
this.hasActiveSchedules = task.hasActiveSchedule();
this.hasPlannedSchedules = task.hasPlannedSchedules();
this.hasTaskSerie = task.getTaskSerieItem() != null;
}
public long getTaskID() {
@ -136,4 +138,12 @@ public class TaskEntityInfo {
public void setHasPlannedSchedules(boolean hasPlannedSchedules) {
this.hasPlannedSchedules = hasPlannedSchedules;
}
public boolean isHasTaskSerie() {
return hasTaskSerie;
}
public void setHasTaskSerie(boolean hasTaskSerie) {
this.hasTaskSerie = hasTaskSerie;
}
}

View File

@ -56,5 +56,9 @@ export interface TaskEntityInfo {
* determines whether the task has schedules that can be started
*/
hasPlannedSchedules: boolean;
/**
* determines whether the task is associated with a taskserie
*/
hasTaskSerie: boolean;
}

View File

@ -29,7 +29,7 @@
<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" (click)="startTaskNow()">Start now</button>
<button mat-flat-button class="grayBtn" (click)="openTaskEditor()">Edit</button>
<button mat-flat-button class="lightBlueBtn" (click)="openRepeatingTaskEditor()">Copy</button>
<button mat-flat-button class="lightBlueBtn" *ngIf="!task.hasTaskSerie" (click)="openRepeatingTaskEditor()">Copy</button>
<button mat-flat-button class="greenBtn" *ngIf="task!.finishable" (click)="finishTask()">{{task!.finished ? 'Reopen':'Finish'}}</button>
</div>

View File

@ -2414,6 +2414,7 @@ components:
- finishable
- hasActiveSchedules
- hasPlannedSchedules
- hasTaskSerie
additionalProperties: false
properties:
taskID:
@ -2458,6 +2459,10 @@ components:
hasPlannedSchedules:
type: boolean
description: determines whether the task has schedules that can be started
hasTaskSerie:
type: boolean
description: determines whether the task is associated with a taskserie
example: false
TaskTaskgroupInfo:
required:
- taskID