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:
parent
013e977031
commit
aa24274cb3
@ -325,7 +325,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||||||
// Tiles for "purchaseable" parts
|
// Tiles for "purchaseable" parts
|
||||||
if (part.isPurchaseable) {
|
if (part.isPurchaseable) {
|
||||||
|
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10().suppliers),
|
title: Text(L10().suppliers),
|
||||||
leading: FaIcon(FontAwesomeIcons.industry),
|
leading: FaIcon(FontAwesomeIcons.industry),
|
||||||
@ -334,41 +334,36 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||||||
// TODO
|
// TODO
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// On order
|
// On order
|
||||||
if (part.onOrder > 0) {
|
tiles.add(
|
||||||
tiles.add(
|
ListTile(
|
||||||
ListTile(
|
title: Text(L10().onOrder),
|
||||||
title: Text(L10().onOrder),
|
subtitle: Text(L10().onOrderDetails),
|
||||||
subtitle: Text(L10().onOrderDetails),
|
leading: FaIcon(FontAwesomeIcons.shoppingCart),
|
||||||
leading: FaIcon(FontAwesomeIcons.shoppingCart),
|
trailing: Text("${part.onOrder}"),
|
||||||
trailing: Text("${part.onOrder}"),
|
onTap: () {
|
||||||
onTap: () {
|
// TODO - Order views
|
||||||
// TODO - Order views
|
},
|
||||||
},
|
)
|
||||||
)
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tiles for an "assembly" part
|
// Tiles for an "assembly" part
|
||||||
if (part.isAssembly) {
|
if (part.isAssembly) {
|
||||||
|
|
||||||
if (part.bomItemCount > 0) {
|
tiles.add(
|
||||||
tiles.add(
|
ListTile(
|
||||||
ListTile(
|
title: Text(L10().billOfMaterials),
|
||||||
title: Text(L10().billOfMaterials),
|
leading: FaIcon(FontAwesomeIcons.thList),
|
||||||
leading: FaIcon(FontAwesomeIcons.thList),
|
trailing: Text("${part.bomItemCount}"),
|
||||||
trailing: Text("${part.bomItemCount}"),
|
onTap: () {
|
||||||
onTap: () {
|
// TODO
|
||||||
// TODO
|
}
|
||||||
}
|
)
|
||||||
)
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (part.building > 0) {
|
if (part.building > 0) {
|
||||||
tiles.add(
|
tiles.add(
|
||||||
@ -386,15 +381,17 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||||||
|
|
||||||
// Tiles for "component" part
|
// Tiles for "component" part
|
||||||
if (part.isComponent) {
|
if (part.isComponent) {
|
||||||
tiles.add(ListTile(
|
|
||||||
title: Text(L10().usedIn),
|
tiles.add(
|
||||||
subtitle: Text(L10().usedInDetails),
|
ListTile(
|
||||||
leading: FaIcon(FontAwesomeIcons.sitemap),
|
title: Text(L10().usedIn),
|
||||||
trailing: Text("${part.usedInCount}"),
|
subtitle: Text(L10().usedInDetails),
|
||||||
onTap: () {
|
leading: FaIcon(FontAwesomeIcons.sitemap),
|
||||||
// TODO
|
trailing: Text("${part.usedInCount}"),
|
||||||
},
|
onTap: () {
|
||||||
)
|
// TODO
|
||||||
|
},
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user