@extends('operacional.operacional') @section('content')
| Senha | Nome | Empresa | Unidade | Inicio | Fim | Tempo Atendimento | Tipo | Status | * | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| @foreach($allData as $senha) @if ($senha->id_atendimento == $registro->id) {{ $senha->id }} @endif @endforeach | {{ $registro->visitante->nome }} | {{ $registro->visitante->empresa }} | @foreach ($unidadesCadastradas as $unidadeSigla) @if ($registro->id_unidade == $unidadeSigla->id) {{ $unidadeSigla->sigla }} @endif @endforeach | {{ $registro->created_at->format('d/m/Y H:i:s') }} | @if($registro->updated_at != null && $registro->updated_at != $registro->created_at){{ $registro->updated_at->format('d/m/Y H:i:s') }} | @elseEm aberto | @endif@if ($registro->created_at && $registro->updated_at) @php // Convert to Carbon instances $createdAt = \Carbon\Carbon::parse($registro->created_at); $updatedAt = \Carbon\Carbon::parse($registro->updated_at); // Calculate the difference $tempo_atendimento = $createdAt->diff($updatedAt); // Format the difference as H:i:s $formattedTime = $tempo_atendimento->format('%H:%I:%S'); @endphp {{ $formattedTime }} @else N/A @endif | {{ strtoupper($registro->tipo_atendimento) }} | {{ strtoupper($registro->status) }} | @if ($registro->status == 'finalizado' OR $registro->status == 'cancelado')- | @else@endif |