mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-30 21:05:42 +00:00 
			
		
		
		
	Add counter for stock items
This commit is contained in:
		| @@ -332,15 +332,21 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | |||||||
|  |  | ||||||
|     tiles.add(headerTile()); |     tiles.add(headerTile()); | ||||||
|  |  | ||||||
|  |     tiles.add( | ||||||
|  |       ListTile( | ||||||
|  |         title: Text( | ||||||
|  |           I18N.of(context).stockItems, | ||||||
|  |           style: TextStyle(fontWeight: FontWeight.bold), | ||||||
|  |         ), | ||||||
|  |         subtitle: part.stockItems.isEmpty ? Text("No stock items available") : null, | ||||||
|  |         trailing: part.stockItems.isNotEmpty ? Text("${part.stockItems.length}") : null, | ||||||
|  |       ) | ||||||
|  |     ); | ||||||
|  |  | ||||||
|     if (loading) { |     if (loading) { | ||||||
|       tiles.add(progressIndicator()); |       tiles.add(progressIndicator()); | ||||||
|     } else if (part.stockItems.length > 0) { |     } else if (part.stockItems.length > 0) { | ||||||
|       tiles.add(PartStockList(part.stockItems)); |       tiles.add(PartStockList(part.stockItems)); | ||||||
|     } else { |  | ||||||
|       tiles.add(ListTile( |  | ||||||
|         title: Text("No Stock"), |  | ||||||
|         subtitle: Text("No stock items available") |  | ||||||
|       )); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     return tiles; |     return tiles; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user