mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Create detail view for part stock
- Shows all in-stock stock items
This commit is contained in:
parent
15fee106b5
commit
83465511aa
5 changed files with 168 additions and 10 deletions
|
|
@ -283,9 +283,9 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
String get locationName {
|
||||
String loc = '';
|
||||
|
||||
if (jsondata.containsKey('location_detail')) {
|
||||
loc = jsondata['location_detail']['name'] ?? '';
|
||||
}
|
||||
if (locationId == -1 || !jsondata.containsKey('location_detail')) return 'Unknown Location';
|
||||
|
||||
loc = jsondata['location_detail']['name'] ?? '';
|
||||
|
||||
// Old-style name
|
||||
if (loc.isEmpty) {
|
||||
|
|
@ -298,11 +298,9 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
String get locationPathString {
|
||||
String path = '';
|
||||
|
||||
if (jsondata.containsKey('location_detail')) {
|
||||
path = jsondata['location_detail']['pathstring'] ?? '';
|
||||
}
|
||||
if (locationId == -1 || !jsondata.containsKey('location_detail')) return 'No location specified';
|
||||
|
||||
return path;
|
||||
return jsondata['location_detail']['pathstring'] ?? '';
|
||||
}
|
||||
|
||||
String get displayQuantity {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue