fix for clients (#239)

This commit is contained in:
Anwesh Nayak
2018-07-28 19:37:10 +05:30
committed by GitHub
parent 0cdd6dbf5e
commit af9c18b532
3 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -30,7 +30,11 @@
<!-- Status Column -->
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header='active'> Status </th>
<td mat-cell *matCellDef="let row"> {{row.active}} </td>
<td mat-cell *matCellDef="let row">
<div [className]="row.active === true ? 'active' : 'inactive'">
<i class="fa fa-circle fa-2x"> </i>
</div>
</td>
</ng-container>
<!-- Color Column -->
+1 -1
View File
@@ -17,7 +17,7 @@ td, th {
}
.inactive {
color: grey;
color: red;
}
.active {
+1
View File
@@ -32,6 +32,7 @@ export class ClientsComponent implements OnInit {
.subscribe(
(res => {
console.log(res);
res.active = !!res.active;
this.dataSource = new MatTableDataSource(res);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;