Three features: labor group headers, status picker, catalog import
- LaborResource: add titlePrefixedWithLabel(false) so group headers show
just the localized category name (not "Categorie: Шины"); remove static
cache from closure to avoid Octane cross-request locale bleed
- WorkOrderDashboard: add changeStatus() Livewire method + Alpine.js
dropdown on the status badge so status can be changed directly from
the dashboard without going to the full edit form
- New artisan command catalog:import-labors {company} that reads
database/data/labor-catalog.json (386 operations, 45 leaf categories)
and upserts labor_categories + labors for the given tenant; supports
--force to update existing records by code
- Add "Status actualizat" translation to ru/en JSON
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,9 +120,9 @@ class LaborResource extends Resource
|
||||
->groups([
|
||||
Tables\Grouping\Group::make('category')
|
||||
->label(__('Categorie'))
|
||||
->titlePrefixedWithLabel(false)
|
||||
->getTitleFromRecordUsing(function ($record) {
|
||||
static $opts = null;
|
||||
$opts ??= \App\Models\Tenant\LaborCategory::optionsForSelect();
|
||||
$opts = \App\Models\Tenant\LaborCategory::optionsForSelect();
|
||||
return $opts[$record->category] ?? $record->category;
|
||||
}),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user