Product Group renamed to Menu Category

Extracted Product Group -> Group_type to a a new object called Sale Category.
Moved tax from product to Sale Category for uniform taxes on types of sales.
This commit is contained in:
Amritanshu
2019-06-20 13:15:23 +05:30
parent 16455fdcac
commit 05f8058a15
74 changed files with 1400 additions and 646 deletions

View File

@ -3,7 +3,7 @@ import { TableListDataSource } from './table-list-datasource';
import { Table } from '../../core/table';
import { ActivatedRoute, Router } from '@angular/router';
import { MatTable } from "@angular/material";
import { ProductGroup } from "../../core/product-group";
import { MenuCategory } from "../../core/menu-category";
import { BehaviorSubject } from "rxjs";
import { CdkDragDrop, moveItemInArray } from "@angular/cdk/drag-drop";
import { ToasterService } from "../../core/toaster.service";
@ -15,7 +15,7 @@ import { TableService } from "../table.service";
styleUrls: ['./table-list.component.css']
})
export class TableListComponent implements OnInit {
@ViewChild('table', { static: true }) table: MatTable<ProductGroup>;
@ViewChild('table', { static: true }) table: MatTable<MenuCategory>;
dataSource: TableListDataSource;
list: Table[];
data: BehaviorSubject<Table[]>;
@ -54,7 +54,7 @@ export class TableListComponent implements OnInit {
);
}
dropTable(event: CdkDragDrop<ProductGroup[]>) {
dropTable(event: CdkDragDrop<MenuCategory[]>) {
const prevIndex = this.list.indexOf(event.item.data);
moveItemInArray(this.list, prevIndex, event.currentIndex);
this.data.next(this.list);