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

StockLocation display now improved

- Expandable list of sublocations
- Expandable list of stockitems
- Traverse upward (to higher locations)
- Fix rendering of unknown part thumbnails
This commit is contained in:
Oliver Walters
2020-04-05 23:10:36 +10:00
parent 04ad279c58
commit 4c8bbd46e7
5 changed files with 154 additions and 46 deletions

View File

@ -114,11 +114,9 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null)));
} else {
// TODO - Refactor this code into the InvenTreePart class
InvenTreePartCategory().get(category.parentId).then((
var cat) {
InvenTreePartCategory().get(category.parentId).then((var cat) {
if (cat is InvenTreePartCategory) {
Navigator.push(context, MaterialPageRoute(builder: (
context) => CategoryDisplayWidget(cat)));
Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(cat)));
}
});
}
@ -138,13 +136,10 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
),
drawer: new InvenTreeDrawer(context),
body: ListView(
//mainAxisAlignment: MainAxisAlignment.start,
//mainAxisSize: MainAxisSize.max,
children: <Widget>[
getCategoryDescriptionCard(),
ExpansionPanelList(
expansionCallback: (int index, bool isExpanded) {
print("callback!");
setState(() {
switch (index) {