2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 21:45:39 +00:00

PART_NAME_FORMAT is introduced to display the names of parts in custom format. - For Feature Request InvenTree#2085

full_name construction in part.js is obsolete/redundant since the same is constructed in backend and sent through api response
This commit is contained in:
rocheparadox
2021-10-11 22:21:12 +05:30
parent 8dddb200c7
commit 2d77b21a4e
3 changed files with 50 additions and 25 deletions

View File

@ -876,23 +876,7 @@ function loadPartTable(table, url, options={}) {
switchable: false,
formatter: function(value, row) {
var name = '';
if (row.IPN) {
name += row.IPN;
name += ' | ';
}
name += value;
if (row.revision) {
name += ' | ';
name += row.revision;
}
if (row.is_template) {
name = '<i>' + name + '</i>';
}
var name = row.full_name;
var display = imageHoverIcon(row.thumbnail) + renderLink(name, '/part/' + row.pk + '/');