@extends('dashboard._theme_dashboard') @section('content')

Detalhes da O.S #{{ $schedule->schedule_id }}

Departamento - {{ $schedule->Departamento }}
Colaborador - {{ $schedule->collector_full_name }}
{{-- Previsto x Executado --}}
Previsto
Acompanhante
{{ $schedule->companion_full_name }}
Veículo
{{ $schedule->schedule_vehicle }}
Atividade
{{ $schedule->schedule_activity }}
Projeto
{{ $schedule->schedule_project }}
Executado
Acompanhante
{{ $service_order->companion_full_name }}
Veículo
{{ $service_order->service_order_vehicle }}
Atividade
{{ $service_order->service_order_activity }}
Projeto
{{ $service_order->service_order_project }}
{{-- Resumo --}}
Resumo da OS
Início
{{ isset($service_order->service_order_date_start) ? date("d/m/Y H:i", strtotime($service_order->service_order_date_start)) : "-" }}
Fim
{{ isset($service_order->service_order_date_end) ? date("d/m/Y H:i", strtotime($service_order->service_order_date_end)) : "-" }}
Almoço
@if($service_order->service_order_break_time === 'Sim') Sim (-1h) @else Não @endif
Tempo Total
{{ $service_order->service_order_total_time }}h
Hora Extra
{{ $service_order->service_order_extra_time }}
Km Inicial / Final / Total
{{ $service_order->service_order_vehicle_start }} → {{ $service_order->service_order_vehicle_end }} ({{ $service_order->service_order_vehicle_total }})
Custos
Alimentação: R${{ $service_order->service_order_food_expense }} Combustível: R${{ $service_order->service_order_fuel_expense }} Outros: R${{ $service_order->service_order_other_expense }}
{{-- Detalhes da visita por cliente/equipamento --}}
Detalhes da Visita
@foreach($clients_list as $idx => $details) @php $accClient = 'accClient_'.$idx; $headClient = 'headClient_'.$idx; $collClient = 'collClient_'.$idx; @endphp

@foreach($details['equipments'] as $equipment)
Equipamento
{{ $equipment['equipment_name'] }}
Situação
@if($equipment['schedule_data_status']) Concluído @else Não realizado @endif
Localização: @if($equipment['schedule_data_localization']) Ver Localização @else Sem localização @endif
@if(!empty($equipment['itinerary']))
Formulário: {{ $equipment['itinerary'] }}
@endif @if(!empty($equipment['schedule_data_assessment']))
Avaliação Técnica: {{ $equipment['schedule_data_assessment'] }}
@endif @if(!empty($equipment['schedule_data_assessment_observations']))
Observações: {!! nl2br(e($equipment['schedule_data_assessment_observations'])) !!}
@endif {{-- Formulário Preenchido --}} @if(!empty($equipment['schedule_data_filled'])) @php $filled = json_decode($equipment['schedule_data_filled'], true); $accId = 'accordionItin_'.$equipment['schedule_data_id']; $headId = 'heading_'.$equipment['schedule_data_id']; $colId = 'collapse_'.$equipment['schedule_data_id']; @endphp

@if(is_array($filled))
    @foreach($filled as $field) @php $type = $field['type'] ?? ''; $title = $field['title'] ?? ''; $options = $field['options'] ?? []; $response = $field['response'] ?? null; $position = (is_array($options) && isset($options['position'])) ? $options['position'] : ''; @endphp @if($type === 'title')
  • {{ e($title) }}
  • @elseif($type === 'divider')

  • @else
  • {{ e($title) }} @if(is_array($response)) {{ e(implode(', ', $response)) }} @elseif(is_string($response) && $response !== '') {{ e($response) }} @elseif(is_numeric($response)) {{ e((string)$response) }} @else -- @endif
  • @endif @endforeach
@else
Ops! Erro ao carregar formulário.
@endif
@endif
@endforeach
@endforeach
@endsection