mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Adds button to refresh stock item tracking table
This commit is contained in:
parent
48170ee096
commit
e5eb1f4513
@ -2319,6 +2319,23 @@ function loadStockTrackingTable(table, options) {
|
|||||||
|
|
||||||
var cols = [];
|
var cols = [];
|
||||||
|
|
||||||
|
var filterTarget = '#filter-list-stocktracking';
|
||||||
|
|
||||||
|
var filterKey = 'stocktracking';
|
||||||
|
|
||||||
|
var filters = loadTableFilters(filterKey);
|
||||||
|
|
||||||
|
var params = options.params;
|
||||||
|
|
||||||
|
var original = {};
|
||||||
|
|
||||||
|
for (var k in params) {
|
||||||
|
original[k] = params[k];
|
||||||
|
filters[k] = params[k];
|
||||||
|
}
|
||||||
|
|
||||||
|
setupFilterList(filterKey, table, filterTarget);
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
cols.push({
|
cols.push({
|
||||||
field: 'date',
|
field: 'date',
|
||||||
@ -2493,27 +2510,10 @@ function loadStockTrackingTable(table, options) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
// 2021-05-11 - Ability to edit or delete StockItemTracking entries is now removed
|
|
||||||
cols.push({
|
|
||||||
sortable: false,
|
|
||||||
formatter: function(value, row, index, field) {
|
|
||||||
// Manually created entries can be edited or deleted
|
|
||||||
if (false && !row.system) {
|
|
||||||
var bEdit = "<button title='{% trans 'Edit tracking entry' %}' class='btn btn-entry-edit btn-outline-secondary' type='button' url='/stock/track/" + row.pk + "/edit/'><span class='fas fa-edit'/></button>";
|
|
||||||
var bDel = "<button title='{% trans 'Delete tracking entry' %}' class='btn btn-entry-delete btn-outline-secondary' type='button' url='/stock/track/" + row.pk + "/delete/'><span class='fas fa-trash-alt icon-red'/></button>";
|
|
||||||
|
|
||||||
return "<div class='btn-group' role='group'>" + bEdit + bDel + "</div>";
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
table.inventreeTable({
|
table.inventreeTable({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
queryParams: options.params,
|
queryParams: filters,
|
||||||
|
original: original,
|
||||||
columns: cols,
|
columns: cols,
|
||||||
url: options.url,
|
url: options.url,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user