Feature: Tax Regimes are added so that different bills with different series can be printed for Different regimes such as VAT and GST
Chore: Model relationships updated to make them simpler Chore: Bill printing majorly refactored for it Due to the sheer depth of the changes. There can be showstoppers. Please test it carefully
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { MatTable } from '@angular/material/table';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@ -20,19 +20,18 @@ export class ModifierListComponent implements OnInit {
|
||||
filter: BehaviorSubject<string> = new BehaviorSubject('');
|
||||
data: BehaviorSubject<Modifier[]> = new BehaviorSubject<Modifier[]>([]);
|
||||
dataSource: ModifierListDataSource = new ModifierListDataSource(this.filter, this.data);
|
||||
form: UntypedFormGroup;
|
||||
form: FormGroup<{
|
||||
modifierCategory: FormControl<string | null>;
|
||||
}>;
|
||||
|
||||
list: Modifier[] = [];
|
||||
modifierCategories: ModifierCategory[] = [];
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns: string[] = ['name', 'showInBill', 'price', 'isActive', 'modifierCategory'];
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private fb: UntypedFormBuilder,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
modifierCategory: '',
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
this.form = new FormGroup({
|
||||
modifierCategory: new FormControl<string | null>(''),
|
||||
});
|
||||
this.data.subscribe((data: Modifier[]) => {
|
||||
this.list = data;
|
||||
|
||||
Reference in New Issue
Block a user