Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/fix quantity in update activity dialog (#5199)

Attila Cseh6f7e879aca6e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a3ad9fc38..6e91d46a53 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed the horizontal ellipsis icon in the accounts table component
+- Fixed the quantity value in the update activity dialog
- Fixed the static portfolio analysis rule for no accounts: _Account Cluster Risks_ (Current Investment)
- Fixed the static portfolio analysis rule for no accounts: _Account Cluster Risks_ (Single Account)
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 c3a75611e3..656e4a88fa 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
@@ -355,7 +355,11 @@ export class GfCreateOrUpdateActivityDialog implements OnDestroy {
this.activityForm.get('fee').setValue(0);
this.activityForm.get('name').setValidators(Validators.required);
this.activityForm.get('name').updateValueAndValidity();
- this.activityForm.get('quantity').setValue(1);
+
+ if (type === 'ITEM') {
+ this.activityForm.get('quantity').setValue(1);
+ }
+
this.activityForm
.get('searchSymbol')
.removeValidators(Validators.required);