@extends('layouts.app') @section('title', 'Capacitaciones') @section('content')
Gestión de capacitaciones y entrenamientos
| Capacitación | Tipo | Proveedor | Fecha Inicio | Fecha Fin | Costo | Estado | Acciones |
|---|---|---|---|---|---|---|---|
|
{{ $training->name }}
@if($training->description)
{{ Str::limit($training->description, 60) }}
@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') }} @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->cost) {{ number_format($training->cost, 2) }} {{ $training->currency }} @else Gratuito @endif | @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 }} |