mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-30 22:46:49 +00:00
Reload page after performing QR action(s)
This commit is contained in:
parent
d1e612698e
commit
e53170ed7e
2
lib/l10n
2
lib/l10n
@ -1 +1 @@
|
|||||||
Subproject commit fc412e0315c435efa43bbdc69a20e00ba35c8481
|
Subproject commit 47cab0e55b09fc0bfe80ee841e2f8b653d18bb0a
|
@ -419,7 +419,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
|
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Test Results"),
|
title: Text(I18N.of(context).testResults),
|
||||||
leading: FaIcon(FontAwesomeIcons.tasks),
|
leading: FaIcon(FontAwesomeIcons.tasks),
|
||||||
trailing: Text("${item.testResultCount}"),
|
trailing: Text("${item.testResultCount}"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -508,14 +508,16 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
// Scan item into a location
|
// Scan item into a location
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Scan Into Location"),
|
title: Text(I18N.of(context).scanIntoLocation),
|
||||||
leading: FaIcon(FontAwesomeIcons.exchangeAlt),
|
leading: FaIcon(FontAwesomeIcons.exchangeAlt),
|
||||||
trailing: FaIcon(FontAwesomeIcons.qrcode),
|
trailing: FaIcon(FontAwesomeIcons.qrcode),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) => InvenTreeQRView(StockItemScanIntoLocationHandler(item)))
|
MaterialPageRoute(builder: (context) => InvenTreeQRView(StockItemScanIntoLocationHandler(item)))
|
||||||
);
|
).then((context) {
|
||||||
|
refresh();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -524,14 +526,16 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
if (item.uid.isEmpty) {
|
if (item.uid.isEmpty) {
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Assign Barcode"),
|
title: Text(I18N.of(context).assignBarcode),
|
||||||
leading: FaIcon(FontAwesomeIcons.barcode),
|
leading: FaIcon(FontAwesomeIcons.barcode),
|
||||||
trailing: FaIcon(FontAwesomeIcons.qrcode),
|
trailing: FaIcon(FontAwesomeIcons.qrcode),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) => InvenTreeQRView(StockItemBarcodeAssignmentHandler(item)))
|
MaterialPageRoute(builder: (context) => InvenTreeQRView(StockItemBarcodeAssignmentHandler(item)))
|
||||||
);
|
).then((context) {
|
||||||
|
refresh();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -540,49 +544,6 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
return tiles;
|
return tiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Return a list of context-sensitive action buttons.
|
|
||||||
* Not all buttons will be avaialable for a given StockItem,
|
|
||||||
* depending on the properties of that StockItem
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
List<SpeedDialChild> actionButtons() {
|
|
||||||
var buttons = List<SpeedDialChild>();
|
|
||||||
|
|
||||||
// The following actions only apply if the StockItem is not serialized
|
|
||||||
if (!item.isSerialized()) {
|
|
||||||
buttons.add(SpeedDialChild(
|
|
||||||
child: Icon(FontAwesomeIcons.plusCircle),
|
|
||||||
label: "Add Stock",
|
|
||||||
onTap: _addStockDialog,
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
buttons.add(SpeedDialChild(
|
|
||||||
child: Icon(FontAwesomeIcons.minusCircle),
|
|
||||||
label: "Remove Stock",
|
|
||||||
onTap: _removeStockDialog,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
buttons.add(SpeedDialChild(
|
|
||||||
child: Icon(FontAwesomeIcons.checkCircle),
|
|
||||||
label: "Count Stock",
|
|
||||||
onTap: _countStockDialog,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
buttons.add(SpeedDialChild(
|
|
||||||
child: Icon(FontAwesomeIcons.exchangeAlt),
|
|
||||||
label: "Transfer Stock",
|
|
||||||
onTap: _transferStockDialog,
|
|
||||||
));
|
|
||||||
|
|
||||||
return buttons;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget getBottomNavBar(BuildContext context) {
|
Widget getBottomNavBar(BuildContext context) {
|
||||||
return BottomNavigationBar(
|
return BottomNavigationBar(
|
||||||
@ -626,16 +587,4 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
Widget getBody(BuildContext context) {
|
Widget getBody(BuildContext context) {
|
||||||
return getSelectedWidget(tabIndex);
|
return getSelectedWidget(tabIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
@override
|
|
||||||
Widget getFab(BuildContext context) {
|
|
||||||
return SpeedDial(
|
|
||||||
visible: true,
|
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
|
||||||
heroTag: 'stock-item-fab',
|
|
||||||
children: actionButtons(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user