Chore: Removed Mat Card from everywhere.

Chore: Removed the Toaster Service.
Chore: Updated to Material Theme 3
This commit is contained in:
2025-07-11 11:30:35 +00:00
parent 5c1c474e93
commit 88a1572747
117 changed files with 2895 additions and 3236 deletions

View File

@ -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;
}
}