Browse Source
Task/reuse asset profile identifier (#7086)
Reuse AssetProfileIdentifier
pull/7084/head
Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
9 additions and
18 deletions
-
apps/client/src/app/app.component.ts
-
apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
-
libs/ui/src/lib/services/data.service.ts
|
|
|
@ -1,5 +1,9 @@ |
|
|
|
import { getCssVariable } from '@ghostfolio/common/helper'; |
|
|
|
import { InfoItem, User } from '@ghostfolio/common/interfaces'; |
|
|
|
import { |
|
|
|
AssetProfileIdentifier, |
|
|
|
InfoItem, |
|
|
|
User |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import { internalRoutes, publicRoutes } from '@ghostfolio/common/routes/routes'; |
|
|
|
import { ColorScheme } from '@ghostfolio/common/types'; |
|
|
|
@ -27,7 +31,6 @@ import { |
|
|
|
RouterLink, |
|
|
|
RouterOutlet |
|
|
|
} from '@angular/router'; |
|
|
|
import { DataSource } from '@prisma/client'; |
|
|
|
import { Chart } from 'chart.js'; |
|
|
|
import { addIcons } from 'ionicons'; |
|
|
|
import { openOutline } from 'ionicons/icons'; |
|
|
|
@ -269,10 +272,7 @@ export class GfAppComponent implements OnInit { |
|
|
|
private openHoldingDetailDialog({ |
|
|
|
dataSource, |
|
|
|
symbol |
|
|
|
}: { |
|
|
|
dataSource: DataSource; |
|
|
|
symbol: string; |
|
|
|
}) { |
|
|
|
}: AssetProfileIdentifier) { |
|
|
|
this.userService |
|
|
|
.get() |
|
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
|
|
|
|
|
@ -408,10 +408,7 @@ export class GfAdminMarketDataComponent implements AfterViewInit, OnInit { |
|
|
|
private openAssetProfileDialog({ |
|
|
|
dataSource, |
|
|
|
symbol |
|
|
|
}: { |
|
|
|
dataSource: DataSource; |
|
|
|
symbol: string; |
|
|
|
}) { |
|
|
|
}: AssetProfileIdentifier) { |
|
|
|
this.userService |
|
|
|
.get() |
|
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
|
|
|
|
|
@ -479,10 +479,7 @@ export class DataService { |
|
|
|
public fetchHoldingDetail({ |
|
|
|
dataSource, |
|
|
|
symbol |
|
|
|
}: { |
|
|
|
dataSource: DataSource; |
|
|
|
symbol: string; |
|
|
|
}): Observable< |
|
|
|
}: AssetProfileIdentifier): Observable< |
|
|
|
Omit<PortfolioHoldingResponse, 'dateOfFirstActivity'> & { |
|
|
|
dateOfFirstActivity: Date | undefined; |
|
|
|
} |
|
|
|
@ -541,10 +538,7 @@ export class DataService { |
|
|
|
public fetchMarketDataBySymbol({ |
|
|
|
dataSource, |
|
|
|
symbol |
|
|
|
}: { |
|
|
|
dataSource: DataSource; |
|
|
|
symbol: string; |
|
|
|
}): Observable<AssetProfileResponse> { |
|
|
|
}: AssetProfileIdentifier): Observable<AssetProfileResponse> { |
|
|
|
return this.http |
|
|
|
.get<any>(`/api/v1/asset-profiles/${dataSource}/${symbol}`) |
|
|
|
.pipe( |
|
|
|
|