Browse Source

fix table for transaction for accounts without platform

pull/76/head
Valentin Zickner 4 years ago
committed by Thomas
parent
commit
d3d2b4af53
  1. 1
      apps/client/src/app/components/transactions-table/transactions-table.component.html
  2. 9
      apps/client/src/app/components/transactions-table/transactions-table.component.ts

1
apps/client/src/app/components/transactions-table/transactions-table.component.html

@ -12,6 +12,7 @@
</mat-chip> </mat-chip>
<input <input
placeholder="Search for transactions..." placeholder="Search for transactions..."
name="close-outline"
#searchInput #searchInput
[formControl]="searchControl" [formControl]="searchControl"
[matAutocomplete]="auto" [matAutocomplete]="auto"

9
apps/client/src/app/components/transactions-table/transactions-table.component.ts

@ -92,6 +92,8 @@ export class TransactionsTableComponent
(filter) => filter.toLowerCase().indexOf(filterValue) === 0 (filter) => filter.toLowerCase().indexOf(filterValue) === 0
) )
); );
} else {
this.filteredTransactions$.next(this.allFilteredTransactions);
} }
}); });
} }
@ -249,7 +251,9 @@ export class TransactionsTableComponent
this.getFilterableValues(transaction, fieldValues); this.getFilterableValues(transaction, fieldValues);
} }
return [...fieldValues].sort(); return [...fieldValues]
.filter(item => item != undefined)
.sort();
} }
private static getFilterableValues( private static getFilterableValues(
@ -261,6 +265,7 @@ export class TransactionsTableComponent
fieldValues.add(transaction.type); fieldValues.add(transaction.type);
fieldValues.add(transaction.Account?.name); fieldValues.add(transaction.Account?.name);
fieldValues.add(transaction.Account?.Platform?.name); fieldValues.add(transaction.Account?.Platform?.name);
return [...fieldValues]; return [...fieldValues]
.filter(item => item != undefined);
} }
} }

Loading…
Cancel
Save