mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Add "stock" table to "category" page (#8579)
- Ref: https://github.com/inventree/InvenTree/discussions/8578
This commit is contained in:
parent
c074250ce6
commit
49cb63cb54
@ -4,6 +4,7 @@ import {
|
|||||||
IconCategory,
|
IconCategory,
|
||||||
IconInfoCircle,
|
IconInfoCircle,
|
||||||
IconListDetails,
|
IconListDetails,
|
||||||
|
IconPackages,
|
||||||
IconSitemap
|
IconSitemap
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
@ -40,6 +41,7 @@ import { useUserState } from '../../states/UserState';
|
|||||||
import ParametricPartTable from '../../tables/part/ParametricPartTable';
|
import ParametricPartTable from '../../tables/part/ParametricPartTable';
|
||||||
import { PartCategoryTable } from '../../tables/part/PartCategoryTable';
|
import { PartCategoryTable } from '../../tables/part/PartCategoryTable';
|
||||||
import { PartListTable } from '../../tables/part/PartTable';
|
import { PartListTable } from '../../tables/part/PartTable';
|
||||||
|
import { StockItemTable } from '../../tables/stock/StockItemTable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detail view for a single PartCategory instance.
|
* Detail view for a single PartCategory instance.
|
||||||
@ -252,6 +254,12 @@ export default function CategoryDetail() {
|
|||||||
icon: <IconInfoCircle />,
|
icon: <IconInfoCircle />,
|
||||||
content: detailsPanel
|
content: detailsPanel
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'subcategories',
|
||||||
|
label: t`Subcategories`,
|
||||||
|
icon: <IconSitemap />,
|
||||||
|
content: <PartCategoryTable parentId={id} />
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'parts',
|
name: 'parts',
|
||||||
label: t`Parts`,
|
label: t`Parts`,
|
||||||
@ -267,10 +275,19 @@ export default function CategoryDetail() {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'subcategories',
|
name: 'stockitem',
|
||||||
label: t`Part Categories`,
|
label: t`Stock Items`,
|
||||||
icon: <IconSitemap />,
|
icon: <IconPackages />,
|
||||||
content: <PartCategoryTable parentId={id} />
|
hidden: !id,
|
||||||
|
content: (
|
||||||
|
<StockItemTable
|
||||||
|
params={{
|
||||||
|
category: id
|
||||||
|
}}
|
||||||
|
allowAdd={false}
|
||||||
|
tableName='category-stockitems'
|
||||||
|
/>
|
||||||
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'parameters',
|
name: 'parameters',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user