diff --git a/InvenTree/InvenTree/static/script/inventree/part.js b/InvenTree/InvenTree/static/script/inventree/part.js index 54947c949b..a03dd6d89a 100644 --- a/InvenTree/InvenTree/static/script/inventree/part.js +++ b/InvenTree/InvenTree/static/script/inventree/part.js @@ -146,6 +146,12 @@ function loadPartTable(table, url, options={}) { if (row.assembly) { display = display + ``; } + + /* + if (row.component) { + display = display + ``; + } + */ if (!row.active) { display = display + ``; diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 5f6eed41ac..dd2b86e064 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -156,6 +156,7 @@ class PartList(generics.ListCreateAPIView): - is_template: Is the part a template part? - variant_of: Filter by variant_of Part reference - assembly: Filter by assembly field + - component: Filter by component field """ serializer_class = part_serializers.PartSerializer diff --git a/InvenTree/templates/table_filters.html b/InvenTree/templates/table_filters.html index 6e362ab3d4..0bff04a7aa 100644 --- a/InvenTree/templates/table_filters.html +++ b/InvenTree/templates/table_filters.html @@ -85,6 +85,10 @@ function getAvailableTableFilters(tableKey) { type: 'bool', title: '{% trans "Assembly" %}', }, + component: { + type: 'bool', + title: '{% trans "Component" %}', + }, }; }