mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Add "substitutes" column to BOM table
This commit is contained in:
parent
324ccd805d
commit
f3f41730be
@ -300,6 +300,20 @@ function loadBomTable(table, options) {
|
|||||||
return renderLink(text, url);
|
return renderLink(text, url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cols.push({
|
||||||
|
field: 'substitutes',
|
||||||
|
title: '{% trans "Substitutes" %}',
|
||||||
|
searchable: false,
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row) {
|
||||||
|
if (row.substitutes) {
|
||||||
|
return row.substitutes.length;
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (show_pricing) {
|
if (show_pricing) {
|
||||||
cols.push({
|
cols.push({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user