From fad1adb91ba1a214b35ac54b1c7bdc4e72a98646 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 7 Jul 2024 09:54:54 +0200 Subject: [PATCH] Feature/improve usability to delete currency asset profile (#3541) * Improve usability * Update changelog --- CHANGELOG.md | 1 + .../admin-market-data.component.ts | 2 +- .../admin-market-data/admin-market-data.html | 18 +++++++++-------- .../admin-market-data.service.ts | 20 ++++++++++++++++++- .../asset-profile-dialog.component.ts | 2 +- .../asset-profile-dialog.html | 8 +++++--- 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7531c698..f696b3b21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the allocations by ETF holding on the allocations page for the impersonation mode (experimental) - Improved the detection of REST APIs (`JSON`) used via the scraper configuration +- Improved the usability to delete an asset profile of type currency in the historical market data table and the asset profile details dialog of the admin control - Refreshed the cryptocurrencies list - Refactored the thresholds of the rules in the _X-ray_ section - Removed the obsolete `version` from the `docker-compose` files diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index add0e998f..5494e6842 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -124,7 +124,7 @@ export class AdminMarketDataComponent private unsubscribeSubject = new Subject(); public constructor( - private adminMarketDataService: AdminMarketDataService, + public adminMarketDataService: AdminMarketDataService, private adminService: AdminService, private changeDetectorRef: ChangeDetectorRef, private dataService: DataService, diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.html b/apps/client/src/app/components/admin-market-data/admin-market-data.html index 5a7312026..00931d77c 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.html +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.html @@ -24,11 +24,11 @@ @if ( - !( - element.activitiesCount !== 0 || - element.isBenchmark || - element.symbol.startsWith(ghostfolioScraperApiSymbolPrefix) - ) + adminMarketDataService.hasPermissionToDeleteAssetProfile({ + activitiesCount: element.activitiesCount, + isBenchmark: element.isBenchmark, + symbol: element.symbol + }) ) {