Initial commit for the Angular part. We are nowhere yet.

This commit is contained in:
Amritanshu
2019-06-14 00:32:34 +05:30
parent 1a1fa7881d
commit d59c60e81d
123 changed files with 3748 additions and 374 deletions

View File

@ -0,0 +1,70 @@
<div class="mat-elevation-z8">
<form [formGroup]="form" fxLayout="column">
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
<mat-form-field fxFlex>
<input matInput [matDatepicker]="date" (focus)="date.open()" placeholder="Date" formControlName="date"
autocomplete="off">
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
<mat-datepicker #date></mat-datepicker>
</mat-form-field>
<div fxFlex>
<a mat-button [routerLink]="['/guest-book', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
</div>
</div>
</form>
<table mat-table class="full-width-table" [dataSource]="dataSource" matSort aria-label="Elements">
<!-- Id Column -->
<ng-container matColumnDef="sno">
<th mat-header-cell *matHeaderCellDef mat-sort-header>S. No</th>
<td mat-cell *matCellDef="let row">{{row.serial}}</td>
</ng-container>
<!-- Name Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
<td mat-cell *matCellDef="let row">{{row.name}}</td>
</ng-container>
<!-- Name Column -->
<ng-container matColumnDef="phone">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>
<td mat-cell *matCellDef="let row">{{row.phone}}</td>
</ng-container>
<!-- Name Column -->
<ng-container matColumnDef="pax">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Pax</th>
<td mat-cell *matCellDef="let row">{{row.pax}}</td>
</ng-container>
<!-- Action Column -->
<ng-container matColumnDef="action">
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
<mat-cell *matCellDef="let row" class="center">
<button mat-icon-button (click)="seat(row)">
Seat
</button>
<button mat-icon-button (click)="editRow(row)">
<mat-icon>edit</mat-icon>
</button>
<button mat-icon-button color="warn" (click)="deleteRow(row)">
<mat-icon>delete</mat-icon>
</button>
</mat-cell>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator #paginator
[length]="dataSource.data.length"
[pageIndex]="0"
[pageSize]="250"
[pageSizeOptions]="[25, 50, 100, 250]">
</mat-paginator>
</div>