barker/bookie/src/app/tables/table-list/table-list.component.html

44 lines
1.6 KiB
HTML
Raw Normal View History

<mat-card>
<mat-card-title-group>
<mat-card-title>Tables</mat-card-title>
2019-06-16 15:38:18 +00:00
<button mat-button (click)="updateSortOrder()">
Update Order
</button>
<a mat-button [routerLink]="['/tables', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
</mat-card-title-group>
<mat-card-content>
2019-06-16 15:38:18 +00:00
<mat-table #table cdkDropList [dataSource]="dataSource" [cdkDropListData]="dataSource" aria-label="Elements" (cdkDropListDropped)="dropTable($event)">
<!-- Name Column -->
<ng-container matColumnDef="name">
2019-06-16 15:38:18 +00:00
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
<mat-cell *matCellDef="let row"><a [routerLink]="['/tables', row.id]">{{row.name}}</a></mat-cell>
</ng-container>
2019-06-17 07:53:00 +00:00
<!-- Seats Column -->
<ng-container matColumnDef="seats">
<mat-header-cell *matHeaderCellDef>Seats</mat-header-cell>
<mat-cell *matCellDef="let row">{{row.seats}}</mat-cell>
</ng-container>
<!-- Section Column -->
<ng-container matColumnDef="section">
<mat-header-cell *matHeaderCellDef>Section</mat-header-cell>
<mat-cell *matCellDef="let row">{{row.section}}</mat-cell>
</ng-container>
2019-06-16 15:38:18 +00:00
<!-- Is Active Column -->
<ng-container matColumnDef="isActive">
2019-06-16 15:38:18 +00:00
<mat-header-cell *matHeaderCellDef>Is Active?</mat-header-cell>
<mat-cell *matCellDef="let row">{{row.isActive}}</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
2019-06-16 15:38:18 +00:00
<mat-row *matRowDef="let row; columns: displayedColumns;" cdkDrag [cdkDragData]="row"></mat-row>
</mat-table>
</mat-card-content>
</mat-card>