From f5180ce88fb3039dcb877a6d979dbae8d5dbcc23 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Mon, 3 Jul 2023 10:10:08 +0200
Subject: [PATCH 1/3] Improve wording (#2118)
---
.../exploring-the-path-to-fire-page.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/client/src/app/pages/blog/2023/07/exploring-the-path-to-fire/exploring-the-path-to-fire-page.html b/apps/client/src/app/pages/blog/2023/07/exploring-the-path-to-fire/exploring-the-path-to-fire-page.html
index ca8ccdc8c..8b3359b0b 100644
--- a/apps/client/src/app/pages/blog/2023/07/exploring-the-path-to-fire/exploring-the-path-to-fire-page.html
+++ b/apps/client/src/app/pages/blog/2023/07/exploring-the-path-to-fire/exploring-the-path-to-fire-page.html
@@ -79,7 +79,7 @@
FIRE grants individuals a higher level of autonomy and empowerment
over their schedules and the activities they choose to pursue.
Whether it involves exploring new career paths, starting a business,
- or embarking on extensive travel, FIRE provides the flexibility to
+ or undertaking adventurous travels, FIRE provides the flexibility to
determine how time is spent and how life is shaped.
@@ -127,8 +127,8 @@
understanding of the advantages and disadvantages.
- Knowing your financial situation and tracking it diligently is vital
- on your journey to FIRE. This is where the power of
+ Knowing your financial situation and consistently monitoring it is
+ vital on your journey to FIRE. This is where the strength of
Ghostfolio, a comprehensive open
source wealth management software, comes into play. By leveraging
Ghostfolio, you can gain deep insights into your financial health,
From 0d421e71812325b91791f13511ea3a84a29fe0a3 Mon Sep 17 00:00:00 2001
From: Arghya Ghosh
Date: Tue, 4 Jul 2023 01:59:00 +0530
Subject: [PATCH 2/3] Bugfix/fix adding 'Item' and 'Liability' activities
(#2119)
* Fix adding activities of type item and liability
* Update changelog
---
CHANGELOG.md | 6 ++++
...ate-or-update-activity-dialog.component.ts | 11 +++++--
.../abstract-mat-form-field.ts | 7 +++--
.../symbol-autocomplete.component.ts | 30 ++++++++-----------
4 files changed, 31 insertions(+), 23 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 63bb46822..8d86a032b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## Unreleased
+
+### Fixed
+
+- Fixed the creation of (wealth) items and liabilities
+
## 1.285.0 - 2023-07-01
### Added
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 6962d4d40..abf8fb310 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
@@ -241,7 +241,11 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
this.activityForm.controls['searchSymbol'].valueChanges.subscribe(() => {
if (this.activityForm.controls['searchSymbol'].invalid) {
this.data.activity.SymbolProfile = null;
- } else {
+ } else if (
+ ['BUY', 'DIVIDEND', 'SELL'].includes(
+ this.activityForm.controls['type'].value
+ )
+ ) {
this.activityForm.controls['dataSource'].setValue(
this.activityForm.controls['searchSymbol'].value.dataSource
);
@@ -408,8 +412,9 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
fee: this.activityForm.controls['fee'].value,
quantity: this.activityForm.controls['quantity'].value,
symbol:
- this.activityForm.controls['searchSymbol'].value.symbol === undefined ||
- isUUID(this.activityForm.controls['searchSymbol'].value.symbol)
+ this.activityForm.controls['searchSymbol'].value?.symbol ===
+ undefined ||
+ isUUID(this.activityForm.controls['searchSymbol'].value?.symbol)
? this.activityForm.controls['name'].value
: this.activityForm.controls['searchSymbol'].value.symbol,
tags: this.activityForm.controls['tags'].value,
diff --git a/libs/ui/src/lib/symbol-autocomplete/abstract-mat-form-field.ts b/libs/ui/src/lib/symbol-autocomplete/abstract-mat-form-field.ts
index b0ce3dc9b..38198daea 100644
--- a/libs/ui/src/lib/symbol-autocomplete/abstract-mat-form-field.ts
+++ b/libs/ui/src/lib/symbol-autocomplete/abstract-mat-form-field.ts
@@ -9,7 +9,7 @@ import {
Input,
OnDestroy
} from '@angular/core';
-import { ControlValueAccessor, NgControl } from '@angular/forms';
+import { ControlValueAccessor, NgControl, Validators } from '@angular/forms';
import { MatFormFieldControl } from '@angular/material/form-field';
import { Subject } from 'rxjs';
@@ -96,7 +96,10 @@ export abstract class AbstractMatFormField
public _required: boolean = false;
public get required() {
- return this._required;
+ return (
+ this._required ||
+ this.ngControl.control?.hasValidator(Validators.required)
+ );
}
@Input()
diff --git a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts
index ea99ab0e5..654a634ff 100644
--- a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts
+++ b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts
@@ -9,7 +9,7 @@ import {
OnInit,
ViewChild
} from '@angular/core';
-import { FormControl, NgControl, Validators } from '@angular/forms';
+import { FormControl, NgControl } from '@angular/forms';
import {
MatAutocomplete,
MatAutocompleteSelectedEvent
@@ -25,7 +25,8 @@ import {
debounceTime,
distinctUntilChanged,
filter,
- switchMap
+ switchMap,
+ takeUntil
} from 'rxjs/operators';
import { AbstractMatFormField } from './abstract-mat-form-field';
@@ -76,12 +77,18 @@ export class SymbolAutocompleteComponent
}
public ngOnInit() {
- super.required = this.ngControl.control?.hasValidator(Validators.required);
-
if (this.disabled) {
this.control.disable();
}
+ this.control.valueChanges
+ .pipe(takeUntil(this.unsubscribeSubject))
+ .subscribe(() => {
+ if (super.value) {
+ super.value.dataSource = null;
+ }
+ });
+
this.control.valueChanges
.pipe(
debounceTime(400),
@@ -89,6 +96,7 @@ export class SymbolAutocompleteComponent
filter((query) => {
return isString(query) && query.length > 1;
}),
+ takeUntil(this.unsubscribeSubject),
tap(() => {
this.isLoading = true;
@@ -136,11 +144,6 @@ export class SymbolAutocompleteComponent
public ngDoCheck() {
if (this.ngControl) {
this.validateRequired();
-
- if (this.control.touched) {
- this.validateSelection();
- }
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
this.stateChanges.next();
}
@@ -173,13 +176,4 @@ export class SymbolAutocompleteComponent
this.ngControl.control.setErrors({ invalidData: true });
}
}
-
- private validateSelection() {
- const error =
- !this.isValueInOptions(this.input?.value) ||
- this.input?.value !== super.value?.symbol;
- if (error) {
- this.ngControl.control.setErrors({ invalidData: true });
- }
- }
}
From 421072c7fa8e724d8e3de85e0a03e56cc13ba8fb Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Mon, 3 Jul 2023 22:30:33 +0200
Subject: [PATCH 3/3] Release 1.286.0 (#2120)
---
CHANGELOG.md | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d86a032b..d753a612e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## Unreleased
+## 1.286.0 - 2023-07-03
### Fixed
diff --git a/package.json b/package.json
index 24c99c0b6..298975e66 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "1.285.0",
+ "version": "1.286.0",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"scripts": {