{{ __('labels.timeline') }}
@php $now = now(); // Convert strings to Carbon instances $startedAt = $started_at ? \Carbon\Carbon::parse($started_at) : null; $endedAt = $ended_at ? \Carbon\Carbon::parse($ended_at) : null; $isStarted = $startedAt && $now->gte($startedAt); $isEnded = $endedAt && $now->gte($endedAt); if (!$startedAt) { $status = 'not_started'; $color = 'secondary'; } elseif ($isStarted && !$isEnded) { $status = 'in_progress'; $color = 'success'; } elseif ($isEnded) { $status = 'completed'; $color = 'info'; } else { $status = 'scheduled'; $color = 'warning'; } @endphp {{ __('labels.' . $status) }}
{{ __('labels.start') }}
{{ $startedAt ? $startedAt->format('d M Y') : '--' }}
{{ __('labels.end') }}
{{ $endedAt ? $endedAt->format('d M Y') : '--' }}