Chore: Removed Mat Card from everywhere.
Chore: Removed the Toaster Service. Chore: Updated to Material Theme 3
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { BehaviorSubject, throwError, Observable } from 'rxjs';
|
||||
import { tap } from 'rxjs/operators';
|
||||
|
||||
@ -10,7 +11,6 @@ import { Product } from '../core/product';
|
||||
import { ReceivePaymentItem } from '../core/receive-payment-item';
|
||||
import { SaleCategory } from '../core/sale-category';
|
||||
import { Table } from '../core/table';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
import { ModifierCategoryService } from '../modifier-categories/modifier-category.service';
|
||||
import { MathService } from '../shared/math.service';
|
||||
import { Bill } from './bills/bill';
|
||||
@ -25,7 +25,7 @@ import { ModifiersComponent } from './modifiers/modifiers.component';
|
||||
})
|
||||
export class BillService {
|
||||
private dialog = inject(MatDialog);
|
||||
private toaster = inject(ToasterService);
|
||||
private snackBar = inject(MatSnackBar);
|
||||
private math = inject(MathService);
|
||||
private ser = inject(VoucherService);
|
||||
private modifierCategoryService = inject(ModifierCategoryService);
|
||||
@ -118,7 +118,7 @@ export class BillService {
|
||||
if (quantity < 0) {
|
||||
const minimum = this.minimum(product.id as string, product.hasHappyHour) + quantity;
|
||||
if (minimum + quantity < 0) {
|
||||
this.toaster.show('Error', 'Total quantity cannot be negative!');
|
||||
this.snackBar.open('Total quantity cannot be negative!', 'Error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user