2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 20:15:44 +00:00

Cleanup panel groups (#9783)

- Hide label if panel is not expanded
- Add a visual divider
This commit is contained in:
Oliver
2025-06-15 11:17:44 +10:00
committed by GitHub
parent 26b5f0ae4c
commit 3bc1e7f9f0
2 changed files with 10 additions and 7 deletions

View File

@ -218,13 +218,16 @@ function BasePanelGroup({
{groupedPanels.map((group) => (
<Box key={`group-${group.id}`} w={'100%'}>
<Text
fs={'italic'}
ml={'1rem'}
hidden={!group.label || !expanded}
c={vars.colors.primaryColors[7]}
key={`group-label-${group.id}`}
style={{
paddingLeft: '10px'
}}
>
{group.label}
</Text>
{group.label && <Divider c={vars.colors.primaryColors[7]} />}
{group.panels?.map(
(panel) =>
!panel.hidden && (

View File

@ -256,11 +256,6 @@ export default function AdminCenter() {
label: t`Reporting`,
panelIDs: ['labels', 'reports']
},
{
id: 'extend',
label: t`Extend / Integrate`,
panelIDs: ['plugin', 'machine']
},
{
id: 'plm',
label: t`PLM`,
@ -270,6 +265,11 @@ export default function AdminCenter() {
'location-types',
'stocktake'
]
},
{
id: 'extend',
label: t`Extend / Integrate`,
panelIDs: ['plugin', 'machine']
}
];
}, []);