Browse Source

fix(lib): change type annotation

pull/4624/head
KenTandrian 4 months ago
parent
commit
c3b57ba7ba
  1. 8
      apps/client/src/app/components/home-watchlist/home-watchlist.component.ts
  2. 2
      libs/ui/src/lib/benchmark/benchmark.component.ts

8
apps/client/src/app/components/home-watchlist/home-watchlist.component.ts

@ -1,6 +1,10 @@
import { DataService } from '@ghostfolio/client/services/data.service'; import { DataService } from '@ghostfolio/client/services/data.service';
import { UserService } from '@ghostfolio/client/services/user/user.service'; import { UserService } from '@ghostfolio/client/services/user/user.service';
import { Benchmark, User } from '@ghostfolio/common/interfaces'; import {
AssetProfileIdentifier,
Benchmark,
User
} from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark'; import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark';
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';
@ -95,7 +99,7 @@ export class HomeWatchlistComponent implements OnDestroy, OnInit {
this.unsubscribeSubject.complete(); this.unsubscribeSubject.complete();
} }
public onWatchlistItemDeleted(item: Benchmark) { public onWatchlistItemDeleted(item: AssetProfileIdentifier) {
this.dataService this.dataService
.deleteWatchlistItem(item) .deleteWatchlistItem(item)
.pipe(takeUntil(this.unsubscribeSubject)) .pipe(takeUntil(this.unsubscribeSubject))

2
libs/ui/src/lib/benchmark/benchmark.component.ts

@ -113,7 +113,7 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy {
} }
} }
public onDeleteWatchlistItem({ dataSource, symbol }: AssetProfileIdentifier) { public onDeleteWatchlistItem({ dataSource, symbol }: Benchmark) {
this.notificationService.confirm({ this.notificationService.confirm({
confirmFn: () => this.watchlistItemDeleted.emit({ dataSource, symbol }), confirmFn: () => this.watchlistItemDeleted.emit({ dataSource, symbol }),
confirmType: ConfirmationDialogType.Warn, confirmType: ConfirmationDialogType.Warn,

Loading…
Cancel
Save