2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Load build order prefix setting

This commit is contained in:
Oliver Walters
2020-10-20 08:41:08 +11:00
parent 7aa473712f
commit 406d7bcf80
5 changed files with 26 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% load inventree_extras %}
function loadBuildTable(table, options) {
// Display a table of Build objects
@ -40,6 +41,13 @@ function loadBuildTable(table, options) {
sortable: true,
switchable: false,
formatter: function(value, row, index, field) {
var prefix = "{% inventree_setting 'BUILDORDER_REFERENCE_PREFIX' 'BO' %}";
if (prefix) {
value = `${prefix}${value}`;
}
return renderLink(value, '/build/' + row.pk + '/');
}
},