2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-05-01 23:16:49 +00:00

Code cleanup for part_detail view

This commit is contained in:
Oliver 2021-08-02 14:04:18 +10:00
parent 013e977031
commit aa24274cb3

View File

@ -335,10 +335,8 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
},
)
);
}
// On order
if (part.onOrder > 0) {
tiles.add(
ListTile(
title: Text(L10().onOrder),
@ -350,14 +348,12 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
},
)
);
}
}
// Tiles for an "assembly" part
if (part.isAssembly) {
if (part.bomItemCount > 0) {
tiles.add(
ListTile(
title: Text(L10().billOfMaterials),
@ -368,7 +364,6 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
}
)
);
}
if (part.building > 0) {
tiles.add(
@ -386,7 +381,9 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
// Tiles for "component" part
if (part.isComponent) {
tiles.add(ListTile(
tiles.add(
ListTile(
title: Text(L10().usedIn),
subtitle: Text(L10().usedInDetails),
leading: FaIcon(FontAwesomeIcons.sitemap),