No automatic signout
Voucher basic working running tables shifted to cards from buttons, this gives us immense styling oportunities
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user