fix(edit-wo): pass panel='tenant' to Page::getUrl()

Without an explicit panel, WorkOrderDashboard::getUrl() resolves the
route name against Filament's current-or-default panel, which in some
Livewire lifecycles or from ambiguous contexts is 'central' — where
the page isn't registered. Symptom: the produced URL ended up empty
or malformed, and clicking the button hit our friendly redirect
claiming WO #0 doesn't exist.

Also removes the temporary /__wo-diag/{id} route added for diagnosis.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-05 20:19:19 +00:00
parent 07a4fb8948
commit fbb0bcb7e1
2 changed files with 4 additions and 21 deletions
@@ -36,7 +36,10 @@ class EditWorkOrder extends EditRecord
->label(__('Vizualizare dashboard'))
->icon('heroicon-m-squares-2x2')
->color('info')
->url(fn () => \App\Filament\Tenant\Pages\WorkOrderDashboard::getUrl(['record' => $this->record->id])),
->url(fn () => \App\Filament\Tenant\Pages\WorkOrderDashboard::getUrl(
parameters: ['record' => $this->record->id],
panel: 'tenant',
)),
Actions\Action::make('apply_template')
->label(__('Aplică șablon'))
->icon('heroicon-m-clipboard-document-list')