Skip to content

Commit

Permalink
[PUI] Part IPN display (#8264)
Browse files Browse the repository at this point in the history
* Add IPN column to order tables

* Fix display on SupplierPartDetail page

* Update manufacturer part detail page
  • Loading branch information
SchrodingersGat authored Oct 9, 2024
1 parent 67434b3 commit 0b87dc9
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/pages/company/CompanyDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
39 changes: 26 additions & 13 deletions src/frontend/src/pages/company/ManufacturerPartDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
];

Expand All @@ -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
}
];

Expand All @@ -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} />
Expand Down
15 changes: 12 additions & 3 deletions src/frontend/src/pages/company/SupplierPartDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({}),
{
Expand Down
8 changes: 8 additions & 0 deletions src/frontend/src/tables/sales/ReturnOrderLineItemTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down

0 comments on commit 0b87dc9

Please sign in to comment.