From aef650753e17669338c4172f11f452d33e9b0842 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 4 Aug 2024 08:18:54 +0200 Subject: [PATCH] Feature/clean up activities page (#3635) * Clean up --- .../portfolio/activities/activities-page.component.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts index c96921c30..d6209cdf8 100644 --- a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts @@ -33,7 +33,6 @@ import { ImportActivitiesDialogParams } from './import-activities-dialog/interfa templateUrl: './activities-page.html' }) export class ActivitiesPageComponent implements OnDestroy, OnInit { - public activities: Activity[]; public dataSource: MatTableDataSource; public deviceType: string; public hasImpersonationId: boolean; @@ -66,13 +65,7 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit { if (params['createDialog']) { this.openCreateActivityDialog(); } else if (params['editDialog']) { - if (this.activities) { - const activity = this.activities.find(({ id }) => { - return id === params['activityId']; - }); - - this.openUpdateActivityDialog(activity); - } else if (this.dataSource) { + if (this.dataSource && params['activityId']) { const activity = this.dataSource.data.find(({ id }) => { return id === params['activityId']; });