From 5f4cbe3af72a1cd3422be09f3ee07a0161085bfc Mon Sep 17 00:00:00 2001 From: Madhab Chandra Sahoo <30400985+madhab-chandra-sahoo@users.noreply.github.com> Date: Fri, 11 Oct 2024 23:29:08 +0530 Subject: [PATCH 1/2] Bugfix/considered language of user settings on login with Security Token (#3828) * Consider language of user settings on login with Security Token * Update changelog --- CHANGELOG.md | 6 ++++++ .../src/app/components/header/header.component.ts | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e66630572..d334d6b08 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 + +- Considered the language of the user settings on login with _Security Token_ + ## 2.114.0 - 2024-10-10 ### Added diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts index be90fbc8e..33069aa23 100644 --- a/apps/client/src/app/components/header/header.component.ts +++ b/apps/client/src/app/components/header/header.component.ts @@ -261,7 +261,18 @@ export class HeaderComponent implements OnChanges { this.settingsStorageService.getSetting(KEY_STAY_SIGNED_IN) === 'true' ); - this.router.navigate(['/']); + this.userService + .get() + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe((user) => { + const userLanguage = user?.settings?.language; + + if (userLanguage && document.documentElement.lang !== userLanguage) { + window.location.href = `../${userLanguage}`; + } else { + this.router.navigate(['/']); + } + }); } public ngOnDestroy() { From d158d0c326567600dbddfed0c90b1d18de33a28c Mon Sep 17 00:00:00 2001 From: Uday R <82779467+uday-rana@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:13:40 -0400 Subject: [PATCH 2/2] Feature/Extend tooltip in treemap chart component by name (#3907) * Extend tooltip in treemap chart component by name * Update changelog --- CHANGELOG.md | 4 ++++ .../treemap-chart/treemap-chart.component.ts | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d334d6b08..388fd9772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Added the name to the tooltip of the chart of the holdings tab on the home page (experimental) + ### Fixed - Considered the language of the user settings on login with _Security Token_ diff --git a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts index b278180ea..0e694f6dc 100644 --- a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts +++ b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts @@ -227,16 +227,24 @@ export class GfTreemapChartComponent }), callbacks: { label: (context) => { + const name = context.raw._data.name; + const symbol = context.raw._data.symbol; + if (context.raw._data.valueInBaseCurrency !== null) { const value = context.raw._data.valueInBaseCurrency; - return `${value.toLocaleString(this.locale, { - maximumFractionDigits: 2, - minimumFractionDigits: 2 - })} ${this.baseCurrency}`; + + return [ + `${name ?? symbol}`, + `${value.toLocaleString(this.locale, { + maximumFractionDigits: 2, + minimumFractionDigits: 2 + })} ${this.baseCurrency}` + ]; } else { const percentage = context.raw._data.allocationInPercentage * 100; - return `${percentage.toFixed(2)}%`; + + return [`${name ?? symbol}`, `${percentage.toFixed(2)}%`]; } }, title: () => {