Tables List and Detail working
TODO: Save SortOrder also, Drag and Drop ordering
This commit is contained in:
@ -1,7 +1,41 @@
|
||||
<!--?<div cdkDropList class="example-list" (cdkDropListDropped)="drop($event)">-->
|
||||
<!--?<div class="example-box" *ngFor="let movie of movies" cdkDrag>{{movie}}</div>-->
|
||||
<!--?</div>-->
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Tables</mat-card-title>
|
||||
<a mat-button [routerLink]="['/tables', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
|
||||
<!--?<div fxLayout="row wrap" fxLayoutGap="10px" fxLayoutAlign="flex-start">-->
|
||||
<!--?<button fxFlex="0 1 calc(20% - 10px)" *ngFor="let table of tables">{{table.name}}</button>-->
|
||||
<!--?</div>-->
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="['/tables', row.id]">{{row.name}}</a></mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Location Column -->
|
||||
<ng-container matColumnDef="location">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Location</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.location}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="isActive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Is Active?</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.isActive}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator #paginator
|
||||
[length]="dataSource.data.length"
|
||||
[pageIndex]="0"
|
||||
[pageSize]="50"
|
||||
[pageSizeOptions]="[25, 50, 100, 250]">
|
||||
</mat-paginator>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
Reference in New Issue
Block a user