Browse Source

Task/add selected asset profile count to deletion confirmation dialog of historical market data table in admin control panel (#7072)

* Add selected asset profile count

* Update changelog
pull/7061/head^2
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
2fe8637261
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 12
      apps/client/src/app/components/admin-market-data/admin-market-data.service.ts

1
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

12
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?`
});
}
}

Loading…
Cancel
Save