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

Project Responsible (#5944)

* Add "responsible owner" to project code table

* Update project code serializer

* Update CUI project code table

* Update PUI project code table

* Update API version
This commit is contained in:
Oliver
2023-11-21 23:13:20 +11:00
committed by GitHub
parent 6090ddfdf3
commit 2ccddd8f2e
6 changed files with 67 additions and 6 deletions

View File

@ -145,6 +145,25 @@ onPanelLoad('project-codes', function() {
sortable: true,
title: '{% trans "Project Code" %}',
},
{
field: 'responsible',
title: '{% trans "Responsible" %}',
formatter: function(value, row) {
if (!row.responsible_detail) {
return '-';
}
var html = row.responsible_detail.name;
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>`;
}
return html;
}
},
{
field: 'description',
sortable: false,
@ -171,6 +190,7 @@ onPanelLoad('project-codes', function() {
fields: {
code: {},
description: {},
responsible: {},
},
refreshTable: '#project-code-table',
});