mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-29 05:56:47 +00:00
Load stock detail *before* opening new view
This commit is contained in:
parent
12f4a4fa38
commit
b18daf3acf
@ -80,6 +80,14 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showStock(BuildContext context) async {
|
||||||
|
await part.getStockItems(context);
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) => PartStockDetailWidget(part))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void _editPartDialog() {
|
void _editPartDialog() {
|
||||||
|
|
||||||
// Values which can be edited
|
// Values which can be edited
|
||||||
@ -209,10 +217,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||||
trailing: Text("${part.inStock}"),
|
trailing: Text("${part.inStock}"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
_showStock(context);
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) => PartStockDetailWidget(part))
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user