From 366c732668344b5a039b57b2e75a3cf2d5285d68 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 10 May 2022 00:30:28 +1000 Subject: [PATCH] Add support for locating a stock item --- lib/widget/stock_detail.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index 3e2f4709..b0b3cdab 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -67,6 +67,18 @@ class _StockItemDisplayState extends RefreshableState { ); } + if (InvenTreeAPI().supportsMixin("locate")) { + actions.add( + IconButton( + icon: FaIcon(FontAwesomeIcons.searchLocation), + tooltip: L10().locateItem, + onPressed: () async { + InvenTreeAPI().locateItemOrLocation(context, item: item.pk); + }, + ) + ); + } + if (InvenTreeAPI().checkPermission("stock", "change")) { actions.add( IconButton(