2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Bug fix for part without a category defined

This commit is contained in:
Oliver Walters
2021-01-20 23:12:51 +11:00
parent 153bb1c077
commit 72512329e9
2 changed files with 25 additions and 5 deletions

View File

@ -136,7 +136,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
ListTile(
title: Text("Part Category"),
subtitle: Text("${part.categoryName}"),
leading: FaIcon(FontAwesomeIcons.stream),
leading: FaIcon(FontAwesomeIcons.sitemap),
onTap: () {
if (part.categoryId > 0) {
InvenTreePartCategory().get(context, part.categoryId).then((var cat) {
@ -151,8 +151,11 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
tiles.add(
ListTile(
title: Text("Part Category"),
subtitle: Text("No category set"),
leading: FaIcon(FontAwesomeIcons.stream),
subtitle: Text("Top level part category"),
leading: FaIcon(FontAwesomeIcons.sitemap),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null)));
},
)
);
}