2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Further work on templated filter options

This commit is contained in:
Oliver Walters
2020-04-11 13:38:51 +10:00
parent c1b59eeaab
commit 5d2441776e
3 changed files with 30 additions and 7 deletions

View File

@ -7,6 +7,8 @@
function getAvailableTableFilters(tableKey) {
tableKey = tableKey.toLowerCase();
// Filters for the "Stock" table
if (tableKey == 'stock') {
return {
@ -25,15 +27,32 @@ function getAvailableTableFilters(tableKey) {
{% for opt in stock_status_codes %}'{{ opt.value }}': '{{ opt.key }}',
{% endfor %}
},
'title': 'Stock status',
'description': 'Stock status',
},
'test': {
title: 'A test parameter',
'title': '{% trans "Stock status" %}',
'description': '{% trans "Stock status" %}',
},
};
}
// Filters for the "Build" table
if (tableKey == 'build') {
return {
};
}
// Filters for the "Order" table
if (tableKey == "order") {
return {
};
}
// Filters fro the "Parts" table
if (tableKey == "parts") {
return {
};
}
// Finally, no matching key
return {};
}