Feature/disable option to update cash balance if date is not today (#3229)

* Disable option to update cash balance if date is not today

* Update changelog
pull/3234/head
Thomas Kaul 2 months ago committed by GitHub
parent efdc9b387f
commit 6f3cce1c5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Disabled the option to update the cash balance of an account if date is not today
- Improved the usability of the date range support by specific years (`2023`, `2022`, `2021`, etc.) in the assistant (experimental)
- Introduced a factory for the portfolio calculations to support different algorithms in future

@ -275,6 +275,17 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
}
);
this.activityForm.controls['date'].valueChanges.subscribe(() => {
if (isToday(this.activityForm.controls['date'].value)) {
this.activityForm.controls['updateAccountBalance'].enable();
} else {
this.activityForm.controls['updateAccountBalance'].disable();
this.activityForm.controls['updateAccountBalance'].setValue(false);
}
this.changeDetectorRef.markForCheck();
});
this.activityForm.controls['searchSymbol'].valueChanges.subscribe(() => {
if (this.activityForm.controls['searchSymbol'].invalid) {
this.data.activity.SymbolProfile = null;

Loading…
Cancel
Save