mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	only one api call
This commit is contained in:
		| @@ -153,13 +153,7 @@ function enableSidetree(label) { | ||||
|     $('#tree').jstree({ | ||||
|         'core': { | ||||
|             'data': { | ||||
|                 'url': function(node) { | ||||
|                     if (node.id == '#') { | ||||
|                         var url_parts = String(window.location).split("/").slice(-3); | ||||
|                         return `/api/part/category/tree/${url_parts[0]}/${url_parts[1]}/`; | ||||
|                     } | ||||
|                     return '/api/part/category/tree/' | ||||
|                 }, | ||||
|                 'url': '/api/part/category/tree/', | ||||
|                 'data': function(node) { | ||||
|                     return {'id': node.id}; | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user