From 51da1f02a8d126e32fa84da7f1057ad52f13afb4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 29 Apr 2022 01:58:57 +1000 Subject: [PATCH] JS linting fixes --- InvenTree/templates/js/translated/build.js | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index 502f95d65f..a88f3ccb28 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -867,7 +867,7 @@ function loadBuildOutputTable(build_info, options={}) { // List of "tracked bom items" required for this build order var bom_items = null; - // Request list of BOM data for this build order + // Request list of BOM data for this build order inventreeGet( '{% url "api-bom-list" %}', { @@ -962,7 +962,7 @@ function loadBuildOutputTable(build_info, options={}) { var output_progress_bar = $(`#output-progress-${row.pk}`); - if (output_progress_bar.exists()) { + if (output_progress_bar.exists()) { output_progress_bar.html( makeProgressBar( n_completed_lines, @@ -977,7 +977,7 @@ function loadBuildOutputTable(build_info, options={}) { }); } } - ) + ); } var part_tests = null; @@ -1283,14 +1283,14 @@ function loadBuildOutputTable(build_info, options={}) { $('#build-stock-table').bootstrapTable('refresh'); } } - ) + ); }); // Print stock item labels $('#incomplete-output-print-label').click(function() { var outputs = $(table).bootstrapTable('getSelections'); - if (outputs.length == 0) { + if (outputs.length == 0) { outputs = $(table).bootstrapTable('getData'); } @@ -1375,10 +1375,6 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { setupFilterList('builditems', $(table), options.filterTarget); - // If an "output" is specified, then only "trackable" parts are allocated - // Otherwise, only "untrackable" parts are allowed - var trackable = ! !output; - var allocated_items = output == null ? null : output.allocations; function redrawAllocationData() { @@ -1447,11 +1443,6 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { redrawAllocationData(); } - function reloadTable() { - // Reload the entire build allocation table - $(table).bootstrapTable('refresh'); - } - function requiredQuantity(row) { // Return the requied quantity for a given row @@ -1812,7 +1803,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { sortable: true, formatter: function(value, row) { var allocated = allocatedQuantity(row); - var required = requiredQuantity(row) + var required = requiredQuantity(row); return makeProgressBar(allocated, required); }, sorter: function(valA, valB, rowA, rowB) {