feat(reports): complete reporting system with deviations, progress curves, multi-format export

- Added planned/actual/baseline dates to Phase and Feature models
- Created ProgressSnapshot model + migration for historical tracking
- Implemented CaptureDailyProgressSnapshot job (scheduled daily at 06:30)
- Added DeviationCalculator logic (SPI, planned progress, deviation days)
- ReportGenerator service with complete data aggregation
- ReportController with builder, preview, generate (HTML/Excel)
- ReportBuilder Livewire component with date range, entity selection, format
- ProjectReportExport with 10 sheets (Summary, Phases, Features, Inspections, Issues, Tasks, Deviations, Media, Progress Curve, Parameters)
- Blade partials for all sections (header, summary, phases, features, inspections, issues, tasks, media, deviations, progress curve)
- New routes: /projects/{project}/reports/*
- Added 'generate reports' permission
- All 101 tests passing
This commit is contained in:
Javier Braña
2026-08-24 12:32:08 +02:00
parent c58a49f22d
commit ee32544525
30 changed files with 3170 additions and 7 deletions
+5
View File
@@ -138,6 +138,11 @@ class Task extends Model
return $this->morphMany(ActivityLog::class, 'model');
}
public function progressSnapshots(): MorphMany
{
return $this->morphMany(ProgressSnapshot::class, 'trackable');
}
// ============================================================
// Scopes
// ============================================================