diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.php index 9a61f639a..561d20d19 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php @@ -38,18 +38,20 @@ class All extends Component public function sortMe() { - if ($this->resourceClass === 'App\Models\Application' && $this->resource->settings->is_env_sorting_enabled) { - $this->resource->environment_variables = $this->resource->environment_variables->sortBy('key'); - $this->resource->environment_variables_preview = $this->resource->environment_variables_preview->sortBy('key'); - } else { - $this->resource->environment_variables = $this->resource->environment_variables->sortBy('id'); - $this->resource->environment_variables_preview = $this->resource->environment_variables_preview->sortBy('id'); + if ($this->resourceClass === 'App\Models\Application' && data_get($this->resource, 'build_pack') !== 'dockercompose') { + if ($this->resource->settings->is_env_sorting_enabled) { + $this->resource->environment_variables = $this->resource->environment_variables->sortBy('key'); + $this->resource->environment_variables_preview = $this->resource->environment_variables_preview->sortBy('key'); + } else { + $this->resource->environment_variables = $this->resource->environment_variables->sortBy('id'); + $this->resource->environment_variables_preview = $this->resource->environment_variables_preview->sortBy('id'); + } } $this->getDevView(); } public function instantSave() { - if ($this->resourceClass === 'App\Models\Application') { + if ($this->resourceClass === 'App\Models\Application' && data_get($this->resource, 'build_pack') !== 'dockercompose') { $this->resource->settings->save(); $this->dispatch('success', 'Environment variable settings updated.'); $this->sortMe(); diff --git a/resources/views/livewire/project/shared/environment-variable/all.blade.php b/resources/views/livewire/project/shared/environment-variable/all.blade.php index 41a8a6d59..d2693b983 100644 --- a/resources/views/livewire/project/shared/environment-variable/all.blade.php +++ b/resources/views/livewire/project/shared/environment-variable/all.blade.php @@ -11,7 +11,7 @@ wire:click='switch'>{{ $view === 'normal' ? 'Developer view' : 'Normal view' }}
Environment variables (secrets) for this resource.
- @if ($this->resourceClass === 'App\Models\Application') + @if ($this->resourceClass === 'App\Models\Application' && data_get($this->resource, 'build_pack') !== 'dockercompose')