mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-11-03 23:05:44 +00:00 
			
		
		
		
	Merge pull request #91 from inventree/in-production
Show if stock item is "in production"
This commit is contained in:
		@@ -230,6 +230,8 @@ class InvenTreeStockItem extends InvenTreeModel {
 | 
			
		||||
 | 
			
		||||
  int get trackingItemCount => (jsondata["tracking_items"] ?? 0) as int;
 | 
			
		||||
 | 
			
		||||
  bool get isBuilding => (jsondata["is_building"] ?? false) as bool;
 | 
			
		||||
 | 
			
		||||
  // Date of last update
 | 
			
		||||
  DateTime? get updatedDate {
 | 
			
		||||
    if (jsondata.containsKey("updated")) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								lib/l10n
									
									
									
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								lib/l10n
									
									
									
									
									
								
							 Submodule lib/l10n updated: 42662619b3...77fe28ffc7
									
								
							@@ -706,7 +706,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
 | 
			
		||||
                });
 | 
			
		||||
              }
 | 
			
		||||
            },
 | 
			
		||||
          )
 | 
			
		||||
          ),
 | 
			
		||||
      );
 | 
			
		||||
    } else {
 | 
			
		||||
      tiles.add(
 | 
			
		||||
@@ -718,6 +718,19 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (item.isBuilding) {
 | 
			
		||||
      tiles.add(
 | 
			
		||||
        ListTile(
 | 
			
		||||
          title: Text(L10().inProduction),
 | 
			
		||||
          leading: FaIcon(FontAwesomeIcons.tools),
 | 
			
		||||
          subtitle: Text(L10().inProductionDetail),
 | 
			
		||||
          onTap: () {
 | 
			
		||||
            // TODO: Click through to the "build order"
 | 
			
		||||
          },
 | 
			
		||||
        )
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (item.batch.isNotEmpty) {
 | 
			
		||||
      tiles.add(
 | 
			
		||||
        ListTile(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user