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:
@@ -532,7 +532,7 @@
|
||||
</div>
|
||||
@forelse ($history as $h)
|
||||
<div class="wd-history-item">
|
||||
<a href="{{ route('filament.tenant.pages.work-order-dashboard', ['record' => $h->id]) }}">
|
||||
<a href="{{ url('/app/work-orders/' . $h->id . '/dashboard') }}">
|
||||
<span class="h-date">{{ $h->opened_at?->format('d.m.Y') }}</span>
|
||||
<span>{{ $h->number }}</span>
|
||||
</a>
|
||||
@@ -793,12 +793,12 @@
|
||||
<div class="wd-bottom">
|
||||
<div class="wd-bottom-nav">
|
||||
@if ($prev)
|
||||
<a class="wd-btn" href="{{ route('filament.tenant.pages.work-order-dashboard', ['record' => $prev->id]) }}">
|
||||
<a class="wd-btn" href="{{ url('/app/work-orders/' . $prev->id . '/dashboard') }}">
|
||||
← {{ __('Precedent') }} <span style="color:var(--wd-text-3);">({{ $prev->number }})</span>
|
||||
</a>
|
||||
@endif
|
||||
@if ($next)
|
||||
<a class="wd-btn" href="{{ route('filament.tenant.pages.work-order-dashboard', ['record' => $next->id]) }}">
|
||||
<a class="wd-btn" href="{{ url('/app/work-orders/' . $next->id . '/dashboard') }}">
|
||||
{{ __('Următor') }} → <span style="color:var(--wd-text-3);">({{ $next->number }})</span>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user