2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 03:26:45 +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:
Oliver 2025-01-21 00:37:36 +11:00 committed by GitHub
parent 7ad49949c8
commit 95874d9097
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { t } from '@lingui/macro';
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 { useNavigate, useParams } from 'react-router-dom';
@ -208,8 +208,8 @@ export default function SalesOrderShipmentDetail() {
},
{
name: 'items',
label: t`Assigned Items`,
icon: <IconPackages />,
label: t`Allocated Stock`,
icon: <IconBookmark />,
content: (
<SalesOrderAllocationTable
shipmentId={shipment.pk}

View File

@ -120,6 +120,18 @@ export default function SalesOrderAllocationTable({
switchable: false,
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',
title: t`Serial Number`,

View File

@ -155,7 +155,7 @@ test('Sales Orders - Shipments', async ({ page }) => {
// Click through the various tabs
await page.getByRole('tab', { name: 'Attachments' }).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
await page.getByRole('cell', { name: 'BATCH-001' }).first().waitFor();