Bills initially working just as proof of concept

ng linted
modifier categories list is better at displaying data sanely now
This commit is contained in:
Amritanshu
2019-07-11 12:17:41 +05:30
parent d69ab0063a
commit 4513e8b263
74 changed files with 599 additions and 235 deletions

View File

@ -0,0 +1,5 @@
.square-button {
min-width: 150px;
max-width: 150px;
min-height: 150px;
}

View File

@ -0,0 +1,5 @@
<button mat-raised-button class="square-button" [routerLink]="['menu-categories']">Add Product</button>
<button mat-raised-button class="square-button" [routerLink]="['menu-categories']">Print KOT</button>
<button mat-raised-button class="square-button" [routerLink]="['menu-categories']">Print Bill</button>
<button mat-raised-button class="square-button" [routerLink]="['menu-categories']">Back to Tables</button>
<button mat-raised-button class="square-button" [routerLink]="['menu-categories']">Receive Payment</button>

View File

@ -0,0 +1,25 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {SalesHomeComponent} from './sales-home.component';
describe('SalesHomeComponent', () => {
let component: SalesHomeComponent;
let fixture: ComponentFixture<SalesHomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [SalesHomeComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SalesHomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,25 @@
import {Component, OnInit} from '@angular/core';
import {Subject} from 'rxjs';
import {AuthService} from '../../auth/auth.service';
@Component({
selector: 'app-sales-home',
templateUrl: './sales-home.component.html',
styleUrls: ['./sales-home.component.css']
})
export class SalesHomeComponent implements OnInit {
public nameObject = new Subject<string>();
constructor(private auth: AuthService) {
}
ngOnInit() {
this.auth.userObservable.subscribe((user) => {
if (user.isAuthenticated) {
this.nameObject.next(user.name);
} else {
this.nameObject.next(null);
}
});
}
}