mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Load stock detail *before* opening new view
This commit is contained in:
parent
12f4a4fa38
commit
b18daf3acf
1 changed files with 9 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue