mirror of
https://github.com/Karaka-Management/oms-Dashboard.git
synced 2026-02-07 22:28:40 +00:00
fix para and dashboard bug
This commit is contained in:
parent
56e47a92ae
commit
bb502a85e8
|
|
@ -101,7 +101,7 @@ final class Installer extends InstallerAbstract
|
|||
];
|
||||
|
||||
foreach ($dashboardData as $dashboard) {
|
||||
switch ($dashboard['component']) {
|
||||
switch ($dashboard['type']) {
|
||||
case 'component':
|
||||
$result['component'][] = self::createComponent($app->dbPool, $dashboard);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,10 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/Dashboard/Theme/Backend/dashboard');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000301001, $request, $response));
|
||||
|
||||
$board = DashboardBoardMapper::get()->where('account', $request->header->account)->execute();
|
||||
$board = DashboardBoardMapper::get()
|
||||
->with('components')
|
||||
->where('account', $request->header->account)
|
||||
->execute();
|
||||
|
||||
if ($board instanceof NullDashboardBoard) {
|
||||
$board = DashboardBoardMapper::get()->where('id', 1)->execute();
|
||||
|
|
@ -61,11 +64,11 @@ final class BackendController extends Controller
|
|||
$boardComponents = $board->getComponents();
|
||||
|
||||
foreach ($boardComponents as $component) {
|
||||
if (!$this->app->moduleManager->isActive($component->getModule())) {
|
||||
if (!$this->app->moduleManager->isActive($component->module)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$module = $this->app->moduleManager->get($component->getModule());
|
||||
$module = $this->app->moduleManager->get($component->module);
|
||||
if ($module instanceof DashboardElementInterface) {
|
||||
$panels[] = $module->viewDashboard($request, $response, $data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user