mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Filter part table by 'is_component' status
This commit is contained in:
parent
0f90e8f522
commit
f5a8b110b5
@ -147,6 +147,12 @@ function loadPartTable(table, url, options={}) {
|
||||
display = display + `<span class='fas fa-tools label-right' title='Assembled part'></span>`;
|
||||
}
|
||||
|
||||
/*
|
||||
if (row.component) {
|
||||
display = display + `<span class='fas fa-cogs label-right' title='Component part'></span>`;
|
||||
}
|
||||
*/
|
||||
|
||||
if (!row.active) {
|
||||
display = display + `<span class='fas fa-times label-right' title='Inactive part'></span>`;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -85,6 +85,10 @@ function getAvailableTableFilters(tableKey) {
|
||||
type: 'bool',
|
||||
title: '{% trans "Assembly" %}',
|
||||
},
|
||||
component: {
|
||||
type: 'bool',
|
||||
title: '{% trans "Component" %}',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user