Chore:
Moved to sqlalchemy 2.0 Added type checking as much as possible Updated angular to 15 Moved from Angular flex layout to tailwind css Started developing on vscode with devcontainers
This commit is contained in:
@ -1,47 +1,34 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Products</mat-card-title>
|
||||
<button
|
||||
mat-button
|
||||
(click)="updateSortOrder()"
|
||||
[disabled]="(menuCategoryFilter | async) === '' || (searchFilter | async) !== ''"
|
||||
>
|
||||
Update Order
|
||||
</button>
|
||||
<!-- This should check filtered data and not data-->
|
||||
<button mat-button mat-icon-button (click)="exportCsv()" [disabled]="!(data | async)?.length">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<a mat-button [routerLink]="['/products', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" fxLayout="column">
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="space-around start"
|
||||
fxLayout.lt-md="column"
|
||||
fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px"
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Products</mat-card-title>
|
||||
<button
|
||||
mat-button
|
||||
(click)="updateSortOrder()"
|
||||
[disabled]="(menuCategoryFilter | async) === '' || (searchFilter | async) !== ''"
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Filter"
|
||||
formControlName="filter"
|
||||
autocomplete="off"
|
||||
/>
|
||||
Update Order
|
||||
</button>
|
||||
<!-- This should check filtered data and not data-->
|
||||
<button mat-icon-button (click)="exportCsv()" [disabled]="!(data | async)?.length">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<a mat-button [routerLink]="['/products', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Filter</mat-label>
|
||||
<input type="text" matInput formControlName="filter" autocomplete="off" />
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Product Type</mat-label>
|
||||
<mat-select
|
||||
placeholder="Menu Category"
|
||||
formControlName="menuCategory"
|
||||
(selectionChange)="filterOn($event.value)"
|
||||
>
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Menu Category</mat-label>
|
||||
<mat-select formControlName="menuCategory" (selectionChange)="filterOn($event.value)">
|
||||
<mat-option>-- All Products --</mat-option>
|
||||
<mat-option *ngFor="let mc of menuCategories" [value]="mc.id">
|
||||
{{ mc.name }}
|
||||
@ -69,7 +56,7 @@
|
||||
<!-- Price Column -->
|
||||
<ng-container matColumnDef="price">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Menu Category Column -->
|
||||
@ -109,7 +96,7 @@
|
||||
<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'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user