mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
[ADF-4968 ] [TaskHeaderCloudComponent] Allow Assignee property to be clickable if the task in CREATED, ASSIGNED, SUSPENDED states (#5191)
* [ADF-4968][TaskHeaderCloudComponent] Allow Assignee property to be clickable if the task in CREATED, ASSIGNED, SUSPENDED states * * Added clickable to the parentName and ParentTask Id. * * Fixed comments
This commit is contained in:
parent
4885e6bcee
commit
1c6eb4d73d
@ -106,6 +106,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.ASSIGNEE',
|
||||
value: this.taskDetails.assignee,
|
||||
key: 'assignee',
|
||||
clickable: this.isClickable(),
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.ASSIGNEE_DEFAULT'),
|
||||
icon: 'create'
|
||||
}
|
||||
@ -159,14 +160,16 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.PARENT_NAME',
|
||||
value: this.parentTaskName,
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.PARENT_NAME_DEFAULT'),
|
||||
key: 'parentName'
|
||||
key: 'parentName',
|
||||
clickable: true
|
||||
}
|
||||
),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.PARENT_TASK_ID',
|
||||
value: this.taskDetails.parentTaskId,
|
||||
key: 'parentTaskId'
|
||||
key: 'parentTaskId',
|
||||
clickable: true
|
||||
}
|
||||
),
|
||||
new CardViewDateItemModel(
|
||||
@ -254,6 +257,11 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
return this.taskCloudService.isTaskEditable(this.taskDetails);
|
||||
}
|
||||
|
||||
isClickable(): boolean {
|
||||
const states = [TaskStatusEnum.ASSIGNED, TaskStatusEnum.CREATED, TaskStatusEnum.SUSPENDED];
|
||||
return states.includes(this.taskDetails.status);
|
||||
}
|
||||
|
||||
private isValidSelection(filteredProperties: string[], cardItem: CardViewBaseItemModel): boolean {
|
||||
return filteredProperties ? filteredProperties.indexOf(cardItem.key) >= 0 : true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user