Hide copy function for subtasks (daily)
This commit is contained in:
parent
7526b6c134
commit
8487a573a1
@ -29,6 +29,8 @@ public class TaskEntityInfo {
|
|||||||
|
|
||||||
private boolean hasPlannedSchedules;
|
private boolean hasPlannedSchedules;
|
||||||
private boolean hasTaskSerie;
|
private boolean hasTaskSerie;
|
||||||
|
private boolean hasSubtasks;
|
||||||
|
private boolean hasParent;
|
||||||
|
|
||||||
public TaskEntityInfo(Task task) {
|
public TaskEntityInfo(Task task) {
|
||||||
this.taskID = task.getTaskID();
|
this.taskID = task.getTaskID();
|
||||||
@ -49,6 +51,8 @@ public class TaskEntityInfo {
|
|||||||
this.hasActiveSchedules = task.hasActiveSchedule();
|
this.hasActiveSchedules = task.hasActiveSchedule();
|
||||||
this.hasPlannedSchedules = task.hasPlannedSchedules();
|
this.hasPlannedSchedules = task.hasPlannedSchedules();
|
||||||
this.hasTaskSerie = task.getTaskSerieItem() != null;
|
this.hasTaskSerie = task.getTaskSerieItem() != null;
|
||||||
|
this.hasSubtasks = !task.getSubtasks().isEmpty();
|
||||||
|
this.hasParent = task.getParent() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTaskID() {
|
public long getTaskID() {
|
||||||
@ -146,4 +150,20 @@ public class TaskEntityInfo {
|
|||||||
public void setHasTaskSerie(boolean hasTaskSerie) {
|
public void setHasTaskSerie(boolean hasTaskSerie) {
|
||||||
this.hasTaskSerie = hasTaskSerie;
|
this.hasTaskSerie = hasTaskSerie;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isHasSubtasks() {
|
||||||
|
return hasSubtasks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasSubtasks(boolean hasSubtasks) {
|
||||||
|
this.hasSubtasks = hasSubtasks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHasParent() {
|
||||||
|
return hasParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasParent(boolean hasParent) {
|
||||||
|
this.hasParent = hasParent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,5 +60,13 @@ export interface TaskEntityInfo {
|
|||||||
* determines whether the task is associated with a taskserie
|
* determines whether the task is associated with a taskserie
|
||||||
*/
|
*/
|
||||||
hasTaskSerie: boolean;
|
hasTaskSerie: boolean;
|
||||||
|
/**
|
||||||
|
* determines whether a task has subtasks
|
||||||
|
*/
|
||||||
|
hasSubtasks: boolean;
|
||||||
|
/**
|
||||||
|
* determines whether a task is a top task or Not
|
||||||
|
*/
|
||||||
|
hasParent: 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" *ngIf="!task.hasTaskSerie" (click)="openRepeatingTaskEditor()">Copy</button>
|
<button mat-flat-button class="lightBlueBtn" *ngIf="!task.hasTaskSerie && !task.hasParent" (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>
|
||||||
|
|
||||||
|
10
openapi.yaml
10
openapi.yaml
@ -2498,6 +2498,8 @@ components:
|
|||||||
- hasActiveSchedules
|
- hasActiveSchedules
|
||||||
- hasPlannedSchedules
|
- hasPlannedSchedules
|
||||||
- hasTaskSerie
|
- hasTaskSerie
|
||||||
|
- hasSubtasks
|
||||||
|
- hasParent
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
taskID:
|
taskID:
|
||||||
@ -2546,6 +2548,14 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: determines whether the task is associated with a taskserie
|
description: determines whether the task is associated with a taskserie
|
||||||
example: false
|
example: false
|
||||||
|
hasSubtasks:
|
||||||
|
type: boolean
|
||||||
|
description: determines whether a task has subtasks
|
||||||
|
example: true
|
||||||
|
hasParent:
|
||||||
|
type: boolean
|
||||||
|
description: determines whether a task is a top task or Not
|
||||||
|
example: false
|
||||||
TaskTaskgroupInfo:
|
TaskTaskgroupInfo:
|
||||||
required:
|
required:
|
||||||
- taskID
|
- taskID
|
||||||
|
Loading…
Reference in New Issue
Block a user