mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
[PUI] Assigned stock table (#6337)
* Display "assigned stock" table * Add BuildOrder table to SalesOrder page
This commit is contained in:
parent
fb0baa9e7a
commit
65ecb975c6
@ -1,5 +1,5 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { LoadingOverlay, Stack } from '@mantine/core';
|
import { LoadingOverlay, Skeleton, Stack } from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
IconBuildingFactory2,
|
IconBuildingFactory2,
|
||||||
IconBuildingWarehouse,
|
IconBuildingWarehouse,
|
||||||
@ -133,7 +133,12 @@ export default function CompanyDetail(props: CompanyDetailProps) {
|
|||||||
name: 'assigned-stock',
|
name: 'assigned-stock',
|
||||||
label: t`Assigned Stock`,
|
label: t`Assigned Stock`,
|
||||||
icon: <IconPackageExport />,
|
icon: <IconPackageExport />,
|
||||||
hidden: !company?.is_customer
|
hidden: !company?.is_customer,
|
||||||
|
content: company?.pk ? (
|
||||||
|
<StockItemTable params={{ customer: company.pk }} />
|
||||||
|
) : (
|
||||||
|
<Skeleton />
|
||||||
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'contacts',
|
name: 'contacts',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { LoadingOverlay, Stack } from '@mantine/core';
|
import { LoadingOverlay, Skeleton, Stack } from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
IconInfoCircle,
|
IconInfoCircle,
|
||||||
IconList,
|
IconList,
|
||||||
@ -14,6 +14,7 @@ import { useParams } from 'react-router-dom';
|
|||||||
|
|
||||||
import { PageDetail } from '../../components/nav/PageDetail';
|
import { PageDetail } from '../../components/nav/PageDetail';
|
||||||
import { PanelGroup, PanelType } from '../../components/nav/PanelGroup';
|
import { PanelGroup, PanelType } from '../../components/nav/PanelGroup';
|
||||||
|
import { BuildOrderTable } from '../../components/tables/build/BuildOrderTable';
|
||||||
import { AttachmentTable } from '../../components/tables/general/AttachmentTable';
|
import { AttachmentTable } from '../../components/tables/general/AttachmentTable';
|
||||||
import { NotesEditor } from '../../components/widgets/MarkdownEditor';
|
import { NotesEditor } from '../../components/widgets/MarkdownEditor';
|
||||||
import { ApiPaths } from '../../enums/ApiEndpoints';
|
import { ApiPaths } from '../../enums/ApiEndpoints';
|
||||||
@ -59,7 +60,16 @@ export default function SalesOrderDetail() {
|
|||||||
{
|
{
|
||||||
name: 'build-orders',
|
name: 'build-orders',
|
||||||
label: t`Build Orders`,
|
label: t`Build Orders`,
|
||||||
icon: <IconTools />
|
icon: <IconTools />,
|
||||||
|
content: order?.pk ? (
|
||||||
|
<BuildOrderTable
|
||||||
|
params={{
|
||||||
|
sales_order: order.pk
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Skeleton />
|
||||||
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'attachments',
|
name: 'attachments',
|
||||||
|
Loading…
Reference in New Issue
Block a user