2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 04:25:42 +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) => ( {groupedPanels.map((group) => (
<Box key={`group-${group.id}`} w={'100%'}> <Box key={`group-${group.id}`} w={'100%'}>
<Text <Text
fs={'italic'} hidden={!group.label || !expanded}
ml={'1rem'}
c={vars.colors.primaryColors[7]} c={vars.colors.primaryColors[7]}
key={`group-label-${group.id}`} key={`group-label-${group.id}`}
style={{
paddingLeft: '10px'
}}
> >
{group.label} {group.label}
</Text> </Text>
{group.label && <Divider c={vars.colors.primaryColors[7]} />}
{group.panels?.map( {group.panels?.map(
(panel) => (panel) =>
!panel.hidden && ( !panel.hidden && (

View File

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