-
- Name
-
-
+
Role
+
+
+
+
+
+
diff --git a/bookie/src/app/roles/role-detail/role-detail.component.ts b/bookie/src/app/roles/role-detail/role-detail.component.ts
index d69dd6f..0463a3a 100644
--- a/bookie/src/app/roles/role-detail/role-detail.component.ts
+++ b/bookie/src/app/roles/role-detail/role-detail.component.ts
@@ -1,15 +1,13 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialog } from '@angular/material/dialog';
-import { MatDividerModule } from '@angular/material/divider';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { Role } from '../role';
import { RoleService } from '../role.service';
@@ -18,20 +16,12 @@ import { RoleService } from '../role.service';
selector: 'app-role-detail',
templateUrl: './role-detail.component.html',
styleUrls: ['./role-detail.component.css'],
- imports: [
- MatButtonModule,
- MatCardModule,
- MatCheckboxModule,
- MatDividerModule,
- MatFormFieldModule,
- MatInputModule,
- ReactiveFormsModule,
- ],
+ imports: [MatButtonModule, MatCheckboxModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule],
})
export class RoleDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private dialog = inject(MatDialog);
private ser = inject(RoleService);
@@ -83,11 +73,11 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/roles');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -95,11 +85,11 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id as string).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/roles');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/roles/role-list/role-list.component.html b/bookie/src/app/roles/role-list/role-list.component.html
index 614ea33..08e4f9c 100644
--- a/bookie/src/app/roles/role-list/role-list.component.html
+++ b/bookie/src/app/roles/role-list/role-list.component.html
@@ -1,37 +1,31 @@
-
-
-
- Roles
-
- add_box
- Add
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+
+
+
+ Name
+ {{ row.name }}
+
-
-
- Permissions
-
-
- @for (permission of row.permissions; track permission) {
- - {{ permission }}
- }
-
-
-
+
+
+ Permissions
+
+
+ @for (permission of row.permissions; track permission) {
+ - {{ permission }}
+ }
+
+
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/roles/role-list/role-list.component.ts b/bookie/src/app/roles/role-list/role-list.component.ts
index b40a78c..8867819 100644
--- a/bookie/src/app/roles/role-list/role-list.component.ts
+++ b/bookie/src/app/roles/role-list/role-list.component.ts
@@ -1,6 +1,5 @@
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, RouterLink } from '@angular/router';
@@ -12,7 +11,7 @@ import { RoleListDataSource } from './role-list-datasource';
selector: 'app-role-list',
templateUrl: './role-list.component.html',
styleUrls: ['./role-list.component.css'],
- imports: [MatButtonModule, MatCardModule, MatIconModule, MatTableModule, RouterLink],
+ imports: [MatButtonModule, MatIconModule, MatTableModule, RouterLink],
})
export class RoleListComponent implements OnInit {
private route = inject(ActivatedRoute);
diff --git a/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.html b/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.html
index 13498a9..9b0730c 100644
--- a/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.html
+++ b/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.html
@@ -1,71 +1,61 @@
-
-
- Sale Category
-
-
-
-
-
-
- @if (!!item.id) {
-
- }
-
-
-
-
- Products
-
-
-
-
-
- Name
- {{ row.name }}
-
+Sale Category
+
+
+
+
+ @if (!!item.id) {
+
+ }
+
-
-
- Price
- {{ row.price | currency: 'INR' }}
-
+Products
+
+
+
+ Name
+ {{ row.name }}
+
-
-
- Menu Category
- {{ row.menuCategory.name }}
-
+
+
+ Price
+ {{ row.price | currency: 'INR' }}
+
-
-
-
-
-
+
+
+ Menu Category
+ {{ row.menuCategory.name }}
+
+
+
+
+
diff --git a/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.ts b/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.ts
index 0861997..f86fb1a 100644
--- a/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.ts
+++ b/bookie/src/app/sale-category/sale-category-detail/sale-category-detail.component.ts
@@ -2,12 +2,13 @@ import { CurrencyPipe } from '@angular/common';
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatOptionModule } from '@angular/material/core';
import { MatDialog } from '@angular/material/dialog';
+import { MatDividerModule } from '@angular/material/divider';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { round } from 'mathjs';
@@ -16,7 +17,6 @@ import { BehaviorSubject } from 'rxjs';
import { Product } from '../../core/product';
import { SaleCategory } from '../../core/sale-category';
import { Tax } from '../../core/tax';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { SaleCategoryService } from '../sale-category.service';
import { SaleCategoryDetailDatasource } from './sale-category-detail-datasource';
@@ -28,11 +28,12 @@ import { SaleCategoryDetailDatasource } from './sale-category-detail-datasource'
imports: [
CurrencyPipe,
MatButtonModule,
- MatCardModule,
+
MatFormFieldModule,
MatInputModule,
MatOptionModule,
MatSelectModule,
+ MatDividerModule,
MatTableModule,
ReactiveFormsModule,
RouterLink,
@@ -42,7 +43,7 @@ export class SaleCategoryDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(SaleCategoryService);
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
@@ -96,11 +97,11 @@ export class SaleCategoryDetailComponent implements OnInit, AfterViewInit {
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/sale-categories');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -108,11 +109,11 @@ export class SaleCategoryDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id as string).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/sale-categories');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.html b/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.html
index d44a6d3..3692ca7 100644
--- a/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.html
+++ b/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.html
@@ -1,37 +1,31 @@
-
-
-
- Sale Categories
-
- add_box
- Add
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+
+
+
+ Name
+ {{ row.name }}
+
-
-
- Discount Limit
- {{ row.discountLimit | percent: '1.2-2' }}
-
+
+
+ Discount Limit
+ {{ row.discountLimit | percent: '1.2-2' }}
+
-
-
- Tax
- {{ row.tax.rate | percent: '1.2-2' }} {{ row.tax.name }}
-
+
+
+ Tax
+ {{ row.tax.rate | percent: '1.2-2' }} {{ row.tax.name }}
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.ts b/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.ts
index ba5e206..f5c94c8 100644
--- a/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.ts
+++ b/bookie/src/app/sale-category/sale-category-list/sale-category-list.component.ts
@@ -1,14 +1,13 @@
import { PercentPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { BehaviorSubject } from 'rxjs';
import { SaleCategory } from '../../core/sale-category';
-import { ToasterService } from '../../core/toaster.service';
import { SaleCategoryService } from '../sale-category.service';
import { SaleCategoryListDatasource } from './sale-category-list-datasource';
@@ -16,12 +15,12 @@ import { SaleCategoryListDatasource } from './sale-category-list-datasource';
selector: 'app-sale-category-list',
templateUrl: './sale-category-list.component.html',
styleUrls: ['./sale-category-list.component.css'],
- imports: [MatButtonModule, MatCardModule, MatIconModule, MatTableModule, PercentPipe, RouterLink],
+ imports: [MatButtonModule, MatIconModule, MatTableModule, PercentPipe, RouterLink],
})
export class SaleCategoryListComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(SaleCategoryService);
// @ViewChild('table', { static: true }) table?: MatTable
;
diff --git a/bookie/src/app/sale-report/sale-report.component.html b/bookie/src/app/sale-report/sale-report.component.html
index ea76f09..3d79ecb 100644
--- a/bookie/src/app/sale-report/sale-report.component.html
+++ b/bookie/src/app/sale-report/sale-report.component.html
@@ -1,71 +1,66 @@
-
-
-
- Sale Report
-
-
-
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+ Sale Report
+
+
+
+
-
-
- Amount
- {{ row.amount | currency: 'INR' }}
-
-
-
-
-
-
+
+
+
+
+ Name
+ {{ row.name }}
+
+
+
+
+ Amount
+ {{ row.amount | currency: 'INR' }}
+
+
+
+
diff --git a/bookie/src/app/sale-report/sale-report.component.ts b/bookie/src/app/sale-report/sale-report.component.ts
index a46a480..6bc6163 100644
--- a/bookie/src/app/sale-report/sale-report.component.ts
+++ b/bookie/src/app/sale-report/sale-report.component.ts
@@ -2,19 +2,18 @@ import { CurrencyPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatOptionModule } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import moment from 'moment';
import { Section } from '../core/section';
-import { ToasterService } from '../core/toaster.service';
import { ToCsvService } from '../shared/to-csv.service';
import { SaleReport } from './sale-report';
import { SaleReportDatasource } from './sale-report-datasource';
@@ -27,7 +26,7 @@ import { SaleReportService } from './sale-report.service';
imports: [
CurrencyPipe,
MatButtonModule,
- MatCardModule,
+
MatDatepickerModule,
MatFormFieldModule,
MatIconModule,
@@ -42,7 +41,7 @@ export class SaleReportComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private toCsv = inject(ToCsvService);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(SaleReportService);
sections: Section[] = [];
@@ -109,10 +108,10 @@ export class SaleReportComponent implements OnInit {
print() {
this.ser.print(this.info.startDate, this.info.finishDate, this.info.sectionId).subscribe({
next: () => {
- this.toaster.show('', 'Successfully Printed');
+ this.snackBar.open('Successfully Printed', '');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/sales/bill-type/bill-type.component.ts b/bookie/src/app/sales/bill-type/bill-type.component.ts
index 3f2315e..6159629 100644
--- a/bookie/src/app/sales/bill-type/bill-type.component.ts
+++ b/bookie/src/app/sales/bill-type/bill-type.component.ts
@@ -11,7 +11,7 @@ import { VoucherType } from '../bills/voucher-type';
selector: 'app-bill-type',
templateUrl: './bill-type.component.html',
styleUrls: ['./bill-type.component.sass'],
- imports: [CdkScrollableModule, MatButtonModule, MatCardModule, MatDialogModule, MatRippleModule],
+ imports: [CdkScrollableModule, MatButtonModule, MatDialogModule, MatRippleModule, MatCardModule],
})
export class BillTypeComponent {
dialogRef = inject>(MatDialogRef);
diff --git a/bookie/src/app/sales/bill.service.ts b/bookie/src/app/sales/bill.service.ts
index 76d6e21..c408fa5 100644
--- a/bookie/src/app/sales/bill.service.ts
+++ b/bookie/src/app/sales/bill.service.ts
@@ -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;
}
}
diff --git a/bookie/src/app/sales/bills/bills.component.html b/bookie/src/app/sales/bills/bills.component.html
index 1e72892..d880c57 100644
--- a/bookie/src/app/sales/bills/bills.component.html
+++ b/bookie/src/app/sales/bills/bills.component.html
@@ -1,174 +1,165 @@
-
-
- Bill
-
-
-
-
- Bill / KOT number
-
-
- {{ bs.bill.billId }} / K-{{ bs.bill.kotId }}Bill
+
+
+
+ Bill / KOT number
+
+
+ {{ bs.bill.billId }} / K-{{ bs.bill.kotId }}
+
+
+ Time / Start Time / Last Edit Time
+
+
+
+ {{ bs.bill.date }} / {{ bs.bill.creationDate }} / {{ bs.bill.lastEditDate }}
+
+
+ Table / Pax / Customer
+
+
+ /
+ /
+
+
+
+
+
+
+ @if (row.isOldKot) {
+
-
-
- Time / Start Time / Last Edit Time
-
-
-
- {{ bs.bill.date }} / {{ bs.bill.creationDate }} / {{ bs.bill.lastEditDate }}
+ }
+ @if (!row.isKot) {
+
-
-
- Table / Pax / Customer
-
-
- /
- /
-
-
+
+ }
+
+
+
+
+
+
+ {{ row.info }}
+
+
+ @for (m of row.modifiers; track m.id) {
+ - {{ m.name }}
+ }
+
+
+
+
+
+ Quantity
+
+ @if (!row.isKot) {
+
+ }
+ @if (!row.isKot) {
+
+ }
+ @if (!row.isKot) {
+
+ }
+ @if (!row.isKot) {
+
+ }
+ @if (row.isKot) {
+
+ }
+
+
+
+
+
+
+
+
+ Gross
+
+
+ {{
+ bs.grossAmount | async | currency: 'INR'
+ }}
+
-
-
-
- @if (row.isOldKot) {
-
-
- }
- @if (!row.isKot) {
-
-
- }
-
-
-
-
-
-
- {{ row.info }}
-
-
- @for (m of row.modifiers; track m.id) {
- - {{ m.name }}
- }
-
-
-
-
-
- Quantity
-
- @if (!row.isKot) {
-
- }
- @if (!row.isKot) {
-
- }
- @if (!row.isKot) {
-
- }
- @if (!row.isKot) {
-
- }
- @if (row.isKot) {
-
- }
-
-
-
-
-
-
-
-
- Gross
-
-
- {{
- bs.grossAmount | async | currency: 'INR'
- }}
-
+
+
+ Happy Hour Discount
+
+
+ {{
+ bs.hhAmount | async | currency: 'INR'
+ }}
+
-
-
- Happy Hour Discount
-
-
- {{
- bs.hhAmount | async | currency: 'INR'
- }}
-
+
+
+ Discount
+
+
+ {{
+ bs.discountAmount | async | currency: 'INR'
+ }}
+
-
-
- Discount
-
-
- {{
- bs.discountAmount | async | currency: 'INR'
- }}
-
+
+
+ Tax
+
+
+ {{
+ bs.taxAmount | async | currency: 'INR'
+ }}
+
-
-
- Tax
-
-
- {{
- bs.taxAmount | async | currency: 'INR'
- }}
-
+
+
+ Amount
+
+
+ {{
+ bs.amount | async | currency: 'INR'
+ }}
+
+
-
-
- Amount
-
-
- {{
- bs.amount | async | currency: 'INR'
- }}
-
-
-
-
diff --git a/bookie/src/app/sales/bills/bills.component.ts b/bookie/src/app/sales/bills/bills.component.ts
index 4ad9878..8839335 100644
--- a/bookie/src/app/sales/bills/bills.component.ts
+++ b/bookie/src/app/sales/bills/bills.component.ts
@@ -1,10 +1,10 @@
import { AsyncPipe, CurrencyPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialog } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { MatTooltipModule } from '@angular/material/tooltip';
import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
@@ -15,7 +15,6 @@ import { AuthService } from '../../auth/auth.service';
import { BillViewItem } from '../../core/bill-view-item';
import { Customer } from '../../core/customer';
import { Table } from '../../core/table';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { TableService } from '../../tables/table.service';
import { BillService } from '../bill.service';
@@ -38,7 +37,7 @@ import { VoucherType } from './voucher-type';
AsyncPipe,
CurrencyPipe,
MatButtonModule,
- MatCardModule,
+
MatCheckboxModule,
MatIconModule,
MatTableModule,
@@ -50,7 +49,7 @@ export class BillsComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private auth = inject(AuthService);
bs = inject(BillService);
private tSer = inject(TableService);
@@ -273,11 +272,11 @@ export class BillsComponent implements OnInit {
)
.subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (x) => {
- this.toaster.show('Error', x);
+ this.snackBar.open(x, 'Error');
},
});
}
diff --git a/bookie/src/app/sales/home/sales-home.component.html b/bookie/src/app/sales/home/sales-home.component.html
index 89525eb..f624b4e 100644
--- a/bookie/src/app/sales/home/sales-home.component.html
+++ b/bookie/src/app/sales/home/sales-home.component.html
@@ -1,80 +1,76 @@
-
-
-
-
- Add Product
-
-
- Discount
-
-
- Print KOT
-
-
- Print Bill
-
-
- Back to Tables
-
-
- Receive Payment
-
-
- Move Table
-
-
- Cancel Bill
-
-
- Split Bill
-
-
-
-
+
+
+ Add Product
+
+
+ Discount
+
+
+ Print KOT
+
+
+ Print Bill
+
+
+ Back to Tables
+
+
+ Receive Payment
+
+
+ Move Table
+
+
+ Cancel Bill
+
+
+ Split Bill
+
+
diff --git a/bookie/src/app/sales/home/sales-home.component.ts b/bookie/src/app/sales/home/sales-home.component.ts
index 88d3531..0e046ba 100644
--- a/bookie/src/app/sales/home/sales-home.component.ts
+++ b/bookie/src/app/sales/home/sales-home.component.ts
@@ -2,6 +2,7 @@ import { Component, 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, Router, RouterLink } from '@angular/router';
import { Observable, of as observableOf } from 'rxjs';
import { map, switchMap, tap } from 'rxjs/operators';
@@ -9,7 +10,6 @@ import { map, switchMap, tap } from 'rxjs/operators';
import { AuthService } from '../../auth/auth.service';
import { ReceivePaymentItem } from '../../core/receive-payment-item';
import { Table } from '../../core/table';
-import { ToasterService } from '../../core/toaster.service';
import { SaleCategoryService } from '../../sale-category/sale-category.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { TableService } from '../../tables/table.service';
@@ -28,14 +28,14 @@ import { TablesDialogComponent } from '../tables-dialog/tables-dialog.component'
selector: 'app-sales-home',
templateUrl: './sales-home.component.html',
styleUrls: ['./sales-home.component.sass'],
- imports: [MatCardModule, MatRippleModule, RouterLink],
+ imports: [MatRippleModule, RouterLink, MatCardModule],
})
export class SalesHomeComponent {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
private auth = inject(AuthService);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private saleCategoryService = inject(SaleCategoryService);
private tableService = inject(TableService);
private customerDiscountsService = inject(CustomerDiscountsService);
@@ -64,11 +64,11 @@ export class SalesHomeComponent {
}
this.bs.printKot(guestBookId).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (result) => {
- this.toaster.show('Error', result);
+ this.snackBar.open(result, 'Error');
},
});
}
@@ -167,11 +167,11 @@ export class SalesHomeComponent {
)
.subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (result) => {
- this.toaster.show('Error', result);
+ this.snackBar.open(result, 'Error');
},
});
}
@@ -216,11 +216,11 @@ export class SalesHomeComponent {
)
.subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (value) => {
- this.toaster.show('Error', value);
+ this.snackBar.open(value, 'Error');
},
});
}
@@ -259,11 +259,11 @@ export class SalesHomeComponent {
)
.subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (x) => {
- this.toaster.show('Error', x);
+ this.snackBar.open(x, 'Error');
},
});
}
@@ -315,11 +315,11 @@ export class SalesHomeComponent {
)
.subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (x) => {
- this.toaster.show('Error', x);
+ this.snackBar.open(x, 'Error');
},
});
}
@@ -382,11 +382,11 @@ export class SalesHomeComponent {
)
.subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigate(['/sales']);
},
error: (x) => {
- this.toaster.show('Error', x);
+ this.snackBar.open(x, 'Error');
},
});
}
diff --git a/bookie/src/app/sales/menu-categories/menu-categories.component.html b/bookie/src/app/sales/menu-categories/menu-categories.component.html
index c815e73..2f5e075 100644
--- a/bookie/src/app/sales/menu-categories/menu-categories.component.html
+++ b/bookie/src/app/sales/menu-categories/menu-categories.component.html
@@ -1,24 +1,15 @@
-
-
-
-
- Back
-
- @for (item of list; track item) {
-
- {{ item.name }}
-
- }
-
-
-
+
+
+ Back
+
+ @for (item of list; track item) {
+
+ {{ item.name }}
+
+ }
+
diff --git a/bookie/src/app/sales/menu-categories/menu-categories.component.ts b/bookie/src/app/sales/menu-categories/menu-categories.component.ts
index dbc17ed..310d654 100644
--- a/bookie/src/app/sales/menu-categories/menu-categories.component.ts
+++ b/bookie/src/app/sales/menu-categories/menu-categories.component.ts
@@ -9,7 +9,7 @@ import { MenuCategory } from '../../core/menu-category';
selector: 'app-menu-category',
templateUrl: './menu-categories.component.html',
styleUrls: ['./menu-categories.component.sass'],
- imports: [MatCardModule, MatRippleModule, RouterLink],
+ imports: [MatRippleModule, RouterLink, MatCardModule],
})
export class MenuCategoriesComponent implements OnInit {
private route = inject(ActivatedRoute);
diff --git a/bookie/src/app/sales/products/products.component.html b/bookie/src/app/sales/products/products.component.html
index 8d838cf..9b20512 100644
--- a/bookie/src/app/sales/products/products.component.html
+++ b/bookie/src/app/sales/products/products.component.html
@@ -1,27 +1,23 @@
-
-
-
-
- Back
-
- @for (item of list; track item) {
-
- {{ item.name }}
- {{ item.price | currency: 'INR' }}
-
- }
-
-
-
+
+
+ Back
+
+ @for (item of list; track item) {
+
+ {{ item.name }}
+ {{ item.price | currency: 'INR' }}
+
+ }
+
diff --git a/bookie/src/app/sales/products/products.component.ts b/bookie/src/app/sales/products/products.component.ts
index c2511d8..c9a9e85 100644
--- a/bookie/src/app/sales/products/products.component.ts
+++ b/bookie/src/app/sales/products/products.component.ts
@@ -11,7 +11,7 @@ import { BillService } from '../bill.service';
selector: 'app-products',
templateUrl: './products.component.html',
styleUrls: ['./products.component.sass'],
- imports: [CurrencyPipe, MatCardModule, MatRippleModule, RouterLink],
+ imports: [CurrencyPipe, MatRippleModule, RouterLink, MatCardModule],
})
export class ProductsComponent implements OnInit {
private route = inject(ActivatedRoute);
diff --git a/bookie/src/app/sales/running-tables/running-tables.component.html b/bookie/src/app/sales/running-tables/running-tables.component.html
index 923f63b..db5eac0 100644
--- a/bookie/src/app/sales/running-tables/running-tables.component.html
+++ b/bookie/src/app/sales/running-tables/running-tables.component.html
@@ -1,32 +1,27 @@
-
-
- Running Tables
-
-
-
- @for (table of list; track table) {
-
- {{ table.name }}
- {{ table.guest }}
- {{ table.pax ?? '-' }} / {{ table.seats }} / {{ table.section?.name }}
- @if (table.date) {
- {{ table.date }}
- }
- @if (table.amount) {
- {{ table.amount | currency: 'INR' }}
- }
-
+
Running Tables
+
+
+ @for (table of list; track table) {
+
+ {{ table.name }}
+ {{ table.guest }}
+ {{ table.pax ?? '-' }} / {{ table.seats }} / {{ table.section?.name }}
+ @if (table.date) {
+ {{ table.date }}
}
-
- Open Bill
-
-
-
-
+ @if (table.amount) {
+
{{ table.amount | currency: 'INR' }}
+ }
+
+ }
+
+ Open Bill
+
+
diff --git a/bookie/src/app/sales/running-tables/running-tables.component.ts b/bookie/src/app/sales/running-tables/running-tables.component.ts
index 6f489c7..b192167 100644
--- a/bookie/src/app/sales/running-tables/running-tables.component.ts
+++ b/bookie/src/app/sales/running-tables/running-tables.component.ts
@@ -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'),
});
}
}
diff --git a/bookie/src/app/sales/tables-dialog/tables-dialog.component.ts b/bookie/src/app/sales/tables-dialog/tables-dialog.component.ts
index 06545d8..50e56d1 100644
--- a/bookie/src/app/sales/tables-dialog/tables-dialog.component.ts
+++ b/bookie/src/app/sales/tables-dialog/tables-dialog.component.ts
@@ -13,7 +13,7 @@ import { Table } from '../../core/table';
selector: 'app-tables-dialog',
templateUrl: './tables-dialog.component.html',
styleUrls: ['./tables-dialog.component.sass'],
- imports: [CdkScrollableModule, CurrencyPipe, MatButtonModule, MatCardModule, MatDialogModule, MatRippleModule],
+ imports: [CdkScrollableModule, CurrencyPipe, MatButtonModule, MatDialogModule, MatRippleModule, MatCardModule],
})
export class TablesDialogComponent {
dialogRef = inject>(MatDialogRef);
diff --git a/bookie/src/app/section-printers/section-printer.component.html b/bookie/src/app/section-printers/section-printer.component.html
index 2dabdb0..1d792a2 100644
--- a/bookie/src/app/section-printers/section-printer.component.html
+++ b/bookie/src/app/section-printers/section-printer.component.html
@@ -1,69 +1,62 @@
-
-
- Printers for Section
-
-
-
-
-
-
- @if (sectionId) {
-
- }
-
-
+
+
+
+
+
+
+ @if (sectionId) {
+
+ }
+
diff --git a/bookie/src/app/section-printers/section-printer.component.ts b/bookie/src/app/section-printers/section-printer.component.ts
index cf4ae8e..a3aeaf1 100644
--- a/bookie/src/app/section-printers/section-printer.component.ts
+++ b/bookie/src/app/section-printers/section-printer.component.ts
@@ -1,13 +1,13 @@
import { Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatOptionModule } from '@angular/material/core';
import { MatDialog } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectChange, MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import { BehaviorSubject } from 'rxjs';
@@ -16,7 +16,6 @@ import { map } from 'rxjs/operators';
import { Printer } from '../core/printer';
import { Section } from '../core/section';
import { SectionPrinter } from '../core/section-printer';
-import { ToasterService } from '../core/toaster.service';
import { ConfirmDialogComponent } from '../shared/confirm-dialog/confirm-dialog.component';
import { SectionPrinterDataSource } from './section-printer-datasource';
import { SectionPrinterService } from './section-printer.service';
@@ -27,7 +26,7 @@ import { SectionPrinterService } from './section-printer.service';
styleUrls: ['./section-printer.component.css'],
imports: [
MatButtonModule,
- MatCardModule,
+
MatDividerModule,
MatFormFieldModule,
MatInputModule,
@@ -40,7 +39,7 @@ import { SectionPrinterService } from './section-printer.service';
export class SectionPrinterComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private dialog = inject(MatDialog);
private ser = inject(SectionPrinterService);
@@ -114,11 +113,11 @@ export class SectionPrinterComponent implements OnInit {
save() {
this.ser.save(this.sectionId, this.getItem()).subscribe({
next: (result: SectionPrinter[]) => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.showItem(result);
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -126,10 +125,10 @@ export class SectionPrinterComponent implements OnInit {
delete() {
this.ser.delete(this.sectionId).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/sections/section-detail/section-detail.component.html b/bookie/src/app/sections/section-detail/section-detail.component.html
index 4a19a0d..64f0fea 100644
--- a/bookie/src/app/sections/section-detail/section-detail.component.html
+++ b/bookie/src/app/sections/section-detail/section-detail.component.html
@@ -1,21 +1,16 @@
-
-
- Section
-
-
-
-
-
-
- @if (!!item.id) {
-
- }
-
-
+Section
+
+
+
+
+ @if (!!item.id) {
+
+ }
+
diff --git a/bookie/src/app/sections/section-detail/section-detail.component.ts b/bookie/src/app/sections/section-detail/section-detail.component.ts
index b6d6530..45b8366 100644
--- a/bookie/src/app/sections/section-detail/section-detail.component.ts
+++ b/bookie/src/app/sections/section-detail/section-detail.component.ts
@@ -1,14 +1,13 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatDialog } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import { Section } from '../../core/section';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { SectionService } from '../section.service';
@@ -16,13 +15,13 @@ import { SectionService } from '../section.service';
selector: 'app-section-detail',
templateUrl: './section-detail.component.html',
styleUrls: ['./section-detail.component.css'],
- imports: [MatButtonModule, MatCardModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule],
+ imports: [MatButtonModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule],
})
export class SectionDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(SectionService);
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
@@ -64,11 +63,11 @@ export class SectionDetailComponent implements OnInit, AfterViewInit {
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/sections');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -76,11 +75,11 @@ export class SectionDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id as string).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/sections');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/sections/section-list/section-list.component.html b/bookie/src/app/sections/section-list/section-list.component.html
index 2692d0a..6de3c5c 100644
--- a/bookie/src/app/sections/section-list/section-list.component.html
+++ b/bookie/src/app/sections/section-list/section-list.component.html
@@ -1,25 +1,19 @@
-
-
-
- Sections
-
- add_box
- Add
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+
+
+
+ Name
+ {{ row.name }}
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/sections/section-list/section-list.component.ts b/bookie/src/app/sections/section-list/section-list.component.ts
index e3b3eab..d70a497 100644
--- a/bookie/src/app/sections/section-list/section-list.component.ts
+++ b/bookie/src/app/sections/section-list/section-list.component.ts
@@ -1,6 +1,5 @@
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, RouterLink } from '@angular/router';
@@ -12,7 +11,7 @@ import { SectionListDataSource } from './section-list-datasource';
selector: 'app-section-list',
templateUrl: './section-list.component.html',
styleUrls: ['./section-list.component.css'],
- imports: [MatButtonModule, MatCardModule, MatIconModule, MatTableModule, RouterLink],
+ imports: [MatButtonModule, MatIconModule, MatTableModule, RouterLink],
})
export class SectionListComponent implements OnInit {
private route = inject(ActivatedRoute);
diff --git a/bookie/src/app/settings/settings.component.ts b/bookie/src/app/settings/settings.component.ts
index e4d47af..1c19f10 100644
--- a/bookie/src/app/settings/settings.component.ts
+++ b/bookie/src/app/settings/settings.component.ts
@@ -7,13 +7,13 @@ import { MatDialog } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTabsModule } from '@angular/material/tabs';
import { ActivatedRoute, Router } from '@angular/router';
import moment from 'moment';
import { environment } from '../app.environment';
import { AuthService } from '../auth/auth.service';
-import { ToasterService } from '../core/toaster.service';
import { SettingsService } from './settings.service';
@Component({
@@ -29,13 +29,14 @@ import { SettingsService } from './settings.service';
MatSlideToggleModule,
MatTabsModule,
ReactiveFormsModule,
+ MatCardModule,
],
})
export class SettingsComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
auth = inject(AuthService);
private ser = inject(SettingsService);
@@ -87,15 +88,15 @@ export class SettingsComponent implements OnInit {
const finishDate = moment(formModel.finishDate).format('DD-MMM-YYYY');
if (!this.beerFile || !this.saleFile) {
- this.toaster.show('Danger', 'Please choose both files first!');
+ this.snackBar.open('Please choose both files first!', 'Danger');
return;
}
this.ser.runMaintenance(startDate, finishDate, this.beerFile, this.saleFile).subscribe({
next: () => {
- this.toaster.show('Success', 'Maintenance done');
+ this.snackBar.open('Maintenance done', 'Success');
},
error: (error) => {
- this.toaster.show('Danger', error);
+ this.snackBar.open(error, 'Danger');
},
});
}
diff --git a/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.html b/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.html
index 1b227c6..51a1d74 100644
--- a/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.html
+++ b/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.html
@@ -1,44 +1,39 @@
-
-
- Settle Option
-
-
-
-
-
-
- @if (!!item.id) {
-
- }
-
-
+Settle Option
+
+
+
+
+ @if (!!item.id) {
+
+ }
+
diff --git a/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.ts b/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.ts
index 5731a2f..a715355 100644
--- a/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.ts
+++ b/bookie/src/app/settle-option/settle-option-detail/settle-option-detail.component.ts
@@ -1,18 +1,17 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatOptionModule } from '@angular/material/core';
import { MatDialog } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import { ReportingLevel } from '../../core/reporting-level';
import { SettleOption } from '../../core/settle-option';
-import { ToasterService } from '../../core/toaster.service';
import { VoucherType } from '../../sales/bills/voucher-type';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { SettleOptionService } from '../settle-option.service';
@@ -23,7 +22,7 @@ import { SettleOptionService } from '../settle-option.service';
styleUrls: ['./settle-option-detail.component.css'],
imports: [
MatButtonModule,
- MatCardModule,
+
MatCheckboxModule,
MatFormFieldModule,
MatInputModule,
@@ -36,7 +35,7 @@ export class SettleOptionDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(SettleOptionService);
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
@@ -95,11 +94,11 @@ export class SettleOptionDetailComponent implements OnInit, AfterViewInit {
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/settle-options');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -107,11 +106,11 @@ export class SettleOptionDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/settle-options');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.html b/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.html
index 169e182..5af9852 100644
--- a/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.html
+++ b/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.html
@@ -1,49 +1,43 @@
-
-
-
- Settle Options
-
- add_box
- Add
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+
+
+
+ Name
+ {{ row.name }}
+
-
-
- Voucher Type
- {{ voucherType(row.voucherType) }}
-
+
+
+ Voucher Type
+ {{ voucherType(row.voucherType) }}
+
-
-
- Reporting Level
- {{ reportingLevel(row.reportingLevel) }}
-
+
+
+ Reporting Level
+ {{ reportingLevel(row.reportingLevel) }}
+
-
-
- Has Reason?
- {{ row.hasReason }}
-
+
+
+ Has Reason?
+ {{ row.hasReason }}
+
-
-
- Fixture?
- {{ row.isFixture }}
-
+
+
+ Fixture?
+ {{ row.isFixture }}
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.ts b/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.ts
index abf33c7..a400d53 100644
--- a/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.ts
+++ b/bookie/src/app/settle-option/settle-option-list/settle-option-list.component.ts
@@ -1,7 +1,7 @@
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { BehaviorSubject } from 'rxjs';
@@ -9,7 +9,6 @@ import { map } from 'rxjs/operators';
import { ReportingLevel } from '../../core/reporting-level';
import { SettleOption } from '../../core/settle-option';
-import { ToasterService } from '../../core/toaster.service';
import { VoucherType } from '../../sales/bills/voucher-type';
import { SettleOptionService } from '../settle-option.service';
import { SettleOptionListDatasource } from './settle-option-list-datasource';
@@ -18,12 +17,12 @@ import { SettleOptionListDatasource } from './settle-option-list-datasource';
selector: 'app-settle-option-list',
templateUrl: './settle-option-list.component.html',
styleUrls: ['./settle-option-list.component.css'],
- imports: [MatButtonModule, MatCardModule, MatIconModule, MatTableModule, RouterLink],
+ imports: [MatButtonModule, MatIconModule, MatTableModule, RouterLink],
})
export class SettleOptionListComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(SettleOptionService);
// @ViewChild('table', { static: true }) table?: MatTable;
diff --git a/bookie/src/app/tables/table-detail/table-detail.component.html b/bookie/src/app/tables/table-detail/table-detail.component.html
index 9d5d98a..daf342b 100644
--- a/bookie/src/app/tables/table-detail/table-detail.component.html
+++ b/bookie/src/app/tables/table-detail/table-detail.component.html
@@ -1,42 +1,37 @@
-
-
- Table
-
-
-
-
-
-
- @if (!!item.id) {
-
- }
-
-
+Table
+
+
+
+
+ @if (!!item.id) {
+
+ }
+
diff --git a/bookie/src/app/tables/table-detail/table-detail.component.ts b/bookie/src/app/tables/table-detail/table-detail.component.ts
index 3e89502..f1d986c 100644
--- a/bookie/src/app/tables/table-detail/table-detail.component.ts
+++ b/bookie/src/app/tables/table-detail/table-detail.component.ts
@@ -1,18 +1,17 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatOptionModule } from '@angular/material/core';
import { MatDialog } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import { Section } from '../../core/section';
import { Table } from '../../core/table';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { TableService } from '../table.service';
@@ -22,7 +21,7 @@ import { TableService } from '../table.service';
styleUrls: ['./table-detail.component.css'],
imports: [
MatButtonModule,
- MatCardModule,
+
MatCheckboxModule,
MatFormFieldModule,
MatInputModule,
@@ -35,7 +34,7 @@ export class TableDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(TableService);
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
@@ -88,11 +87,11 @@ export class TableDetailComponent implements OnInit, AfterViewInit {
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/tables');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -100,11 +99,11 @@ export class TableDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id as string).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/tables');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/tables/table-list/table-list.component.html b/bookie/src/app/tables/table-list/table-list.component.html
index a860334..77d133e 100644
--- a/bookie/src/app/tables/table-list/table-list.component.html
+++ b/bookie/src/app/tables/table-list/table-list.component.html
@@ -1,51 +1,46 @@
-
-
-
- Tables
-
-
- add_box
- Add
-
-
-
-
-
+ Tables
+
+
+ add_box
+ Add
+
+
+
+
+
+
+ Name
+ {{ row.name }}
-
-
- Name
- {{ row.name }}
-
+
-
-
- Seats
- {{ row.seats }}
-
+
+
+ Seats
+ {{ row.seats }}
+
-
-
- Section
- {{ row.section.name }}
-
+
+
+ Section
+ {{ row.section.name }}
+
-
-
- Is Active?
- {{ row.isActive }}
-
+
+
+ Is Active?
+ {{ row.isActive }}
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/tables/table-list/table-list.component.css b/bookie/src/app/tables/table-list/table-list.component.sass
similarity index 100%
rename from bookie/src/app/tables/table-list/table-list.component.css
rename to bookie/src/app/tables/table-list/table-list.component.sass
diff --git a/bookie/src/app/tables/table-list/table-list.component.ts b/bookie/src/app/tables/table-list/table-list.component.ts
index 83a63a7..2cd8a11 100644
--- a/bookie/src/app/tables/table-list/table-list.component.ts
+++ b/bookie/src/app/tables/table-list/table-list.component.ts
@@ -1,27 +1,27 @@
import { CdkDragDrop, moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
+import { MatToolbarModule } from '@angular/material/toolbar';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { BehaviorSubject } from 'rxjs';
import { Table } from '../../core/table';
-import { ToasterService } from '../../core/toaster.service';
import { TableService } from '../table.service';
import { TableListDataSource } from './table-list-datasource';
@Component({
selector: 'app-table-list',
templateUrl: './table-list.component.html',
- styleUrls: ['./table-list.component.css'],
- imports: [DragDropModule, MatButtonModule, MatCardModule, MatIconModule, MatTableModule, RouterLink],
+ styleUrls: ['./table-list.component.sass'],
+ imports: [DragDropModule, MatButtonModule, MatIconModule, MatTableModule, RouterLink, MatToolbarModule],
})
export class TableListComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(TableService);
// @ViewChild('table', { static: true }) table?: MatTable;
@@ -48,10 +48,10 @@ export class TableListComponent implements OnInit {
updateSortOrder() {
this.ser.updateSortOrder(this.list).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/tax-report/tax-report.component.html b/bookie/src/app/tax-report/tax-report.component.html
index d563ec7..5b57794 100644
--- a/bookie/src/app/tax-report/tax-report.component.html
+++ b/bookie/src/app/tax-report/tax-report.component.html
@@ -1,69 +1,64 @@
-
-
-
- Tax Report
-
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+ Tax Report
+
+
-
-
- Rate
- {{ row.taxRate | percent: '1.2-2' }}
-
+
+
+
+
+ Name
+ {{ row.name }}
+
-
-
- Sale
- {{ row.saleAmount | currency: 'INR' }}
-
+
+
+ Rate
+ {{ row.taxRate | percent: '1.2-2' }}
+
-
-
- Tax
- {{ row.amount | currency: 'INR' }}
-
+
+
+ Sale
+ {{ row.saleAmount | currency: 'INR' }}
+
-
-
-
-
-
+
+
+ Tax
+ {{ row.amount | currency: 'INR' }}
+
+
+
+
+
diff --git a/bookie/src/app/tax-report/tax-report.component.ts b/bookie/src/app/tax-report/tax-report.component.ts
index 359baf4..4475288 100644
--- a/bookie/src/app/tax-report/tax-report.component.ts
+++ b/bookie/src/app/tax-report/tax-report.component.ts
@@ -2,7 +2,6 @@ import { PercentPipe, CurrencyPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
@@ -22,7 +21,7 @@ import { TaxReportDatasource } from './tax-report-datasource';
imports: [
CurrencyPipe,
MatButtonModule,
- MatCardModule,
+
MatDatepickerModule,
MatFormFieldModule,
MatIconModule,
diff --git a/bookie/src/app/taxes/tax-detail/tax-detail.component.html b/bookie/src/app/taxes/tax-detail/tax-detail.component.html
index cb577f5..922f8b8 100644
--- a/bookie/src/app/taxes/tax-detail/tax-detail.component.html
+++ b/bookie/src/app/taxes/tax-detail/tax-detail.component.html
@@ -1,41 +1,36 @@
-
-
- Tax
-
-
-
-
-
-
- @if (!!item.id) {
-
- }
-
-
+Tax
+
+
+
+
+ @if (!!item.id) {
+
+ }
+
diff --git a/bookie/src/app/taxes/tax-detail/tax-detail.component.ts b/bookie/src/app/taxes/tax-detail/tax-detail.component.ts
index 5594032..f9096dd 100644
--- a/bookie/src/app/taxes/tax-detail/tax-detail.component.ts
+++ b/bookie/src/app/taxes/tax-detail/tax-detail.component.ts
@@ -1,18 +1,17 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatOptionModule } from '@angular/material/core';
import { MatDialog } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import { round } from 'mathjs';
import { Regime } from 'src/app/core/regime';
import { Tax } from '../../core/tax';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { TaxService } from '../tax.service';
@@ -20,21 +19,13 @@ import { TaxService } from '../tax.service';
selector: 'app-tax-detail',
templateUrl: './tax-detail.component.html',
styleUrls: ['./tax-detail.component.css'],
- imports: [
- MatButtonModule,
- MatCardModule,
- MatFormFieldModule,
- MatInputModule,
- MatOptionModule,
- MatSelectModule,
- ReactiveFormsModule,
- ],
+ imports: [MatButtonModule, MatFormFieldModule, MatInputModule, MatOptionModule, MatSelectModule, ReactiveFormsModule],
})
export class TaxDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(TaxService);
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
@@ -84,11 +75,11 @@ export class TaxDetailComponent implements OnInit, AfterViewInit {
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/taxes');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -96,11 +87,11 @@ export class TaxDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id as string).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/taxes');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/taxes/tax-list/tax-list.component.html b/bookie/src/app/taxes/tax-list/tax-list.component.html
index 1855d4f..745dfc6 100644
--- a/bookie/src/app/taxes/tax-list/tax-list.component.html
+++ b/bookie/src/app/taxes/tax-list/tax-list.component.html
@@ -1,43 +1,37 @@
-
-
-
- Taxes
-
- add_box
- Add
-
-
-
-
-
-
-
- Name
- {{ row.name }}
-
+
+
+
+
+ Name
+ {{ row.name }}
+
-
-
- Rate
- {{ row.rate | percent: '1.2-2' }}
-
+
+
+ Rate
+ {{ row.rate | percent: '1.2-2' }}
+
-
-
- Regime
- {{ row.regime.name }}
-
+
+
+ Regime
+ {{ row.regime.name }}
+
-
-
- Is Fixture?
- {{ row.isFixture }}
-
+
+
+ Is Fixture?
+ {{ row.isFixture }}
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/taxes/tax-list/tax-list.component.ts b/bookie/src/app/taxes/tax-list/tax-list.component.ts
index 30d3704..6a2adf3 100644
--- a/bookie/src/app/taxes/tax-list/tax-list.component.ts
+++ b/bookie/src/app/taxes/tax-list/tax-list.component.ts
@@ -1,7 +1,6 @@
import { PercentPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, RouterLink } from '@angular/router';
@@ -13,7 +12,7 @@ import { TaxListDataSource } from './tax-list-datasource';
selector: 'app-tax-list',
templateUrl: './tax-list.component.html',
styleUrls: ['./tax-list.component.css'],
- imports: [MatButtonModule, MatCardModule, MatIconModule, MatTableModule, PercentPipe, RouterLink],
+ imports: [MatButtonModule, MatIconModule, MatTableModule, PercentPipe, RouterLink],
})
export class TaxListComponent implements OnInit {
private route = inject(ActivatedRoute);
diff --git a/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.html b/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.html
index c14c243..4b8f110 100644
--- a/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.html
+++ b/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.html
@@ -1,79 +1,74 @@
-
-
- Product
-
-
-
-
-
-
-
-
-
+Product
+
+
+
+
+
+
diff --git a/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.ts b/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.ts
index 5d6d4ec..afd8ca7 100644
--- a/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.ts
+++ b/bookie/src/app/temporal-product/temporal-product-detail/temporal-product-detail.component.ts
@@ -1,7 +1,6 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatOptionModule } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
@@ -9,13 +8,13 @@ import { MatDialog } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import moment from 'moment';
import { MenuCategory } from '../../core/menu-category';
import { Product } from '../../core/product';
import { SaleCategory } from '../../core/sale-category';
-import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { TemporalProductService } from '../temporal-product.service';
@@ -25,12 +24,13 @@ import { TemporalProductService } from '../temporal-product.service';
styleUrls: ['./temporal-product-detail.component.css'],
imports: [
MatButtonModule,
- MatCardModule,
+
MatCheckboxModule,
MatDatepickerModule,
MatFormFieldModule,
MatInputModule,
MatOptionModule,
+
MatSelectModule,
ReactiveFormsModule,
],
@@ -39,7 +39,7 @@ export class TemporalProductDetailComponent implements OnInit, AfterViewInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(TemporalProductService);
@ViewChild('name', { static: true }) nameElement?: ElementRef;
@@ -119,11 +119,11 @@ export class TemporalProductDetailComponent implements OnInit, AfterViewInit {
update() {
this.ser.update(this.getItem()).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/temporal-products');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
@@ -131,11 +131,11 @@ export class TemporalProductDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.versionId as string).subscribe({
next: () => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.router.navigateByUrl('/temporal-products');
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.html b/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.html
index be17234..b46b310 100644
--- a/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.html
+++ b/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.html
@@ -1,105 +1,101 @@
-
-
- Temporal Products
-
-
-
-
-
-
- Name
-
-
-
-
+
+ Temporal Products
+
+
+
+
+
+ Name
+
+
+
+
-
-
- Price
- {{ row.price | currency: 'INR' }}
-
+
+
+ Price
+ {{ row.price | currency: 'INR' }}
+
-
-
- Menu Category
- {{ row.menuCategory.name }}
-
+
+
+ Menu Category
+ {{ row.menuCategory.name }}
+
-
-
- Sale Category
- {{ row.saleCategory.name }}
-
+
+
+ Sale Category
+ {{ row.saleCategory.name }}
+
-
-
- Details
-
-
- -
- Valid From: {{ row.validFrom ?? '∞' }} linear_scale
- Till: {{ row.validTill ?? '∞' }}
-
- -
-
- {{ row.hasHappyHour ? 'sentiment_satisfied_alt' : 'sentiment_dissatisfied' }}
-
- {{ row.hasHappyHour ? 'Has Happy Hours' : 'No Happy Hours' }}
-
- -
-
- {{ row.isNotAvailable ? 'pause' : 'play_arrow' }}
-
- {{ row.isNotAvailable ? 'Is not Available' : 'Is Available' }}
-
-
-
-
+
+
+ Details
+
+
+ -
+ Valid From: {{ row.validFrom ?? '∞' }} linear_scale
+ Till: {{ row.validTill ?? '∞' }}
+
+ -
+
+ {{ row.hasHappyHour ? 'sentiment_satisfied_alt' : 'sentiment_dissatisfied' }}
+
+ {{ row.hasHappyHour ? 'Has Happy Hours' : 'No Happy Hours' }}
+
+ -
+
+ {{ row.isNotAvailable ? 'pause' : 'play_arrow' }}
+
+ {{ row.isNotAvailable ? 'Is not Available' : 'Is Available' }}
+
+
+
+
-
-
- Quantity
- {{ row.quantity | number: '1.2-2' }}
-
+
+
+ Quantity
+ {{ row.quantity | number: '1.2-2' }}
+
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.ts b/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.ts
index 3a03eb2..1fd31b4 100644
--- a/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.ts
+++ b/bookie/src/app/temporal-product/temporal-product-list/temporal-product-list.component.ts
@@ -1,7 +1,6 @@
import { DecimalPipe, CurrencyPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
-import { MatCardModule } from '@angular/material/card';
import { MatOptionModule } from '@angular/material/core';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
@@ -24,7 +23,7 @@ import { TemporalProductListDatasource } from './temporal-product-list-datasourc
imports: [
CurrencyPipe,
DecimalPipe,
- MatCardModule,
+
MatFormFieldModule,
MatIconModule,
MatInputModule,
diff --git a/bookie/src/app/update-product-prices/update-product-prices.component.html b/bookie/src/app/update-product-prices/update-product-prices.component.html
index 79ab870..b937e82 100644
--- a/bookie/src/app/update-product-prices/update-product-prices.component.html
+++ b/bookie/src/app/update-product-prices/update-product-prices.component.html
@@ -1,64 +1,60 @@
-
-
-
- Product Update Report
-
-
-
-
-
-
-
- New Price
-
-
- New Price
-
- ₹
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/bookie/src/app/update-product-prices/update-product-prices.component.ts b/bookie/src/app/update-product-prices/update-product-prices.component.ts
index cb13594..f859fd9 100644
--- a/bookie/src/app/update-product-prices/update-product-prices.component.ts
+++ b/bookie/src/app/update-product-prices/update-product-prices.component.ts
@@ -2,20 +2,19 @@ import { CurrencyPipe } from '@angular/common';
import { Component, OnInit, inject } from '@angular/core';
import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
import { MatOptionModule } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
+import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import moment from 'moment';
import { map } from 'rxjs/operators';
import { MenuCategory } from '../core/menu-category';
-import { ToasterService } from '../core/toaster.service';
import { ToCsvService } from '../shared/to-csv.service';
import { UpdateProductPrices } from './update-product-prices';
import { UpdateProductPricesDataSource } from './update-product-prices-datasource';
@@ -28,7 +27,7 @@ import { UpdateProductPricesService } from './update-product-prices.service';
imports: [
CurrencyPipe,
MatButtonModule,
- MatCardModule,
+
MatDatepickerModule,
MatFormFieldModule,
MatIconModule,
@@ -43,7 +42,7 @@ export class UpdateProductPricesComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private toCsv = inject(ToCsvService);
- private toaster = inject(ToasterService);
+ private snackBar = inject(MatSnackBar);
private ser = inject(UpdateProductPricesService);
info: UpdateProductPrices = new UpdateProductPrices();
@@ -152,11 +151,11 @@ export class UpdateProductPricesComponent implements OnInit {
save() {
this.ser.save(this.getInfo()).subscribe({
next: (result: UpdateProductPrices) => {
- this.toaster.show('Success', '');
+ this.snackBar.open('', 'Success');
this.loadData(result);
},
error: (error) => {
- this.toaster.show('Error', error);
+ this.snackBar.open(error, 'Error');
},
});
}
diff --git a/bookie/src/app/users/user-detail/user-detail.component.html b/bookie/src/app/users/user-detail/user-detail.component.html
index 7445d09..6cab616 100644
--- a/bookie/src/app/users/user-detail/user-detail.component.html
+++ b/bookie/src/app/users/user-detail/user-detail.component.html
@@ -1,37 +1,32 @@
-
-
- User
-
-
-