2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Adds a button to quickly "pass" a test

This commit is contained in:
Oliver
2022-02-16 17:16:17 +11:00
parent 6c32f5c60d
commit 0f0325daba
2 changed files with 26 additions and 0 deletions

View File

@ -1235,6 +1235,11 @@ function loadStockTestResultsTable(table, options) {
function makeButtons(row, grouped) {
var html = `<div class='btn-group float-right' role='group'>`;
if (row.requires_attachment == false && row.requires_value == false && !row.result) {
// Enable a "quick tick" option for this test result
html += makeIconButton('fa-check-circle icon-green', 'button-test-tick', row.test_name, '{% trans "Pass test" %}');
}
html += makeIconButton('fa-plus icon-green', 'button-test-add', row.test_name, '{% trans "Add test result" %}');
if (!grouped && row.result != null) {