From e5eb1f45136cd9653b90a70798d1d4db627e304a Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 19 Apr 2022 13:09:14 +1000 Subject: [PATCH] Adds button to refresh stock item tracking table --- InvenTree/templates/js/translated/stock.js | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js index 42ed04265d..ff2240b007 100644 --- a/InvenTree/templates/js/translated/stock.js +++ b/InvenTree/templates/js/translated/stock.js @@ -2319,6 +2319,23 @@ function loadStockTrackingTable(table, options) { 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 cols.push({ 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 = ""; - var bDel = ""; - - return "
" + bEdit + bDel + "
"; - } else { - return ""; - } - } - }); - */ - table.inventreeTable({ method: 'get', - queryParams: options.params, + queryParams: filters, + original: original, columns: cols, url: options.url, });