mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Display allocations for individual stock items
This commit is contained in:
@ -43,9 +43,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='panel panel-hidden' id='panel-allocations'>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Stock Item Allocations" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<div id='allocations-button-toolbar'>
|
||||
<div class='btn-group' role='group'>
|
||||
{% include "filter_list.html" with id="allocations" %}
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-striped table-condensed' data-toolbar='#allocatoins-button-toolbar' id='stock-allocation-table'></table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='panel panel-hidden' id='panel-children'>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Child Stock Items" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
{% if item.child_count > 0 %}
|
||||
@ -151,6 +168,19 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
// Load the "allocations" tab
|
||||
onPanelLoad('allocations', function() {
|
||||
|
||||
loadStockAllocationTable(
|
||||
$("#stock-allocation-table"),
|
||||
{
|
||||
params: {
|
||||
stock_item: {{ item.pk }},
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$('#stock-item-install').click(function() {
|
||||
|
||||
launchModalForm(
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
{% trans "Stock Tracking" as text %}
|
||||
{% include "sidebar_item.html" with label='history' text=text icon="fa-history" %}
|
||||
{% if item.part.salable or item.part.component %}
|
||||
{% trans "Allocations" as text %}
|
||||
{% include "sidebar_item.html" with label="allocations" text=text icon="fa-bookmark" %}
|
||||
{% endif %}
|
||||
{% if item.part.trackable %}
|
||||
{% trans "Test Data" as text %}
|
||||
{% include "sidebar_item.html" with label='test-data' text=text icon="fa-vial" %}
|
||||
|
Reference in New Issue
Block a user