@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
@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 }}
Destinatário:
@if (count($document->processingDocument) === 0)
Não possui tramitação
@else
{!! \App\Models\Destination::where('id', $document->processingDocument->first()->destination->id)->pluck('name')->first() !!}
@endif
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