diff --git a/src/frontend/src/components/tables/ColumnRenderers.tsx b/src/frontend/src/components/tables/ColumnRenderers.tsx index 59db7402e4..fb32383a68 100644 --- a/src/frontend/src/components/tables/ColumnRenderers.tsx +++ b/src/frontend/src/components/tables/ColumnRenderers.tsx @@ -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; }; diff --git a/src/frontend/src/tables/build/BuildLineTable.tsx b/src/frontend/src/tables/build/BuildLineTable.tsx index bd2c53a1df..aaface6238 100644 --- a/src/frontend/src/tables/build/BuildLineTable.tsx +++ b/src/frontend/src/tables/build/BuildLineTable.tsx @@ -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, diff --git a/src/frontend/src/tables/sales/SalesOrderAllocationTable.tsx b/src/frontend/src/tables/sales/SalesOrderAllocationTable.tsx index 8615a58832..6a5cb27e78 100644 --- a/src/frontend/src/tables/sales/SalesOrderAllocationTable.tsx +++ b/src/frontend/src/tables/sales/SalesOrderAllocationTable.tsx @@ -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 }), { diff --git a/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx b/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx index b165244112..9843da3f58 100644 --- a/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx +++ b/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx @@ -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' }),