mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26: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();
|
||||
}
|
||||
|
||||
void _showStock(BuildContext context) async {
|
||||
await part.getStockItems(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => PartStockDetailWidget(part))
|
||||
);
|
||||
}
|
||||
|
||||
void _editPartDialog() {
|
||||
|
||||
// Values which can be edited
|
||||
@ -209,10 +217,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||
trailing: Text("${part.inStock}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => PartStockDetailWidget(part))
|
||||
);
|
||||
_showStock(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user