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