Display supplier part URL in table

This commit is contained in:
Oliver Walters 2019-05-12 12:20:15 +10:00
parent 1d36ea3e2e
commit d5dbc1b072
2 changed files with 13 additions and 1 deletions

View File

@ -74,7 +74,18 @@
sortable: true,
field: 'MPN',
title: 'MPN',
}
},
{
field: 'URL',
title: 'URL',
formatter: function(value, row, index, field) {
if (value) {
return renderLink(value, value);
} else {
return '';
}
}
},
],
url: "{% url 'api-part-supplier-list' %}"
});

View File

@ -145,6 +145,7 @@ class SupplierPartSerializer(serializers.ModelSerializer):
'SKU',
'manufacturer',
'MPN',
'URL',
]