- Update App.tsx with routes for InspeccionesPage and InspeccionDetailPage
- Update AdminLayout.tsx with HSE navigation menu
- Update hse/index.ts exports
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add InspeccionDetailPage import to App.tsx
- Add route /admin/hse/inspecciones/:id for inspection detail view
- Enables navigation to inspection detail from inspections list
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- InspeccionesPage: List and filter HSE inspections
- InspeccionDetailPage: View inspection details
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Complete CRUD for HSE incidents (accidente, incidente, casi_accidente)
- Filters by tipo, gravedad, estado, fraccionamiento, date range
- Investigation workflow (abierto -> en_investigacion -> cerrado)
- Modal forms for create/edit, investigate, and close
- Color-coded badges for tipo, gravedad, and estado
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add HSE section to AdminLayout sidebar with Incidentes and Capacitaciones
- Add HSE routes in App.tsx (/admin/hse/incidentes and /admin/hse/capacitaciones)
- Create IncidentesPage and CapacitacionesPage components
- Create barrel export index.ts for HSE pages
- Import AlertTriangle and GraduationCap icons for HSE navigation
Routes added:
- /admin/hse -> redirects to /admin/hse/incidentes
- /admin/hse/incidentes -> IncidentesPage
- /admin/hse/capacitaciones -> CapacitacionesPage
Navigation structure:
- HSE section in sidebar (collapsed by default)
- Links to Incidentes and Capacitaciones pages
- Active state highlighting for current route
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create API service layer for HSE (Health, Safety, Environment) module:
- incidentes.api.ts: Incidents management with stats and investigation workflow
- capacitaciones.api.ts: Training courses management
- inspecciones.api.ts: Inspections with findings tracking
- index.ts: Barrel exports
All services follow the established pattern from fraccionamientos.api.ts:
- TypeScript interfaces for entities, filters, and DTOs
- Paginated responses support
- Axios integration with automatic auth headers
- Complete CRUD operations aligned with backend endpoints
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>