No automatic signout

Voucher basic working
running tables shifted to cards from buttons, this gives us immense styling oportunities
This commit is contained in:
Amritanshu
2019-07-12 12:36:38 +05:30
parent 4513e8b263
commit bcad4cdae3
31 changed files with 1085 additions and 713 deletions

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { Table } from '../../core/table';
@Component({
@ -10,7 +10,7 @@ import { Table } from '../../core/table';
export class RunningTablesComponent implements OnInit {
list: Table[];
constructor(private route: ActivatedRoute) {
constructor(private router: Router, private route: ActivatedRoute) {
}
ngOnInit() {
@ -19,4 +19,17 @@ export class RunningTablesComponent implements OnInit {
this.list = data.list;
});
}
navigateToBill(table: Table): void {
let qp = {table: table.id};
if (table.voucherId) {
qp["voucher"] = table.voucherId;
}
let navigationExtras: NavigationExtras = {
queryParams: qp,
queryParamsHandling: 'merge',
preserveFragment: true
};
this.router.navigate(['/sales', 'bill'], navigationExtras);
}
}