Add "substitutes" column to BOM table

This commit is contained in:
Oliver 2021-10-13 11:58:40 +11:00
parent 324ccd805d
commit f3f41730be

View File

@ -300,6 +300,20 @@ function loadBomTable(table, options) {
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) {
cols.push({