Add API filtering for new field
This commit is contained in:
parent
2d65841ad1
commit
8d96670bbc
|
|
@ -925,6 +925,8 @@ class PartFilter(FilterSet):
|
|||
|
||||
virtual = rest_filters.BooleanFilter()
|
||||
|
||||
consumable = rest_filters.BooleanFilter()
|
||||
|
||||
tags = common.filters.TagsFilter()
|
||||
|
||||
# Created date filters
|
||||
|
|
|
|||
|
|
@ -215,6 +215,10 @@ function partTableColumns(): TableColumn[] {
|
|||
accessor: 'virtual',
|
||||
defaultVisible: false
|
||||
}),
|
||||
BooleanColumn({
|
||||
accessor: 'consumable',
|
||||
defaultVisible: false
|
||||
}),
|
||||
LinkColumn({})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,12 @@ export function PartTableFilters(): TableFilter[] {
|
|||
description: t`Filter by parts which are virtual`,
|
||||
type: 'boolean'
|
||||
},
|
||||
{
|
||||
name: 'consumable',
|
||||
label: t`Consumable`,
|
||||
description: t`Filter by parts which are consumable`,
|
||||
type: 'boolean'
|
||||
},
|
||||
{
|
||||
name: 'is_template',
|
||||
label: t`Is Template`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue