Browse Source
			
			
			Feature/improve validation of currency management (#2761)
			
				* Improve validation
* Update changelog
			
			
				pull/2767/head
			
			
		 
		
			
				
					
						
						Thomas Kaul
					
					2 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
7 additions and 
2 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
 
			
				- 
					
					
					 
					apps/client/src/app/components/admin-overview/admin-overview.component.ts
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					### Changed | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Set the select column of the lazy-loaded activities table to stick at the end (experimental) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Improved the validation of the currency management in the admin control panel | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Improved the performance of the value redaction interceptor for the impersonation mode by eliminating `cloneDeep` | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					### Fixed | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -119,8 +119,12 @@ export class AdminOverviewComponent implements OnDestroy, OnInit { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const currency = prompt($localize`Please add a currency:`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (currency) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      const currencies = uniq([...this.customCurrencies, currency]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.putAdminSetting({ key: PROPERTY_CURRENCIES, value: currencies }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (currency.length === 3) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        const currencies = uniq([...this.customCurrencies, currency]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.putAdminSetting({ key: PROPERTY_CURRENCIES, value: currencies }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        alert($localize`${currency} is an invalid currency!`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |