Tax is added directly to product for sale

Auth guard and auth service simplified and fixed so that user is updated upon login
Home component changed to use square buttons
Fixed showing the totals in the bill

ng linted the project
This commit is contained in:
Amritanshu
2019-08-11 01:37:14 +05:30
parent d7fdf751b9
commit dcaf23b390
23 changed files with 334 additions and 266 deletions

View File

@ -1,53 +1,59 @@
<h1>Welcome to bookie!</h1>
<a mat-raised-button routerLink="/login" *ngIf="!(nameObject | async)">
<mat-icon>account_box</mat-icon>
Login</a>
<a mat-raised-button routerLink="/guest-book">
Guest Book
</a>
<a mat-raised-button routerLink="/sales">
Sales
</a>
<a mat-raised-button routerLink="/tables">
Tables
</a>
<a mat-raised-button routerLink="/sections">
Sections
</a>
<a mat-raised-button routerLink="/menu-categories">
Menu Categories
</a>
<a mat-raised-button routerLink="/sale-categories">
Sale Categories
</a>
<a mat-raised-button routerLink="/products">
Products
</a>
<a mat-raised-button routerLink="/modifier-categories">
Modifier Categories
</a>
<a mat-raised-button routerLink="/modifiers">
Modifiers
</a>
<a mat-raised-button routerLink="/taxes">
Taxes
</a>
<a mat-raised-button routerLink="/devices">
Devices
</a>
<a mat-raised-button routerLink="/section-printers">
Section Printers
</a>
<a mat-raised-button routerLink="/printers">
Printers
</a>
<a mat-raised-button routerLink="/roles">
Roles
</a>
<a mat-raised-button routerLink="/users">
Users
</a>
<a mat-raised-button routerLink="/logout" *ngIf="nameObject | async as name">
<mat-icon>account_box</mat-icon>
Logout {{name}}
</a>
<div fxLayout="row wrap" fxLayoutGap="grid 20px">
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'login']" *ngIf="!(user | async)">
<h3 class="item-name">
<mat-icon>account_box</mat-icon>
Login
</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'guest-book']">
<h3 class="item-name">Guest Book</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sales']">
<h3 class="item-name">Sales</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'tables']">
<h3 class="item-name">Tables</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sections']">
<h3 class="item-name">Sections</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'menu-categories']">
<h3 class="item-name">Menu Categories</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sale-categories']">
<h3 class="item-name">Sale Categories</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'products']">
<h3 class="item-name">Products</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'modifier-categories']">
<h3 class="item-name">Modifier Categories</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'modifiers']">
<h3 class="item-name">Modifiers</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'taxes']">
<h3 class="item-name">Taxes</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'devices']">
<h3 class="item-name">Devices</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'section-printers']">
<h3 class="item-name">Section Printers</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'printers']">
<h3 class="item-name">Printers</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'roles']">
<h3 class="item-name">Roles</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'users']">
<h3 class="item-name">Users</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'logout']"
*ngIf="user | async as name">
<h3 class="item-name">
<mat-icon>account_box</mat-icon>
Logout {{name}}</h3>
</mat-card>
</div>