mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
[PUI] Tweak purchase order line table (#7656)
* Add "packaging" field to PO line table * Fixes for order detail pages
This commit is contained in:
parent
fc0a860e9b
commit
b96b8b8a04
@ -134,12 +134,6 @@ export default function PurchaseOrderDetail() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
let tr: DetailsField[] = [
|
let tr: DetailsField[] = [
|
||||||
{
|
|
||||||
type: 'text',
|
|
||||||
name: 'line_items',
|
|
||||||
label: t`Line Items`,
|
|
||||||
icon: 'list'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'progressbar',
|
type: 'progressbar',
|
||||||
name: 'completed',
|
name: 'completed',
|
||||||
@ -148,14 +142,6 @@ export default function PurchaseOrderDetail() {
|
|||||||
total: order.line_items,
|
total: order.line_items,
|
||||||
progress: order.completed_lines
|
progress: order.completed_lines
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'progressbar',
|
|
||||||
name: 'shipments',
|
|
||||||
icon: 'shipment',
|
|
||||||
label: t`Completed Shipments`,
|
|
||||||
total: order.shipments,
|
|
||||||
progress: order.completed_shipments
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'text',
|
type: 'text',
|
||||||
name: 'currency',
|
name: 'currency',
|
||||||
|
@ -106,12 +106,6 @@ export default function SalesOrderDetail() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
let tr: DetailsField[] = [
|
let tr: DetailsField[] = [
|
||||||
{
|
|
||||||
type: 'text',
|
|
||||||
name: 'line_items',
|
|
||||||
label: t`Line Items`,
|
|
||||||
icon: 'list'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'progressbar',
|
type: 'progressbar',
|
||||||
name: 'completed',
|
name: 'completed',
|
||||||
@ -126,8 +120,8 @@ export default function SalesOrderDetail() {
|
|||||||
icon: 'shipment',
|
icon: 'shipment',
|
||||||
label: t`Completed Shipments`,
|
label: t`Completed Shipments`,
|
||||||
total: order.shipments,
|
total: order.shipments,
|
||||||
progress: order.completed_shipments
|
progress: order.completed_shipments,
|
||||||
// TODO: Fix this progress bar
|
hidden: !order.shipments
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
@ -23,6 +23,7 @@ import {
|
|||||||
import { useTable } from '../../hooks/UseTable';
|
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 {
|
import {
|
||||||
CurrencyColumn,
|
CurrencyColumn,
|
||||||
LinkColumn,
|
LinkColumn,
|
||||||
@ -65,7 +66,7 @@ export function PurchaseOrderLineItemTable({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableColumns = useMemo(() => {
|
const tableColumns: TableColumn[] = useMemo(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
accessor: 'part',
|
accessor: 'part',
|
||||||
@ -138,17 +139,21 @@ export function PurchaseOrderLineItemTable({
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessor: 'pack_quantity',
|
accessor: 'supplier_part_detail.packaging',
|
||||||
sortable: false,
|
sortable: false,
|
||||||
title: t`Pack Quantity`,
|
title: t`Packaging`
|
||||||
render: (record: any) => record?.supplier_part_detail?.pack_quantity
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessor: 'SKU',
|
accessor: 'supplier_part_detail.pack_quantity',
|
||||||
|
sortable: false,
|
||||||
|
title: t`Pack Quantity`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
accessor: 'supplier_part_detail.SKU',
|
||||||
title: t`Supplier Code`,
|
title: t`Supplier Code`,
|
||||||
switchable: false,
|
switchable: false,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
render: (record: any) => record?.supplier_part_detail?.SKU
|
ordering: 'SKU'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessor: 'supplier_link',
|
accessor: 'supplier_link',
|
||||||
|
Loading…
Reference in New Issue
Block a user