Save Bill Works
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Subject} from 'rxjs';
|
||||
import {AuthService} from '../../auth/auth.service';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { AuthService } from '../../auth/auth.service';
|
||||
import { BillService } from '../bill.service';
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
|
||||
@Component({
|
||||
selector: 'app-sales-home',
|
||||
@ -10,7 +12,7 @@ import {AuthService} from '../../auth/auth.service';
|
||||
export class SalesHomeComponent implements OnInit {
|
||||
public nameObject = new Subject<string>();
|
||||
|
||||
constructor(private auth: AuthService) {
|
||||
constructor(private route: ActivatedRoute, private auth: AuthService, private bs: BillService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@ -22,4 +24,16 @@ export class SalesHomeComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
printKot() {
|
||||
let guestBookId = null;
|
||||
if (this.route.snapshot.queryParamMap.has("guest")) {
|
||||
guestBookId = this.route.snapshot.queryParamMap.get("guest");
|
||||
}
|
||||
this.bs.printKot(guestBookId);
|
||||
}
|
||||
|
||||
printBill() {
|
||||
this.bs.printBill();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user