2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Further work on build output scripts

This commit is contained in:
Oliver
2021-10-17 11:25:53 +11:00
parent 283bf1682f
commit 9d2273c1cd
5 changed files with 60 additions and 319 deletions

View File

@ -153,8 +153,8 @@ src="{% static 'img/blank_image.png' %}"
</tr>
{% endif %}
<tr>
<td><span class='fas fa-spinner'></span></td>
<td>{% trans "Progress" %}</td>
<td><span class='fas fa-check-circle'></span></td>
<td>{% trans "Completed" %}</td>
<td> {{ build.completed }} / {{ build.quantity }}</td>
</tr>
{% if build.parent %}

View File

@ -63,10 +63,17 @@
<td>{% build_status_label build.status %}</td>
</tr>
<tr>
<td><span class='fas fa-spinner'></span></td>
<td>{% trans "Progress" %}</td>
<td><span class='fas fa-check-circle'></span></td>
<td>{% trans "Completed" %}</td>
<td>{{ build.completed }} / {{ build.quantity }}</td>
</tr>
{% if True or build.active and build.has_untracked_bom_items %}
<tr>
<td><span class='fas fa-list'></span></td>
<td>{% trans "Allocated Parts" %}</td>
<td id='output-progress-untracked'><span class='fas fa-spinner fa-spin'></span></td>
</tr>
{% endif %}
{% if build.batch %}
<tr>
<td><span class='fas fa-layer-group'></span></td>
@ -237,13 +244,6 @@
</div>
</div>
</div>
<div class="panel-group" id="build-output-accordion" role="tablist" aria-multiselectable="true">
{% for item in build.incomplete_outputs %}
{% include "build/allocation_card.html" with item=item tracked_items=build.has_tracked_bom_items %}
{% endfor %}
</div>
<table class='table table-striped table-condensed' id='build-output-table' data-toolbar='#build-output-toolbar'></table>
</div>
</div>
@ -371,23 +371,11 @@ inventreeGet(
});
{% endif %}
{% for item in build.incomplete_outputs %}
// Get the build output as a javascript object
inventreeGet('{% url 'api-stock-detail' item.pk %}', {},
{
success: function(response) {
loadBuildOutputAllocationTable(build_info, response);
}
}
);
{% endfor %}
{% if build.has_untracked_bom_items %}
{% if build.active and build.has_untracked_bom_items %}
// Load allocation table for un-tracked parts
loadBuildOutputAllocationTable(build_info, null);
{% endif %}
}
}
);

View File

@ -19,25 +19,25 @@
{% if build.active %}
<li class='list-group-item' title='{% trans "Allocate Stock" %}'>
<a href='#' id='select-allocate' class='nav-toggle'>
<span class='fas fa-tools sidebar-icon'></span>
<span class='fas fa-tasks sidebar-icon'></span>
{% trans "Allocate Stock" %}
</a>
</li>
{% endif %}
{% if not build.is_complete %}
<li class='list-group-item' title='{% trans "In Progress Items" %}'>
<li class='list-group-item' title='{% trans "Pending Outputs" %}'>
<a href='#' id='select-outputs' class='nav-toggle'>
<span class='fas fa-tasks sidebar-icon'></span>
{% trans "In Progress Items" %}
<span class='fas fa-tools sidebar-icon'></span>
{% trans "Pending Outputs" %}
</a>
</li>
{% endif %}
<li class='list-group-item' title='{% trans "Completed Items" %}'>
<li class='list-group-item' title='{% trans "Completed Outputs" %}'>
<a href='#' id='select-completed' class='nav-toggle'>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Completed Items" %}
{% trans "Completed Outputs" %}
</a>
</li>