i18n(wo relations): translated snapshot names + explicit empty states

- WorksRelationManager Name column: getStateUsing(labor?->label()) so
  the row shows the labor's localized name (not the raw snapshot);
  fallback to stored snapshot when labor is missing.
- 4 explicit empty states with helper description + icon on Works,
  Parts, SubcontractJobs, Payments — replaces Filament's auto-generated
  'Не найдено X / Создать X для старта.'
- 4 CreateAction titles / modal headings for all four relation managers.
- Notification 'Piesa returnată în stoc' / 'Nimic de restituit' wrapped.
- +11 translation keys.

All 306 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-26 10:59:47 +00:00
parent 9609295a9e
commit de2964c854
6 changed files with 57 additions and 13 deletions
@@ -64,7 +64,14 @@ class SubcontractJobsRelationManager extends RelationManager
->badge()
->colors(['warning' => ['sent', 'in_progress'], 'success' => ['done', 'returned'], 'danger' => ['cancelled']]),
])
->headerActions([Actions\CreateAction::make()])
->actions([Actions\EditAction::make(), Actions\DeleteAction::make()]);
->headerActions([
Actions\CreateAction::make()
->label(__('Adaugă lucrare terți'))
->modalHeading(__('Adaugă lucrare la subcontractor')),
])
->actions([Actions\EditAction::make(), Actions\DeleteAction::make()])
->emptyStateHeading(__('Nicio lucrare la terți'))
->emptyStateDescription(__('Adaugă lucrări trimise la ateliere externe (turbo, cutii, vopsitorie). Costul + markup intră automat în totalul fișei.'))
->emptyStateIcon('heroicon-o-arrow-top-right-on-square');
}
}