Added MPN link to supplier part list

This commit is contained in:
eeintech 2021-04-05 15:41:18 -04:00
parent 547dcc6e80
commit fd66e8b136
2 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,7 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "MPN" %}</td>
<td>{{ part.manufacturer_part.MPN }}</td>
<td><a href="{% url 'manufacturer-part-detail' part.manufacturer_part.id %}">{{ part.manufacturer_part.MPN }}</a></td>
</tr>
{% endif %}
{% if part.packaging %}

View File

@ -299,6 +299,9 @@ function loadSupplierPartTable(table, url, options) {
sortable: true,
field: 'MPN',
title: '{% trans "MPN" %}',
formatter: function(value, row, index, field) {
return renderLink(value, `/manufacturer-part/${row.manufacturer_part.pk}/`);
}
},
{
field: 'link',