2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Merge pull request #2368 from SchrodingersGat/responsible-column

Adds "responsible" row to purchase order table
This commit is contained in:
Oliver
2021-11-26 22:31:39 +11:00
committed by GitHub
2 changed files with 24 additions and 4 deletions

View File

@ -695,6 +695,23 @@ function loadPurchaseOrderTable(table, options) {
title: '{% trans "Items" %}',
sortable: true,
},
{
field: 'responsible',
title: '{% trans "Responsible" %}',
switchable: true,
sortable: false,
formatter: function(value, row) {
var html = row.responsible_detail.name;
if (row.responsible_detail.label == 'group') {
html += `<span class='float-right fas fa-users'></span>`;
} else {
html += `<span class='float-right fas fa-user'></span>`;
}
return html;
}
},
],
});
}