committed by
Abhay Chawla
parent
f56d7a7dc7
commit
b517d015cc
@@ -0,0 +1,34 @@
|
||||
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
|
||||
<button mat-raised-button color="primary" [routerLink]="['create']">
|
||||
<fa-icon icon="plus"></fa-icon>
|
||||
Add Code
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div fxLayout="row">
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Filter</mat-label>
|
||||
<input matInput>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
<ng-container matColumnDef="codeName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Code Name </th>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="systemDefined">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> System Defined </th>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CodesComponent } from './codes.component';
|
||||
|
||||
describe('CodesComponent', () => {
|
||||
let component: CodesComponent;
|
||||
let fixture: ComponentFixture<CodesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CodesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CodesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatPaginator, MatSort, MatTableDataSource } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-codes',
|
||||
templateUrl: './codes.component.html',
|
||||
styleUrls: ['./codes.component.scss']
|
||||
})
|
||||
export class CodesComponent implements OnInit {
|
||||
|
||||
/** Codes data. */
|
||||
codesData: any;
|
||||
/** Columns to be displayed in codes table. */
|
||||
displayedColumns: string[] = ['codeName', 'systemDefined'];
|
||||
/** Data source for codes table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
|
||||
/** Paginator for codes table. */
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
/** Sorter for codes table. */
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user