mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1712] The <adf-task-header component displays a Requeue button for none pooled tasks (#2680)
* [ADF-1712] The <adf-task-header component displays a Requeue button for none pooled tasks . * Refactored task header component. * [ADF-1712]The <adf-task-header component displays a Requeue button for none pooled tasks. * Refactored task header component. * Added test cases. * [ADF-1712] The <adf-task-header component displays a Requeue button for none pooled tasks. * Changed method name .
This commit is contained in:
committed by
Eugenio Romano
parent
3ccccbec4e
commit
7cf0a1c839
@@ -197,31 +197,24 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the task has involvedGroup
|
||||
* Return true if the user is a candidate member
|
||||
*/
|
||||
public hasInvolvedGroup(): boolean {
|
||||
return this.taskDetails.involvedGroups.length > 0 ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the task has involvedPeople
|
||||
*/
|
||||
public hasInvolvedPeople(): boolean {
|
||||
return this.taskDetails.involvedPeople.length > 0 ? true : false;
|
||||
isCandidateMember() {
|
||||
return this.taskDetails.managerOfCandidateGroup || this.taskDetails.memberOfCandidateGroup || this.taskDetails.memberOfCandidateUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the task claimable
|
||||
*/
|
||||
public isTaskClaimable(): boolean {
|
||||
return !this.isCompleted() && (this.hasInvolvedGroup() || this.hasInvolvedPeople()) && !this.hasAssignee() ;
|
||||
return !this.hasAssignee() && this.isCandidateMember();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the task claimed by currentUser
|
||||
* Return true if the task claimed by candidate member.
|
||||
*/
|
||||
public isTaskClaimedByCurrentUser(): boolean {
|
||||
return !this.isCompleted() && (this.hasInvolvedGroup() || this.hasInvolvedPeople()) && this.isAssignedToCurrentUser();
|
||||
public isTaskClaimedByCandidateMember(): boolean {
|
||||
return this.isCandidateMember() && this.isAssignedToCurrentUser() && !this.isCompleted();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user