2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-05-02 07:26:50 +00:00

Improve display of StockList tiles

This commit is contained in:
Oliver 2021-07-20 19:36:19 +10:00
parent 7e55dbb260
commit 6b226fafc9
2 changed files with 8 additions and 2 deletions

View File

@ -415,7 +415,13 @@ class InvenTreeStockItem extends InvenTreeModel {
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 {

View File

@ -517,7 +517,7 @@ class _PaginatedStockListState extends State<PaginatedStockList> {
Widget _buildItem(BuildContext context, InvenTreeStockItem item) {
return ListTile(
title: Text("${item.partName}"),
subtitle: Text("${item.partDescription}"),
subtitle: Text("${item.locationPathString}"),
leading: InvenTreeAPI().getImage(
item.partThumbnail,
width: 40,