From 0ef35fd31f5ca08bfd13a0b516cc4d31c197318c Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sat, 15 May 2021 17:50:28 +0200 Subject: [PATCH] Feature/hide unknown exchange (#95) * Hide unknown exchange * Update changelog --- CHANGELOG.md | 6 ++++++ .../src/app/components/position/position.component.html | 4 +++- .../src/app/components/position/position.component.ts | 7 ++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de0980b49..179730c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Hid unknown exchange in the position overview + ## 1.3.0 - 15.05.2021 ### Changed diff --git a/apps/client/src/app/components/position/position.component.html b/apps/client/src/app/components/position/position.component.html index 01335e625..402778482 100644 --- a/apps/client/src/app/components/position/position.component.html +++ b/apps/client/src/app/components/position/position.component.html @@ -35,7 +35,9 @@
{{ position?.name }}
{{ position?.symbol | gfSymbol }} - ({{ position.exchange }})
diff --git a/apps/client/src/app/components/position/position.component.ts b/apps/client/src/app/components/position/position.component.ts index ab9ef93ff..360a14798 100644 --- a/apps/client/src/app/components/position/position.component.ts +++ b/apps/client/src/app/components/position/position.component.ts @@ -8,7 +8,8 @@ import { import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; -import { Subject, Subscription } from 'rxjs'; +import { UNKNOWN_KEY } from '@ghostfolio/helper'; +import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { PositionDetailDialog } from './position-detail-dialog/position-detail-dialog.component'; @@ -27,7 +28,7 @@ export class PositionComponent implements OnDestroy, OnInit { @Input() position: PortfolioPosition; @Input() range: string; - public routeQueryParams: Subscription; + public unknownKey = UNKNOWN_KEY; private unsubscribeSubject = new Subject(); @@ -36,7 +37,7 @@ export class PositionComponent implements OnDestroy, OnInit { private route: ActivatedRoute, private router: Router ) { - this.routeQueryParams = route.queryParams + route.queryParams .pipe(takeUntil(this.unsubscribeSubject)) .subscribe((params) => { if (