mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-30 18:50:53 +00:00
* add assigned_to filter to Build API * extend API to filter build orders by assigned owner * rename API filter to 'responsible' * add 'Responsible' filter to build oders table * add user/group icon to owners in 'Responsible' column * remove unused python class import * bump API version number * fix handling of invalid IDs * refactor filter options as a callback function * fix JS styling
This commit is contained in:
@ -2695,11 +2695,19 @@ function loadBuildTable(table, options) {
|
||||
title: '{% trans "Responsible" %}',
|
||||
sortable: true,
|
||||
formatter: function(value, row) {
|
||||
if (value) {
|
||||
return row.responsible_detail.name;
|
||||
} else {
|
||||
if (!row.responsible_detail) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user