Fixes:
- Add teal, cyan, slate colors to StatusColor type and StatusBadge
- Create StatsCard component with color prop for backward compatibility
- Add label/required props to FormGroup component
- Fix Pagination to accept both currentPage and page props
- Fix unused imports in quality and contracts pages
- Add missing Plus, Trash2, User icon imports in contracts pages
- Remove duplicate formatDate function in ContratoDetailPage
New components:
- StatsCard, StatsCardGrid for statistics display
Build: Success (npm run build passes)
Dev: Success (npm run dev starts on port 3020)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Components added:
- G-003: ErrorBoundary with withErrorBoundary HOC and PageErrorFallback
- G-010: Pagination with SimplePagination variant
- G-011: Dropdown system (Dropdown, DropdownItem, Menu, etc.)
- G-012: FileUpload with drag & drop and preview
- G-013: DatePicker with DateRangePicker
Hooks added:
- G-006: useDebounce, useDebouncedCallback, useDebounceWithImmediate
- G-007: useLocalStorage, useSessionStorage
Services added:
- G-004: API Client with request/response interceptors, token refresh
Tests: 49 passing (14 new tests for utility hooks)
TypeScript: All types validated
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Skeleton base component with variants: text, rectangular, circular
- Add SkeletonText for multi-line text placeholders
- Add SkeletonCard for card-shaped loading states
- Add SkeletonTable for table loading with configurable rows/columns
- Add SkeletonAvatar for avatar placeholders (sm/md/lg/xl)
- Add SkeletonButton for button placeholders
- Add shimmer animation to Tailwind config
- Add comprehensive tests (21 tests passing)
- Export all components from common/index.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
LotesPage (548 -> 307 lines, -44%):
- Use SearchInput, SelectField, Modal, ConfirmDialog from common
- Use DataTable instead of inline table
- Use LOTE_STATUS_OPTIONS from utils/constants
- Keep StatCard specific to lotes (with color indicator)
DashboardPage (710 -> 382 lines, -46%):
- Use formatCurrency, formatPercent, formatNumber from utils
- Use SearchInput, SelectField from common
- Remove inline utility functions (duplicated)
- Keep specialized components (StatCard, KPIGauge, EVMValueCard)
Total reduction: 569 lines removed across both files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add PresupuestoDetailPage with partidas table
- Add version history sidebar
- Add partida CRUD operations
- Add approval/rejection workflow
- Add PDF/Excel export buttons
- Enhance presupuestos.api.ts with version management APIs
- Add 8 new hooks in usePresupuestos.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
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>
- 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>