mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 21:20:56 +00:00
Add part info to "Build Order Allocations" table (#9915)
This commit is contained in:
@ -211,6 +211,7 @@ export function ProjectCodeColumn(props: TableColumnProps): TableColumn {
|
|||||||
export function StatusColumn({
|
export function StatusColumn({
|
||||||
model,
|
model,
|
||||||
sortable,
|
sortable,
|
||||||
|
switchable,
|
||||||
ordering,
|
ordering,
|
||||||
accessor,
|
accessor,
|
||||||
title,
|
title,
|
||||||
@ -218,6 +219,7 @@ export function StatusColumn({
|
|||||||
}: {
|
}: {
|
||||||
model: ModelType;
|
model: ModelType;
|
||||||
sortable?: boolean;
|
sortable?: boolean;
|
||||||
|
switchable?: boolean;
|
||||||
accessor?: string;
|
accessor?: string;
|
||||||
ordering?: string;
|
ordering?: string;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
@ -226,6 +228,7 @@ export function StatusColumn({
|
|||||||
return {
|
return {
|
||||||
accessor: accessor ?? 'status',
|
accessor: accessor ?? 'status',
|
||||||
sortable: sortable ?? true,
|
sortable: sortable ?? true,
|
||||||
|
switchable: switchable ?? true,
|
||||||
ordering: ordering,
|
ordering: ordering,
|
||||||
title: title,
|
title: title,
|
||||||
hidden: hidden,
|
hidden: hidden,
|
||||||
|
@ -14,6 +14,7 @@ import { useUserState } from '../../states/UserState';
|
|||||||
import type { TableColumn } from '../Column';
|
import type { TableColumn } from '../Column';
|
||||||
import {
|
import {
|
||||||
DescriptionColumn,
|
DescriptionColumn,
|
||||||
|
PartColumn,
|
||||||
ProjectCodeColumn,
|
ProjectCodeColumn,
|
||||||
StatusColumn
|
StatusColumn
|
||||||
} from '../ColumnRenderers';
|
} from '../ColumnRenderers';
|
||||||
@ -40,6 +41,7 @@ export default function PartBuildAllocationsTable({
|
|||||||
accessor: 'build',
|
accessor: 'build',
|
||||||
title: t`Build Order`,
|
title: t`Build Order`,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
switchable: false,
|
||||||
render: (record: any) => (
|
render: (record: any) => (
|
||||||
<Group wrap='nowrap' gap='xs'>
|
<Group wrap='nowrap' gap='xs'>
|
||||||
<RowExpansionIcon
|
<RowExpansionIcon
|
||||||
@ -50,6 +52,11 @@ export default function PartBuildAllocationsTable({
|
|||||||
</Group>
|
</Group>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessor: 'part',
|
||||||
|
title: t`Assembly`,
|
||||||
|
render: (record: any) => <PartColumn part={record.part_detail} />
|
||||||
|
},
|
||||||
DescriptionColumn({
|
DescriptionColumn({
|
||||||
accessor: 'build_detail.title'
|
accessor: 'build_detail.title'
|
||||||
}),
|
}),
|
||||||
@ -59,11 +66,13 @@ export default function PartBuildAllocationsTable({
|
|||||||
StatusColumn({
|
StatusColumn({
|
||||||
accessor: 'build_detail.status',
|
accessor: 'build_detail.status',
|
||||||
model: ModelType.build,
|
model: ModelType.build,
|
||||||
title: t`Order Status`
|
title: t`Order Status`,
|
||||||
|
switchable: false
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
accessor: 'allocated',
|
accessor: 'allocated',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
switchable: false,
|
||||||
title: t`Required Stock`,
|
title: t`Required Stock`,
|
||||||
render: (record: any) => (
|
render: (record: any) => (
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
@ -118,7 +127,7 @@ export default function PartBuildAllocationsTable({
|
|||||||
build_detail: true,
|
build_detail: true,
|
||||||
order_outstanding: true
|
order_outstanding: true
|
||||||
},
|
},
|
||||||
enableColumnSwitching: false,
|
enableColumnSwitching: true,
|
||||||
enableSearch: false,
|
enableSearch: false,
|
||||||
rowActions: rowActions,
|
rowActions: rowActions,
|
||||||
rowExpansion: rowExpansion
|
rowExpansion: rowExpansion
|
||||||
|
Reference in New Issue
Block a user