diff --git a/InvenTree/InvenTree/static/script/inventree/bom.js b/InvenTree/InvenTree/static/script/inventree/bom.js index 2da80c6138..1e66af5c7e 100644 --- a/InvenTree/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/InvenTree/static/script/inventree/bom.js @@ -317,5 +317,22 @@ function loadBomTable(table, options) { } }); }); + + table.on('click', '.bom-validate-button', function() { + var button = $(this); + + var url = '/api/bom/' + button.attr('pk') + '/validate/'; + + inventreePut( + url, + { + valid: true + }, + { + method: 'PATCH', + reloadOnSuccess: true + } + ); + }); } } \ No newline at end of file