[ADF-2320] Complete button is visible on an involved task (#3033)

* * [ADF-2320] Conditionally showing Complete button for task without form

* * [ADF-2320] Refactored the coditions
This commit is contained in:
Deepak Paul
2018-03-08 15:32:41 +05:30
committed by Eugenio Romano
parent 6afdbcad7c
commit 1fade9b23b
3 changed files with 36 additions and 5 deletions

View File

@@ -292,10 +292,14 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
return this.taskDetails.assignee.email === this.authService.getBpmUsername();
}
isCompleteButtonVisible(): boolean {
isCompleteButtonEnabled(): boolean {
return this.isAssignedToMe() || this.canInitiatorComplete();
}
isCompleteButtonVisible(): boolean {
return !this.hasFormKey() && this.isTaskActive() && this.isCompleteButtonEnabled();
}
canInitiatorComplete(): boolean {
return this.taskDetails.initiatorCanCompleteTask;
}