Browse Source
Bugfix/persistence of empty comment in create or update account dialog (#7512)
* Fix persistence of empty comment
* Update changelog
pull/7514/head
Thomas Kaul
6 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with
12 additions and
7 deletions
-
CHANGELOG.md
-
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
-
libs/common/src/lib/dtos/create-account.dto.ts
-
libs/common/src/lib/dtos/create-order.dto.ts
-
libs/common/src/lib/dtos/update-account.dto.ts
-
libs/common/src/lib/dtos/update-order.dto.ts
|
|
|
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the handling of the _Exclude from Analysis_ tag in the activities table |
|
|
|
- Fixed the persistence of an empty comment in the create or update account dialog |
|
|
|
- Resolved a validation error caused by empty strings in the asset profile details dialog of the admin control panel |
|
|
|
|
|
|
|
## 3.39.0 - 2026-08-01 |
|
|
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { UserService } from '@ghostfolio/client/services/user/user.service'; |
|
|
|
import { TAG_ID_EXCLUDE_FROM_ANALYSIS } from '@ghostfolio/common/config'; |
|
|
|
import { CreateAccountDto, UpdateAccountDto } from '@ghostfolio/common/dtos'; |
|
|
|
import { getStringOrNull } from '@ghostfolio/common/helper'; |
|
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import { validateObjectForForm } from '@ghostfolio/common/utils'; |
|
|
|
import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector'; |
|
|
|
@ -198,7 +199,7 @@ export class GfCreateOrUpdateAccountDialogComponent { |
|
|
|
protected async onSubmit() { |
|
|
|
const account: CreateAccountDto | UpdateAccountDto = { |
|
|
|
balance: this.accountForm.get('balance')?.value, |
|
|
|
comment: this.accountForm.get('comment')?.value ?? null, |
|
|
|
comment: getStringOrNull(this.accountForm.get('comment')?.value), |
|
|
|
currency: this.accountForm.get('currency')?.value, |
|
|
|
id: this.accountForm.get('accountId')?.value, |
|
|
|
name: this.accountForm.get('name')?.value, |
|
|
|
|
|
|
|
@ -1,7 +1,10 @@ |
|
|
|
import { UserService } from '@ghostfolio/client/services/user/user.service'; |
|
|
|
import { ASSET_CLASS_MAPPING, DEFAULT_LOCALE } from '@ghostfolio/common/config'; |
|
|
|
import { CreateOrderDto, UpdateOrderDto } from '@ghostfolio/common/dtos'; |
|
|
|
import { getDateFormatString } from '@ghostfolio/common/helper'; |
|
|
|
import { |
|
|
|
getDateFormatString, |
|
|
|
getStringOrNull |
|
|
|
} from '@ghostfolio/common/helper'; |
|
|
|
import { |
|
|
|
AssetClassSelectorOption, |
|
|
|
LookupItem |
|
|
|
@ -471,7 +474,7 @@ export class GfCreateOrUpdateActivityDialogComponent { |
|
|
|
accountId: this.activityForm.get('accountId')?.value, |
|
|
|
assetClass: this.activityForm.get('assetClass')?.value, |
|
|
|
assetSubClass: this.activityForm.get('assetSubClass')?.value, |
|
|
|
comment: this.activityForm.get('comment')?.value ?? null, |
|
|
|
comment: getStringOrNull(this.activityForm.get('comment')?.value), |
|
|
|
currency: this.activityForm.get('currency')?.value, |
|
|
|
customCurrency: this.activityForm.get('currencyOfUnitPrice')?.value, |
|
|
|
dataSource: ['FEE', 'INTEREST', 'LIABILITY', 'VALUABLE'].includes( |
|
|
|
|
|
|
|
@ -20,7 +20,7 @@ export class CreateAccountDto { |
|
|
|
@Transform(({ value }: TransformFnParams) => |
|
|
|
isString(value) ? value.trim() : value |
|
|
|
) |
|
|
|
comment?: string; |
|
|
|
comment?: string | null; |
|
|
|
|
|
|
|
@IsCurrencyCode() |
|
|
|
currency: string; |
|
|
|
|
|
|
|
@ -35,7 +35,7 @@ export class CreateOrderDto { |
|
|
|
@Transform(({ value }: TransformFnParams) => |
|
|
|
isString(value) ? value.trim() : value |
|
|
|
) |
|
|
|
comment?: string; |
|
|
|
comment?: string | null; |
|
|
|
|
|
|
|
@IsCurrencyCode() |
|
|
|
currency: string; |
|
|
|
|
|
|
|
@ -20,7 +20,7 @@ export class UpdateAccountDto { |
|
|
|
@Transform(({ value }: TransformFnParams) => |
|
|
|
isString(value) ? value.trim() : value |
|
|
|
) |
|
|
|
comment?: string; |
|
|
|
comment?: string | null; |
|
|
|
|
|
|
|
@IsCurrencyCode() |
|
|
|
currency: string; |
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ export class UpdateOrderDto { |
|
|
|
@Transform(({ value }: TransformFnParams) => |
|
|
|
isString(value) ? value.trim() : value |
|
|
|
) |
|
|
|
comment?: string; |
|
|
|
comment?: string | null; |
|
|
|
|
|
|
|
@IsCurrencyCode() |
|
|
|
currency: string; |
|
|
|
|