From a659dcf6372ddbd17c7a6772148f0ddcd21bd75c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 28 Nov 2024 02:45:04 +0000 Subject: [PATCH] Add "stock" table to "category" page - Ref: https://github.com/inventree/InvenTree/discussions/8578 --- .../src/pages/part/CategoryDetail.tsx | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/pages/part/CategoryDetail.tsx b/src/frontend/src/pages/part/CategoryDetail.tsx index 83fd0ce3bc33..a8fa7a9cb9d6 100644 --- a/src/frontend/src/pages/part/CategoryDetail.tsx +++ b/src/frontend/src/pages/part/CategoryDetail.tsx @@ -4,6 +4,7 @@ import { IconCategory, IconInfoCircle, IconListDetails, + IconPackages, IconSitemap } from '@tabler/icons-react'; import { useMemo, useState } from 'react'; @@ -40,6 +41,7 @@ import { useUserState } from '../../states/UserState'; import ParametricPartTable from '../../tables/part/ParametricPartTable'; import { PartCategoryTable } from '../../tables/part/PartCategoryTable'; import { PartListTable } from '../../tables/part/PartTable'; +import { StockItemTable } from '../../tables/stock/StockItemTable'; /** * Detail view for a single PartCategory instance. @@ -252,6 +254,12 @@ export default function CategoryDetail() { icon: , content: detailsPanel }, + { + name: 'subcategories', + label: t`Subcategories`, + icon: , + content: + }, { name: 'parts', label: t`Parts`, @@ -267,10 +275,19 @@ export default function CategoryDetail() { ) }, { - name: 'subcategories', - label: t`Part Categories`, - icon: , - content: + name: 'stockitem', + label: t`Stock Items`, + icon: , + hidden: !id, + content: ( + + ) }, { name: 'parameters',