mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF- 4871][TaskHeaderCloudComponent] Add Candidate Users/Groups properties (#5189)
* [ADF-4871] [TaskHeaderCloudComponent] Add Candidate Users/Groups properties * Added Candidate users/groups properties to the task heade cloud component. * * Created CardViewArrayItemComponent * Modified FullName pipe to return username or email incase fullname missing. * Added candidate Users/Groups properties to the taskcloudheader component. * Added two service into task-cloudservice * Updated Demoshell card-view with new widget * * Fixed failing unit test * * Fixed comments. * * Refactored CardViewArrayItem model * Fixed comments. * * Changed candidate group icon
This commit is contained in:
committed by
Maurizio Vitale
parent
1c6eb4d73d
commit
9c2bcdee1a
@@ -21,6 +21,7 @@ import {
|
||||
CardViewItem,
|
||||
CardViewTextItemModel,
|
||||
CardViewBaseItemModel,
|
||||
CardViewArrayItemModel,
|
||||
TranslationService,
|
||||
AppConfigService,
|
||||
UpdateNotification,
|
||||
@@ -29,7 +30,7 @@ import {
|
||||
import { TaskDetailsCloudModel, TaskStatusEnum } from '../../start-task/models/task-details-cloud.model';
|
||||
import { Router } from '@angular/router';
|
||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { Subject, Observable } from 'rxjs';
|
||||
import { NumericFieldValidator } from '../../../validators/numeric-field.validator';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@@ -197,10 +198,38 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
multiline: true,
|
||||
editable: true
|
||||
}
|
||||
),
|
||||
new CardViewArrayItemModel(
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.CANDIDATE_USERS',
|
||||
value: this.getCandidateUsers(),
|
||||
key: 'candidateUsers',
|
||||
icon: 'person',
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.CANDIDATE_USERS_DEFAULT'),
|
||||
noOfItemsToDisplay: 2
|
||||
}
|
||||
),
|
||||
new CardViewArrayItemModel(
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.CANDIDATE_GROUPS',
|
||||
value: this.getCandidateGroups(),
|
||||
key: 'candidateGroups',
|
||||
icon: 'group',
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.CANDIDATE_GROUPS_DEFAULT'),
|
||||
noOfItemsToDisplay: 2
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
private getCandidateUsers(): Observable<string[]> {
|
||||
return this.taskCloudService.getCandidateUsers(this.appName, this.taskId);
|
||||
}
|
||||
|
||||
private getCandidateGroups(): Observable<string[]> {
|
||||
return this.taskCloudService.getCandidateGroups(this.appName, this.taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh the card data
|
||||
*/
|
||||
|
Reference in New Issue
Block a user