mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 12:06:24 +00:00
Add counter for stock items
This commit is contained in:
parent
443c545ed2
commit
36f0d7b120
1 changed files with 11 additions and 5 deletions
|
|
@ -332,15 +332,21 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||||
|
|
||||||
tiles.add(headerTile());
|
tiles.add(headerTile());
|
||||||
|
|
||||||
|
tiles.add(
|
||||||
|
ListTile(
|
||||||
|
title: Text(
|
||||||
|
I18N.of(context).stockItems,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
subtitle: part.stockItems.isEmpty ? Text("No stock items available") : null,
|
||||||
|
trailing: part.stockItems.isNotEmpty ? Text("${part.stockItems.length}") : null,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
tiles.add(progressIndicator());
|
tiles.add(progressIndicator());
|
||||||
} else if (part.stockItems.length > 0) {
|
} else if (part.stockItems.length > 0) {
|
||||||
tiles.add(PartStockList(part.stockItems));
|
tiles.add(PartStockList(part.stockItems));
|
||||||
} else {
|
|
||||||
tiles.add(ListTile(
|
|
||||||
title: Text("No Stock"),
|
|
||||||
subtitle: Text("No stock items available")
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tiles;
|
return tiles;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue