2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 19:46:46 +00:00

Add test description field (#4137)

This commit is contained in:
Oliver 2023-01-03 12:25:09 +11:00 committed by GitHub
parent 2f7436d894
commit a69c524cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1375,7 +1375,7 @@ function loadStockTestResultsTable(table, options) {
}, },
{ {
field: 'test_name', field: 'test_name',
title: '{% trans "Test Name" %}', title: '{% trans "Test" %}',
sortable: true, sortable: true,
formatter: function(value, row) { formatter: function(value, row) {
var html = value; var html = value;
@ -1393,6 +1393,13 @@ function loadStockTestResultsTable(table, options) {
return html; return html;
} }
}, },
{
field: 'description',
title: '{% trans "Description" %}',
formatter: function(value, row) {
return row.description || row.test_description;
}
},
{ {
field: 'value', field: 'value',
title: '{% trans "Value" %}', title: '{% trans "Value" %}',
@ -1474,6 +1481,7 @@ function loadStockTestResultsTable(table, options) {
if (key == row.key) { if (key == row.key) {
item.test_name = row.test_name; item.test_name = row.test_name;
item.test_description = row.description;
item.required = row.required; item.required = row.required;
if (row.result == null) { if (row.result == null) {