diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts index 958679fcd..bc5423faf 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts @@ -5,7 +5,10 @@ import { AdminService } from '@ghostfolio/client/services/admin.service'; import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { validateObjectForForm } from '@ghostfolio/client/util/form.util'; -import { ghostfolioScraperApiSymbolPrefix } from '@ghostfolio/common/config'; +import { + ghostfolioScraperApiSymbolPrefix, + PROPERTY_IS_DATA_GATHERING_ENABLED +} from '@ghostfolio/common/config'; import { DATE_FORMAT } from '@ghostfolio/common/helper'; import { AdminMarketDataDetails, @@ -133,6 +136,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit { public ghostfolioScraperApiSymbolPrefix = ghostfolioScraperApiSymbolPrefix; public historicalDataItems: LineChartItem[]; public isBenchmark = false; + public isDataGatheringEnabled: boolean; public isEditAssetProfileIdentifierMode = false; public marketDataItems: MarketData[] = []; @@ -285,6 +289,16 @@ export class AssetProfileDialog implements OnDestroy, OnInit { this.changeDetectorRef.markForCheck(); }); + + this.adminService + .fetchAdminData() + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe(({ settings }) => { + this.isDataGatheringEnabled = + settings[PROPERTY_IS_DATA_GATHERING_ENABLED] === false ? false : true; + + this.changeDetectorRef.markForCheck(); + }); } public onCancelEditAssetProfileIdentifierMode() { diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index 4c7d39fc0..0657d9fa5 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -534,8 +534,8 @@
Data Gathering