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

Part table filtering

- Filter by active status
- Filter by 'is_template' status
- Filter by 'has_stock'
- Allow cascading sublocations
- API improvements to allow new features
This commit is contained in:
Oliver Walters
2020-04-11 22:10:15 +10:00
parent d606df16f7
commit 5e706554b1
5 changed files with 48 additions and 14 deletions

View File

@ -59,6 +59,24 @@ function getAvailableTableFilters(tableKey) {
// Filters for the "Parts" table
if (tableKey == "parts") {
return {
cascade: {
type: 'bool',
title: '{% trans "Include subcategories" %}',
description: '{% trans "Include parts in subcategories" %}',
},
active: {
type: 'bool',
title: '{% trans "Active" %}',
description: '{% trans "Show active parts" %}',
},
is_template: {
type: 'bool',
title: '{% trans "Template" %}',
},
has_stock: {
type: 'bool',
title: '{% trans "Stock Available" %}'
},
};
}