2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-30 18:50:53 +00:00

Filter build orders by responsible owner (#4383) (#4408)

* 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:
simonkuehling
2023-02-25 03:52:12 +01:00
committed by GitHub
parent c46f153449
commit f523fb44f6
5 changed files with 54 additions and 4 deletions

View File

@ -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;
}
},
{