mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
improve navigation
This commit is contained in:
1 parent
3f92c1e37b
commit
433dff2684
5 files changed
+32
-37
No files matched your search
@@ -8,7 +8,6 @@ use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Livewire\Component;
|
||||
|
||||
class Dashboard extends Component
|
||||
@@ -52,16 +51,7 @@ class Dashboard extends Component
|
||||
|
||||
public function navigateToProject($projectUuid)
|
||||
{
|
||||
$project = Project::where('uuid', $projectUuid)->first();
|
||||
|
||||
if ($project && $project->environments->count() === 1) {
|
||||
return Redirect::route('project.resource.index', [
|
||||
'project_uuid' => $projectUuid,
|
||||
'environment_uuid' => $project->environments->first()->uuid,
|
||||
]);
|
||||
}
|
||||
|
||||
return Redirect::route('project.show', ['project_uuid' => $projectUuid]);
|
||||
return $this->redirect(collect($this->projects)->firstWhere('uuid', $projectUuid)->navigateTo(), true);
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
||||
Reference in new issue
Block a user