mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Update SalesOrderAllocationTable (#8911)
* Update SalesOrderAllocationTable - Add 'description' column for part - Add 'IPN' column for part * Fix unit test
This commit is contained in:
parent
7ad49949c8
commit
95874d9097
@ -1,6 +1,6 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Grid, Skeleton, Stack } from '@mantine/core';
|
import { Grid, Skeleton, Stack } from '@mantine/core';
|
||||||
import { IconInfoCircle, IconPackages } from '@tabler/icons-react';
|
import { IconBookmark, IconInfoCircle } from '@tabler/icons-react';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
|
|
||||||
@ -208,8 +208,8 @@ export default function SalesOrderShipmentDetail() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'items',
|
name: 'items',
|
||||||
label: t`Assigned Items`,
|
label: t`Allocated Stock`,
|
||||||
icon: <IconPackages />,
|
icon: <IconBookmark />,
|
||||||
content: (
|
content: (
|
||||||
<SalesOrderAllocationTable
|
<SalesOrderAllocationTable
|
||||||
shipmentId={shipment.pk}
|
shipmentId={shipment.pk}
|
||||||
|
@ -120,6 +120,18 @@ export default function SalesOrderAllocationTable({
|
|||||||
switchable: false,
|
switchable: false,
|
||||||
render: (record: any) => PartColumn({ part: record.part_detail })
|
render: (record: any) => PartColumn({ part: record.part_detail })
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessor: 'part_detail.description',
|
||||||
|
title: t`Description`,
|
||||||
|
hidden: showPartInfo != true,
|
||||||
|
sortable: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
accessor: 'part_detail.IPN',
|
||||||
|
title: t`IPN`,
|
||||||
|
hidden: showPartInfo != true,
|
||||||
|
sortable: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
accessor: 'serial',
|
accessor: 'serial',
|
||||||
title: t`Serial Number`,
|
title: t`Serial Number`,
|
||||||
|
@ -155,7 +155,7 @@ test('Sales Orders - Shipments', async ({ page }) => {
|
|||||||
// Click through the various tabs
|
// Click through the various tabs
|
||||||
await page.getByRole('tab', { name: 'Attachments' }).click();
|
await page.getByRole('tab', { name: 'Attachments' }).click();
|
||||||
await page.getByRole('tab', { name: 'Notes' }).click();
|
await page.getByRole('tab', { name: 'Notes' }).click();
|
||||||
await page.getByRole('tab', { name: 'Assigned Items' }).click();
|
await page.getByRole('tab', { name: 'Allocated Stock' }).click();
|
||||||
|
|
||||||
// Ensure assigned items table loads correctly
|
// Ensure assigned items table loads correctly
|
||||||
await page.getByRole('cell', { name: 'BATCH-001' }).first().waitFor();
|
await page.getByRole('cell', { name: 'BATCH-001' }).first().waitFor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user