2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Display a message if a part does not have a category sit

This commit is contained in:
Oliver Walters 2020-05-30 21:07:54 +10:00
parent 5d62344cc7
commit 9d929c7741

View File

@ -133,7 +133,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
); );
// Category information // Category information
if (part.categoryName.isNotEmpty) { if (part.categoryName != null && part.categoryName.isNotEmpty) {
tiles.add( tiles.add(
ListTile( ListTile(
title: Text("Part Category"), title: Text("Part Category"),
@ -149,6 +149,14 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
}, },
) )
); );
} else {
tiles.add(
ListTile(
title: Text("Part Category"),
subtitle: Text("No category set"),
leading: FaIcon(FontAwesomeIcons.stream),
)
);
} }
// External link? // External link?