diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html index 5c3f94f72f..48fcfb8370 100644 --- a/InvenTree/stock/templates/stock/item.html +++ b/InvenTree/stock/templates/stock/item.html @@ -311,6 +311,27 @@ }); }); + $('#test-result-table').on('click', '.button-test-tick', function() { + var button = $(this); + + var test_name = button.attr('pk'); + + inventreePut( + '{% url "api-stock-test-result-list" %}', + { + test: test_name, + result: true, + stock_item: {{ item.pk }}, + }, + { + method: 'POST', + success: function(response) { + reloadTable(); + } + } + ); + }) + $("#test-result-table").on('click', '.button-test-add', function() { var button = $(this); diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js index 809cd6fa8c..6fb8c911c8 100644 --- a/InvenTree/templates/js/translated/stock.js +++ b/InvenTree/templates/js/translated/stock.js @@ -1235,6 +1235,11 @@ function loadStockTestResultsTable(table, options) { function makeButtons(row, grouped) { var html = `