Disable daily task repetition when task is already part of a series
This commit is contained in:
parent
9e5a1337d9
commit
f3c491826b
@ -28,6 +28,7 @@ public class TaskEntityInfo {
|
|||||||
private boolean hasActiveSchedules;
|
private boolean hasActiveSchedules;
|
||||||
|
|
||||||
private boolean hasPlannedSchedules;
|
private boolean hasPlannedSchedules;
|
||||||
|
private boolean hasTaskSerie;
|
||||||
|
|
||||||
public TaskEntityInfo(Task task) {
|
public TaskEntityInfo(Task task) {
|
||||||
this.taskID = task.getTaskID();
|
this.taskID = task.getTaskID();
|
||||||
@ -47,6 +48,7 @@ public class TaskEntityInfo {
|
|||||||
this.finishable = task.isFinishable();
|
this.finishable = task.isFinishable();
|
||||||
this.hasActiveSchedules = task.hasActiveSchedule();
|
this.hasActiveSchedules = task.hasActiveSchedule();
|
||||||
this.hasPlannedSchedules = task.hasPlannedSchedules();
|
this.hasPlannedSchedules = task.hasPlannedSchedules();
|
||||||
|
this.hasTaskSerie = task.getTaskSerieItem() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTaskID() {
|
public long getTaskID() {
|
||||||
@ -136,4 +138,12 @@ public class TaskEntityInfo {
|
|||||||
public void setHasPlannedSchedules(boolean hasPlannedSchedules) {
|
public void setHasPlannedSchedules(boolean hasPlannedSchedules) {
|
||||||
this.hasPlannedSchedules = hasPlannedSchedules;
|
this.hasPlannedSchedules = hasPlannedSchedules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isHasTaskSerie() {
|
||||||
|
return hasTaskSerie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasTaskSerie(boolean hasTaskSerie) {
|
||||||
|
this.hasTaskSerie = hasTaskSerie;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,9 @@ export interface TaskEntityInfo {
|
|||||||
* determines whether the task has schedules that can be started
|
* determines whether the task has schedules that can be started
|
||||||
*/
|
*/
|
||||||
hasPlannedSchedules: boolean;
|
hasPlannedSchedules: boolean;
|
||||||
|
/**
|
||||||
|
* determines whether the task is associated with a taskserie
|
||||||
|
*/
|
||||||
|
hasTaskSerie: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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="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="yellowBtn" (click)="startTaskNow()">Start now</button>
|
||||||
<button mat-flat-button class="grayBtn" (click)="openTaskEditor()">Edit</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>
|
<button mat-flat-button class="greenBtn" *ngIf="task!.finishable" (click)="finishTask()">{{task!.finished ? 'Reopen':'Finish'}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2414,6 +2414,7 @@ components:
|
|||||||
- finishable
|
- finishable
|
||||||
- hasActiveSchedules
|
- hasActiveSchedules
|
||||||
- hasPlannedSchedules
|
- hasPlannedSchedules
|
||||||
|
- hasTaskSerie
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
taskID:
|
taskID:
|
||||||
@ -2458,6 +2459,10 @@ components:
|
|||||||
hasPlannedSchedules:
|
hasPlannedSchedules:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: determines whether the task has schedules that can be started
|
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:
|
TaskTaskgroupInfo:
|
||||||
required:
|
required:
|
||||||
- taskID
|
- taskID
|
||||||
|
Loading…
Reference in New Issue
Block a user