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

View File

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