Browse Source
			
			
			Feature/preselect account in create or update activity dialog (#3413)
			
				* Preselect account if there is only one
* Update changelog
			
			
				pull/3425/head
			
			
		 
		
			
				
					
						
						Eduardo Marinho
					
					1 year ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
7 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
 
			
				- 
					
					
					 
					apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					### Changed | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Improved the usability of the create or update activity dialog by preselecting the (only) account | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Improved the usability of the date range selector in the assistant | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Refactored the holding detail dialog to a standalone component | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Refreshed the cryptocurrencies list | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -91,7 +91,12 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.activityForm = this.formBuilder.group({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      accountId: [this.data.activity?.accountId, Validators.required], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      accountId: [ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.data.accounts.length === 1 && !this.data.activity?.accountId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          ? this.data.accounts[0].id | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          : this.data.activity?.accountId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Validators.required | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      ], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      assetClass: [this.data.activity?.SymbolProfile?.assetClass], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      assetSubClass: [this.data.activity?.SymbolProfile?.assetSubClass], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      comment: [this.data.activity?.comment], | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |