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:
2023-03-05 23:50:41 +05:30
parent 802eded568
commit e46fe7f90e
141 changed files with 2197 additions and 892 deletions

View File

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