2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Fixes for build item allocation rendering

This commit is contained in:
Oliver Walters
2021-06-01 16:14:26 +10:00
parent ab16e1efc3
commit 9baf856d75
4 changed files with 33 additions and 4 deletions

View File

@ -372,7 +372,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
data.forEach(function(item) {
// Group BuildItem objects by part
var part = item.part;
var part = item.bom_part || item.part;
var key = parseInt(part);
if (!(key in allocations)) {
@ -461,6 +461,16 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
data: row.allocations,
showHeader: true,
columns: [
{
field: 'part',
title: '{% trans "Part" %}',
formatter: function(value, row) {
var html = imageHoverIcon(row.part_thumb);
html += renderLink(row.part_name, `/part/${value}/`);
return html;
}
},
{
width: '50%',
field: 'quantity',