fix(project): update selected environment handling to use environment name instead of UUID
This commit is contained in:
parent
c97415a8ef
commit
0603ab13c2
1 changed files with 4 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ public function mount()
|
||||||
}
|
}
|
||||||
$projectUuid = data_get($this->parameters, 'project_uuid');
|
$projectUuid = data_get($this->parameters, 'project_uuid');
|
||||||
$this->environments = Project::whereUuid($projectUuid)->first()->environments;
|
$this->environments = Project::whereUuid($projectUuid)->first()->environments;
|
||||||
$this->selectedEnvironment = data_get($this->parameters, 'environment_uuid');
|
$this->selectedEnvironment = $this->environments->where('uuid', data_get($this->parameters, 'environment_uuid'))->first()->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
|
|
@ -73,9 +73,11 @@ public function render()
|
||||||
|
|
||||||
public function updatedSelectedEnvironment()
|
public function updatedSelectedEnvironment()
|
||||||
{
|
{
|
||||||
|
$environmentUuid = $this->environments->where('name', $this->selectedEnvironment)->first()->uuid;
|
||||||
|
|
||||||
return redirect()->route('project.resource.create', [
|
return redirect()->route('project.resource.create', [
|
||||||
'project_uuid' => $this->parameters['project_uuid'],
|
'project_uuid' => $this->parameters['project_uuid'],
|
||||||
'environment_uuid' => $this->selectedEnvironment,
|
'environment_uuid' => $environmentUuid,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue