- 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
73 lines
2.5 KiB
PHP
73 lines
2.5 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="page-wrapper">
|
|
{{-- Print Button --}}
|
|
<div class="mb-6 text-right no-print">
|
|
<button onclick="window.print()" class="btn btn-primary gap-2">
|
|
<x-heroicon-o-printer class="w-5 h-5" /> {{ __('Imprimir / Guardar PDF') }}
|
|
</button>
|
|
<a href="{{ route('reports.project.excel', ['project' => $project->id] + $filters->toArray()) }}"
|
|
class="btn btn-success gap-2 ml-2">
|
|
<x-heroicon-o-document-arrow-down class="w-5 h-5" /> {{ __('Descargar Excel') }}
|
|
</a>
|
|
<a href="{{ route('projects.map', $project) }}" class="btn btn-ghost btn-sm ml-2">
|
|
<x-heroicon-o-arrow-left class="w-4 h-4 mr-1" /> {{ __('Volver') }}
|
|
</a>
|
|
</div>
|
|
|
|
{{-- Header --}}
|
|
@include('reports.partials._header', ['project' => $project, 'filters' => $filters])
|
|
|
|
{{-- Summary KPIs --}}
|
|
@include('reports.partials._summary', ['summary' => $summary])
|
|
|
|
{{-- Progress Curve Chart --}}
|
|
@if(isset($progress_curve) && !empty($progress_curve['labels']))
|
|
@include('reports.partials._progress-curve', ['curveData' => $progress_curve])
|
|
@endif
|
|
|
|
{{-- Deviations --}}
|
|
@if(isset($deviations))
|
|
@include('reports.partials._deviations', ['deviations' => $deviations])
|
|
@endif
|
|
|
|
{{-- Phases --}}
|
|
@if(isset($phases) && !empty($phases))
|
|
@include('reports.partials._phases', ['phases' => $phases])
|
|
@endif
|
|
|
|
{{-- Features --}}
|
|
@if(isset($features) && !empty($features))
|
|
@include('reports.partials._features', ['features' => $features])
|
|
@endif
|
|
|
|
{{-- Inspections --}}
|
|
@if(isset($inspections) && !empty($inspections))
|
|
@include('reports.partials._inspections', ['inspections' => $inspections])
|
|
@endif
|
|
|
|
{{-- Issues --}}
|
|
@if(isset($issues) && !empty($issues))
|
|
@include('reports.partials._issues', ['issues' => $issues])
|
|
@endif
|
|
|
|
{{-- Tasks --}}
|
|
@if(isset($tasks) && !empty($tasks))
|
|
@include('reports.partials._tasks', ['tasks' => $tasks])
|
|
@endif
|
|
|
|
{{-- Media --}}
|
|
@if(isset($media) && !empty($media) && $filters['include_photos'])
|
|
@include('reports.partials._media', ['media' => $media])
|
|
@endif
|
|
|
|
{{-- Footer --}}
|
|
<div class="report-footer no-print">
|
|
<div class="flex justify-between items-center">
|
|
<span>ConstProgress — Sistema de Gestión de Obras</span>
|
|
<span>{{ now()->format('d/m/Y H:i') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection |