Browse Source

Clean up

pull/4604/head
Thomas Kaul 4 months ago
parent
commit
116fc67b04
  1. 2
      apps/api/src/app/endpoints/watchlist/watchlist.service.ts
  2. 2
      apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.html
  3. 9
      apps/client/src/app/components/home-watchlist/home-watchlist.component.ts

2
apps/api/src/app/endpoints/watchlist/watchlist.service.ts

@ -74,6 +74,6 @@ export class WatchlistService {
where: { id: userId }
});
return user?.watchlist ?? [];
return user.watchlist ?? [];
}
}

2
apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.html

@ -6,13 +6,11 @@
>
<h1 i18n mat-dialog-title>Add Asset</h1>
<div class="flex-grow-1 py-3" mat-dialog-content>
<div>
<mat-form-field appearance="outline" class="w-100">
<mat-label i18n>Name, symbol or ISIN</mat-label>
<gf-symbol-autocomplete formControlName="searchSymbol" />
</mat-form-field>
</div>
</div>
<div class="d-flex justify-content-end" mat-dialog-actions>
<button i18n mat-button type="button" (click)="onCancel()">Cancel</button>
<button

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

@ -81,11 +81,11 @@ export class HomeWatchlistComponent implements OnDestroy, OnInit {
.fetchWatchlist()
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(({ watchlist }) => {
this.watchlist = watchlist.map((item) => ({
dataSource: item.dataSource,
symbol: item.symbol,
name: item.symbol,
this.watchlist = watchlist.map(({ dataSource, symbol }) => ({
dataSource,
symbol,
marketCondition: null,
name: symbol,
performances: null,
trend200d: 'UNKNOWN',
trend50d: 'UNKNOWN'
@ -123,6 +123,7 @@ export class HomeWatchlistComponent implements OnDestroy, OnInit {
next: () => this.loadWatchlistData()
});
}
this.router.navigate(['.'], { relativeTo: this.route });
});
});

Loading…
Cancel
Save