Browse Source

fix table for transaction for accounts without platform

pull/76/head
Valentin Zickner 4 years ago
parent
commit
279bcf9375
  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>
<input
placeholder="Search for transactions..."
name="close-outline"
#searchInput
[formControl]="searchControl"
[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
)
);
} else {
this.filteredTransactions$.next(this.allFilteredTransactions);
}
});
}
@ -249,7 +251,9 @@ export class TransactionsTableComponent
this.getFilterableValues(transaction, fieldValues);
}
return [...fieldValues].sort();
return [...fieldValues]
.filter(item => item != undefined)
.sort();
}
private static getFilterableValues(
@ -261,6 +265,7 @@ export class TransactionsTableComponent
fieldValues.add(transaction.type);
fieldValues.add(transaction.Account?.name);
fieldValues.add(transaction.Account?.Platform?.name);
return [...fieldValues];
return [...fieldValues]
.filter(item => item != undefined);
}
}

Loading…
Cancel
Save