2019-06-14 03:58:30 +00:00
|
|
|
<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>
|
2019-06-14 03:58:30 +00:00
|
|
|
<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)">
|
2019-06-13 19:02:34 +00:00
|
|
|
|
2019-06-14 03:58:30 +00:00
|
|
|
<!-- Name Column -->
|
|
|
|
<ng-container matColumnDef="name">
|
2019-06-16 15:38:18 +00:00
|
|
|
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
|
2019-06-14 03:58:30 +00:00
|
|
|
<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>
|
2019-06-14 03:58:30 +00:00
|
|
|
</ng-container>
|
|
|
|
|
2019-06-16 15:38:18 +00:00
|
|
|
<!-- Is Active Column -->
|
2019-06-14 03:58:30 +00:00
|
|
|
<ng-container matColumnDef="isActive">
|
2019-06-16 15:38:18 +00:00
|
|
|
<mat-header-cell *matHeaderCellDef>Is Active?</mat-header-cell>
|
2019-06-14 03:58:30 +00:00
|
|
|
<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>
|
2019-06-14 03:58:30 +00:00
|
|
|
</mat-table>
|
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|