Browse Source

Fix persistence of empty comment

pull/7510/head
Thomas Kaul 4 weeks ago
parent
commit
2dcb538007
  1. 1
      apps/client/eslint.config.cjs
  2. 2
      apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts
  3. 2
      apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts

1
apps/client/eslint.config.cjs

@ -52,6 +52,7 @@ module.exports = [
'error', 'error',
{ {
ignorePrimitives: { ignorePrimitives: {
boolean: true,
string: true string: true
} }
} }

2
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts

@ -198,7 +198,7 @@ export class GfCreateOrUpdateAccountDialogComponent {
protected async onSubmit() { protected async onSubmit() {
const account: CreateAccountDto | UpdateAccountDto = { const account: CreateAccountDto | UpdateAccountDto = {
balance: this.accountForm.get('balance')?.value, balance: this.accountForm.get('balance')?.value,
comment: this.accountForm.get('comment')?.value ?? null, comment: this.accountForm.get('comment')?.value || null,
currency: this.accountForm.get('currency')?.value, currency: this.accountForm.get('currency')?.value,
id: this.accountForm.get('accountId')?.value, id: this.accountForm.get('accountId')?.value,
name: this.accountForm.get('name')?.value, name: this.accountForm.get('name')?.value,

2
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts

@ -471,7 +471,7 @@ export class GfCreateOrUpdateActivityDialogComponent {
accountId: this.activityForm.get('accountId')?.value, accountId: this.activityForm.get('accountId')?.value,
assetClass: this.activityForm.get('assetClass')?.value, assetClass: this.activityForm.get('assetClass')?.value,
assetSubClass: this.activityForm.get('assetSubClass')?.value, assetSubClass: this.activityForm.get('assetSubClass')?.value,
comment: this.activityForm.get('comment')?.value ?? null, comment: this.activityForm.get('comment')?.value || null,
currency: this.activityForm.get('currency')?.value, currency: this.activityForm.get('currency')?.value,
customCurrency: this.activityForm.get('currencyOfUnitPrice')?.value, customCurrency: this.activityForm.get('currencyOfUnitPrice')?.value,
dataSource: ['FEE', 'INTEREST', 'LIABILITY', 'VALUABLE'].includes( dataSource: ['FEE', 'INTEREST', 'LIABILITY', 'VALUABLE'].includes(

Loading…
Cancel
Save