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:
5
bookie/src/app/sales/home/sales-home.component.css
Normal file
5
bookie/src/app/sales/home/sales-home.component.css
Normal file
@ -0,0 +1,5 @@
|
||||
.square-button {
|
||||
min-width: 150px;
|
||||
max-width: 150px;
|
||||
min-height: 150px;
|
||||
}
|
||||
5
bookie/src/app/sales/home/sales-home.component.html
Normal file
5
bookie/src/app/sales/home/sales-home.component.html
Normal 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>
|
||||
25
bookie/src/app/sales/home/sales-home.component.spec.ts
Normal file
25
bookie/src/app/sales/home/sales-home.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
25
bookie/src/app/sales/home/sales-home.component.ts
Normal file
25
bookie/src/app/sales/home/sales-home.component.ts
Normal 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user