Blacked and isorted the python files

Prettied and eslinted the typescript/html files
This commit is contained in:
2020-10-11 10:56:29 +05:30
parent b31db593c2
commit d677cfb1ea
505 changed files with 7560 additions and 5650 deletions

View File

@ -14,4 +14,3 @@
.center {
text-align: center;
}

View File

@ -1,68 +1,200 @@
<div fxLayout="row wrap" fxLayoutGap="grid 20px">
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('guest-book') !== -1" [routerLink]="['/', 'guest-book']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('guest-book') !== -1"
[routerLink]="['/', 'guest-book']"
>
<h3 class="item-name">Guest Book</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('sales') !== -1" [routerLink]="['/', 'sales']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('sales') !== -1"
[routerLink]="['/', 'sales']"
>
<h3 class="item-name">Sales</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('cashier-report') !== -1" [routerLink]="['/', 'cashier-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('cashier-report') !== -1"
[routerLink]="['/', 'cashier-report']"
>
<h3 class="item-name">Cashier Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('sale-report') !== -1" [routerLink]="['/', 'sale-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('sale-report') !== -1"
[routerLink]="['/', 'sale-report']"
>
<h3 class="item-name">Sale Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('tax-report') !== -1" [routerLink]="['/', 'tax-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('tax-report') !== -1"
[routerLink]="['/', 'tax-report']"
>
<h3 class="item-name">Tax Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('product-sale-report') !== -1" [routerLink]="['/', 'product-sale-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('product-sale-report') !== -1"
[routerLink]="['/', 'product-sale-report']"
>
<h3 class="item-name">Product Sale Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('bill-settlement-report') !== -1" [routerLink]="['/', 'bill-settlement-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('bill-settlement-report') !== -1"
[routerLink]="['/', 'bill-settlement-report']"
>
<h3 class="item-name">Bill Settlement Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('beer-consumption-report') !== -1" [routerLink]="['/', 'beer-consumption-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('beer-consumption-report') !== -1"
[routerLink]="['/', 'beer-consumption-report']"
>
<h3 class="item-name">Beer Consumption Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('discount-report') !== -1" [routerLink]="['/', 'discount-report']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('discount-report') !== -1"
[routerLink]="['/', 'discount-report']"
>
<h3 class="item-name">Discount Report</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('tables') !== -1" [routerLink]="['/', 'tables']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('tables') !== -1"
[routerLink]="['/', 'tables']"
>
<h3 class="item-name">Tables</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('sections') !== -1" [routerLink]="['/', 'sections']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('sections') !== -1"
[routerLink]="['/', 'sections']"
>
<h3 class="item-name">Sections</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('products') !== -1" [routerLink]="['/', 'menu-categories']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('products') !== -1"
[routerLink]="['/', 'menu-categories']"
>
<h3 class="item-name">Menu Categories</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('products') !== -1" [routerLink]="['/', 'sale-categories']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('products') !== -1"
[routerLink]="['/', 'sale-categories']"
>
<h3 class="item-name">Sale Categories</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('products') !== -1" [routerLink]="['/', 'products']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('products') !== -1"
[routerLink]="['/', 'products']"
>
<h3 class="item-name">Products</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('modifiers') !== -1" [routerLink]="['/', 'modifier-categories']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('modifiers') !== -1"
[routerLink]="['/', 'modifier-categories']"
>
<h3 class="item-name">Modifier Categories</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('modifiers') !== -1" [routerLink]="['/', 'modifiers']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('modifiers') !== -1"
[routerLink]="['/', 'modifiers']"
>
<h3 class="item-name">Modifiers</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('taxes') !== -1" [routerLink]="['/', 'taxes']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('taxes') !== -1"
[routerLink]="['/', 'taxes']"
>
<h3 class="item-name">Taxes</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('devices') !== -1" [routerLink]="['/', 'devices']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('devices') !== -1"
[routerLink]="['/', 'devices']"
>
<h3 class="item-name">Devices</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('section-printers') !== -1" [routerLink]="['/', 'section-printers']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('section-printers') !== -1"
[routerLink]="['/', 'section-printers']"
>
<h3 class="item-name">Section Printers</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('printers') !== -1" [routerLink]="['/', 'printers']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('printers') !== -1"
[routerLink]="['/', 'printers']"
>
<h3 class="item-name">Printers</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('users') !== -1" [routerLink]="['/', 'roles']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('users') !== -1"
[routerLink]="['/', 'roles']"
>
<h3 class="item-name">Roles</h3>
</mat-card>
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.user && auth.user.perms.indexOf('users') !== -1" [routerLink]="['/', 'users']">
<mat-card
fxLayout="column"
class="square-button"
matRipple
*ngIf="auth.user && auth.user.perms.indexOf('users') !== -1"
[routerLink]="['/', 'users']"
>
<h3 class="item-name">Users</h3>
</mat-card>
</div>

View File

@ -1,6 +1,6 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {HomeComponent} from './home.component';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
@ -8,9 +8,8 @@ describe('HomeComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [HomeComponent]
})
.compileComponents();
declarations: [HomeComponent],
}).compileComponents();
}));
beforeEach(() => {

View File

@ -1,16 +1,12 @@
import { Component, OnInit} from '@angular/core';
import { AuthService} from '../auth/auth.service';
import { Component } from '@angular/core';
import { AuthService } from '../auth/auth.service';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
styleUrls: ['./home.component.css'],
})
export class HomeComponent implements OnInit {
constructor(public auth: AuthService) {
}
ngOnInit() {
}
export class HomeComponent {
constructor(public auth: AuthService) {}
}