Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
saving progress
  • Loading branch information
CarliPinell committed Nov 22, 2024
commit 1461c225dd6ade7254cf288bde1138dcc35fd9ff
11 changes: 8 additions & 3 deletions ProcessMaker/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ public function index(Request $request)
if (Auth::check()) {
// Redirect to home dynamic only if the package was enable
if (hasPackage('package-dynamic-ui')) {
$user = \Auth::user();
$homePage = \ProcessMaker\Package\PackageDynamicUI\Models\DynamicUI::getHomePage($user);
$user = Auth::user();
$customDashboardExists = \ProcessMaker\Package\PackageDynamicUI\Models\DynamicUI::where('type', 'DASHBOARD')
->count() > 0;

return redirect($homePage);
if ($customDashboardExists) {
$homePage = \ProcessMaker\Package\PackageDynamicUI\Models\DynamicUI::getHomePage($user);

return redirect($homePage);
}
}

// Redirect to the default view
Expand Down