Browse Source

Merge branch 'main' into feature/refactor-search-query-of-holdings-search

pull/5333/head
Thomas Kaul 2 weeks ago
committed by GitHub
parent
commit
87c573ed87
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 2
      apps/api/src/app/account/account.controller.ts
  3. 18
      apps/api/src/app/portfolio/portfolio.service.ts
  4. 26
      apps/client/src/locales/messages.es.xlf

2
CHANGELOG.md

@ -10,8 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Extended the import functionality by tags - Extended the import functionality by tags
- Introduced the fuzzy search for the accounts endpoint
- Refactored the fuzzy search for the holdings of the assistant - Refactored the fuzzy search for the holdings of the assistant
- Improved the language localization for Polish (`pl`) - Improved the language localization for Polish (`pl`)
- Improved the language localization for Spanish (`es`)
## 2.189.0 - 2025-08-05 ## 2.189.0 - 2025-08-05

2
apps/api/src/app/account/account.controller.ts

@ -89,6 +89,7 @@ export class AccountController {
public async getAllAccounts( public async getAllAccounts(
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, @Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
@Query('dataSource') filterByDataSource?: string, @Query('dataSource') filterByDataSource?: string,
@Query('query') filterBySearchQuery?: string,
@Query('symbol') filterBySymbol?: string @Query('symbol') filterBySymbol?: string
): Promise<AccountsResponse> { ): Promise<AccountsResponse> {
const impersonationUserId = const impersonationUserId =
@ -96,6 +97,7 @@ export class AccountController {
const filters = this.apiService.buildFiltersFromQueryParams({ const filters = this.apiService.buildFiltersFromQueryParams({
filterByDataSource, filterByDataSource,
filterBySearchQuery,
filterBySymbol filterBySymbol
}); });

18
apps/api/src/app/portfolio/portfolio.service.ts

@ -220,11 +220,27 @@ export class PortfolioService {
userId: string; userId: string;
withExcludedAccounts?: boolean; withExcludedAccounts?: boolean;
}): Promise<AccountsResponse> { }): Promise<AccountsResponse> {
const accounts = await this.getAccounts({ let accounts = await this.getAccounts({
filters, filters,
userId, userId,
withExcludedAccounts 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 totalBalanceInBaseCurrency = new Big(0);
let totalValueInBaseCurrency = new Big(0); let totalValueInBaseCurrency = new Big(0);
let transactionCount = 0; let transactionCount = 0;

26
apps/client/src/locales/messages.es.xlf

@ -7581,7 +7581,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskEquity.false.max" datatype="html"> <trans-unit id="rule.assetClassClusterRiskEquity.false.max" datatype="html">
<source> The equity contribution of your current investment (${equityValueRatio}%) exceeds ${thresholdMax}% </source> <source> The equity contribution of your current investment (${equityValueRatio}%) exceeds ${thresholdMax}% </source>
<target state="new"> The equity contribution of your current investment (${equityValueRatio}%) exceeds ${thresholdMax}% </target> <target state="translated">La contribución de renta variable de tu inversión actual (${equityValueRatio}%) supera el ${thresholdMax}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">43</context> <context context-type="linenumber">43</context>
@ -7589,7 +7589,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskEquity.false.min" datatype="html"> <trans-unit id="rule.assetClassClusterRiskEquity.false.min" datatype="html">
<source> The equity contribution of your current investment (${equityValueRatio}%) is below ${thresholdMin}% </source> <source> The equity contribution of your current investment (${equityValueRatio}%) is below ${thresholdMin}% </source>
<target state="new"> The equity contribution of your current investment (${equityValueRatio}%) is below ${thresholdMin}% </target> <target state="translated">La contribución de renta variable de tu inversión actual (${equityValueRatio}%) está por debajo del ${thresholdMin}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">47</context> <context context-type="linenumber">47</context>
@ -7597,7 +7597,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskEquity.true" datatype="html"> <trans-unit id="rule.assetClassClusterRiskEquity.true" datatype="html">
<source> The equity contribution of your current investment (${equityValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% </source> <source> The equity contribution of your current investment (${equityValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% </source>
<target state="new"> The equity contribution of your current investment (${equityValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% </target> <target state="translated">La contribución de renta variable de tu inversión actual (${equityValueRatio}%) está dentro del rango entre ${thresholdMin}% y ${thresholdMax}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">51</context> <context context-type="linenumber">51</context>
@ -7605,7 +7605,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskFixedIncome" datatype="html"> <trans-unit id="rule.assetClassClusterRiskFixedIncome" datatype="html">
<source>Fixed Income</source> <source>Fixed Income</source>
<target state="new">Fixed Income</target> <target state="translated">Renta fija</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">55</context> <context context-type="linenumber">55</context>
@ -7613,7 +7613,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskFixedIncome.false.max" datatype="html"> <trans-unit id="rule.assetClassClusterRiskFixedIncome.false.max" datatype="html">
<source> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) exceeds ${thresholdMax}% </source> <source> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) exceeds ${thresholdMax}% </source>
<target state="new"> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) exceeds ${thresholdMax}% </target> <target state="translated">La contribución de renta fija de tu inversión actual (${fixedIncomeValueRatio}%) supera el ${thresholdMax}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">57</context> <context context-type="linenumber">57</context>
@ -7621,7 +7621,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskFixedIncome.false.min" datatype="html"> <trans-unit id="rule.assetClassClusterRiskFixedIncome.false.min" datatype="html">
<source> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is below ${thresholdMin}% </source> <source> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is below ${thresholdMin}% </source>
<target state="new"> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is below ${thresholdMin}% </target> <target state="translated">La contribución de renta fija de tu inversión actual (${fixedIncomeValueRatio}%) está por debajo del ${thresholdMin}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">61</context> <context context-type="linenumber">61</context>
@ -7629,7 +7629,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.assetClassClusterRiskFixedIncome.true" datatype="html"> <trans-unit id="rule.assetClassClusterRiskFixedIncome.true" datatype="html">
<source> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% </source> <source> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% </source>
<target state="new"> The fixed income contribution of your current investment (${fixedIncomeValueRatio}%) is within the range of ${thresholdMin}% and ${thresholdMax}% </target> <target state="translated">La contribución de renta fija de tu inversión actual (${fixedIncomeValueRatio}%) está dentro del rango entre ${thresholdMin}% y ${thresholdMax}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">66</context> <context context-type="linenumber">66</context>
@ -7637,7 +7637,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.currencyClusterRiskBaseCurrencyCurrentInvestment" datatype="html"> <trans-unit id="rule.currencyClusterRiskBaseCurrencyCurrentInvestment" datatype="html">
<source> Investment: Base Currency </source> <source> Investment: Base Currency </source>
<target state="new"> Investment: Base Currency </target> <target state="translated">Inversión: Moneda base</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">72</context> <context context-type="linenumber">72</context>
@ -7645,7 +7645,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.currencyClusterRiskBaseCurrencyCurrentInvestment.false" datatype="html"> <trans-unit id="rule.currencyClusterRiskBaseCurrencyCurrentInvestment.false" datatype="html">
<source> The major part of your current investment is not in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) </source> <source> The major part of your current investment is not in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) </source>
<target state="new"> The major part of your current investment is not in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) </target> <target state="translated">La mayor parte de tu inversión actual no está en tu moneda base (${baseCurrencyValueRatio}% en ${baseCurrency})</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">75</context> <context context-type="linenumber">75</context>
@ -7653,7 +7653,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.currencyClusterRiskBaseCurrencyCurrentInvestment.true" datatype="html"> <trans-unit id="rule.currencyClusterRiskBaseCurrencyCurrentInvestment.true" datatype="html">
<source> The major part of your current investment is in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) </source> <source> The major part of your current investment is in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) </source>
<target state="new"> The major part of your current investment is in your base currency (${baseCurrencyValueRatio}% in ${baseCurrency}) </target> <target state="translated">La mayor parte de tu inversión actual está en tu moneda base (${baseCurrencyValueRatio}% en ${baseCurrency})</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">79</context> <context context-type="linenumber">79</context>
@ -7661,7 +7661,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.currencyClusterRiskCurrentInvestment" datatype="html"> <trans-unit id="rule.currencyClusterRiskCurrentInvestment" datatype="html">
<source>Investment</source> <source>Investment</source>
<target state="new">Investment</target> <target state="translated">Inversión</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">82</context> <context context-type="linenumber">82</context>
@ -7669,7 +7669,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.currencyClusterRiskCurrentInvestment.false" datatype="html"> <trans-unit id="rule.currencyClusterRiskCurrentInvestment.false" datatype="html">
<source> Over ${thresholdMax}% of your current investment is in ${currency} (${maxValueRatio}%) </source> <source> Over ${thresholdMax}% of your current investment is in ${currency} (${maxValueRatio}%) </source>
<target state="new"> Over ${thresholdMax}% of your current investment is in ${currency} (${maxValueRatio}%) </target> <target state="translated">Más del ${thresholdMax}% de tu inversión actual está en ${currency} (${maxValueRatio}%)</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">84</context> <context context-type="linenumber">84</context>
@ -7677,7 +7677,7 @@
</trans-unit> </trans-unit>
<trans-unit id="rule.currencyClusterRiskCurrentInvestment.true" datatype="html"> <trans-unit id="rule.currencyClusterRiskCurrentInvestment.true" datatype="html">
<source> The major part of your current investment is in ${currency} (${maxValueRatio}%) and does not exceed ${thresholdMax}% </source> <source> The major part of your current investment is in ${currency} (${maxValueRatio}%) and does not exceed ${thresholdMax}% </source>
<target state="new"> The major part of your current investment is in ${currency} (${maxValueRatio}%) and does not exceed ${thresholdMax}% </target> <target state="translated">La mayor parte de tu inversión actual está en ${currency} (${maxValueRatio}%) y no supera el ${thresholdMax}%</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context> <context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">88</context> <context context-type="linenumber">88</context>

Loading…
Cancel
Save