mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
Update javascript callbacks
This commit is contained in:
@ -11,33 +11,31 @@ InvenTree | Allocate Parts
|
||||
|
||||
{% include "build/tabs.html" with tab='allocate' %}
|
||||
|
||||
<div id='build-item-toolbar'>
|
||||
{% if build.status == BuildStatus.PENDING %}
|
||||
<div class='btn-group'>
|
||||
<button class='btn btn-primary' type='button' id='btn-order-parts' title='Order Parts'>{% trans "Order Parts" %}</button>
|
||||
<button class='btn btn-primary' type='button' id='btn-allocate' title='{% trans "Automatically allocate stock" %}'>{% trans "Auto Allocate" %}</button>
|
||||
<button class='btn btn-danger' type='button' id='btn-unallocate' title='Unallocate Stock'>{% trans "Unallocate" %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<table class='table table-striped table-condensed' id='build-item-list' data-toolbar='#build-item-toolbar'></table>
|
||||
-->
|
||||
|
||||
<h4>{% trans "Allocated Stock" %}</h4>
|
||||
<div class="panel-group" id="build-output-accordion" role="tablist" aria-multiselectable="true">
|
||||
{% include "build/allocation_card.html" %}
|
||||
</div>
|
||||
|
||||
{% if build.incomplete_outputs %}
|
||||
<h4>{% trans "Build Ouputs" %}</h4>
|
||||
<h4>{% trans "Tracked Build Ouputs" %}</h4>
|
||||
<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 %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h4>{% trans "Untracked Parts" %}</h4>
|
||||
{% endif %}
|
||||
|
||||
<div id='build-item-toolbar'>
|
||||
{% if build.status == BuildStatus.PENDING %}
|
||||
<div class='btn-group'>
|
||||
<button class='btn btn-primary' type='button' id='btn-order-parts' title='Order Parts'><span class='fas fa-shopping-cart'></span> {% trans "Order Parts" %}</button>
|
||||
<button class='btn btn-primary' type='button' id='btn-allocate' title='{% trans "Automatically allocate stock" %}'><span class='fas fa-magic'></span> {% trans "Auto Allocate" %}</button>
|
||||
<button class='btn btn-danger' type='button' id='btn-unallocate' title='Unallocate Stock'><span class='fas fa-minus-circle'></span> {% trans "Unallocate" %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed' id='build-item-list' data-toolbar='#build-item-toolbar'></table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
@ -50,7 +48,13 @@ InvenTree | Allocate Parts
|
||||
part: {{ build.part.pk }},
|
||||
};
|
||||
|
||||
loadBuildOutputAllocationTable(buildInfo, null);
|
||||
loadBuildOutputAllocationTable(
|
||||
buildInfo,
|
||||
null,
|
||||
{
|
||||
table: '#build-item-list',
|
||||
}
|
||||
);
|
||||
|
||||
{% for item in build.incomplete_outputs %}
|
||||
// Get the build output as a javascript object
|
||||
|
Reference in New Issue
Block a user