@extends('layouts.app') @section('content')
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
@else
#{{ $schedule['order_folio'] }}
{{ $schedule['status'] }}
Cliente:
{{ $schedule['customer'] }}
Fecha:
{{ $schedule['date'] }}
Hora:
{{ $schedule['time'] }}
Servicio:
{{ $schedule['service'] }} ({{ $schedule['type'] }})
Técnicos:
@can('write_order')
@endcan
@foreach ($schedule['technicians'] as $technician)
{{ $technician }}
@endforeach
No hay órdenes programadas para esta hora |