From 539a610731d70eeda6eb345fb245121a7339cce2 Mon Sep 17 00:00:00 2001 From: Pedro Moreira Date: Wed, 14 Oct 2026 22:32:08 +0100 Subject: [PATCH] Allow ROAI and ROI as performance calculation type in user settings --- libs/common/src/lib/dtos/update-user-setting.dto.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/common/src/lib/dtos/update-user-setting.dto.ts b/libs/common/src/lib/dtos/update-user-setting.dto.ts index d290f1fdad..b51d8bb61b 100644 --- a/libs/common/src/lib/dtos/update-user-setting.dto.ts +++ b/libs/common/src/lib/dtos/update-user-setting.dto.ts @@ -5,6 +5,7 @@ import type { HoldingsViewMode, ViewMode } from '@ghostfolio/common/types'; +import { PerformanceCalculationType } from '@ghostfolio/common/types/performance-calculation-type.type'; import { IsCurrencyCode } from '@ghostfolio/common/validators/is-currency-code'; import { @@ -100,6 +101,10 @@ export class UpdateUserSettingDto { @IsOptional() locale?: string; + @IsIn([PerformanceCalculationType.ROAI, PerformanceCalculationType.ROI]) + @IsOptional() + performanceCalculationType?: PerformanceCalculationType; + /** * The target financial amount the user aims to reach before retiring. * Can be explicitly set to null to clear the value and calculate it dynamically.