mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add item link
This commit is contained in:
parent
7d71a04eaa
commit
a57c634cfd
@ -58,6 +58,20 @@ function loadNotificationTable(table, options={}) {
|
|||||||
title: '{% trans "Category" %}',
|
title: '{% trans "Category" %}',
|
||||||
sortable: 'true',
|
sortable: 'true',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'target',
|
||||||
|
title: '{% trans "Item" %}',
|
||||||
|
sortable: 'true',
|
||||||
|
formatter: function(value, row, index, field) {
|
||||||
|
if (value == null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
var html = `${value.model}: ${value.name}`;
|
||||||
|
if (value.link ) {html = `<a href='${value.link}'>${html}</a>`;}
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
title: '{% trans "Name" %}',
|
title: '{% trans "Name" %}',
|
||||||
|
Loading…
Reference in New Issue
Block a user