2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-09 21:30:54 +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 = { export type TableFilter = {
name: string; name: string;
label?: string; label: string;
description?: string; description?: string;
type?: string; type?: string;
choices?: TableFilterChoice[]; choices?: TableFilterChoice[];

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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