Merge branch 'main' of github.com:ghostfolio/ghostfolio
All checks were successful
Docker image CD / build_and_push (push) Successful in 21m18s
All checks were successful
Docker image CD / build_and_push (push) Successful in 21m18s
This commit is contained in:
commit
d395b195ff
@ -1249,7 +1249,7 @@ export class PortfolioService {
|
||||
|
||||
const rules: PortfolioReportResponse['rules'] = {
|
||||
accountClusterRisk:
|
||||
summary.ordersCount > 0
|
||||
summary.activityCount > 0
|
||||
? await this.rulesService.evaluate(
|
||||
[
|
||||
new AccountClusterRiskCurrentInvestment(
|
||||
@ -1265,7 +1265,7 @@ export class PortfolioService {
|
||||
)
|
||||
: undefined,
|
||||
assetClassClusterRisk:
|
||||
summary.ordersCount > 0
|
||||
summary.activityCount > 0
|
||||
? await this.rulesService.evaluate(
|
||||
[
|
||||
new AssetClassClusterRiskEquity(
|
||||
@ -1281,7 +1281,7 @@ export class PortfolioService {
|
||||
)
|
||||
: undefined,
|
||||
currencyClusterRisk:
|
||||
summary.ordersCount > 0
|
||||
summary.activityCount > 0
|
||||
? await this.rulesService.evaluate(
|
||||
[
|
||||
new CurrencyClusterRiskBaseCurrencyCurrentInvestment(
|
||||
@ -1297,7 +1297,7 @@ export class PortfolioService {
|
||||
)
|
||||
: undefined,
|
||||
economicMarketClusterRisk:
|
||||
summary.ordersCount > 0
|
||||
summary.activityCount > 0
|
||||
? await this.rulesService.evaluate(
|
||||
[
|
||||
new EconomicMarketClusterRiskDevelopedMarkets(
|
||||
@ -1338,7 +1338,7 @@ export class PortfolioService {
|
||||
userSettings
|
||||
),
|
||||
regionalMarketClusterRisk:
|
||||
summary.ordersCount > 0
|
||||
summary.activityCount > 0
|
||||
? await this.rulesService.evaluate(
|
||||
[
|
||||
new RegionalMarketClusterRiskAsiaPacific(
|
||||
@ -1981,6 +1981,9 @@ export class PortfolioService {
|
||||
netPerformanceWithCurrencyEffect,
|
||||
totalBuy,
|
||||
totalSell,
|
||||
activityCount: activities.filter(({ type }) => {
|
||||
return ['BUY', 'SELL'].includes(type);
|
||||
}).length,
|
||||
committedFunds: committedFunds.toNumber(),
|
||||
currentValueInBaseCurrency: currentValueInBaseCurrency.toNumber(),
|
||||
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(),
|
||||
@ -2008,9 +2011,6 @@ export class PortfolioService {
|
||||
interest: interest.toNumber(),
|
||||
items: valuables.toNumber(),
|
||||
liabilities: liabilities.toNumber(),
|
||||
ordersCount: activities.filter(({ type }) => {
|
||||
return ['BUY', 'SELL'].includes(type);
|
||||
}).length,
|
||||
totalInvestment: totalInvestment.toNumber(),
|
||||
totalValueInBaseCurrency: netWorth
|
||||
};
|
||||
|
@ -1515,6 +1515,7 @@ describe('redactAttributes', () => {
|
||||
}
|
||||
},
|
||||
summary: {
|
||||
activityCount: 29,
|
||||
annualizedPerformancePercent: 0.16690880197786,
|
||||
annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876,
|
||||
cash: null,
|
||||
@ -1538,7 +1539,6 @@ describe('redactAttributes', () => {
|
||||
interest: null,
|
||||
items: null,
|
||||
liabilities: null,
|
||||
ordersCount: 29,
|
||||
totalInvestment: null,
|
||||
totalValueInBaseCurrency: null,
|
||||
currentNetWorth: null
|
||||
@ -3018,6 +3018,7 @@ describe('redactAttributes', () => {
|
||||
}
|
||||
},
|
||||
summary: {
|
||||
activityCount: 29,
|
||||
annualizedPerformancePercent: 0.16690880197786,
|
||||
annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876,
|
||||
cash: null,
|
||||
@ -3041,7 +3042,6 @@ describe('redactAttributes', () => {
|
||||
interest: null,
|
||||
items: null,
|
||||
liabilities: null,
|
||||
ordersCount: 29,
|
||||
totalInvestment: null,
|
||||
totalValueInBaseCurrency: null,
|
||||
currentNetWorth: null
|
||||
|
@ -7,11 +7,11 @@
|
||||
</div>
|
||||
<div
|
||||
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">
|
||||
{{ summary?.ordersCount }}
|
||||
<ng-container i18n>{summary?.ordersCount, plural,
|
||||
{{ summary?.activityCount }}
|
||||
<ng-container i18n>{summary?.activityCount, plural,
|
||||
=1 {activity}
|
||||
other {activities}
|
||||
}</ng-container>
|
||||
|
@ -2902,7 +2902,7 @@
|
||||
<context context-type="linenumber">3</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6586,7 +6586,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {Aktivität} other {Aktivitäten}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6563,7 +6563,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6562,7 +6562,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {activity} autres {activities}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6563,7 +6563,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {attività} other {attività}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6562,7 +6562,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {activiteit} other {activiteiten}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6562,7 +6562,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6562,7 +6562,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="new">{VAR_PLURAL, plural, =1 {activity} other {activities}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6562,7 +6562,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {Etkinlik} other {Etkinlikler}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -2982,7 +2982,7 @@
|
||||
<context context-type="linenumber">3</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {дія} other {дій}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -6000,7 +6000,7 @@
|
||||
<context context-type="linenumber">8</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html</context>
|
||||
|
@ -6563,7 +6563,7 @@
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="ebf471e68247ca2110cdc5c98538e2e2bbf6e56e" datatype="html">
|
||||
<trans-unit id="44268762ecf7c7d690288f763f17196216671353" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {activity} other {activities}}</source>
|
||||
<target state="translated">{VAR_PLURAL, plural, =1 {活动} other {活动}}</target>
|
||||
<context-group purpose="location">
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { PortfolioPerformance } from './portfolio-performance.interface';
|
||||
|
||||
export interface PortfolioSummary extends PortfolioPerformance {
|
||||
activityCount: number;
|
||||
annualizedPerformancePercent: number;
|
||||
annualizedPerformancePercentWithCurrencyEffect: number;
|
||||
cash: number;
|
||||
@ -21,7 +22,6 @@ export interface PortfolioSummary extends PortfolioPerformance {
|
||||
interest: number;
|
||||
items: number;
|
||||
liabilities: number;
|
||||
ordersCount: number;
|
||||
totalBuy: number;
|
||||
totalSell: number;
|
||||
totalValueInBaseCurrency?: number;
|
||||
|
Loading…
x
Reference in New Issue
Block a user