2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Merge remote-tracking branch 'inventree/master' into drf-api-forms

This commit is contained in:
Oliver
2021-06-27 09:26:23 +10:00
43 changed files with 10592 additions and 8151 deletions

View File

@ -41,6 +41,22 @@
</tbody>
</table>
<h4>{% trans "Part Import" %}</h4>
<button class='btn btn-success' id='import-part'>
<span class='fas fa-plus-circle'></span> {% trans "Import Part" %}
</button>
<table class='table table-striped table-condensed'>
{% include "InvenTree/settings/header.html" %}
<tbody>
{% include "InvenTree/settings/setting.html" with key="PART_SHOW_IMPORT" icon="fa-file-upload" %}
</tbody>
</table>
<h4>{% trans "Part Parameter Templates" %}</h4>
<div id='param-buttons'>
@ -125,4 +141,8 @@
});
});
$("#import-part").click(function() {
launchModalForm("{% url 'api-part-import' %}?reset", {});
});
{% endblock %}

View File

@ -179,27 +179,32 @@ function loadStockTestResultsTable(table, options) {
var match = false;
var override = false;
// Extract the simplified test key
var key = item.key;
// Attempt to associate this result with an existing test
tableData.forEach(function(row, index) {
for (var idx = 0; idx < tableData.length; idx++) {
var row = tableData[idx];
if (key == row.key) {
item.test_name = row.test_name;
item.required = row.required;
match = true;
if (row.result == null) {
item.parent = parent_node;
tableData[index] = item;
tableData[idx] = item;
override = true;
} else {
item.parent = row.pk;
}
match = true;
break;
}
});
}
// No match could be found
if (!match) {