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:
parent
d1c06ed12a
commit
4a8cb6f7f3
@ -17,6 +17,7 @@ import { useTable } from '../../hooks/UseTable';
|
|||||||
import { apiUrl } from '../../states/ApiState';
|
import { apiUrl } from '../../states/ApiState';
|
||||||
import { useUserState } from '../../states/UserState';
|
import { useUserState } from '../../states/UserState';
|
||||||
import type { TableColumn } from '../Column';
|
import type { TableColumn } from '../Column';
|
||||||
|
import { NoteColumn } from '../ColumnRenderers';
|
||||||
import { InvenTreeTable } from '../InvenTreeTable';
|
import { InvenTreeTable } from '../InvenTreeTable';
|
||||||
import { type RowAction, RowDeleteAction, RowEditAction } from '../RowActions';
|
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',
|
accessor: 'description',
|
||||||
title: t`Part Description`,
|
title: t`Part Description`,
|
||||||
@ -71,11 +81,7 @@ export function RelatedPartTable({
|
|||||||
return getPart(record).description;
|
return getPart(record).description;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
NoteColumn({})
|
||||||
accessor: 'note',
|
|
||||||
title: t`Note`,
|
|
||||||
sortable: false
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}, [partId]);
|
}, [partId]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user