mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-17 20:23:50 +00:00
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:
@@ -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 & {
|
export type StockColumnProps = TableColumnProps & {
|
||||||
nullMessage?: string | ReactNode;
|
nullMessage?: string | ReactNode;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ import {
|
|||||||
IPNColumn,
|
IPNColumn,
|
||||||
LocationColumn,
|
LocationColumn,
|
||||||
PartColumn,
|
PartColumn,
|
||||||
RenderPartColumn
|
RenderPartColumn,
|
||||||
|
RevisionColumn
|
||||||
} from '../../components/tables/ColumnRenderers';
|
} from '../../components/tables/ColumnRenderers';
|
||||||
import { PartCategoryFilter } from '../../components/tables/Filter';
|
import { PartCategoryFilter } from '../../components/tables/Filter';
|
||||||
import { InvenTreeTable } from '../../components/tables/InvenTreeTable';
|
import { InvenTreeTable } from '../../components/tables/InvenTreeTable';
|
||||||
@@ -351,6 +352,7 @@ export default function BuildLineTable({
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
IPNColumn({}),
|
IPNColumn({}),
|
||||||
|
RevisionColumn({}),
|
||||||
CategoryColumn({
|
CategoryColumn({
|
||||||
accessor: 'category_detail',
|
accessor: 'category_detail',
|
||||||
defaultVisible: false,
|
defaultVisible: false,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
LocationColumn,
|
LocationColumn,
|
||||||
PartColumn,
|
PartColumn,
|
||||||
ReferenceColumn,
|
ReferenceColumn,
|
||||||
|
RevisionColumn,
|
||||||
StatusColumn
|
StatusColumn
|
||||||
} from '../../components/tables/ColumnRenderers';
|
} from '../../components/tables/ColumnRenderers';
|
||||||
import {
|
import {
|
||||||
@@ -128,11 +129,14 @@ export default function SalesOrderAllocationTable({
|
|||||||
hidden: showPartInfo != true,
|
hidden: showPartInfo != true,
|
||||||
part: 'part_detail'
|
part: 'part_detail'
|
||||||
}),
|
}),
|
||||||
DescriptionColumn({
|
IPNColumn({
|
||||||
accessor: 'part_detail.description',
|
|
||||||
hidden: showPartInfo != true
|
hidden: showPartInfo != true
|
||||||
}),
|
}),
|
||||||
IPNColumn({
|
RevisionColumn({
|
||||||
|
hidden: showPartInfo != true
|
||||||
|
}),
|
||||||
|
DescriptionColumn({
|
||||||
|
accessor: 'part_detail.description',
|
||||||
hidden: showPartInfo != true
|
hidden: showPartInfo != true
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ import {
|
|||||||
LinkColumn,
|
LinkColumn,
|
||||||
ProjectCodeColumn,
|
ProjectCodeColumn,
|
||||||
ReferenceColumn,
|
ReferenceColumn,
|
||||||
RenderPartColumn
|
RenderPartColumn,
|
||||||
|
RevisionColumn
|
||||||
} from '../../components/tables/ColumnRenderers';
|
} from '../../components/tables/ColumnRenderers';
|
||||||
import { InvenTreeTable } from '../../components/tables/InvenTreeTable';
|
import { InvenTreeTable } from '../../components/tables/InvenTreeTable';
|
||||||
|
|
||||||
@@ -103,6 +104,7 @@ export default function SalesOrderLineItemTable({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
IPNColumn({}),
|
IPNColumn({}),
|
||||||
|
RevisionColumn({}),
|
||||||
DescriptionColumn({
|
DescriptionColumn({
|
||||||
accessor: 'part_detail.description'
|
accessor: 'part_detail.description'
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user