mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-11-04 07:15:46 +00:00 
			
		
		
		
	Add helpers for boolean functions
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
				
			|||||||
### 0.11.6 - April 2023
 | 
					### 0.11.6 - April 2023
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Add support for Project Codes
 | 
				
			||||||
- Fix action button colors
 | 
					- Fix action button colors
 | 
				
			||||||
- Added Norwegian translations
 | 
					- Added Norwegian translations
 | 
				
			||||||
- Fix serial number field when creating stock item
 | 
					- Fix serial number field when creating stock item
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								lib/api.dart
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								lib/api.dart
									
									
									
									
									
								
							@@ -1365,6 +1365,12 @@ class InvenTreeAPI {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Return a boolean global setting value
 | 
				
			||||||
 | 
					  Future<bool> getGlobalBooleanSetting(String key) async {
 | 
				
			||||||
 | 
					    String value = await getGlobalSetting(key);
 | 
				
			||||||
 | 
					    return value.toLowerCase() == "true";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Future<String> getUserSetting(String key) async {
 | 
					  Future<String> getUserSetting(String key) async {
 | 
				
			||||||
    if (!supportsSettings) return "";
 | 
					    if (!supportsSettings) return "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1385,6 +1391,12 @@ class InvenTreeAPI {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Return a boolean user setting value
 | 
				
			||||||
 | 
					  Future<bool> getUserBooleanSetting(String key) async {
 | 
				
			||||||
 | 
					    String value = await getUserSetting(key);
 | 
				
			||||||
 | 
					    return value.toLowerCase() == "true";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /*
 | 
					  /*
 | 
				
			||||||
   * Send a request to the server to locate / identify either a StockItem or StockLocation
 | 
					   * Send a request to the server to locate / identify either a StockItem or StockLocation
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user