| {{ __('Fase') }} | {{-- Month header row --}}
@php
$projectStart = $project->start_date ?? now()->startOfMonth();
$projectEnd = $project->end_date_estimated ?? now()->addMonths(6);
$totalDays = max(1, $projectStart->diffInDays($projectEnd));
// Build month segments
$months = [];
$cursor = $projectStart->copy()->startOfMonth();
while ($cursor->lte($projectEnd)) {
$mStart = $cursor->copy()->max($projectStart);
$mEnd = $cursor->copy()->endOfMonth()->min($projectEnd);
$days = max(1, $mStart->diffInDays($mEnd) + 1);
$widthPct = round(($days / $totalDays) * 100, 2);
$months[] = [
'label' => $cursor->translatedFormat('M Y'),
'width_pct' => $widthPct,
];
$cursor->addMonthNoOverflow();
}
@endphp
@foreach($months as $month)
{{ $month['label'] }}
@endforeach
|
{{-- Dates column --}}
{{ __('Fechas') }} | {{-- Status column --}}{{ __('Estado') }} |
|---|---|---|---|
|
{{ $phase['name'] }}
@if($phase['features_count'] > 0)
{{ $phase['features_count'] }} {{ __('elementos') }}
@endif
|
{{-- Gantt bar cell --}}
{{-- Month grid lines --}}
@php $offset = 0; @endphp
@foreach($months as $i => $month)
@if($i > 0)
@endif
@php $offset += $month['width_pct']; @endphp
@endforeach
{{-- Planned bar --}}
{{ $phase['progress'] }}%
|
{{-- Dates column --}}
{{ $phase['planned_start'] }} – {{ $phase['planned_end'] }}
@if($phase['actual_start'])
{{ $phase['actual_start'] }} – {{ $phase['actual_end'] ?? __('En curso') }}
@endif
|
{{-- Status badge --}}
@if($phase['is_delayed'])
|