feat: view client layout implemented (#93)

* view client layout implemented
This commit is contained in:
Anwesh Nayak
2018-07-04 07:30:25 +05:30
committed by GitHub
parent 8aea96449a
commit 9f1df583a5
11 changed files with 404 additions and 171 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ import { Observable } from 'rxjs';
})
export class ClientsComponent implements OnInit {
post: any = [];
private ELEMENT_DATA: any = null;
private ELEMENT_DATA: any = undefined;
displayedColumns = ['name', 'clientno', 'externalid', 'status', 'office', 'staff'];
dataSource = new MatTableDataSource();
@@ -20,10 +20,10 @@ export class ClientsComponent implements OnInit {
constructor(private clientService: ClientsService) {
// GET from clients API
this.clientService.getServer()
this.clientService.getClients()
.subscribe(
(res => {
console.log(res);
// console.log(res);
this.ELEMENT_DATA = res;
this.dataSource = new MatTableDataSource(this.ELEMENT_DATA);
})