82 lines
3.3 KiB
HTML
82 lines
3.3 KiB
HTML
<mat-card>
|
|
<mat-card-title-group>
|
|
<mat-card-title>Beer Sale Report</mat-card-title>
|
|
<button mat-button mat-icon-button (click)="exportCsv()">
|
|
<mat-icon>save_alt</mat-icon>
|
|
</button>
|
|
</mat-card-title-group>
|
|
<mat-card-content>
|
|
<form [formGroup]="form" fxLayout="column">
|
|
<div
|
|
fxLayout="row"
|
|
fxLayout.lt-md="column"
|
|
fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px"
|
|
fxLayoutAlign="space-around start"
|
|
>
|
|
<mat-form-field fxFlex="40">
|
|
<input
|
|
matInput
|
|
[matDatepicker]="startDate"
|
|
(focus)="startDate.open()"
|
|
placeholder="Start Date"
|
|
formControlName="startDate"
|
|
autocomplete="off"
|
|
/>
|
|
<mat-datepicker-toggle matSuffix [for]="startDate"></mat-datepicker-toggle>
|
|
<mat-datepicker #startDate></mat-datepicker>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="40">
|
|
<input
|
|
matInput
|
|
[matDatepicker]="finishDate"
|
|
(focus)="finishDate.open()"
|
|
placeholder="Finish Date"
|
|
formControlName="finishDate"
|
|
autocomplete="off"
|
|
/>
|
|
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
|
<mat-datepicker #finishDate></mat-datepicker>
|
|
</mat-form-field>
|
|
<button fxFlex="20" mat-raised-button color="primary" (click)="show()">Show</button>
|
|
</div>
|
|
<div>
|
|
<mat-checkbox class="example-margin" formControlName="regular">Regular</mat-checkbox>
|
|
<mat-checkbox class="example-margin" formControlName="happy">Happy Hour</mat-checkbox>
|
|
<mat-checkbox class="example-margin" formControlName="staff"
|
|
>Staff Consumption</mat-checkbox
|
|
>
|
|
<mat-checkbox class="example-margin" formControlName="nc">No Charge</mat-checkbox>
|
|
</div>
|
|
</form>
|
|
<mat-table #table [dataSource]="dataSource" aria-label="Elements">
|
|
<!-- Date Column -->
|
|
<ng-container matColumnDef="date">
|
|
<mat-header-cell *matHeaderCellDef>Time</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{ row.date }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Name Column -->
|
|
<ng-container *ngFor="let col of info.headers" matColumnDef="{{ col }}">
|
|
<mat-header-cell *matHeaderCellDef class="right">{{ col }}</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{ row[col] }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- <!– Name Column –>-->
|
|
<!-- <ng-container matColumnDef="name">-->
|
|
<!-- <mat-header-cell *matHeaderCellDef class="right">Name</mat-header-cell>-->
|
|
<!-- <mat-cell *matCellDef="let row" class="right">{{row.name}}</mat-cell>-->
|
|
<!-- </ng-container>-->
|
|
|
|
<!-- <!– Quantity Column –>-->
|
|
<!-- <ng-container matColumnDef="quantity">-->
|
|
<!-- <mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>-->
|
|
<!-- <mat-cell *matCellDef="let row" class="right">{{row.quantity | number:'1.2-2'}}</mat-cell>-->
|
|
<!-- </ng-container>-->
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
|
</mat-table>
|
|
</mat-card-content>
|
|
</mat-card>
|