Chore: Reformatted everthing
Fix: Product ledger was not totalling. This is because for some reason, pydantic was sending the data as string when the field was nullable
This commit is contained in:
@ -54,20 +54,13 @@ export class RecipeListComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.dataSource = new RecipeListDatasource(
|
||||
this.productGroupFilter,
|
||||
this.data,
|
||||
this.paginator,
|
||||
this.sort,
|
||||
);
|
||||
this.dataSource = new RecipeListDatasource(this.productGroupFilter, this.data, this.paginator, this.sort);
|
||||
// this.dataSource = new RecipeListDatasource(this.validFromFilter, this.validTillFilter, this.productGroupFilter, this.data);
|
||||
this.route.data.subscribe((value) => {
|
||||
const data = value as { list: Recipe[]; productGroups: ProductGroup[]; periods: Period[] };
|
||||
this.productGroups = data.productGroups;
|
||||
this.periods = data.periods;
|
||||
const period =
|
||||
this.periods.find((x) => x.id === this.route.snapshot.queryParamMap.get('p')) ||
|
||||
this.periods[0];
|
||||
const period = this.periods.find((x) => x.id === this.route.snapshot.queryParamMap.get('p')) || this.periods[0];
|
||||
|
||||
this.form.setValue({
|
||||
period: period,
|
||||
|
||||
Reference in New Issue
Block a user