fix for clients (#239)
This commit is contained in:
@@ -30,7 +30,11 @@
|
|||||||
<!-- Status Column -->
|
<!-- Status Column -->
|
||||||
<ng-container matColumnDef="status">
|
<ng-container matColumnDef="status">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header='active'> Status </th>
|
<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>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Color Column -->
|
<!-- Color Column -->
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ td, th {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.inactive {
|
.inactive {
|
||||||
color: grey;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export class ClientsComponent implements OnInit {
|
|||||||
.subscribe(
|
.subscribe(
|
||||||
(res => {
|
(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
res.active = !!res.active;
|
||||||
this.dataSource = new MatTableDataSource(res);
|
this.dataSource = new MatTableDataSource(res);
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
this.dataSource.sort = this.sort;
|
this.dataSource.sort = this.sort;
|
||||||
|
|||||||
Reference in New Issue
Block a user