Skip to content

Commit

Permalink
fixing menu related bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Aug 24, 2024
1 parent d8afdd9 commit 0c41896
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Core/Controller/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private function executeActions(string $method, object|array $params): void
$this->response = $this->run();
} else {
Log::error('Method not found: ' . $method);
throw new HttpResponseException(Frontcontroller::redirect(BASE_URL . "/errors/error501", 307));
Frontcontroller::redirect(BASE_URL . "/errors/error501", 307);
}
}

Expand Down
3 changes: 3 additions & 0 deletions app/Domain/Menu/Composers/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public function with(): array
];
}

$newProjectUrl = self::dispatch_filter("startSomething", "#/projects/createnew");

return [
'currentClient' => $currentClient,
'module' => FrontcontrollerCore::getModuleName(),
Expand All @@ -126,6 +128,7 @@ public function with(): array
'projectSelectGroupOptions' => $projectSelectGroupOptions,
'projectSelectFilter' => $projectSelectFilter,
'clients' => $clients,
'startSomethingUrl' => $newProjectUrl
];
}
}
3 changes: 3 additions & 0 deletions app/Domain/Menu/Hxcontrollers/ProjectSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public function updateMenu(): void
];
}

$newProjectUrl = self::dispatch_filter("startSomething", "#/projects/createnew");

$this->tpl->assign('currentClient', $currentClient);
$this->tpl->assign('module', FrontcontrollerCore::getModuleName());
Expand All @@ -132,6 +133,8 @@ public function updateMenu(): void
$this->tpl->assign('projectSelectGroupOptions', $projectSelectGroupOptions);
$this->tpl->assign('projectSelectFilter', $projectSelectFilter);
$this->tpl->assign('clients', $clients);
$this->tpl->assign('startSomethingUrl', $newProjectUrl);

}

/**
Expand Down

0 comments on commit 0c41896

Please sign in to comment.