mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Adds new buttons to create a new stock item
This commit is contained in:
parent
d8e3c40f78
commit
aaf27d4098
@ -134,7 +134,15 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
|
|
||||||
<div class='panel panel-hidden' id='panel-stock'>
|
<div class='panel panel-hidden' id='panel-stock'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<h4>{% trans "Supplier Part Stock" %}</h4>
|
<span class='d-flex flex-wrap'>
|
||||||
|
<h4>{% trans "Supplier Part Stock" %}</h4>
|
||||||
|
{% include "spacer.html" %}
|
||||||
|
<div class='btn-group' role='group'>
|
||||||
|
<button type='button' class='btn btn-success' id='item-create' title='{% trans "Create new stock item" %}'>
|
||||||
|
<span class='fas fa-plus-circle'></span> {% trans "New Stock Item" %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
{% include "stock_table.html" %}
|
{% include "stock_table.html" %}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<h4>{% trans "Received Items" %}</h4>
|
<h4>{% trans "Received Items" %}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
{% include "stock_table.html" with prevent_new_stock=True %}
|
{% include "stock_table.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -95,7 +95,15 @@
|
|||||||
|
|
||||||
<div class='panel panel-hidden' id='panel-part-stock'>
|
<div class='panel panel-hidden' id='panel-part-stock'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<h4>{% trans "Part Stock" %}</h4>
|
<div class='d-flex flex-wrap'>
|
||||||
|
<h4>{% trans "Part Stock" %}</h4>
|
||||||
|
{% include "spacer.html" %}
|
||||||
|
<div class='btn-group' role='group'>
|
||||||
|
<button type='button' class='btn btn-success' id='new-stock-item' title='{% trans "Create new stock item" %}'>
|
||||||
|
<span class='fas fa-plus-circle'></span> {% trans "New Stock Item" %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
{% if part.is_template %}
|
{% if part.is_template %}
|
||||||
@ -851,11 +859,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
onPanelLoad("part-stock", function() {
|
onPanelLoad("part-stock", function() {
|
||||||
$('#add-stock-item').click(function () {
|
$('#new-stock-item').click(function () {
|
||||||
createNewStockItem({
|
createNewStockItem({
|
||||||
reload: true,
|
reload: true,
|
||||||
data: {
|
data: {
|
||||||
part: {{ part.id }},
|
part: {{ part.id }},
|
||||||
|
{% if part.default_location %}
|
||||||
|
location: {{ part.default_location.pk }},
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -140,7 +140,15 @@
|
|||||||
|
|
||||||
<div class='panel panel-hidden' id='panel-stock'>
|
<div class='panel panel-hidden' id='panel-stock'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<h4>{% trans "Stock Items" %}</h4>
|
<div class='d-flex flex-wrap'>
|
||||||
|
<h4>{% trans "Stock Items" %}</h4>
|
||||||
|
{% include "spacer.html" %}
|
||||||
|
<div class='btn-group' role='group'>
|
||||||
|
<button type='button' class='btn btn-success' id='item-create' title='{% trans "Create new stock item" %}'>
|
||||||
|
<span class='fas fa-plus-circle'></span> {% trans "New Stock Item" %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
{% include "stock_table.html" %}
|
{% include "stock_table.html" %}
|
||||||
|
@ -10,17 +10,10 @@
|
|||||||
|
|
||||||
<div id='{{ prefix }}button-toolbar'>
|
<div id='{{ prefix }}button-toolbar'>
|
||||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||||
<div class='btn-group'>
|
<div class='btn-group' role='group'>
|
||||||
<button class='btn btn-outline-secondary' id='stock-export' title='{% trans "Export Stock Information" %}'>
|
<button class='btn btn-outline-secondary' id='stock-export' title='{% trans "Export Stock Information" %}'>
|
||||||
<span class='fas fa-download'></span>
|
<span class='fas fa-download'></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% if owner_control.value == "True" and user in owners or user.is_superuser or owner_control.value == "False" %}
|
|
||||||
{% if not read_only and not prevent_new_stock and roles.stock.add %}
|
|
||||||
<button class="btn btn-success" id='item-create' title='{% trans "New Stock Item" %}'>
|
|
||||||
<span class='fas fa-plus-circle'></span>
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
{% if barcodes %}
|
{% if barcodes %}
|
||||||
<!-- Barcode actions menu -->
|
<!-- Barcode actions menu -->
|
||||||
<div class='btn-group' role='group'>
|
<div class='btn-group' role='group'>
|
||||||
@ -46,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% if not read_only %}
|
{% if not read_only %}
|
||||||
{% if roles.stock.change or roles.stock.delete %}
|
{% if roles.stock.change or roles.stock.delete %}
|
||||||
<div class="btn-group">
|
<div class="btn-group" role="group">
|
||||||
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" title='{% trans "Stock Options" %}'>
|
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" title='{% trans "Stock Options" %}'>
|
||||||
<span class='fas fa-boxes'></span> <span class="caret"></span>
|
<span class='fas fa-boxes'></span> <span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
@ -66,7 +59,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
{% include "filter_list.html" with id="stock" %}
|
{% include "filter_list.html" with id="stock" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user