From 57c5d6c97a80e407e9693c2fc2898601a58717d2 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 11 Apr 2020 12:30:24 +1000 Subject: [PATCH] Moar refactoring --- .../static/script/inventree/filters.js | 65 ++++++++++++++++++- .../static/script/inventree/stock.js | 45 ++++--------- 2 files changed, 73 insertions(+), 37 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/filters.js b/InvenTree/InvenTree/static/script/inventree/filters.js index 69b8ceae45..0ae09b29ad 100644 --- a/InvenTree/InvenTree/static/script/inventree/filters.js +++ b/InvenTree/InvenTree/static/script/inventree/filters.js @@ -112,11 +112,11 @@ function getAvailableTableFilters(tableKey) { 'cascade': { 'type': 'bool', 'description': 'Include stock in sublocations', - 'title': 'sublocations', + 'title': 'Include sublocations', }, 'active': { 'type': 'bool', - 'title': 'part active', + 'title': 'Acitve parts', 'description': 'Show stock for active parts', }, 'status': { @@ -127,8 +127,12 @@ function getAvailableTableFilters(tableKey) { 'DESTROYED': 60, 'LOST': 70 }, + 'title': 'Stock status', 'description': 'Stock status', - } + }, + 'test': { + title: 'A test parameter', + }, }; } @@ -191,7 +195,62 @@ function getFilterOptionList(tableKey, filterKey) { } +/* + * Generate a list of