mirror of
https://github.com/inventree/inventree-app.git
synced 2025-05-05 16:58:55 +00:00
Add counter for stock items
This commit is contained in:
parent
443c545ed2
commit
36f0d7b120
@ -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…
x
Reference in New Issue
Block a user