Merge branch 'main' of github.com:ghostfolio/ghostfolio
All checks were successful
Docker image CD / build_and_push (push) Successful in 21m18s

This commit is contained in:
sudacode 2025-05-19 18:00:47 -07:00
commit d395b195ff
16 changed files with 26 additions and 26 deletions

View File

@ -1249,7 +1249,7 @@ export class PortfolioService {
const rules: PortfolioReportResponse['rules'] = { const rules: PortfolioReportResponse['rules'] = {
accountClusterRisk: accountClusterRisk:
summary.ordersCount > 0 summary.activityCount > 0
? await this.rulesService.evaluate( ? await this.rulesService.evaluate(
[ [
new AccountClusterRiskCurrentInvestment( new AccountClusterRiskCurrentInvestment(
@ -1265,7 +1265,7 @@ export class PortfolioService {
) )
: undefined, : undefined,
assetClassClusterRisk: assetClassClusterRisk:
summary.ordersCount > 0 summary.activityCount > 0
? await this.rulesService.evaluate( ? await this.rulesService.evaluate(
[ [
new AssetClassClusterRiskEquity( new AssetClassClusterRiskEquity(
@ -1281,7 +1281,7 @@ export class PortfolioService {
) )
: undefined, : undefined,
currencyClusterRisk: currencyClusterRisk:
summary.ordersCount > 0 summary.activityCount > 0
? await this.rulesService.evaluate( ? await this.rulesService.evaluate(
[ [
new CurrencyClusterRiskBaseCurrencyCurrentInvestment( new CurrencyClusterRiskBaseCurrencyCurrentInvestment(
@ -1297,7 +1297,7 @@ export class PortfolioService {
) )
: undefined, : undefined,
economicMarketClusterRisk: economicMarketClusterRisk:
summary.ordersCount > 0 summary.activityCount > 0
? await this.rulesService.evaluate( ? await this.rulesService.evaluate(
[ [
new EconomicMarketClusterRiskDevelopedMarkets( new EconomicMarketClusterRiskDevelopedMarkets(
@ -1338,7 +1338,7 @@ export class PortfolioService {
userSettings userSettings
), ),
regionalMarketClusterRisk: regionalMarketClusterRisk:
summary.ordersCount > 0 summary.activityCount > 0
? await this.rulesService.evaluate( ? await this.rulesService.evaluate(
[ [
new RegionalMarketClusterRiskAsiaPacific( new RegionalMarketClusterRiskAsiaPacific(
@ -1981,6 +1981,9 @@ export class PortfolioService {
netPerformanceWithCurrencyEffect, netPerformanceWithCurrencyEffect,
totalBuy, totalBuy,
totalSell, totalSell,
activityCount: activities.filter(({ type }) => {
return ['BUY', 'SELL'].includes(type);
}).length,
committedFunds: committedFunds.toNumber(), committedFunds: committedFunds.toNumber(),
currentValueInBaseCurrency: currentValueInBaseCurrency.toNumber(), currentValueInBaseCurrency: currentValueInBaseCurrency.toNumber(),
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), dividendInBaseCurrency: dividendInBaseCurrency.toNumber(),
@ -2008,9 +2011,6 @@ export class PortfolioService {
interest: interest.toNumber(), interest: interest.toNumber(),
items: valuables.toNumber(), items: valuables.toNumber(),
liabilities: liabilities.toNumber(), liabilities: liabilities.toNumber(),
ordersCount: activities.filter(({ type }) => {
return ['BUY', 'SELL'].includes(type);
}).length,
totalInvestment: totalInvestment.toNumber(), totalInvestment: totalInvestment.toNumber(),
totalValueInBaseCurrency: netWorth totalValueInBaseCurrency: netWorth
}; };

View File

@ -1515,6 +1515,7 @@ describe('redactAttributes', () => {
} }
}, },
summary: { summary: {
activityCount: 29,
annualizedPerformancePercent: 0.16690880197786, annualizedPerformancePercent: 0.16690880197786,
annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876, annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876,
cash: null, cash: null,
@ -1538,7 +1539,6 @@ describe('redactAttributes', () => {
interest: null, interest: null,
items: null, items: null,
liabilities: null, liabilities: null,
ordersCount: 29,
totalInvestment: null, totalInvestment: null,
totalValueInBaseCurrency: null, totalValueInBaseCurrency: null,
currentNetWorth: null currentNetWorth: null
@ -3018,6 +3018,7 @@ describe('redactAttributes', () => {
} }
}, },
summary: { summary: {
activityCount: 29,
annualizedPerformancePercent: 0.16690880197786, annualizedPerformancePercent: 0.16690880197786,
annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876, annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876,
cash: null, cash: null,
@ -3041,7 +3042,6 @@ describe('redactAttributes', () => {
interest: null, interest: null,
items: null, items: null,
liabilities: null, liabilities: null,
ordersCount: 29,
totalInvestment: null, totalInvestment: null,
totalValueInBaseCurrency: null, totalValueInBaseCurrency: null,
currentNetWorth: null currentNetWorth: null

View File

@ -7,11 +7,11 @@
</div> </div>
<div <div
class="flex-nowrap px-3 py-1 row" class="flex-nowrap px-3 py-1 row"
[hidden]="summary?.ordersCount === null" [hidden]="summary?.activityCount === null"
> >
<div class="d-flex flex-grow-1 ml-3 text-truncate"> <div class="d-flex flex-grow-1 ml-3 text-truncate">
{{ summary?.ordersCount }} {{ summary?.activityCount }}
<ng-container i18n>{summary?.ordersCount, plural, <ng-container i18n>{summary?.activityCount, plural,
=1 {activity} =1 {activity}
other {activities} other {activities}
}</ng-container> }</ng-container>

View File

@ -2902,7 +2902,7 @@
<context context-type="linenumber">3</context> <context context-type="linenumber">3</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target> <target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6586,7 +6586,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {Aktivität} other {Aktivitäten}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {Aktivität} other {Aktivitäten}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6563,7 +6563,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target> <target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6562,7 +6562,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {activity} autres {activities}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {activity} autres {activities}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6563,7 +6563,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {attività} other {attività}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {attività} other {attività}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6562,7 +6562,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {activiteit} other {activiteiten}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {activiteit} other {activiteiten}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6562,7 +6562,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target> <target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6562,7 +6562,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target> <target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6562,7 +6562,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {Etkinlik} other {Etkinlikler}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {Etkinlik} other {Etkinlikler}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -2982,7 +2982,7 @@
<context context-type="linenumber">3</context> <context context-type="linenumber">3</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {дія} other {дій}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {дія} other {дій}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -6000,7 +6000,7 @@
<context context-type="linenumber">8</context> <context context-type="linenumber">8</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html</context> <context context-type="sourcefile">apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html</context>

View File

@ -6563,7 +6563,7 @@
<context context-type="linenumber">48</context> <context context-type="linenumber">48</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html"> <trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source> <source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
<target state="translated">{VAR_PLURAL, plural, =1 {活动} other {活动}}</target> <target state="translated">{VAR_PLURAL, plural, =1 {活动} other {活动}}</target>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -1,6 +1,7 @@
import { PortfolioPerformance } from './portfolio-performance.interface'; import { PortfolioPerformance } from './portfolio-performance.interface';
export interface PortfolioSummary extends PortfolioPerformance { export interface PortfolioSummary extends PortfolioPerformance {
activityCount: number;
annualizedPerformancePercent: number; annualizedPerformancePercent: number;
annualizedPerformancePercentWithCurrencyEffect: number; annualizedPerformancePercentWithCurrencyEffect: number;
cash: number; cash: number;
@ -21,7 +22,6 @@ export interface PortfolioSummary extends PortfolioPerformance {
interest: number; interest: number;
items: number; items: number;
liabilities: number; liabilities: number;
ordersCount: number;
totalBuy: number; totalBuy: number;
totalSell: number; totalSell: number;
totalValueInBaseCurrency?: number; totalValueInBaseCurrency?: number;