mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Link to parent part category
This commit is contained in:
parent
0f2c88e630
commit
683f1e8efd
2 changed files with 39 additions and 7 deletions
|
|
@ -96,14 +96,30 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||
);
|
||||
} else {
|
||||
return Card(
|
||||
child: ListTile(
|
||||
title: Text("${category.name}"),
|
||||
subtitle: Text("${category.description}"),
|
||||
trailing: IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
onPressed: null,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text("${category.name}"),
|
||||
subtitle: Text("${category.description}"),
|
||||
trailing: IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
onPressed: null,
|
||||
),
|
||||
),
|
||||
)
|
||||
ListTile(
|
||||
title: Text("Parent Category"),
|
||||
subtitle: Text("${category.parentpathstring}"),
|
||||
onTap: () {
|
||||
// TODO - Refactor this code into the InvenTreePart class
|
||||
InvenTreePartCategory().get(category.parentId).then((var cat) {
|
||||
if (cat is InvenTreePartCategory) {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(cat)));
|
||||
}
|
||||
});
|
||||
},
|
||||
)
|
||||
]
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue