fix for clients (#239)
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -17,7 +17,7 @@ td, th {
|
||||
}
|
||||
|
||||
.inactive {
|
||||
color: grey;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.active {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user