From 74fe90906a665a5b91de84fe33e2896df95194e1 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 11 Jun 2022 12:55:32 +0200 Subject: [PATCH] Bugfix/exclude emtpy items in activities filter (#999) * Exclude empty items * Update changelog --- CHANGELOG.md | 4 ++++ .../activities-table/activities-table.component.ts | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8df6ba51..93be00b6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded `chart.js` from version `3.7.0` to `3.8.0` - Upgraded `envalid` from version `7.2.1` to `7.3.1` +### Fixed + +- Excluded empty items in the activities filter + ## 1.156.0 - 05.06.2022 ### Added diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.ts index 055c82d86..268df1f3a 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.ts +++ b/libs/ui/src/lib/activities-table/activities-table.component.ts @@ -192,11 +192,13 @@ export class ActivitiesTableComponent implements OnChanges, OnDestroy { activity: OrderWithAccount, fieldValueMap: { [id: string]: Filter } = {} ): Filter[] { - fieldValueMap[activity.Account?.id] = { - id: activity.Account?.id, - label: activity.Account?.name, - type: 'ACCOUNT' - }; + if (activity.Account?.id) { + fieldValueMap[activity.Account.id] = { + id: activity.Account.id, + label: activity.Account.name, + type: 'ACCOUNT' + }; + } fieldValueMap[activity.SymbolProfile.currency] = { id: activity.SymbolProfile.currency,