mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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
@@ -0,0 +1,49 @@
|
||||
|
||||
<div [attr.data-automation-id]="'card-array-label-' + property.key" class="adf-property-label">{{ property.label | translate }}</div>
|
||||
<div class="adf-property-value" (click)="clicked()">
|
||||
<ng-container *ngIf="(property.displayValue | async) as items; else elseEmptyValueBlock">
|
||||
<mat-chip-list *ngIf="items.length > 0; else elseEmptyValueBlock" data-automation-id="card-arrayitem-chip-list-container">
|
||||
<ng-container *ngIf="displayCount() > 0; else withOutDisplayCount" >
|
||||
<mat-chip
|
||||
*ngFor="let item of items.slice(0, displayCount())"
|
||||
(click)="clicked()"
|
||||
[attr.data-automation-id]="'card-arrayitem-chip-' + item">
|
||||
<mat-icon *ngIf="hasIcon()" class="adf-array-item-icon">{{property.icon}}</mat-icon>
|
||||
<span>{{item}}</span>
|
||||
</mat-chip>
|
||||
<mat-chip
|
||||
*ngIf="items.length > displayCount()"
|
||||
data-automation-id="card-arrayitem-more-chip"
|
||||
[matMenuTriggerFor]="menu">
|
||||
<span>{{items.length - displayCount()}} {{'CORE.CARDVIEW.MORE' | translate}}</span>
|
||||
</mat-chip>
|
||||
</ng-container>
|
||||
<ng-template #withOutDisplayCount>
|
||||
<mat-chip
|
||||
*ngFor="let item of items"
|
||||
(click)="clicked()"
|
||||
[attr.data-automation-id]="'card-arrayitem-chip-' + item">
|
||||
<mat-icon *ngIf="hasIcon()" class="adf-array-item-icon">{{property.icon}}</mat-icon>
|
||||
<span>{{item}}</span>
|
||||
</mat-chip>
|
||||
</ng-template>
|
||||
</mat-chip-list>
|
||||
<mat-menu #menu="matMenu">
|
||||
<mat-card class="adf-array-item-more-chip-container">
|
||||
<mat-card-content>
|
||||
<mat-chip-list>
|
||||
<mat-chip (click)="clicked()"
|
||||
*ngFor="let item of items.slice(displayCount(), items.length)"
|
||||
[attr.data-automation-id]="'card-arrayitem-chip-' + item">
|
||||
<mat-icon *ngIf="hasIcon()" class="adf-array-item-icon">{{property.icon}}</mat-icon>
|
||||
<span>{{item}}</span>
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
<ng-template #elseEmptyValueBlock>
|
||||
<span data-automation-id="card-arrayitem-default">{{ property.default | translate }}</span>
|
||||
</ng-template>
|
||||
</div>
|
Reference in New Issue
Block a user