loreal-utilisation-dept/frontend
DJP a1a7729a0e frontend: contain chart crashes with ErrorBoundary + null-safe Project Load aggregate
Resourcing page went blank in prod the first time a booking arrived
with a null resourceName (Airtable placeholder rows, or any booking
whose resource lookup didn't resolve). The Project Load per Person
chart's aggregate then crashed on `null.localeCompare(...)` during
sort, and with no error boundary in the tree, React unmounted the
entire route — visible to the user as "loads, then goes blank".

- ProjectLoadPerPerson.aggregate: coerce nullable lookup values to
  scalars before keying/sorting; treat empty resourceName as
  "Placeholder", missing project name as "Unknown", and NaN totals
  as 0.
- New ErrorBoundary component (class — React still requires class
  for boundaries) that renders a card with the error message instead
  of unmounting the parent.
- Wrap each chart on both Resourcing and Department in its own
  ErrorBoundary so a future chart-specific bug only blanks that one
  card, not the whole page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 13:52:56 -04:00
..
src frontend: contain chart crashes with ErrorBoundary + null-safe Project Load aggregate 2026-05-16 13:52:56 -04:00
.eslintrc.cjs Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
index.html Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
package-lock.json Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
package.json Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
postcss.config.js Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
tailwind.config.js Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
tsconfig.json Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
tsconfig.node.json Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00
vite.config.ts Initial commit: dockerised FastAPI backend + React/Vite frontend rewrite 2026-05-16 12:37:04 -04:00