mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Rendering fix for build allocation table (#5145)
- Fix link to part - Fix link to stock item
This commit is contained in:
parent
5408ced564
commit
5f61b5f120
@ -2255,16 +2255,16 @@ function renderBuildLineAllocationTable(element, build_line, options={}) {
|
|||||||
{
|
{
|
||||||
field: 'part',
|
field: 'part',
|
||||||
title: '{% trans "Part" %}',
|
title: '{% trans "Part" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(_value, row) {
|
||||||
let html = imageHoverIcon(row.part_detail.thumbnail);
|
let html = imageHoverIcon(row.part_detail.thumbnail);
|
||||||
html += renderLink(row.part_detail.full_name, `/part/${value}/`);
|
html += renderLink(row.part_detail.full_name, `/part/${row.part_detail.pk}/`);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
title: '{% trans "Allocated Quantity" %}',
|
title: '{% trans "Allocated Quantity" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(_value, row) {
|
||||||
let text = '';
|
let text = '';
|
||||||
let url = '';
|
let url = '';
|
||||||
let serial = row.serial;
|
let serial = row.serial;
|
||||||
@ -2294,8 +2294,8 @@ function renderBuildLineAllocationTable(element, build_line, options={}) {
|
|||||||
title: '{% trans "Location" %}',
|
title: '{% trans "Location" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
if (row.location_detail) {
|
if (row.location_detail) {
|
||||||
var text = shortenString(row.location_detail.pathstring);
|
let text = shortenString(row.location_detail.pathstring);
|
||||||
var url = `/stock/location/${row.location}/`;
|
let url = `/stock/location/${row.location_detail.pk}/`;
|
||||||
|
|
||||||
return renderLink(text, url);
|
return renderLink(text, url);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user