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

Add filter for supplier part table:

Filter by "active" status
This commit is contained in:
Oliver Walters
2020-10-29 12:50:17 +11:00
parent 60a8ef723b
commit b3ac261746
4 changed files with 21 additions and 0 deletions

View File

@ -122,6 +122,7 @@ function loadSupplierPartTable(table, url, options) {
$(table).inventreeTable({
url: url,
method: 'get',
original: params,
queryParams: filters,
name: 'supplierparts',
groupBy: false,
@ -135,6 +136,7 @@ function loadSupplierPartTable(table, url, options) {
sortable: true,
field: 'part_detail.full_name',
title: '{% trans "Part" %}',
switchable: false,
formatter: function(value, row, index, field) {
var url = `/part/${row.part}/`;

View File

@ -189,6 +189,15 @@ function getAvailableTableFilters(tableKey) {
};
}
if (tableKey == 'supplier-part') {
return {
active: {
type: 'bool',
title: '{% trans "Active parts" %}',
}
};
}
// Filters for the "Parts" table
if (tableKey == "parts") {
return {