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:
@@ -17,6 +17,9 @@ 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..."
|
||||
|
||||
Reference in New Issue
Block a user