Ignore:
Timestamp:
07/29/20 13:21:48 (3 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
de18858
Parents:
ef1219a
Message:

Add more services

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/counter/counter.component.ts

    ref1219a re42f61a  
    55import { MatPaginator } from '@angular/material/paginator';
    66import { MatSort } from '@angular/material/sort';
     7import { HealthcareWorkers } from '../models/HealthcareWorkers';
    78
    89@Component({
     
    1314export class CounterComponent implements OnInit {
    1415  public facilities: HealthFacilities[];
     16  public workers: HealthcareWorkers[];
    1517  displayedColumns = ['Име','Општина','Адреса', 'Тип', 'Е-пошта', 'Телефон'];
     18  displayedColumnsWorkers = ['Име','Гранка','Установа', 'Назив'];
    1619  dataSource = new MatTableDataSource<HealthFacilities>();
     20  dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>();
    1721
    1822  @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
     
    2529      this.dataSource = new MatTableDataSource<HealthFacilities>(this.facilities);
    2630    }, error => console.error(error));
     31    http.get<HealthcareWorkers[]>(baseUrl + 'HealthcareWorker/Get?').subscribe(result => {
     32      this.workers = result;
     33      console.log(this.workers);
     34      this.dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>(this.workers);
     35    }, error => console.error(error));
    2736  }
    2837  ngOnInit(): void {
     
    3241    this.dataSource.paginator = this.paginator;
    3342    this.dataSource.sort = this.sort;
     43    this.dataSourceWorkers.paginator = this.paginator;
     44    this.dataSourceWorkers.sort = this.sort;
    3445  }
    3546
     
    3849    filterValue = filterValue.toLowerCase();
    3950    this.dataSource.filter = filterValue;
     51    this.dataSourceWorkers.filter = filterValue;
    4052  }
    4153}
Note: See TracChangeset for help on using the changeset viewer.