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:
@@ -0,0 +1,56 @@
|
||||
<div class="section-title">{{ __('Inspecciones') }}</div>
|
||||
|
||||
@if(empty($inspections))
|
||||
<div class="text-center text-gray-400 py-8">
|
||||
<p>{{ __('No hay inspecciones en el rango seleccionado.') }}</p>
|
||||
</div>
|
||||
@else
|
||||
<div class="overflow-x-auto">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Elemento</th>
|
||||
<th>Fase</th>
|
||||
<th>Template</th>
|
||||
<th>Inspector</th>
|
||||
<th>Fecha</th>
|
||||
<th>Estado</th>
|
||||
<th>Resultado</th>
|
||||
<th>Notas</th>
|
||||
<th>Fotos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($inspections as $inspection)
|
||||
<tr>
|
||||
<td>{{ $inspection['id'] }}</td>
|
||||
<td>{{ $inspection['feature'] }}</td>
|
||||
<td>{{ $inspection['phase'] }}</td>
|
||||
<td>{{ $inspection['template'] }}</td>
|
||||
<td>{{ $inspection['inspector'] }}</td>
|
||||
<td>{{ $inspection['date'] }}</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ match($inspection['status']) {
|
||||
'completed' => 'success',
|
||||
'pending' => 'warning',
|
||||
default => 'ghost'
|
||||
} }}">
|
||||
{{ $inspection['status'] }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@if($inspection['result'])
|
||||
<span class="badge {{ $inspection['result'] === 'pass' ? 'badge-success' : ($inspection['result'] === 'fail' ? 'badge-error' : 'badge-warning') }}">
|
||||
{{ $inspection['result_label'] }}
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="max-w-xs truncate">{{ $inspection['notes'] ?? '—' }}</td>
|
||||
<td>{{ $inspection['photos_count'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
Reference in New Issue
Block a user