improve WO form: inline client/vehicle create, mechanic filter, category translation, PDF emoji fix

- client_id field: switched to relationship() with createOptionForm so new clients
  can be created inline (name, phone, email); search also matches by phone
- vehicle_id field: added createOptionForm (make, model, plate, year, VIN); newly
  created vehicle is automatically linked to the currently selected client
- master_id field: now shows only active users with role mechanic/master
- WorksRelationManager: labor catalog select marked optional; added createOptionForm
  so new catalog entries can be added without leaving the WO form
- SubcontractJobsRelationManager: category table column now translates value via __()
  and shows explicit label(__('Categorie'))
- PDF work-order: replaced 📞 / ✉ / ⚠ emojis with plain-text equivalents so
  DomPDF/DejaVu Sans renders them correctly instead of showing "????"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-04 19:56:40 +00:00
parent 2ca6ab58a1
commit 3c7e5fffbf
4 changed files with 46 additions and 9 deletions
@@ -51,7 +51,9 @@ class SubcontractJobsRelationManager extends RelationManager
->columns([
Tables\Columns\TextColumn::make('number')->label(__('Nr.')),
Tables\Columns\TextColumn::make('subcontractor.name')->label(__('Terț'))->placeholder('—'),
Tables\Columns\TextColumn::make('category')->badge()->placeholder('—'),
Tables\Columns\TextColumn::make('category')->label(__('Categorie'))
->formatStateUsing(fn ($s) => $s ? __($s) : '—')
->badge()->placeholder('—'),
Tables\Columns\TextColumn::make('cost')->money('MDL')->alignRight(),
Tables\Columns\TextColumn::make('client_price')->label(__('Preț client'))->money('MDL')->alignRight(),
Tables\Columns\TextColumn::make('margin')