From 6370127497416323e995a67f9391dd511cf26ebd Mon Sep 17 00:00:00 2001 From: csehatt741 Date: Wed, 30 Apr 2025 11:43:43 +0200 Subject: [PATCH] Save new/updated activity fix --- CHANGELOG.md | 6 ++++++ .../create-or-update-activity-dialog.component.ts | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3850390e6..5acd868cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Fixed the issue of saving valuable, interest and liability + ## 2.157.1 - 2025-04-29 ### Added diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts index f6ce2a81d..687c96ffc 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts @@ -238,7 +238,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { .get('dataSource') .removeValidators(Validators.required); this.activityForm.get('dataSource').updateValueAndValidity(); - this.activityForm.get('fee').reset(); + this.activityForm.get('fee').setValue(0); this.activityForm.get('name').setValidators(Validators.required); this.activityForm.get('name').updateValueAndValidity(); this.activityForm.get('quantity').setValue(1); @@ -271,12 +271,8 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { .removeValidators(Validators.required); this.activityForm.get('dataSource').updateValueAndValidity(); - if ( - (type === 'FEE' && this.activityForm.get('fee').value === 0) || - type === 'INTEREST' || - type === 'LIABILITY' - ) { - this.activityForm.get('fee').reset(); + if (type === 'INTEREST' || type === 'LIABILITY') { + this.activityForm.get('fee').setValue(0); } this.activityForm.get('name').setValidators(Validators.required);