Fix labor table grouping colspan + auto-import catalog on deploy

- LaborResource: hide category column from data rows by default
  (toggleable) so group headers span all columns cleanly; the group
  header already shows the localized category name
- ImportLaborCatalogCommand: add --all flag to iterate every company,
  refactor into importForCompany() helper, keep idempotent (skips
  existing codes, updates only with --force)
- entrypoint.sh: run catalog:import-labors --all after each deploy so
  all 386 operations + 45 categories are seeded automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 05:07:32 +00:00
parent 5e923459f7
commit cbf8deabf3
3 changed files with 112 additions and 92 deletions
@@ -85,9 +85,9 @@ class LaborResource extends Resource
->label(__('Categorie'))
->badge()
->sortable()
->toggleable(isToggledHiddenByDefault: true)
->formatStateUsing(function ($state) {
static $opts = null;
$opts ??= \App\Models\Tenant\LaborCategory::optionsForSelect();
$opts = \App\Models\Tenant\LaborCategory::optionsForSelect();
return $opts[$state] ?? $state;
}),
Tables\Columns\TextColumn::make('name_ro')