mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-18 18:56:31 +00:00
Tweak panel behaviour (#10030)
- Always separate "plugin provided" panels
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
@@ -302,7 +302,6 @@ export default function AdminCenter() {
|
||||
panels={adminCenterPanels}
|
||||
groups={grouping}
|
||||
collapsible={true}
|
||||
markCustomPanels={true}
|
||||
model='admincenter'
|
||||
id={null}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user