@extends('layouts.app') @section('content')

Vistorias

@can ('imprimir vistoria') @endcan
Limpar
@if ($vistorias->count() > 0) @foreach ($vistorias as $vistoria) @endforeach @else @endif
# Processo Requerido X Requerente Data - Horario Endereço Bairro Status Ações
#{{ $vistoria->id }} {{ $vistoria->num_processo }} {{ $vistoria->requerente->nome ?? '-' }} X {{ $vistoria->requerido ?? '-' }} @if ($vistoria->agenda->data) {{ \Carbon\Carbon::parse($vistoria->agenda->data)->format('d/m/Y') }} @if ($vistoria->agenda->hora) {{ ' - ' . \Carbon\Carbon::parse($vistoria->agenda->hora)->format('H:i') }} @endif @else - @endif @php $enderecoNumero = trim( ($vistoria->endereco ?? '') . (isset($vistoria->num) ? ', nº ' . $vistoria->num : ''), ); @endphp {{ $enderecoNumero ?: '-' }} {{ $vistoria->bairro ?? '-' }} @php $status = strtolower($vistoria->status); $badgeClass = 'bg-secondary'; $icon = 'fa-clock'; $tooltip = 'Vistoria agendada, aguardando preenchimento.'; if ($status === 'agendado') { $badgeClass = 'bg-primary'; $icon = 'fa-clock'; $tooltip = 'Vistoria agendada, aguardando preenchimento.'; } elseif ($status === 'preenchido') { $badgeClass = 'bg-success'; $icon = 'fa-check-circle'; $tooltip = 'Vistoria preenchida e salva.'; } elseif ($status === 'cancelado') { $badgeClass = 'bg-danger'; $icon = 'fa-times-circle'; $tooltip = 'Vistoria cancelada.'; } @endphp {{ ucfirst($vistoria->status) }}
@if (strtolower($vistoria->status) === 'agendada') @else @endif @can ('imprimir vistoria') @if (strtolower($vistoria->status) === 'agendada') @else @endif @endcan @can('editar vistoria') @endcan @can('excluir vistoria') @if (strtolower($vistoria->status) === 'agendada') @else @endif @endcan

Nenhuma vistoria encontrada.

{{ $vistorias->appends(request()->query())->links('vendor.pagination.simple-coreui') }}
@endsection @section('scripts') @endsection