From 376b1416bbb582b09f699e2e341f60ee8ca184ab Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 9 Jun 2025 08:03:42 +0200 Subject: [PATCH] Bugfix/restrict date range change permission in Zen mode (#4877) * Restrict date range change permission in Zen Mode * Update changelog --- CHANGELOG.md | 6 ++++++ apps/client/src/app/app.component.ts | 11 +++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bd42dc7e..e698a08af 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 + +### Fixed + +- Restricted the date range change permission in the _Zen Mode_ + ## 2.169.0 - 2025-06-08 ### Changed diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index bc3eb69b7..105dfdd79 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -160,12 +160,11 @@ export class AppComponent implements OnDestroy, OnInit { this.currentSubRoute = urlSegments[1]?.path; if ( - (this.currentRoute === 'home' && !this.currentSubRoute) || - (this.currentRoute === 'home' && - this.currentSubRoute === 'holdings') || - (this.currentRoute === 'portfolio' && !this.currentSubRoute) || - (this.currentRoute === 'zen' && !this.currentSubRoute) || - (this.currentRoute === 'zen' && this.currentSubRoute === 'holdings') + ((this.currentRoute === 'home' && !this.currentSubRoute) || + (this.currentRoute === 'home' && + this.currentSubRoute === 'holdings') || + (this.currentRoute === 'portfolio' && !this.currentSubRoute)) && + this.user?.settings?.viewMode !== 'ZEN' ) { this.hasPermissionToChangeDateRange = true; } else {