@extends('layouts.app') @section('content')
Cronograma de Actividades
@csrf
Limpiar
@foreach ($timelapse as $hrs) @php $data = $schedule_data[$hrs] ?? []; @endphp @endforeach
Hora Órdenes Programadas
{{ $hrs }} @if(count($data) > 0)
@foreach ($data as $schedule) @php // Determinar color según el estado $statusColor = 'secondary'; if ($schedule['status'] == 'Pendiente') $statusColor = 'warning'; elseif ($schedule['status'] == 'Completado') $statusColor = 'success'; elseif ($schedule['status'] == 'Cancelado') $statusColor = 'danger'; elseif ($schedule['status'] == 'En proceso') $statusColor = 'info'; // Determinar tipo de cliente $customerType = 'Doméstico'; if (strpos(strtolower($schedule['customer']), 'comercial') !== false || strpos(strtolower($schedule['customer']), 'empresa') !== false) { $customerType = 'Comercial'; } elseif (strpos(strtolower($schedule['customer']), 'industrial') !== false) { $customerType = 'Industrial'; } // Asignar color según tipo de cliente $customerColor = 'domestico'; if ($customerType == 'Comercial') $customerColor = 'comercial'; elseif ($customerType == 'Industrial') $customerColor = 'industrial'; @endphp
#{{ $schedule['order_folio'] }} {{ $schedule['status'] }}
Cliente:

{{ $schedule['customer'] }}

Fecha:

{{ $schedule['date'] }}

Hora:

{{ $schedule['time'] }}

Servicio:

{{ $schedule['service'] }} ({{ $schedule['type'] }})

Técnicos:
@foreach ($schedule['technicians'] as $technician) {{ $technician }} @endforeach
@can('write_order') @endcan
@endforeach
@else

No hay órdenes programadas para esta hora

@endif
@endsection