Browse Source
Bugfix/reset form values to null if empty string (#3327)
* Reset form values to null if empty string
* Update changelog
pull/3333/head
Thomas Kaul
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
9 additions and
5 deletions
-
CHANGELOG.md
-
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
-
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts
-
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
|
|
@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Upgraded `prisma` from version `5.12.1` to `5.13.0` |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the form submit in the asset profile details dialog of the admin control due to the `url` validation |
|
|
|
|
|
|
|
## 2.76.0 - 2024-04-23 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
@ -291,12 +291,12 @@ export class AssetProfileDialog implements OnDestroy, OnInit { |
|
|
|
symbolMapping, |
|
|
|
assetClass: this.assetProfileForm.get('assetClass').value, |
|
|
|
assetSubClass: this.assetProfileForm.get('assetSubClass').value, |
|
|
|
comment: this.assetProfileForm.get('comment').value ?? null, |
|
|
|
comment: this.assetProfileForm.get('comment').value || null, |
|
|
|
currency: (<Currency>( |
|
|
|
(<unknown>this.assetProfileForm.get('currency').value) |
|
|
|
))?.value, |
|
|
|
name: this.assetProfileForm.get('name').value, |
|
|
|
url: this.assetProfileForm.get('url').value |
|
|
|
url: this.assetProfileForm.get('url').value || null |
|
|
|
}; |
|
|
|
|
|
|
|
this.adminService |
|
|
|
|
|
@ -106,12 +106,12 @@ export class CreateOrUpdateAccountDialog implements OnDestroy { |
|
|
|
public async onSubmit() { |
|
|
|
const account: CreateAccountDto | UpdateAccountDto = { |
|
|
|
balance: this.accountForm.get('balance').value, |
|
|
|
comment: this.accountForm.get('comment').value, |
|
|
|
comment: this.accountForm.get('comment').value || null, |
|
|
|
currency: this.accountForm.get('currency').value?.value, |
|
|
|
id: this.accountForm.get('accountId').value, |
|
|
|
isExcluded: this.accountForm.get('isExcluded').value, |
|
|
|
name: this.accountForm.get('name').value, |
|
|
|
platformId: this.accountForm.get('platformId').value?.id ?? null |
|
|
|
platformId: this.accountForm.get('platformId').value?.id || null |
|
|
|
}; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
@ -448,7 +448,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { |
|
|
|
accountId: this.activityForm.get('accountId').value, |
|
|
|
assetClass: this.activityForm.get('assetClass').value, |
|
|
|
assetSubClass: this.activityForm.get('assetSubClass').value, |
|
|
|
comment: this.activityForm.get('comment').value, |
|
|
|
comment: this.activityForm.get('comment').value || null, |
|
|
|
currency: this.activityForm.get('currency').value, |
|
|
|
customCurrency: this.activityForm.get('currencyOfUnitPrice').value, |
|
|
|
date: this.activityForm.get('date').value, |
|
|
|