From f763c3aa8b1e1fa26878bfb485f6bb78c4137603 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:45:30 +0100 Subject: [PATCH] Refactor project environment and resource management UI - Removed unnecessary SVG icons from the environment edit view for cleaner UI. - Deleted the environment select component as it was no longer needed. - Enhanced the project resource index view with a dropdown for environments and resources, improving navigation. - Implemented dynamic dropdowns for environments and their associated resources, allowing for better user interaction. - Added transitions and hover effects for a more responsive design. - Updated the layout to ensure a consistent user experience across different project resources. --- .../Project/Resource/EnvironmentSelect.php | 35 -- .../resources/breadcrumbs.blade.php | 476 ++++++++++++------ .../project/environment-edit.blade.php | 8 +- .../resource/environment-select.blade.php | 7 - .../livewire/project/resource/index.blade.php | 291 ++++++++++- 5 files changed, 601 insertions(+), 216 deletions(-) delete mode 100644 app/Livewire/Project/Resource/EnvironmentSelect.php delete mode 100644 resources/views/livewire/project/resource/environment-select.blade.php diff --git a/app/Livewire/Project/Resource/EnvironmentSelect.php b/app/Livewire/Project/Resource/EnvironmentSelect.php deleted file mode 100644 index a38d750da..000000000 --- a/app/Livewire/Project/Resource/EnvironmentSelect.php +++ /dev/null @@ -1,35 +0,0 @@ -selectedEnvironment = request()->route('environment_uuid'); - $this->project_uuid = request()->route('project_uuid'); - } - - public function updatedSelectedEnvironment($value) - { - if ($value === 'edit') { - return redirect()->route('project.show', [ - 'project_uuid' => $this->project_uuid, - ]); - } else { - return redirect()->route('project.resource.index', [ - 'project_uuid' => $this->project_uuid, - 'environment_uuid' => $value, - ]); - } - } -} diff --git a/resources/views/components/resources/breadcrumbs.blade.php b/resources/views/components/resources/breadcrumbs.blade.php index 215adbb2a..f84f4287a 100644 --- a/resources/views/components/resources/breadcrumbs.blade.php +++ b/resources/views/components/resources/breadcrumbs.blade.php @@ -5,7 +5,10 @@ ]) @php $projects = auth()->user()->currentTeam()->projects()->get(); - $environments = $resource->environment->project->environments()->with(['applications', 'services'])->get(); + $environments = $resource->environment->project + ->environments() + ->with(['applications', 'services']) + ->get(); $currentProjectUuid = data_get($resource, 'environment.project.uuid'); $currentEnvironmentUuid = data_get($resource, 'environment.uuid'); $currentResourceUuid = data_get($resource, 'uuid'); @@ -20,17 +23,17 @@ {{ data_get($resource, 'environment.project.name', 'Undefined Name') }} - -