PD List UI and filter changes
This commit is contained in:
parent
a1de92bcd0
commit
4d0919dc3b
@ -1,6 +1,14 @@
|
|||||||
<div align="right" *ngIf="viewPdList">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<button mat-stroked-button color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1"><mat-icon>map</mat-icon>Map List</button>
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 80%;">
|
||||||
<button mat-stroked-button color="primary" (click)="addPdDetails()" class="mr-1 mb-1"><mat-icon>add</mat-icon>Add PD</button>
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 80%;">No records found</div>
|
||||||
|
<div class="ml-xs mr-xs" style="width: 20%;text-align:right" *ngIf="viewPdList">
|
||||||
|
<button mat-fab color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1" matTooltip="Map List" matTooltipPosition="above"><mat-icon>map</mat-icon></button>
|
||||||
|
<button mat-fab color="primary" (click)="addPdDetails()" class="mr-1 mb-1" matTooltip="Add PD" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-card *ngIf="viewPdList">
|
<mat-card *ngIf="viewPdList">
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
|
|||||||
@ -83,6 +83,12 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
|||||||
this.viewPdList = !this.viewPdList;
|
this.viewPdList = !this.viewPdList;
|
||||||
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
|
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
|
||||||
|
|
||||||
|
}
|
||||||
|
//Global filter
|
||||||
|
applyFilter(filterValue: string) {
|
||||||
|
filterValue = filterValue.trim(); // Remove whitespace
|
||||||
|
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||||
|
this.dataSource.filter = filterValue;
|
||||||
}
|
}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.viewPdList=false;
|
this.viewPdList=false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user