2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 03:26:45 +00:00

[PUI] Part IPN display (#8264)

* Add IPN column to order tables

* Fix display on SupplierPartDetail page

* Update manufacturer part detail page
This commit is contained in:
Oliver 2024-10-09 21:50:29 +11:00 committed by GitHub
parent 67434b319b
commit 0b87dc9372
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 54 additions and 23 deletions

View File

@ -171,7 +171,7 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
return [
{
name: 'details',
label: t`Details`,
label: t`Company Details`,
icon: <IconInfoCircle />,
content: detailsPanel
},

View File

@ -79,18 +79,19 @@ export default function ManufacturerPartDetail() {
},
{
type: 'string',
name: 'description',
label: t`Description`,
name: 'part_detail.IPN',
label: t`IPN`,
copy: true,
hidden: !manufacturerPart.description
icon: 'serial',
hidden: !data.part_detail?.IPN
},
{
type: 'link',
external: true,
name: 'link',
label: t`External Link`,
type: 'string',
name: 'part_detail.description',
label: t`Description`,
copy: true,
hidden: !manufacturerPart.link
icon: 'info',
hidden: !manufacturerPart.description
}
];
@ -110,6 +111,22 @@ export default function ManufacturerPartDetail() {
copy: true,
hidden: !manufacturerPart.MPN,
icon: 'reference'
},
{
type: 'string',
name: 'description',
label: t`Description`,
copy: true,
hidden: !manufacturerPart.description,
icon: 'info'
},
{
type: 'link',
external: true,
name: 'link',
label: t`External Link`,
copy: true,
hidden: !manufacturerPart.link
}
];
@ -128,11 +145,7 @@ export default function ManufacturerPartDetail() {
/>
</Grid.Col>
<Grid.Col span={8}>
<DetailsTable
title={t`Manufacturer Part`}
fields={tl}
item={data}
/>
<DetailsTable title={t`Part Details`} fields={tl} item={data} />
</Grid.Col>
</Grid>
<DetailsTable title={t`Manufacturer Details`} fields={tr} item={data} />

View File

@ -88,9 +88,18 @@ export default function SupplierPartDetail() {
},
{
type: 'string',
name: 'description',
name: 'part_detail.IPN',
label: t`IPN`,
copy: true,
hidden: !data.part_detail?.IPN,
icon: 'serial'
},
{
type: 'string',
name: 'part_detail.description',
label: t`Description`,
copy: true
copy: true,
icon: 'info'
},
{
type: 'link',
@ -196,7 +205,7 @@ export default function SupplierPartDetail() {
/>
</Grid.Col>
<Grid.Col span={8}>
<DetailsTable title={t`Supplier Part`} fields={tl} item={data} />
<DetailsTable title={t`Part Details`} fields={tl} item={data} />
</Grid.Col>
</Grid>
<DetailsTable title={t`Supplier`} fields={tr} item={data} />

View File

@ -125,17 +125,18 @@ export function PurchaseOrderLineItemTable({
return [
{
accessor: 'part',
title: t`Internal Part`,
title: t`Part`,
sortable: true,
switchable: false,
render: (record: any) => PartColumn({ part: record.part_detail })
},
{
accessor: 'description',
title: t`Part Description`,
sortable: false,
render: (record: any) => record?.part_detail?.description
accessor: 'part_detail.IPN',
sortable: false
},
{
accessor: 'part_detail.description',
sortable: false
},
ReferenceColumn({}),
{

View File

@ -101,6 +101,14 @@ export default function ReturnOrderLineItemTable({
switchable: false,
render: (record: any) => PartColumn({ part: record?.part_detail })
},
{
accessor: 'part_detail.IPN',
sortable: false
},
{
accessor: 'part_detail.description',
sortable: false
},
{
accessor: 'item_detail.serial',
title: t`Serial Number`,