mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-30 21:05:42 +00:00 
			
		
		
		
	Load stock detail *before* opening new view
This commit is contained in:
		| @@ -80,6 +80,14 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | |||||||
|     refresh(); |     refresh(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   void _showStock(BuildContext context) async { | ||||||
|  |     await part.getStockItems(context); | ||||||
|  |     Navigator.push( | ||||||
|  |         context, | ||||||
|  |         MaterialPageRoute(builder: (context) => PartStockDetailWidget(part)) | ||||||
|  |     ); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   void _editPartDialog() { |   void _editPartDialog() { | ||||||
|  |  | ||||||
|     // Values which can be edited |     // Values which can be edited | ||||||
| @@ -209,10 +217,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | |||||||
|         leading: FaIcon(FontAwesomeIcons.boxes), |         leading: FaIcon(FontAwesomeIcons.boxes), | ||||||
|         trailing: Text("${part.inStock}"), |         trailing: Text("${part.inStock}"), | ||||||
|         onTap: () { |         onTap: () { | ||||||
|           Navigator.push( |           _showStock(context); | ||||||
|               context, |  | ||||||
|               MaterialPageRoute(builder: (context) => PartStockDetailWidget(part)) |  | ||||||
|           ); |  | ||||||
|         }, |         }, | ||||||
|       ), |       ), | ||||||
|     ); |     ); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user