fix(dashboard): replace route() with url() — Filament auto-name has literal {record}
Filament auto-generates route names from the URL slug, so my custom
Page with slug 'work-orders/{record}/dashboard' got the ugly name
'filament.tenant.pages.work-orders.{record}.dashboard' — where
'{record}' is treated as a literal segment in the name, breaking
route() lookups.
Switch all links + the header-action URL to url('/app/work-orders/'
. \$id . '/dashboard') so they resolve correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ class EditWorkOrder extends EditRecord
|
||||
->label(__('Vizualizare dashboard'))
|
||||
->icon('heroicon-m-squares-2x2')
|
||||
->color('info')
|
||||
->url(fn () => route('filament.tenant.pages.work-order-dashboard', ['record' => $this->record->id])),
|
||||
->url(fn () => url('/app/work-orders/' . $this->record->id . '/dashboard')),
|
||||
Actions\Action::make('apply_template')
|
||||
->label(__('Aplică șablon'))
|
||||
->icon('heroicon-m-clipboard-document-list')
|
||||
|
||||
Reference in New Issue
Block a user