Skip to content

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

Bugfix/asset class fields in create or update activity dialog (#8072)

Thomas Kaul70122cfe05d4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2478a09275..117e8e5125 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Fixed the visibility of the asset class, asset sub class, fee and quantity fields of a valuable in the create activity dialog
- Fixed the missing mapping for Aland Islands in the country weightings of the _Financial Modeling Prep_ service
## 3.80.2 - 2026-10-06
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 f24297dbd0..c041b565aa 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
@@ -488,10 +488,18 @@ export class GfCreateOrUpdateActivityDialogComponent {
}
protected async onSubmit() {
+ const isAssetClassApplicable =
+ this.activityForm.get('type')?.value === 'VALUABLE' ||
+ this.mode === 'update';
+
const activity: CreateOrderDto | UpdateOrderDto = {
accountId: this.activityForm.get('accountId')?.value,
- assetClass: this.activityForm.get('assetClass')?.value,
- assetSubClass: this.activityForm.get('assetSubClass')?.value,
+ assetClass: isAssetClassApplicable
+ ? this.activityForm.get('assetClass')?.value
+ : undefined,
+ assetSubClass: isAssetClassApplicable
+ ? this.activityForm.get('assetSubClass')?.value
+ : undefined,
comment: getStringOrNull(this.activityForm.get('comment')?.value),
currency: this.activityForm.get('currency')?.value,
customCurrency: this.activityForm.get('currencyOfUnitPrice')?.value,
diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
index f9494efdc2..104d937b35 100644
--- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
+++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
@@ -157,8 +157,8 @@
[class.d-none]="
activityForm.get('type')?.value === 'FEE' ||
activityForm.get('type')?.value === 'INTEREST' ||
- activityForm.get('type')?.value === 'ITEM' ||
- activityForm.get('type')?.value === 'LIABILITY'
+ activityForm.get('type')?.value === 'LIABILITY' ||
+ activityForm.get('type')?.value === 'VALUABLE'
"
>
<mat-form-field appearance="outline" class="w-100">
@@ -180,10 +180,10 @@
@case ('INTEREST') {
<ng-container i18n>Value</ng-container>
}
- @case ('ITEM') {
+ @case ('LIABILITY') {
<ng-container i18n>Value</ng-container>
}
- @case ('LIABILITY') {
+ @case ('VALUABLE') {
<ng-container i18n>Value</ng-container>
}
@default {
@@ -231,8 +231,8 @@
class="mb-3"
[class.d-none]="
activityForm.get('type')?.value === 'INTEREST' ||
- activityForm.get('type')?.value === 'ITEM' ||
- activityForm.get('type')?.value === 'LIABILITY'
+ activityForm.get('type')?.value === 'LIABILITY' ||
+ activityForm.get('type')?.value === 'VALUABLE'
"
>
<mat-form-field appearance="outline" class="w-100">
@@ -262,7 +262,7 @@
</div>
<div
class="mb-3"
- [class.d-none]="activityForm.get('type')?.value !== 'ITEM'"
+ [class.d-none]="activityForm.get('type')?.value !== 'VALUABLE'"
>
<mat-form-field appearance="outline" class="w-100">
<mat-label i18n>Asset Class</mat-label>
@@ -281,7 +281,7 @@
</div>
<div
class="mb-3"
- [class.d-none]="activityForm.get('type')?.value !== 'ITEM'"
+ [class.d-none]="activityForm.get('type')?.value !== 'VALUABLE'"
>
<mat-form-field appearance="outline" class="w-100">
<mat-label i18n>Asset Sub Class</mat-label>