Update subpanel configuration mapping for new UI

This commit is contained in:
Clemente Raposo 2024-12-05 00:41:46 +00:00 committed by Jack Anderson
parent 8ea4293edf
commit 009dc5e0b0

View file

@ -218,6 +218,7 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
$tabs[$key]['insightWidget'] = $this->mapInsightWidget($subpanel, $tabs, $key, $tab); $tabs[$key]['insightWidget'] = $this->mapInsightWidget($subpanel, $tabs, $key, $tab);
$tabs[$key]['lineActions'] = $this->getSubpanelLineActions($subpanel, $tabs[$key]['module']); $tabs[$key]['lineActions'] = $this->getSubpanelLineActions($subpanel, $tabs[$key]['module']);
$tabs[$key]['searchdefs'] = $this->getSearchdefs($subpanel); $tabs[$key]['searchdefs'] = $this->getSearchdefs($subpanel);
$tabs[$key]['order'] = $tab['order'];
if (empty($columnSubpanel)) { if (empty($columnSubpanel)) {
continue; continue;
@ -488,37 +489,16 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
[ [
'icon' => $tab['module'], 'icon' => $tab['module'],
], ],
]
],
[
'align' => 'end',
'justify' => 'start',
'class' => 'flex-grow-1',
'cols' => [
[
'statistic' => $tabs[$key]['module'],
'class' => 'sub-panel-banner-value',
'bold' => true,
],
]
],
[
'justify' => 'start',
'cols' => [
[
'descriptionKey' => $tabs[$key]['title_key'] . '_INSIGHT_DESCRIPTION',
'class' => 'sub-panel-banner-tooltip',
]
]
],
[
'justify' => 'start',
'cols' => [
[ [
'labelKey' => $tabs[$key]['title_key'], 'labelKey' => $tabs[$key]['title_key'],
'class' => 'sub-panel-banner-button-title', 'class' => 'sub-panel-banner-button-title',
'bold' => true, 'bold' => true,
] ],
[
'statistic' => 'default',
'class' => 'sub-panel-banner-value',
'bold' => true,
],
] ]
], ],
] ]
@ -597,8 +577,10 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
) { ) {
$lineAction = $subpanelLineActions[$list_field['name']]; $lineAction = $subpanelLineActions[$list_field['name']];
$moduleName = $this->moduleNameMapper->toFrontEnd($subpanelModule); $moduleName = $this->moduleNameMapper->toFrontEnd($subpanelModule);
$lineActions[] = $this->subpanelLineActionDefinitionProvider->getLineAction($moduleName, $lineActions[] = $this->subpanelLineActionDefinitionProvider->getLineAction(
$lineAction); $moduleName,
$lineAction
);
} }
} }
} }