mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Render zero stock as 'No Stock' in BOM table
This commit is contained in:
parent
d1de6eb1f9
commit
e87f545d75
@ -132,6 +132,9 @@ function loadBomTable(table, options) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!value) {
|
||||||
|
value = 'No Stock';
|
||||||
|
}
|
||||||
text = "<span class='label label-warning'>" + value + "</span>";
|
text = "<span class='label label-warning'>" + value + "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,13 +119,12 @@ function loadPartTable(table, url, options={}) {
|
|||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'full_name',
|
||||||
title: 'Part',
|
title: 'Part',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
var name = row.full_name;
|
|
||||||
|
|
||||||
var display = imageHoverIcon(row.image_url) + renderLink(name, row.url);
|
var display = imageHoverIcon(row.image_url) + renderLink(value, row.url);
|
||||||
if (!row.active) {
|
if (!row.active) {
|
||||||
display = display + "<span class='label label-warning' style='float: right;'>INACTIVE</span>";
|
display = display + "<span class='label label-warning' style='float: right;'>INACTIVE</span>";
|
||||||
}
|
}
|
||||||
@ -160,7 +159,7 @@ function loadPartTable(table, url, options={}) {
|
|||||||
return renderLink(value, row.url + 'stock/');
|
return renderLink(value, row.url + 'stock/');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "<span class='label label-warning'>No stock</span>";
|
return "<span class='label label-warning'>No Stock</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user