Browse Source

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

* Fix asset class fields

* Update changelog
pull/8045/head
Thomas Kaul 2 days ago
committed by GitHub
parent
commit
70122cfe05
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 12
      apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
  3. 16
      apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html

1
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

12
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,

16
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>

Loading…
Cancel
Save