2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Add IPN column to RelatedPartTable (#8650)

This commit is contained in:
Oliver 2024-12-10 21:23:23 +11:00 committed by GitHub
parent d1c06ed12a
commit 4a8cb6f7f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,6 +17,7 @@ import { useTable } from '../../hooks/UseTable';
import { apiUrl } from '../../states/ApiState';
import { useUserState } from '../../states/UserState';
import type { TableColumn } from '../Column';
import { NoteColumn } from '../ColumnRenderers';
import { InvenTreeTable } from '../InvenTreeTable';
import { type RowAction, RowDeleteAction, RowEditAction } from '../RowActions';
@ -63,6 +64,15 @@ export function RelatedPartTable({
);
}
},
{
accessor: 'ipn',
title: t`IPN`,
switchable: true,
render: (record: any) => {
const part = getPart(record);
return part.IPN;
}
},
{
accessor: 'description',
title: t`Part Description`,
@ -71,11 +81,7 @@ export function RelatedPartTable({
return getPart(record).description;
}
},
{
accessor: 'note',
title: t`Note`,
sortable: false
}
NoteColumn({})
];
}, [partId]);