Commit Graph

15 Commits

Author SHA1 Message Date
Adrian Flores Cortes
5083292fbd feat(obras): Add Programa de Obra and Control de Avance pages
Sprint 2 - S2-T01 & S2-T02

New features:
- ProgramaObraPage: Work schedule management with version control
  - Hierarchical activities (WBS)
  - Simple Gantt visualization
  - S-Curve chart (planned vs actual)
- ControlAvancePage: Progress control dashboard
  - KPI cards (SPI, CPI, variance)
  - Progress by concept table
  - Progress by lot grid view
  - Weekly progress chart
  - Pending approvals summary

New API services:
- programa-obra.api.ts with full CRUD
- 18 new React Query hooks for programa operations

Navigation: Added Control and Programa items to sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 00:21:08 -06:00
Adrian Flores Cortes
e3b33f9caf feat(obras): Add Control de Obra module - Avances and Bitacora
Sprint 1 - S1-T03: Pagina de Catalogo de Obras

New features:
- Avances de Obra page: work progress tracking with workflow
  (pending -> captured -> reviewed -> approved/rejected)
- Bitacora de Obra page: daily work log with timeline view
- Progress API services (avances-obra.api.ts, bitacora-obra.api.ts)
- React Query hooks (useProgress.ts) with 18 hooks total
- Navigation section "Control de Obra" in sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 23:02:54 -06:00
Adrian Flores Cortes
5db3ef247d fix(hse): Remove unused imports and variables from HSE pages
- Remove unused 'Link' import from InspeccionDetailPage.tsx
- Remove unused 'XCircle' import from InspeccionesPage.tsx
- Remove unused 'gravedadColors' and 'tipoHallazgoLabels' constants

Fixes TypeScript compilation errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:30:00 -06:00
Adrian Flores Cortes
8127abca70 feat(hse): Add routing and exports for HSE inspection pages
- 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>
2026-02-02 22:29:04 -06:00
Adrian Flores Cortes
3b5587e1f3 feat(hse): Add route for InspeccionDetailPage
- 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>
2026-02-02 22:25:17 -06:00
Adrian Flores Cortes
3b76b455dc feat(hse): Add InspeccionesPage and InspeccionDetailPage components
- InspeccionesPage: List and filter HSE inspections
- InspeccionDetailPage: View inspection details

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:22:24 -06:00
Adrian Flores Cortes
744545defb feat(hse): Add IncidentesPage component for HSE incidents management
- 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>
2026-02-02 22:20:21 -06:00
Adrian Flores Cortes
dac9ae6f19 feat(frontend): Agregar hooks React Query para módulo HSE
Implementación completa de 16 hooks personalizados de React Query para
gestión del módulo HSE (Health, Safety & Environment):

**Incidentes (7 hooks):**
- useIncidentes, useIncidente, useIncidenteStats
- useCreateIncidente, useUpdateIncidente
- useInvestigateIncidente, useCloseIncidente

**Capacitaciones (6 hooks):**
- useCapacitaciones, useCapacitacion
- useCreateCapacitacion, useUpdateCapacitacion
- useToggleCapacitacion, useDeleteCapacitacion

**Inspecciones (7 hooks):**
- useTiposInspeccion (con staleTime 30min)
- useInspecciones, useInspeccion, useInspeccionesStats
- useCreateInspeccion, useUpdateEstadoInspeccion
- useAddHallazgo

**Características:**
- Query Keys jerárquicos type-safe
- Manejo centralizado de errores con toast
- Invalidación inteligente de queries relacionadas
- Patrón consistente con useConstruccion.ts
- TypeScript completamente tipado
- 291 líneas de código

**Validaciones:**
✓ npm run type-check (sin errores)
✓ npm run lint (sin warnings)

Archivos:
- web/src/hooks/useHSE.ts (nuevo, 291 líneas)
- web/src/hooks/index.ts (export agregado)

Relacionado: MAA-017 (Módulo HSE Backend)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:25:18 -06:00
Adrian Flores Cortes
cbb4f265c5 feat(frontend): Add HSE module navigation and routes
- 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>
2026-02-02 21:23:13 -06:00
Adrian Flores Cortes
676978146b feat(frontend): Add HSE API services module
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>
2026-02-02 21:21:14 -06:00
Adrian Flores Cortes
e4cfe62b1b feat(FASE-5A): Frontend modules Dashboard, Presupuestos, Bidding
New modules implemented:
- Dashboard: EVM visualization, Curva S, KPIs, alerts
- Presupuestos: Conceptos tree, presupuestos list, estimaciones workflow
- Bidding: Opportunities, tenders, proposals, vendors pages

Files created:
- services/reports/ - Reports API service (6 types, 8 methods)
- services/presupuestos/ - Budget/estimates API (presupuestos.api, estimaciones.api)
- services/bidding/ - Bidding API (opportunities, tenders, proposals, vendors)
- hooks/useReports.ts - 8 query hooks, 2 mutation hooks
- hooks/usePresupuestos.ts - 27 hooks for conceptos, presupuestos, estimaciones
- hooks/useBidding.ts - 24 hooks for bidding module
- pages/admin/dashboard/ - DashboardPage with EVM metrics
- pages/admin/presupuestos/ - 3 pages (Conceptos, Presupuestos, Estimaciones)
- pages/admin/bidding/ - 4 pages (Opportunities, Tenders, Proposals, Vendors)

Updated:
- App.tsx: Added routes for new modules
- AdminLayout.tsx: Collapsible sidebar with 4 sections
- hooks/index.ts: Export new hooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 07:21:28 -06:00
Adrian Flores Cortes
f3d91433fe [MAI-002] feat: Implement frontend Proyectos module
- API services: 5 files (fraccionamientos, etapas, manzanas, lotes, prototipos)
- React Query hooks: useConstruccion.ts with 25+ hooks
- Pages: 6 pages for CRUD operations
  - FraccionamientosPage, FraccionamientoDetailPage
  - EtapasPage, ManzanasPage, LotesPage, PrototiposPage
- Components: LoteStatusBadge, HierarchyBreadcrumb
- AdminLayout with sidebar navigation
- Auth store with Zustand + persist
- React Query provider + react-hot-toast setup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:04:54 -06:00
fdd4559508 chore: Add .gitignore for clean repository
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 07:31:38 -06:00
0ff0ca8070 Migración desde erp-construccion/frontend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:11:18 -06:00
d4e62450fe Initial commit 2026-01-16 14:04:09 +00:00