From 22af85435cbdf4c3ce08ea6b310773567c48e0a0 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 2 May 2026 20:03:24 +0700 Subject: [PATCH] fix(lib): update fields to accept null --- libs/common/src/lib/dtos/update-user-setting.dto.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 cf7dff7e8..f2781835c 100644 --- a/libs/common/src/lib/dtos/update-user-setting.dto.ts +++ b/libs/common/src/lib/dtos/update-user-setting.dto.ts @@ -96,13 +96,21 @@ export class UpdateUserSettingDto { @IsOptional() locale?: string; + /** + * 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. + */ @IsNumber() @IsOptional() - projectedTotalAmount?: number; + projectedTotalAmount?: number | null; + /** + * The target date when the user plans to retire. + * Can be explicitly set to null to clear the value and calculate it dynamically. + */ @IsISO8601() @IsOptional() - retirementDate?: string; + retirementDate?: string | null; @IsNumber() @IsOptional()