From 8466e3d73fd70e173248e736eee4972bd3fd0c6d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 24 Sep 2021 20:12:17 +0200 Subject: [PATCH] Feature/always show adapted portfolio page (#388) * Always show adapted portfolio page * Update changelog --- CHANGELOG.md | 4 ++ .../components/header/header.component.html | 25 ----------- .../portfolio/portfolio-page.component.ts | 13 +++++- .../app/pages/portfolio/portfolio-page.html | 45 ++++++++++++------- .../app/pages/portfolio/portfolio-page.scss | 6 +++ .../src/app/pages/pricing/pricing-page.html | 4 +- 6 files changed, 54 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa2cb05a8..ef8109aab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added a story for the line chart component - Added a story for the portfolio proportion chart component +### Changed + +- Changed the navigation to always show the portfolio page + ## 1.55.0 - 20.09.2021 ### Changed diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index 4cf91ff85..4636559c6 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -17,7 +17,6 @@ >Overview Portfolio - Transactions Overview Portfolio - Transactions (); @@ -19,8 +22,16 @@ export class PortfolioPageComponent implements OnDestroy, OnInit { */ public constructor( private changeDetectorRef: ChangeDetectorRef, + private dataService: DataService, private userService: UserService - ) {} + ) { + const { globalPermissions } = this.dataService.fetchInfo(); + + this.hasPermissionForSubscription = hasPermission( + globalPermissions, + permissions.enableSubscription + ); + } /** * Initializes the controller diff --git a/apps/client/src/app/pages/portfolio/portfolio-page.html b/apps/client/src/app/pages/portfolio/portfolio-page.html index 1a2578be4..2b43efedb 100644 --- a/apps/client/src/app/pages/portfolio/portfolio-page.html +++ b/apps/client/src/app/pages/portfolio/portfolio-page.html @@ -17,18 +17,23 @@

-
+
-

Allocations

+

+ Allocations + +

Check the allocations of your portfolio.

Open Allocations → @@ -38,18 +43,23 @@

-
+ -
+
-

X-ray

+

+ X-ray + +

Ghostfolio X-ray uses static analysis to identify potential issues and risks in your portfolio. @@ -72,6 +86,7 @@ color="primary" i18n mat-button + [disabled]="hasPermissionForSubscription && user?.settings?.viewMode !== 'DEFAULT'" [routerLink]="['/portfolio', 'report']" > Open X-ray → diff --git a/apps/client/src/app/pages/portfolio/portfolio-page.scss b/apps/client/src/app/pages/portfolio/portfolio-page.scss index 39eb6792e..761afaa8c 100644 --- a/apps/client/src/app/pages/portfolio/portfolio-page.scss +++ b/apps/client/src/app/pages/portfolio/portfolio-page.scss @@ -1,6 +1,12 @@ :host { color: rgb(var(--dark-primary-text)); display: block; + + .mat-card { + .mat-button-disabled { + pointer-events: none; + } + } } :host-context(.is-dark-theme) { diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index d3c4a845c..60e44f700 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -127,8 +127,8 @@ [ngClass]="{ 'active': user?.subscription?.type === 'Premium' }" >

-

- Premium +

+ Premium