2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16:44 +00:00

Add switchable columns to build output table

This commit is contained in:
Oliver 2022-04-28 15:50:10 +10:00
parent e9500e4981
commit ba3bcdba89

View File

@ -786,7 +786,7 @@ function loadBuildOutputTable(build_info, options={}) {
} }
); );
} else { } else {
console.log(`WARNING: Could not locate sub-table for output ${pk}`); console.warn(`Could not locate sub-table for output ${pk}`);
} }
}); });
@ -869,7 +869,7 @@ function loadBuildOutputTable(build_info, options={}) {
url: '{% url "api-stock-list" %}', url: '{% url "api-stock-list" %}',
queryParams: filters, queryParams: filters,
original: params, original: params,
showColumns: false, showColumns: true,
uniqueId: 'pk', uniqueId: 'pk',
name: 'build-outputs', name: 'build-outputs',
sortable: true, sortable: true,
@ -901,6 +901,7 @@ function loadBuildOutputTable(build_info, options={}) {
{ {
field: 'part', field: 'part',
title: '{% trans "Part" %}', title: '{% trans "Part" %}',
switchable: true,
formatter: function(value, row) { formatter: function(value, row) {
var thumb = row.part_detail.thumbnail; var thumb = row.part_detail.thumbnail;
@ -909,7 +910,9 @@ function loadBuildOutputTable(build_info, options={}) {
}, },
{ {
field: 'quantity', field: 'quantity',
title: '{% trans "Quantity" %}', title: '{% trans "Build Output" %}',
switchable: true,
sortable: true,
formatter: function(value, row) { formatter: function(value, row) {
var url = `/stock/item/${row.pk}/`; var url = `/stock/item/${row.pk}/`;
@ -1079,7 +1082,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
var row = $(table).bootstrapTable('getRowByUniqueId', pk); var row = $(table).bootstrapTable('getRowByUniqueId', pk);
if (!row) { if (!row) {
console.log('WARNING: getRowByUniqueId returned null'); console.warn('getRowByUniqueId returned null');
return; return;
} }
@ -1269,7 +1272,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
} }
} else { } else {
console.log(`WARNING: Could not find progress bar for output ${outputId}`); console.warn(`Could not find progress bar for output ${outputId}`);
} }
} }
} }