From 809956f21020f61f388bc859ce9080eeaf4da1e8 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 9 Jun 2023 20:01:24 +0200 Subject: [PATCH] Feature/display markets overview link in footer based on permission (#2059) * Add check for permission * Update changelog --- CHANGELOG.md | 1 + apps/client/src/app/app.component.html | 4 +++- apps/client/src/app/app.component.ts | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef30e497e..6c187e65c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Extended the clone functionality of a transaction by the quantity - Changed the direction of the ellipsis icon in various tables +- Displayed the link to the markets overview in the footer based on a permission - Refreshed the cryptocurrencies list - Upgraded `Node.js` from version `16` to `18` (`Dockerfile`) diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html index d3c7d911f..d2c66e24d 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -66,7 +66,9 @@
Personal Finance
diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 2793eccf4..574cf1f01 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -34,6 +34,7 @@ export class AppComponent implements OnDestroy, OnInit { public deviceType: string; public hasPermissionForBlog: boolean; public hasPermissionForSubscription: boolean; + public hasPermissionToAccessFearAndGreedIndex: boolean; public info: InfoItem; public pageTitle: string; public user: User; @@ -69,6 +70,11 @@ export class AppComponent implements OnDestroy, OnInit { permissions.enableSubscription ); + this.hasPermissionToAccessFearAndGreedIndex = hasPermission( + this.info?.globalPermissions, + permissions.enableFearAndGreedIndex + ); + this.router.events .pipe(filter((event) => event instanceof NavigationEnd)) .subscribe(() => {