@extends('layouts.app') @section('title', 'Capacitaciones Próximas') @section('content')
Capacitaciones programadas para los próximos 30 días
| Capacitación | Tipo | Proveedor | Fecha Inicio | Fecha Fin | Duración | Costo | Estado | Acciones |
|---|---|---|---|---|---|---|---|---|
|
{{ $training->name }}
@if($training->description)
{{ Str::limit($training->description, 60) }}
@endif
@if($training->max_participants)
Máx: {{ $training->max_participants }} participantes @endif |
@php $typeColors = [ 'internal' => 'bg-primary', 'external' => 'bg-info', 'online' => 'bg-success', 'certification' => 'bg-warning' ]; $typeLabels = [ 'internal' => 'Interna', 'external' => 'Externa', 'online' => 'En Línea', 'certification' => 'Certificación' ]; @endphp {{ $typeLabels[$training->type] ?? ucfirst($training->type) }} | {{ $training->provider ?? 'N/A' }} |
@if($training->start_date)
{{ $training->start_date->format('d/m/Y') }}
{{ $training->start_date->format('H:i') }} {{ $training->start_date->diffForHumans() }} @else No programada @endif |
@if($training->end_date)
{{ $training->end_date->format('d/m/Y') }}
{{ $training->end_date->format('H:i') }} @else N/A @endif |
@if($training->start_date && $training->end_date)
@php
$days = $training->start_date->diffInDays($training->end_date) + 1;
$hours = $training->start_date->diffInHours($training->end_date);
@endphp
{{ $days }} día{{ $days > 1 ? 's' : '' }}
{{ $hours }} horas @else N/A @endif |
@if($training->cost) {{ number_format($training->cost, 2) }} {{ $training->currency }} @else Gratuito @endif | @php $now = now(); $startDate = $training->start_date; if (!$startDate) { $status = 'scheduled'; $statusColor = 'bg-secondary'; $statusText = 'Programada'; } elseif ($startDate->isFuture()) { $daysUntil = $startDate->diffInDays($now); if ($daysUntil <= 1) { $status = 'urgent'; $statusColor = 'bg-danger'; $statusText = '¡Próxima!'; } elseif ($daysUntil <= 3) { $status = 'soon'; $statusColor = 'bg-warning'; $statusText = 'Muy Próxima'; } else { $status = 'upcoming'; $statusColor = 'bg-info'; $statusText = 'Próxima'; } } elseif ($startDate->isToday()) { $status = 'today'; $statusColor = 'bg-warning'; $statusText = 'Hoy'; } else { $status = 'past'; $statusColor = 'bg-success'; $statusText = 'Completada'; } @endphp {{ $statusText }} |
No se encontraron capacitaciones programadas para los próximos 30 días.
Crear Capacitación