From fff291cc386ac142321a3c7e3e9e7a0ceefd58ad Mon Sep 17 00:00:00 2001 From: Jesica Mao Date: Fri, 8 Aug 2025 00:10:46 +0600 Subject: [PATCH 1/2] Feature/improve language localization for ES 20250807 (#5331) * Improve language localization for ES * Update changelog --- CHANGELOG.md | 1 + apps/client/src/locales/messages.es.xlf | 26 ++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9a73498..f3cd842ae 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 import functionality by tags - Improved the language localization for Polish (`pl`) +- Improved the language localization for Spanish (`es`) ## 2.189.0 - 2025-08-05 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 47ced2075..fc7d38d4e 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -7581,7 +7581,7 @@ The equity contribution of your current investment (${equityValueRatio}%) exceeds ${thresholdMax}% - The equity contribution of your current investment (${equityValueRatio}%) exceeds ${thresholdMax}% + La contribución de renta variable de tu inversión actual (${equityValueRatio}%) supera el ${thresholdMax}% apps/client/src/app/pages/i18n/i18n-page.html 43 @@ -7589,7 +7589,7 @@ The equity contribution of your current investment (${equityValueRatio}%) is below ${thresholdMin}% - The equity contribution of your current investment (${equityValueRatio}%) is below ${thresholdMin}% + La contribución de renta variable de tu inversión actual (${equityValueRatio}%) está por debajo del ${thresholdMin}% apps/client/src/app/pages/i18n/i18n-page.html 47 @@ -7597,7 +7597,7 @@ The equity contribution of your current investment (${equityValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% - The equity contribution of your current investment (${equityValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% + La contribución de renta variable de tu inversión actual (${equityValueRatio}%) está dentro del rango entre ${thresholdMin}% y ${thresholdMax}% apps/client/src/app/pages/i18n/i18n-page.html 51 @@ -7605,7 +7605,7 @@ Fixed Income - Fixed Income + Renta fija apps/client/src/app/pages/i18n/i18n-page.html 55 @@ -7613,7 +7613,7 @@ The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) exceeds ${thresholdMax}% - The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) exceeds ${thresholdMax}% + La contribución de renta fija de tu inversión actual (${fixedIncomeValueRatio}%) supera el ${thresholdMax}% apps/client/src/app/pages/i18n/i18n-page.html 57 @@ -7621,7 +7621,7 @@ The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is below ${thresholdMin}% - The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is below ${thresholdMin}% + La contribución de renta fija de tu inversión actual (${fixedIncomeValueRatio}%) está por debajo del ${thresholdMin}% apps/client/src/app/pages/i18n/i18n-page.html 61 @@ -7629,7 +7629,7 @@ The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% - The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% + La contribución de renta fija de tu inversión actual (${fixedIncomeValueRatio}%) está dentro del rango entre ${thresholdMin}% y ${thresholdMax}% apps/client/src/app/pages/i18n/i18n-page.html 66 @@ -7637,7 +7637,7 @@ Investment: Base Currency - Investment: Base Currency + Inversión: Moneda base apps/client/src/app/pages/i18n/i18n-page.html 72 @@ -7645,7 +7645,7 @@ The major part of your current investment is not in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) - The major part of your current investment is not in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) + La mayor parte de tu inversión actual no está en tu moneda base (${baseCurrencyValueRatio}% en ${baseCurrency}) apps/client/src/app/pages/i18n/i18n-page.html 75 @@ -7653,7 +7653,7 @@ The major part of your current investment is in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) - The major part of your current investment is in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) + La mayor parte de tu inversión actual está en tu moneda base (${baseCurrencyValueRatio}% en ${baseCurrency}) apps/client/src/app/pages/i18n/i18n-page.html 79 @@ -7661,7 +7661,7 @@ Investment - Investment + Inversión apps/client/src/app/pages/i18n/i18n-page.html 82 @@ -7669,7 +7669,7 @@ Over ${thresholdMax}% of your current investment is in ${currency} (${maxValueRatio}%) - Over ${thresholdMax}% of your current investment is in ${currency} (${maxValueRatio}%) + Más del ${thresholdMax}% de tu inversión actual está en ${currency} (${maxValueRatio}%) apps/client/src/app/pages/i18n/i18n-page.html 84 @@ -7677,7 +7677,7 @@ The major part of your current investment is in ${currency} (${maxValueRatio}%) and does not exceed ${thresholdMax}% - The major part of your current investment is in ${currency} (${maxValueRatio}%) and does not exceed ${thresholdMax}% + La mayor parte de tu inversión actual está en ${currency} (${maxValueRatio}%) y no supera el ${thresholdMax}% apps/client/src/app/pages/i18n/i18n-page.html 88 From 6de3db08caacd223c5df2d63e6bcc78dee947924 Mon Sep 17 00:00:00 2001 From: Attila Cseh <77381875+csehatt741@users.noreply.github.com> Date: Fri, 8 Aug 2025 20:12:51 +0200 Subject: [PATCH 2/2] Feature/extend GET all accounts endpoint by search query filter (#5329) * Extend GET all accounts endpoint by search query filter * Update changelog --- CHANGELOG.md | 1 + apps/api/src/app/account/account.controller.ts | 2 ++ .../api/src/app/portfolio/portfolio.service.ts | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3cd842ae..0903fd7cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Extended the import functionality by tags +- Introduced fuzzy search for the accounts endpoint - Improved the language localization for Polish (`pl`) - Improved the language localization for Spanish (`es`) diff --git a/apps/api/src/app/account/account.controller.ts b/apps/api/src/app/account/account.controller.ts index 51a33fa9e..7b24ccdcb 100644 --- a/apps/api/src/app/account/account.controller.ts +++ b/apps/api/src/app/account/account.controller.ts @@ -89,6 +89,7 @@ export class AccountController { public async getAllAccounts( @Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, @Query('dataSource') filterByDataSource?: string, + @Query('query') filterBySearchQuery?: string, @Query('symbol') filterBySymbol?: string ): Promise { const impersonationUserId = @@ -96,6 +97,7 @@ export class AccountController { const filters = this.apiService.buildFiltersFromQueryParams({ filterByDataSource, + filterBySearchQuery, filterBySymbol }); diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index d1b9af892..5ad291238 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -220,11 +220,27 @@ export class PortfolioService { userId: string; withExcludedAccounts?: boolean; }): Promise { - const accounts = await this.getAccounts({ + let accounts = await this.getAccounts({ filters, userId, withExcludedAccounts }); + + const searchQuery = filters.find(({ type }) => { + return type === 'SEARCH_QUERY'; + })?.id; + + if (searchQuery) { + const fuse = new Fuse(accounts, { + keys: ['name', 'platform.name'], + threshold: 0.3 + }); + + accounts = fuse.search(searchQuery).map(({ item }) => { + return item; + }); + } + let totalBalanceInBaseCurrency = new Big(0); let totalValueInBaseCurrency = new Big(0); let transactionCount = 0;