Fix some regressions in new "Responsible" filter for build orders (#4430)

* fix responsible user/group icons with translations

* fix display of active filters after recent changes
This commit is contained in:
simonkuehling 2023-02-28 21:25:12 +01:00 committed by GitHub
parent e9a1b57941
commit 03e105dd95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -2702,7 +2702,7 @@ function loadBuildTable(table, options) {
var html = row.responsible_detail.name;
if (row.responsible_detail.label == 'group') {
if (row.responsible_detail.label == '{% trans "group" %}') {
html += `<span class='float-right fas fa-users'></span>`;
} else {
html += `<span class='float-right fas fa-user'></span>`;

View File

@ -455,6 +455,12 @@ function getFilterOptionValue(tableKey, filterKey, valueKey) {
// Iterate through a list of options
if ('options' in filter) {
// options can be an object or a function, in which case we need to run
// this callback first
if (filter.options instanceof Function) {
filter.options = filter.options();
}
for (var key in filter.options) {
if (key == valueKey) {