mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 05:48:47 +00:00
Create template for stock table
This commit is contained in:
parent
b8f5c8cca7
commit
0a1887477c
@ -7,19 +7,20 @@
|
|||||||
|
|
||||||
<h3>Supplier Stock</h3>
|
<h3>Supplier Stock</h3>
|
||||||
|
|
||||||
<table class='table table-striped table-condensed' id='stock-table'>
|
{% include "stock_table.html" %}
|
||||||
</table>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
loadStockTable($('#stock-table'),
|
loadStockTable($('#stock-table'), {
|
||||||
{
|
url: "{% url 'api-stock-list' %}",
|
||||||
url: "{% url 'api-stock-list' %}",
|
params: {
|
||||||
params: {
|
supplier: {{ company.id }},
|
||||||
supplier: {{ company.id }},
|
},
|
||||||
}
|
buttons: [
|
||||||
|
'#stock-options',
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -13,25 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div id='button-toolbar'>
|
{% include "stock_table.html" %}
|
||||||
{% if part.active %}
|
|
||||||
<button class='btn btn-success' id='add-stock-item'>New Stock Item</button>
|
|
||||||
{% endif %}
|
|
||||||
<div id='opt-dropdown' class="dropdown" style='float: right;'>
|
|
||||||
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
|
|
||||||
<span class="caret"></span></button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href='#' id='multi-item-take' title='Take items from stock'>Take items</a></li>
|
|
||||||
<li><a href='#' id='multi-item-give' title='Give items to stock'>Add items</a></li>
|
|
||||||
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
|
||||||
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move items</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='stock-table'>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -87,14 +69,14 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#multi-item-take").click(function() {
|
$("#multi-item-remove").click(function() {
|
||||||
updateStockItems({
|
updateStockItems({
|
||||||
action: 'remove',
|
action: 'remove',
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#multi-item-give").click(function() {
|
$("#multi-item-add").click(function() {
|
||||||
updateStockItems({
|
updateStockItems({
|
||||||
action: 'add',
|
action: 'add',
|
||||||
});
|
});
|
||||||
|
@ -44,24 +44,7 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div id='button-toolbar'>
|
{% include "stock_table.html" %}
|
||||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
|
||||||
<button class="btn btn-success" id='item-create'>New Stock Item</button>
|
|
||||||
<div class="dropdown" style='float: right;'>
|
|
||||||
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options<span class="caret"></span></button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="#" id='multi-item-add' title='Add to selected stock items'>Add stock</a></li>
|
|
||||||
<li><a href="#" id='multi-item-remove' title='Remove from selected stock items'>Remove stock</a></li>
|
|
||||||
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
|
||||||
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='stock-table'>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
{% include 'modals.html' %}
|
{% include 'modals.html' %}
|
||||||
|
|
||||||
|
17
InvenTree/templates/stock_table.html
Normal file
17
InvenTree/templates/stock_table.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<div id='button-toolbar'>
|
||||||
|
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||||
|
<button class="btn btn-success" id='item-create'>New Stock Item</button>
|
||||||
|
<div class="dropdown" style='float: right;'>
|
||||||
|
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options<span class="caret"></span></button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#" id='multi-item-add' title='Add to selected stock items'>Add stock</a></li>
|
||||||
|
<li><a href="#" id='multi-item-remove' title='Remove from selected stock items'>Remove stock</a></li>
|
||||||
|
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
||||||
|
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='stock-table'>
|
||||||
|
</table>
|
Loading…
x
Reference in New Issue
Block a user