2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-18 02:36:31 +00:00

Tweak panel behaviour (#10030)

- Always separate "plugin provided" panels
This commit is contained in:
Oliver
2025-07-16 13:55:16 +10:00
committed by GitHub
parent 31eabc9bea
commit 995c3ff5e7
2 changed files with 5 additions and 5 deletions

View File

@@ -71,7 +71,6 @@ export type PanelProps = {
selectedPanel?: string; selectedPanel?: string;
onPanelChange?: (panel: string) => void; onPanelChange?: (panel: string) => void;
collapsible?: boolean; collapsible?: boolean;
markCustomPanels?: boolean;
}; };
function BasePanelGroup({ function BasePanelGroup({
@@ -84,8 +83,7 @@ function BasePanelGroup({
instance, instance,
model, model,
id, id,
collapsible = true, collapsible = true
markCustomPanels = false
}: Readonly<PanelProps>): ReactNode { }: Readonly<PanelProps>): ReactNode {
const localState = useLocalState(); const localState = useLocalState();
const location = useLocation(); const location = useLocation();
@@ -157,11 +155,14 @@ function BasePanelGroup({
if (pluginPanels.length > 0) { if (pluginPanels.length > 0) {
_grouped_panels.push({ _grouped_panels.push({
id: 'plugins', id: 'plugins',
label: markCustomPanels ? t`Plugin Provided` : '', label: t`Plugin Provided`,
panels: pluginPanels panels: pluginPanels
}); });
} }
console.log('_allPanels:', _allpanels);
console.log('_groupedPanels:', _grouped_panels);
return [_allpanels, _grouped_panels]; return [_allpanels, _grouped_panels];
}, [groups, panels, pluginPanelSet]); }, [groups, panels, pluginPanelSet]);

View File

@@ -302,7 +302,6 @@ export default function AdminCenter() {
panels={adminCenterPanels} panels={adminCenterPanels}
groups={grouping} groups={grouping}
collapsible={true} collapsible={true}
markCustomPanels={true}
model='admincenter' model='admincenter'
id={null} id={null}
/> />