fix: 'new image' quick action not progressing to resource selection

Fixed three issues preventing the "new image" quick action from working:

1. Frontend matching logic wasn't checking the quickcommand field
   - Added check for item.quickcommand in the matching logic
   - Now "new image" matches docker-image via its quickcommand "(type: new image)"

2. Search query remained populated after triggering selection flow
   - Clear searchQuery in navigateToResourceCreation() to show selection UI
   - This switches the UI from creatable items list to server selection

3. Redirect wasn't using Livewire's redirect method
   - Changed from redirect()->route() to $this->redirect(route())
   - Ensures proper Livewire component redirect behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras BacsaiandClaude committed 2025-10-15 10:49:07 +02:00
1 parent 6d3c996ef3
commit 66cff9d9b8
3 files changed
+208 -120

No files matched your search

+5 -2
View File
@@ -1147,6 +1147,9 @@ class GlobalSearch extends Component
$this->selectedResourceType = $type;
$this->isSelectingResource = true;
// Clear search query to show selection UI instead of creatable items
$this->searchQuery = '';
// Reset selections
$this->selectedServerId = null;
$this->selectedDestinationUuid = null;
@@ -1316,10 +1319,10 @@ class GlobalSearch extends Component
$queryParams['database_image'] = 'postgres:16-alpine';
}
return redirect()->route('project.resource.create', [
$this->redirect(route('project.resource.create', [
'project_uuid' => $this->selectedProjectUuid,
'environment_uuid' => $this->selectedEnvironmentUuid,
] + $queryParams);
] + $queryParams));
}
}