2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-15 11:33:08 +00:00

PUI: Improve table rendering of link columns (#8072)

- Some columns were missing correct rendering function
This commit is contained in:
Oliver 2024-09-04 20:19:19 +10:00 committed by GitHub
parent fe36e641c1
commit af5a0f64b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 11 deletions

View File

@ -15,6 +15,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 { TableColumn } from '../Column'; import { TableColumn } from '../Column';
import { LinkColumn } from '../ColumnRenderers';
import { InvenTreeTable } from '../InvenTreeTable'; import { InvenTreeTable } from '../InvenTreeTable';
import { RowAction, RowDeleteAction, RowEditAction } from '../RowActions'; import { RowAction, RowDeleteAction, RowEditAction } from '../RowActions';
@ -91,11 +92,7 @@ export function AddressTable({
sortable: false, sortable: false,
switchable: true switchable: true
}, },
{ LinkColumn({})
accessor: 'link',
sortable: false,
switchable: true
}
]; ];
}, []); }, []);

View File

@ -203,13 +203,11 @@ export function PurchaseOrderLineItemTable({
sortable: true, sortable: true,
ordering: 'SKU' ordering: 'SKU'
}, },
{ LinkColumn({
accessor: 'supplier_link', accessor: 'supplier_part_detail.link',
title: t`Supplier Link`, title: t`Supplier Link`,
sortable: false
sortable: false, }),
render: (record: any) => record?.supplier_part_detail?.link
},
{ {
accessor: 'MPN', accessor: 'MPN',
title: t`Manufacturer Code`, title: t`Manufacturer Code`,