diff --git a/CHANGELOG.md b/CHANGELOG.md index 62cbee836..421a1bd6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the style of the tabs in the holding detail dialog on mobile - Improved the style of the tabs in the asset profile dialog of the admin control panel on mobile - Improved the style of the empty state in the _Fear & Greed Index_ component +- Added the activity count to the delete menu item of the activities table +- Added the activity count to the deletion confirmation dialog of the activities table - Improved the style of the type filter in the activities table component (experimental) - Improved the performance of the property service by caching the properties in memory - Improved the language localization for German (`de`) diff --git a/libs/ui/src/lib/activities-table/activities-table.component.html b/libs/ui/src/lib/activities-table/activities-table.component.html index 3d91852a0..1ff8496a9 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.html +++ b/libs/ui/src/lib/activities-table/activities-table.component.html @@ -84,14 +84,19 @@ 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 573c8c93a..a4e7403a7 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.ts +++ b/libs/ui/src/lib/activities-table/activities-table.component.ts @@ -282,6 +282,13 @@ export class GfActivitiesTableComponent implements AfterViewInit, OnInit { ); } + public canDeleteActivities() { + return ( + (this.dataSource()?.data.length ?? 0) > 0 && + this.hasPermissionToDeleteActivity + ); + } + public isExcludedFromAnalysis(activity: Activity) { return ( (activity.account && isAccountExcluded(activity.account)) ?? @@ -314,7 +321,10 @@ export class GfActivitiesTableComponent implements AfterViewInit, OnInit { this.activitiesDeleted.emit(); }, confirmType: ConfirmationDialogType.Warn, - title: $localize`Do you really want to delete these activities?` + title: + this.totalItems === 1 + ? $localize`Do you really want to delete this activity?` + : $localize`Do you really want to delete these ${this.totalItems}:count: activities?` }); }