Browse Source
			
			
			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 years ago
						Thomas Kaul
					
					2 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
12 additions and 
0 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
- 
					
					
					 
					apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -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; | 
			
		
	
	
		
			
				
					|  |  | 
 |