feat: add navigation component (#590)

Fixes: #256
This commit is contained in:
punwai
2020-05-24 22:28:47 +05:30
committed by GitHub
parent 7a5069e590
commit e2707a1d0a
43 changed files with 1713 additions and 9 deletions
@@ -0,0 +1,41 @@
/** Angular Imports */
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { MatTableDataSource, MatPaginator, MatSort } from '@angular/material';
@Component({
selector: 'mifosx-member-groups',
templateUrl: './member-groups.component.html',
styleUrls: ['./member-groups.component.scss']
})
export class MemberGroupsComponent implements OnInit {
/** Columns to be displayed in the member groups table. */
displayedColumns: string[] = ['accountNo', 'name'];
/** Data source for member groups table. */
dataSource: MatTableDataSource<any>;
/** Paginator for member groups table. */
@ViewChild(MatPaginator) paginator: MatPaginator;
/** Sorter for member groups table. */
@ViewChild(MatSort) sort: MatSort;
/** Member Group Data Setter */
@Input() set memberGroupData(data: any) {
this.dataSource = new MatTableDataSource(data);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}
constructor() { }
/**
* Filters data in member groups table based on passed value.
* @param {string} filterValue Value to filter data.
*/
applyFilter(filterValue: string) {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
ngOnInit() { }
}