Restructure catalog to root categories + collapsible groups

- Migration: replace 45 leaf categories (diag.scan, engine.mech…) with
  17 root categories (diag, engine…); update labors.category by taking
  the prefix before the first dot; delete the leaf LaborCategory rows
- ImportLaborCatalogCommand: rewritten to use root categories directly
  so future imports go to the right level from the start
- LaborResource: add ->collapsible() to groups so user can collapse/
  expand each category section to see only headers or only one group
- entrypoint.sh: remove one-time catalog import (was already done)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 05:17:14 +00:00
parent cbf8deabf3
commit 7ed60b1dbf
4 changed files with 105 additions and 30 deletions
@@ -121,6 +121,7 @@ class LaborResource extends Resource
Tables\Grouping\Group::make('category')
->label(__('Categorie'))
->titlePrefixedWithLabel(false)
->collapsible()
->getTitleFromRecordUsing(function ($record) {
$opts = \App\Models\Tenant\LaborCategory::optionsForSelect();
return $opts[$record->category] ?? $record->category;