diff --git a/InvenTree/part/templates/part/bom_upload/select_fields.html b/InvenTree/part/templates/part/bom_upload/select_fields.html index c423d7b0c1..366cce80a3 100644 --- a/InvenTree/part/templates/part/bom_upload/select_fields.html +++ b/InvenTree/part/templates/part/bom_upload/select_fields.html @@ -32,13 +32,14 @@
Row | {% for col in bom_columns %}
{{ col.name }}
-
@@ -65,7 +66,12 @@
| ||
---|---|---|---|
{% add forloop.counter 1 %} | +
+ |
+ {{ forloop.counter }} | {% for item in row.data %}diff --git a/InvenTree/static/script/inventree/bom.js b/InvenTree/static/script/inventree/bom.js index 581fb8d4a3..8b6e802f72 100644 --- a/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/static/script/inventree/bom.js @@ -12,6 +12,37 @@ function reloadBomTable(table, options) { } +function removeRowFromBomWizard(e) { + /* Remove a row from BOM upload wizard + */ + + e = e || window.event; + + var src = e.target || e.srcElement; + + var table = $(src).closest('table'); + + // Which column was clicked? + var row = $(src).closest('tr'); + + row.remove(); + + var rowNum = 1; + var colNum = 0; + + table.find('tr').each(function() { + + colNum++; + + if (colNum >= 3) { + var cell = $(this).find('td:eq(1)'); + cell.text(rowNum++); + console.log("Row: " + rowNum); + } + }); +} + + function removeColFromBomWizard(e) { /* Remove a column from BOM upload wizard */ |