Add menu item to set stock status for multiple items

This commit is contained in:
Oliver Walters 2021-01-14 13:41:38 +11:00
parent a2f9d721f3
commit aac835f634
2 changed files with 9 additions and 0 deletions

View File

@ -682,6 +682,14 @@ function loadStockTable(table, options) {
}); });
}); });
$("#multi-item-set-status").click(function() {
var selections = $("#stock-table").bootstrapTable('getSelections');
selections.forEach(function(item) {
// TODO
});
});
$("#multi-item-delete").click(function() { $("#multi-item-delete").click(function() {
var selections = $("#stock-table").bootstrapTable("getSelections"); var selections = $("#stock-table").bootstrapTable("getSelections");

View File

@ -23,6 +23,7 @@
<li><a href="#" id='multi-item-stocktake' title='{% trans "Stocktake selected stock items" %}'><span class='fas fa-check-circle'></span> {% trans "Count stock" %}</a></li> <li><a href="#" id='multi-item-stocktake' title='{% trans "Stocktake selected stock items" %}'><span class='fas fa-check-circle'></span> {% trans "Count stock" %}</a></li>
<li><a href='#' id='multi-item-move' title='{% trans "Move selected stock items" %}'><span class='fas fa-exchange-alt'></span> {% trans "Move stock" %}</a></li> <li><a href='#' id='multi-item-move' title='{% trans "Move selected stock items" %}'><span class='fas fa-exchange-alt'></span> {% trans "Move stock" %}</a></li>
<li><a href='#' id='multi-item-order' title='{% trans "Order selected items" %}'><span class='fas fa-shopping-cart'></span> {% trans "Order stock" %}</a></li> <li><a href='#' id='multi-item-order' title='{% trans "Order selected items" %}'><span class='fas fa-shopping-cart'></span> {% trans "Order stock" %}</a></li>
<li><a href='#' id='multi-item-set-status' title='{% trans "Change status" %}'><span class='fas fa-exclamation-circle'></span> {% trans "Change stock status" %}</a></li>
{% endif %} {% endif %}
{% if roles.stock.delete %} {% if roles.stock.delete %}
<li><a href='#' id='multi-item-delete' title='{% trans "Delete selected items" %}'><span class='fas fa-trash-alt'></span> {% trans "Delete Stock" %}</a></li> <li><a href='#' id='multi-item-delete' title='{% trans "Delete selected items" %}'><span class='fas fa-trash-alt'></span> {% trans "Delete Stock" %}</a></li>