Fix: Bill Deactivate guard was running when printing kots / bills when items were added to new kot.
This commit is contained in:
@ -14,7 +14,7 @@ import { BillsComponent } from './bills/bills.component';
|
||||
export class CanDeactivateBillGuard implements CanDeactivate<BillsComponent> {
|
||||
constructor(private dialog: MatDialog) {}
|
||||
canDeactivate(component: BillsComponent): Observable<boolean> | boolean {
|
||||
if (!component.bs.isDirty()) {
|
||||
if (component.bs.canDeactivate()) {
|
||||
return observableOf(true);
|
||||
}
|
||||
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
|
||||
|
||||
Reference in New Issue
Block a user