mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Improve display of StockList tiles
This commit is contained in:
parent
7e55dbb260
commit
6b226fafc9
2 changed files with 8 additions and 2 deletions
|
|
@ -415,7 +415,13 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||||
|
|
||||||
if (locationId == -1 || !jsondata.containsKey('location_detail')) return L10().locationNotSet;
|
if (locationId == -1 || !jsondata.containsKey('location_detail')) return L10().locationNotSet;
|
||||||
|
|
||||||
return jsondata['location_detail']['pathstring'] ?? '';
|
String _loc = jsondata['location_detail']['pathstring'] ?? '';
|
||||||
|
|
||||||
|
if (_loc.isNotEmpty) {
|
||||||
|
return _loc;
|
||||||
|
} else {
|
||||||
|
return locationName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String get displayQuantity {
|
String get displayQuantity {
|
||||||
|
|
|
||||||
|
|
@ -517,7 +517,7 @@ class _PaginatedStockListState extends State<PaginatedStockList> {
|
||||||
Widget _buildItem(BuildContext context, InvenTreeStockItem item) {
|
Widget _buildItem(BuildContext context, InvenTreeStockItem item) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text("${item.partName}"),
|
title: Text("${item.partName}"),
|
||||||
subtitle: Text("${item.partDescription}"),
|
subtitle: Text("${item.locationPathString}"),
|
||||||
leading: InvenTreeAPI().getImage(
|
leading: InvenTreeAPI().getImage(
|
||||||
item.partThumbnail,
|
item.partThumbnail,
|
||||||
width: 40,
|
width: 40,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue