diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a2337d89..85d661e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Added the selected asset profile count to the delete menu item of the historical market data table in the admin control panel +- Added the selected asset profile count to the deletion confirmation dialog of the historical market data table in the admin control panel ### Fixed diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts index 77e2151ef..28c8c2d9f 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts @@ -32,6 +32,8 @@ export class AdminMarketDataService { public deleteAssetProfiles( aAssetProfileIdentifiers: AssetProfileIdentifier[] ) { + const assetProfileCount = aAssetProfileIdentifiers.length; + this.notificationService.confirm({ confirmFn: () => { const deleteRequests = aAssetProfileIdentifiers.map( @@ -44,7 +46,10 @@ export class AdminMarketDataService { .pipe( catchError(() => { this.notificationService.alert({ - title: $localize`Oops! Could not delete profiles.` + title: + assetProfileCount === 1 + ? $localize`Oops! Could not delete the asset profile.` + : $localize`Oops! Could not delete the asset profiles.` }); return EMPTY; @@ -56,7 +61,10 @@ export class AdminMarketDataService { .subscribe(); }, confirmType: ConfirmationDialogType.Warn, - title: $localize`Do you really want to delete these profiles?` + title: + assetProfileCount === 1 + ? $localize`Do you really want to delete this asset profile?` + : $localize`Do you really want to delete these ${assetProfileCount}:count: asset profiles?` }); } }