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
-3
View File
@@ -17,9 +17,6 @@ elif [ "${RUN_MIGRATIONS:-true}" = "true" ]; then
php artisan migrate --force --no-interaction || echo "[entrypoint] migrate failed (non-fatal)"
fi
# Import labor catalog for all companies (idempotent — skips existing records by code).
php artisan catalog:import-labors --all --no-interaction 2>&1 | tail -5 || echo "[entrypoint] catalog import failed (non-fatal)"
# Run seeders if requested. Uses firstOrCreate so it's idempotent.
if [ "${RUN_SEED:-false}" = "true" ] && [ "${RUN_FRESH_MIGRATE:-false}" != "true" ]; then
echo "[entrypoint] Running database seed..."