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
This commit is contained in:
parent
efdc9b387f
commit
6f3cce1c5f
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### 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)
|
- 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
|
- 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(() => {
|
this.activityForm.controls['searchSymbol'].valueChanges.subscribe(() => {
|
||||||
if (this.activityForm.controls['searchSymbol'].invalid) {
|
if (this.activityForm.controls['searchSymbol'].invalid) {
|
||||||
this.data.activity.SymbolProfile = null;
|
this.data.activity.SymbolProfile = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user