[ADF-2353] replaced datatable with mat-list (#3085)

* [ADF-2353] replaced datatable with mat-list

* [ADF-2353] fixed test for the new mat-list comment
This commit is contained in:
Vito
2018-03-16 17:11:50 +00:00
committed by Eugenio Romano
parent ce14d68ea7
commit 6490260c5d
5 changed files with 136 additions and 109 deletions

View File

@@ -17,12 +17,13 @@
import { CommentProcessModel, PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
import { DatePipe } from '@angular/common';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'adf-comment-list',
templateUrl: './comment-list.component.html',
styleUrls: ['./comment-list.component.scss']
styleUrls: ['./comment-list.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class CommentListComponent {
@@ -40,8 +41,12 @@ export class CommentListComponent {
constructor(private datePipe: DatePipe, public peopleProcessService: PeopleProcessService) {
}
selectComment(event: any): void {
this.selectedComment = event.value.obj;
selectComment(comment: CommentProcessModel): void {
if (this.selectedComment) {
this.selectedComment.isSelected = false;
}
comment.isSelected = true;
this.selectedComment = comment;
this.clickRow.emit(this.selectedComment);
}
@@ -74,9 +79,4 @@ export class CommentListComponent {
}
return formattedDate;
}
hasComments(): boolean {
return this.comments && this.comments.length && true;
}
}