Estado Actual:
@php
$now = now();
$startDate = $training->start_date;
$endDate = $training->end_date;
if (!$startDate) {
$status = 'scheduled';
$statusColor = 'bg-secondary';
$statusText = 'Programada';
} elseif ($startDate->isFuture()) {
$status = 'upcoming';
$statusColor = 'bg-info';
$statusText = 'Próxima';
} elseif ($startDate->isToday() || ($endDate && $endDate->isFuture())) {
$status = 'ongoing';
$statusColor = 'bg-warning';
$statusText = 'En Curso';
} elseif ($endDate && $endDate->isPast()) {
$status = 'completed';
$statusColor = 'bg-success';
$statusText = 'Completada';
} else {
$status = 'completed';
$statusColor = 'bg-success';
$statusText = 'Completada';
}
@endphp
{{ $statusText }}
Fechas:
- Inicio: {{ $training->start_date ? $training->start_date->format('d/m/Y H:i') : 'No programada' }}
- Fin: {{ $training->end_date ? $training->end_date->format('d/m/Y H:i') : 'No programada' }}
Costo:
@if($training->cost)
{{ number_format($training->cost, 2) }} {{ $training->currency }}
@else
Gratuito
@endif
Participantes:
@if($training->max_participants)
Máximo: {{ $training->max_participants }}
@else
Sin límite
@endif