2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-29 22:16:47 +00:00

Merge pull request #91 from inventree/in-production

Show if stock item is "in production"
This commit is contained in:
Oliver 2022-03-26 19:02:42 +11:00 committed by GitHub
commit 1ee59ec6e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -230,6 +230,8 @@ class InvenTreeStockItem extends InvenTreeModel {
int get trackingItemCount => (jsondata["tracking_items"] ?? 0) as int;
bool get isBuilding => (jsondata["is_building"] ?? false) as bool;
// Date of last update
DateTime? get updatedDate {
if (jsondata.containsKey("updated")) {

@ -1 +1 @@
Subproject commit 42662619b3d094e9bd41d3f715cac2beff7cf6f6
Subproject commit 77fe28ffc72f4be027751027016c1cf7a722af05

View File

@ -706,7 +706,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
});
}
},
)
),
);
} else {
tiles.add(
@ -718,6 +718,19 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
);
}
if (item.isBuilding) {
tiles.add(
ListTile(
title: Text(L10().inProduction),
leading: FaIcon(FontAwesomeIcons.tools),
subtitle: Text(L10().inProductionDetail),
onTap: () {
// TODO: Click through to the "build order"
},
)
);
}
if (item.batch.isNotEmpty) {
tiles.add(
ListTile(