@php $url = $_SERVER['HTTP_HOST']; @endphp
@php $inPauta = \App\Models\MeetingPauta::where('document_id', $document->id)->exists(); $pautaStatus = $document->getPautaStatus(); @endphp @if (!$inPauta)
@shield('document.read') @endshield @shield('document.approved') @endshield
@else @endif


{{-- --}} @if (!isset($document->location_name)) @endif
Ementa:
@if ($document->resume === '') @else
@if (strlen($document->resume) >= 100) {!! substr(strip_tags($document->resume), 0, strrpos(substr(strip_tags($document->resume), 0, 100), ' ')) . '...' !!} @else {!! strip_tags($document->resume) !!} @endif
@endif
@php if (count($document->processingDocument) === 0) { $status = 'Em elaboração'; $class = 'badge-elaboracao'; } else { $statusName = ''; $status = $statusName . ($document->document_protocol ? 'Protocolado' : 'Em elaboração'); switch ($statusName) { case 'Aprovado': $class = 'badge-aprovado'; break; case 'Rejeitado': $class = 'badge-rejeitado'; break; default: $class = $document->document_protocol ? 'badge-protocolado' : 'badge-aberto'; } } $pendingSigners = $document->pendingSigners()->get(); $signedSigners = $document->signedSigners()->get(); @endphp
Status: {{ $status }}
@php $temporariedadeGedActive = $temporariedadeGedActive ?? false; $gedActive = $gedActive ?? false; $temporality = $temporariedadeGedActive && $gedActive ? $document->temporalityByType : null; $temporalityLabel = null; $temporalityClass = null; if ($temporality && $temporality->final_disposal) { switch ($temporality->final_disposal) { case 'Eliminar': $temporalityLabel = 'Descartável'; $temporalityClass = 'badge-danger'; break; case 'Permanente': $temporalityLabel = 'Permanente'; $temporalityClass = 'badge-success'; break; case 'Corrente': $temporalityLabel = 'Corrente'; $temporalityClass = 'badge-info'; break; default: $temporalityLabel = $temporality->final_disposal; $temporalityClass = 'badge-info'; break; } } $limitDate = null; if ($temporality && $temporality->retention_period && $document->date) { $rawDate = (string) $document->date; $date = str_contains($rawDate, '/') ? \Carbon\Carbon::createFromFormat('d/m/Y', $rawDate) : \Carbon\Carbon::parse($rawDate); $limitDate = $date->addYears((int) $temporality->retention_period)->format('d/m/Y'); } @endphp @if ($temporalityLabel)
Temporariedade: {{ $temporalityLabel }}
@endif @if ($limitDate)
Data limite: {{ $limitDate }}
@endif @php $tenantId = function_exists('tenant') && tenant() ? (string) tenant('id') : null; $lastProcessing = $document->processingDocument->first(); $processingDestinationName = $lastProcessing->destination->name ?? null; $documentDestinations = $document->documentsSectors ->pluck('sector.name') ->filter() ->unique() ->values(); $destinationLabel = $tenantId === 'maracaju' ? $documentDestinations->implode(', ') : $processingDestinationName; @endphp
Destinatário: @if (filled($destinationLabel)) {{ $destinationLabel }} @elseif ($tenantId !== 'maracaju' && $document->processingDocument->isEmpty()) Não possui tramitação @else Destinatário ainda não foi informado! @endif
@php $url = request()->getHost(); @endphp @if ($url != 'caracol.legissuper.com.br' && $url != 'caracol.localhost:8000') Assinaturas: @if ($pendingSigners->isNotEmpty()) {{ $pendingSigners->count() }} assinatura(s) pendente(s) @elseif($signedSigners->isNotEmpty()) Documento assinado @elseif($signedSigners->isEmpty()) Não possui solicitação de assinatura @endif @else Assinaturas: Assinatura desabilitada @endif
{{-- Modal scanner --}}
@include('documents.modal_boxes')