2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 04:12:11 +00:00

fix selects

This commit is contained in:
Matthias Mair
2024-04-15 13:45:16 +02:00
parent 087100a9d0
commit 78243027b2
9 changed files with 22 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ export type TableFilterChoice = {
*/
export type TableFilter = {
name: string;
label?: string;
label: string;
description?: string;
type?: string;
choices?: TableFilterChoice[];

View File

@@ -142,7 +142,7 @@ function FilterAddGroup({
<Divider />
<Select
data={filterOptions}
itemComponent={FilterSelectItem}
component={FilterSelectItem}
searchable={true}
placeholder={t`Select filter`}
label={t`Filter`}

View File

@@ -241,26 +241,32 @@ export function BomTable({
},
{
name: 'available_stock',
label: t`Available Stock`,
description: t`Show items with available stock`
},
{
name: 'on_order',
label: t`On Order`,
description: t`Show items on order`
},
{
name: 'validated',
label: t`Validated`,
description: t`Show validated items`
},
{
name: 'inherited',
label: t`Inherited`,
description: t`Show inherited items`
},
{
name: 'optional',
label: t`Optional`,
description: t`Show optional items`
},
{
name: 'consumable',
label: t`Consumable`,
description: t`Show consumable items`
},
{

View File

@@ -51,10 +51,12 @@ export function UsedInTable({
return [
{
name: 'inherited',
label: t`Inherited`,
description: t`Show inherited items`
},
{
name: 'optional',
label: t`Optional`,
description: t`Show optional items`
},
{

View File

@@ -31,6 +31,7 @@ export default function BuildLineTable({ params = {} }: { params?: any }) {
return [
{
name: 'allocated',
label: t`Allocated`,
description: t`Show allocated lines`
},
{

View File

@@ -104,11 +104,13 @@ export function BuildOrderTable({
},
{
name: 'status',
label: t`Status`,
description: t`Filter by order status`,
choiceFunction: StatusFilterOptions(ModelType.build)
},
{
name: 'overdue',
label: t`Overdue`,
type: 'boolean',
description: t`Show overdue status`
},

View File

@@ -582,10 +582,12 @@ export function MachineListTable({
tableFilters: [
{
name: 'active',
label: t`Active`,
type: 'boolean'
},
{
name: 'machine_type',
label: t`Machine Type`,
type: 'choice',
choiceFunction: () =>
machineTypes
@@ -594,6 +596,7 @@ export function MachineListTable({
},
{
name: 'driver',
label: t`Driver`,
type: 'choice',
choiceFunction: () =>
machineDrivers

View File

@@ -76,18 +76,22 @@ export default function PartTestTemplateTable({ partId }: { partId: number }) {
return [
{
name: 'required',
label: t`Required`,
description: t`Show required tests`
},
{
name: 'enabled',
label: t`Enabled`,
description: t`Show enabled tests`
},
{
name: 'requires_value',
label: t`Requires Value`,
description: t`Show tests that require a value`
},
{
name: 'requires_attachment',
label: t`Requires Attachment`,
description: t`Show tests that require an attachment`
},
{

View File

@@ -39,10 +39,12 @@ export function StockLocationTable({ parentId }: { parentId?: any }) {
},
{
name: 'structural',
label: t`structural`,
description: t`Show structural locations`
},
{
name: 'external',
label: t`external`,
description: t`Show external locations`
},
{