Chore: Removed Mat Card from everywhere.
Chore: Removed the Toaster Service. Chore: Updated to Material Theme 3
This commit is contained in:
@@ -3,25 +3,25 @@ import { Component, OnInit, inject } from '@angular/core';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatRippleModule } from '@angular/material/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { Regime } from 'src/app/core/regime';
|
||||
|
||||
import { Table } from '../../core/table';
|
||||
import { ToasterService } from '../../core/toaster.service';
|
||||
import { BillNumberComponent } from '../bill-number/bill-number.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-running-tables',
|
||||
templateUrl: './running-tables.component.html',
|
||||
styleUrls: ['./running-tables.component.sass'],
|
||||
imports: [CurrencyPipe, MatCardModule, MatRippleModule],
|
||||
imports: [CurrencyPipe, MatRippleModule, MatCardModule],
|
||||
})
|
||||
export class RunningTablesComponent implements OnInit {
|
||||
private dialog = inject(MatDialog);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
private toaster = inject(ToasterService);
|
||||
private snackBar = inject(MatSnackBar);
|
||||
|
||||
regimes: Regime[] = [];
|
||||
list: Table[] = [];
|
||||
@@ -61,7 +61,7 @@ export class RunningTablesComponent implements OnInit {
|
||||
)
|
||||
.subscribe({
|
||||
next: (x) => this.router.navigate(['/sales', 'bill'], { queryParams: { bill: x } }),
|
||||
error: (x) => this.toaster.show('Error', x),
|
||||
error: (x) => this.snackBar.open(x, 'Error'),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user