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:
2023-08-04 21:00:26 +05:30
parent af27bf74ef
commit ac868257b7
194 changed files with 513 additions and 1580 deletions
@@ -37,10 +37,7 @@ export class AccountListComponent implements OnInit, AfterViewInit {
filter: new FormControl<string>('', { nonNullable: true }),
});
// Listen to Filter Change
this.filter = this.form.controls.filter.valueChanges.pipe(
debounceTime(150),
distinctUntilChanged(),
);
this.filter = this.form.controls.filter.valueChanges.pipe(debounceTime(150), distinctUntilChanged());
this.dataSource = new AccountListDataSource(this.list, this.filter);
}
@@ -49,9 +46,7 @@ export class AccountListComponent implements OnInit, AfterViewInit {
this.route.data.subscribe((value) => {
const data = value as { list: Account[]; accountTypes: AccountType[] };
this.accountTypes = data.accountTypes;
data.list.forEach(
(x) => (x.typeName = this.accountTypes.find((y) => y.id === x.type)?.name ?? ''),
);
data.list.forEach((x) => (x.typeName = this.accountTypes.find((y) => y.id === x.type)?.name ?? ''));
this.list = data.list;
});
this.dataSource = new AccountListDataSource(this.list, this.filter, this.paginator, this.sort);