mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Properly display 'notes' field in grouped rows for stock table
This commit is contained in:
parent
54855da522
commit
1887463f7f
@ -125,6 +125,28 @@ function loadStockTable(table, options) {
|
|||||||
// A single location!
|
// A single location!
|
||||||
return renderLink(row.location__path, '/stock/location/' + row.location + '/')
|
return renderLink(row.location__path, '/stock/location/' + row.location + '/')
|
||||||
}
|
}
|
||||||
|
} else if (field == 'notes') {
|
||||||
|
var notes = [];
|
||||||
|
|
||||||
|
data.forEach(function(item) {
|
||||||
|
var note = item.notes;
|
||||||
|
|
||||||
|
if (!note || note == '') {
|
||||||
|
note = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!notes.includes(note)) {
|
||||||
|
notes.push(note);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (notes.length > 1) {
|
||||||
|
return '...';
|
||||||
|
} else if (notes.length == 1) {
|
||||||
|
return notes[0] || '-';
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
Reference in New Issue
Block a user