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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user