Add revision to SO and BO tables (#12398)
* Add a Revision column renderer * Add Revision to SO and BO tables * Move Description column after IPN and Revision to be consistent with other tables
This commit is contained in:
parent
70749ed93c
commit
1dd261e918
|
|
@ -129,6 +129,18 @@ export function IPNColumn(props: TableColumnProps): TableColumn {
|
|||
};
|
||||
}
|
||||
|
||||
export function RevisionColumn(props: TableColumnProps): TableColumn {
|
||||
return {
|
||||
accessor: 'part_detail.revision',
|
||||
sortable: true,
|
||||
switchable: true,
|
||||
title: t`Revision`,
|
||||
copyable: true,
|
||||
defaultVisible: false,
|
||||
...props
|
||||
};
|
||||
}
|
||||
|
||||
export type StockColumnProps = TableColumnProps & {
|
||||
nullMessage?: string | ReactNode;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ import {
|
|||
IPNColumn,
|
||||
LocationColumn,
|
||||
PartColumn,
|
||||
RenderPartColumn
|
||||
RenderPartColumn,
|
||||
RevisionColumn
|
||||
} from '../../components/tables/ColumnRenderers';
|
||||
import { PartCategoryFilter } from '../../components/tables/Filter';
|
||||
import { InvenTreeTable } from '../../components/tables/InvenTreeTable';
|
||||
|
|
@ -351,6 +352,7 @@ export default function BuildLineTable({
|
|||
}
|
||||
}),
|
||||
IPNColumn({}),
|
||||
RevisionColumn({}),
|
||||
CategoryColumn({
|
||||
accessor: 'category_detail',
|
||||
defaultVisible: false,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import {
|
|||
LocationColumn,
|
||||
PartColumn,
|
||||
ReferenceColumn,
|
||||
RevisionColumn,
|
||||
StatusColumn
|
||||
} from '../../components/tables/ColumnRenderers';
|
||||
import {
|
||||
|
|
@ -128,11 +129,14 @@ export default function SalesOrderAllocationTable({
|
|||
hidden: showPartInfo != true,
|
||||
part: 'part_detail'
|
||||
}),
|
||||
DescriptionColumn({
|
||||
accessor: 'part_detail.description',
|
||||
IPNColumn({
|
||||
hidden: showPartInfo != true
|
||||
}),
|
||||
IPNColumn({
|
||||
RevisionColumn({
|
||||
hidden: showPartInfo != true
|
||||
}),
|
||||
DescriptionColumn({
|
||||
accessor: 'part_detail.description',
|
||||
hidden: showPartInfo != true
|
||||
}),
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ import {
|
|||
LinkColumn,
|
||||
ProjectCodeColumn,
|
||||
ReferenceColumn,
|
||||
RenderPartColumn
|
||||
RenderPartColumn,
|
||||
RevisionColumn
|
||||
} from '../../components/tables/ColumnRenderers';
|
||||
import { InvenTreeTable } from '../../components/tables/InvenTreeTable';
|
||||
|
||||
|
|
@ -103,6 +104,7 @@ export default function SalesOrderLineItemTable({
|
|||
}
|
||||
},
|
||||
IPNColumn({}),
|
||||
RevisionColumn({}),
|
||||
DescriptionColumn({
|
||||
accessor: 'part_detail.description'
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue