mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-02 16:19:48 +00:00
fix(shared-variables): support direct mount params and comment field for server variables
Allow SharedVariables Livewire components (Environment, Project, Server) to accept UUID parameters directly via mount() instead of relying solely on route parameters. This enables Livewire component testing without a live route context. Also adds comment field support when saving/updating server shared environment variables, guards PostgreSQL-specific migration statements from running under SQLite (test environment compatibility), and expands the feature test suite with server shared variable scenarios including inline comment preservation and update behaviour.
This commit is contained in:
@@ -44,9 +44,9 @@ class Show extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function mount()
|
||||
public function mount(?string $project_uuid = null)
|
||||
{
|
||||
$projectUuid = request()->route('project_uuid');
|
||||
$projectUuid = $project_uuid ?? request()->route('project_uuid');
|
||||
$teamId = currentTeam()->id;
|
||||
$project = Project::where('team_id', $teamId)->where('uuid', $projectUuid)->first();
|
||||
if (! $project) {
|
||||
|
||||
Reference in New Issue
Block a user