mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-30 21:05:42 +00:00 
			
		
		
		
	Display "action" items with color
This commit is contained in:
		| @@ -5,6 +5,8 @@ import 'dart:ui'; | ||||
| const Color COLOR_GRAY = Color.fromRGBO(50, 50, 50, 1); | ||||
| const Color COLOR_GRAY_LIGHT = Color.fromRGBO(150, 150, 150, 1); | ||||
|  | ||||
| const Color COLOR_CLICK = Color.fromRGBO(175, 150, 100, 0.9); | ||||
|  | ||||
| const Color COLOR_BLUE = Color.fromRGBO(0, 0, 250, 1); | ||||
|  | ||||
| const Color COLOR_STAR = Color.fromRGBO(250, 250, 100, 1); | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
|  | ||||
| import 'package:inventree/api.dart'; | ||||
| import 'package:inventree/app_colors.dart'; | ||||
| import 'package:inventree/app_settings.dart'; | ||||
| import 'package:inventree/inventree/part.dart'; | ||||
| import 'package:inventree/inventree/sentry.dart'; | ||||
| @@ -166,7 +167,10 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().parentCategory), | ||||
|               subtitle: Text("${category?.parentpathstring}"), | ||||
|               leading: FaIcon(FontAwesomeIcons.levelUpAlt), | ||||
|               leading: FaIcon( | ||||
|                 FontAwesomeIcons.levelUpAlt, | ||||
|                 color: COLOR_CLICK, | ||||
|               ), | ||||
|               onTap: () { | ||||
|                 if (category == null || ((category?.parentId ?? 0) < 0)) { | ||||
|                   Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null))); | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| import 'package:inventree/api.dart'; | ||||
| import 'package:inventree/api_form.dart'; | ||||
| import 'package:inventree/app_colors.dart'; | ||||
| import 'package:inventree/app_settings.dart'; | ||||
| import 'package:inventree/barcode.dart'; | ||||
| import 'package:inventree/inventree/sentry.dart'; | ||||
| @@ -176,7 +177,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().parentCategory), | ||||
|               subtitle: Text("${location!.parentpathstring}"), | ||||
|               leading: FaIcon(FontAwesomeIcons.levelUpAlt), | ||||
|               leading: FaIcon(FontAwesomeIcons.levelUpAlt, color: COLOR_CLICK), | ||||
|               onTap: () { | ||||
|  | ||||
|                 int parent = location?.parentId ?? -1; | ||||
| @@ -302,7 +303,7 @@ List<Widget> detailTiles() { | ||||
|         tiles.add( | ||||
|             ListTile( | ||||
|               title: Text(L10().barcodeScanInItems), | ||||
|               leading: FaIcon(FontAwesomeIcons.exchangeAlt), | ||||
|               leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK), | ||||
|               trailing: FaIcon(FontAwesomeIcons.qrcode), | ||||
|               onTap: () { | ||||
|  | ||||
|   | ||||
| @@ -275,7 +275,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|         ListTile( | ||||
|             title: Text(L10().partCategory), | ||||
|             subtitle: Text("${part.categoryName}"), | ||||
|             leading: FaIcon(FontAwesomeIcons.sitemap), | ||||
|             leading: FaIcon(FontAwesomeIcons.sitemap, color: COLOR_CLICK), | ||||
|             onTap: () { | ||||
|               if (part.categoryId > 0) { | ||||
|                 InvenTreePartCategory().get(part.categoryId).then((var cat) { | ||||
| @@ -294,7 +294,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|         ListTile( | ||||
|           title: Text(L10().partCategory), | ||||
|           subtitle: Text(L10().partCategoryTopLevel), | ||||
|           leading: FaIcon(FontAwesomeIcons.sitemap), | ||||
|           leading: FaIcon(FontAwesomeIcons.sitemap, color: COLOR_CLICK), | ||||
|           onTap: () { | ||||
|             Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null))); | ||||
|           }, | ||||
| @@ -306,7 +306,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|     tiles.add( | ||||
|       ListTile( | ||||
|         title: Text(L10().stock), | ||||
|         leading: FaIcon(FontAwesomeIcons.boxes), | ||||
|         leading: FaIcon(FontAwesomeIcons.boxes, color: COLOR_CLICK), | ||||
|         trailing: Text("${part.inStockString}"), | ||||
|         onTap: () { | ||||
|           setState(() { | ||||
| @@ -392,8 +392,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|             title: Text("${part.link}"), | ||||
|             leading: FaIcon(FontAwesomeIcons.link), | ||||
|             trailing: FaIcon(FontAwesomeIcons.externalLinkAlt), | ||||
|             leading: FaIcon(FontAwesomeIcons.link, color: COLOR_CLICK), | ||||
|             onTap: () { | ||||
|               part.openLink(); | ||||
|             }, | ||||
| @@ -417,7 +416,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|             title: Text(L10().notes), | ||||
|             leading: FaIcon(FontAwesomeIcons.stickyNote), | ||||
|             leading: FaIcon(FontAwesomeIcons.stickyNote, color: COLOR_CLICK), | ||||
|             trailing: Text(""), | ||||
|             onTap: () { | ||||
|               Navigator.push( | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| import 'package:inventree/app_colors.dart'; | ||||
| import 'package:inventree/barcode.dart'; | ||||
| import 'package:inventree/inventree/model.dart'; | ||||
| import 'package:inventree/inventree/stock.dart'; | ||||
| @@ -434,7 +435,10 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|           ListTile( | ||||
|             title: Text(L10().stockLocation), | ||||
|             subtitle: Text("${item.locationPathString}"), | ||||
|             leading: FaIcon(FontAwesomeIcons.mapMarkerAlt), | ||||
|             leading: FaIcon( | ||||
|               FontAwesomeIcons.mapMarkerAlt, | ||||
|               color: COLOR_CLICK, | ||||
|             ), | ||||
|             onTap: () { | ||||
|               if (item.locationId > 0) { | ||||
|                 InvenTreeStockLocation().get(item.locationId).then((var loc) { | ||||
| @@ -503,9 +507,10 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text("${item.link}"), | ||||
|           leading: FaIcon(FontAwesomeIcons.link), | ||||
|           trailing: Text(""), | ||||
|           onTap: null, | ||||
|           leading: FaIcon(FontAwesomeIcons.link, color: COLOR_CLICK), | ||||
|           onTap: () { | ||||
|             item.openLink(); | ||||
|           }, | ||||
|         ) | ||||
|       ); | ||||
|     } | ||||
| @@ -514,7 +519,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().testResults), | ||||
|               leading: FaIcon(FontAwesomeIcons.tasks), | ||||
|               leading: FaIcon(FontAwesomeIcons.tasks, color: COLOR_CLICK), | ||||
|               trailing: Text("${item.testResultCount}"), | ||||
|               onTap: () { | ||||
|                 Navigator.push( | ||||
| @@ -550,8 +555,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().notes), | ||||
|           leading: FaIcon(FontAwesomeIcons.stickyNote), | ||||
|           trailing: Text(""), | ||||
|           leading: FaIcon(FontAwesomeIcons.stickyNote, color: COLOR_CLICK), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
|               context, | ||||
| @@ -594,7 +598,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().countStock), | ||||
|               leading: FaIcon(FontAwesomeIcons.checkCircle), | ||||
|               leading: FaIcon(FontAwesomeIcons.checkCircle, color: COLOR_CLICK), | ||||
|               onTap: _countStockDialog, | ||||
|               trailing: Text(item.quantityString), | ||||
|           ) | ||||
| @@ -603,7 +607,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().removeStock), | ||||
|               leading: FaIcon(FontAwesomeIcons.minusCircle), | ||||
|               leading: FaIcon(FontAwesomeIcons.minusCircle, color: COLOR_CLICK), | ||||
|               onTap: _removeStockDialog, | ||||
|           ) | ||||
|       ); | ||||
| @@ -611,7 +615,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().addStock), | ||||
|               leading: FaIcon(FontAwesomeIcons.plusCircle), | ||||
|               leading: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK), | ||||
|               onTap: _addStockDialog, | ||||
|           ) | ||||
|       ); | ||||
| @@ -620,7 +624,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     tiles.add( | ||||
|       ListTile( | ||||
|         title: Text(L10().transferStock), | ||||
|         leading: FaIcon(FontAwesomeIcons.exchangeAlt), | ||||
|         leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK), | ||||
|         onTap: () { _transferStockDialog(context); }, | ||||
|       ) | ||||
|     ); | ||||
| @@ -629,7 +633,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     tiles.add( | ||||
|       ListTile( | ||||
|         title: Text(L10().scanIntoLocation), | ||||
|         leading: FaIcon(FontAwesomeIcons.exchangeAlt), | ||||
|         leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK), | ||||
|         trailing: FaIcon(FontAwesomeIcons.qrcode), | ||||
|         onTap: () { | ||||
|           Navigator.push( | ||||
| @@ -647,7 +651,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().barcodeAssign), | ||||
|           leading: FaIcon(FontAwesomeIcons.barcode), | ||||
|           leading: FaIcon(FontAwesomeIcons.barcode, color: COLOR_CLICK), | ||||
|           trailing: FaIcon(FontAwesomeIcons.qrcode), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -663,7 +667,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().barcodeUnassign), | ||||
|           leading: FaIcon(FontAwesomeIcons.barcode), | ||||
|           leading: FaIcon(FontAwesomeIcons.barcode, color: COLOR_CLICK), | ||||
|           onTap: () { | ||||
|             _unassignBarcode(context); | ||||
|           } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user