@extends('site.layouts.new.app') @php $backToPropositionsUrl = route('site.propositions', ['id' => $meeting->id, 'front_layout' => 'new']); $summaryUrl = route('site.propositions.summary', ['meetingId' => $meeting->id, 'documentId' => $document->id, 'front_layout' => 'new']); $documentUrl = route('DocumentDetailsFront', ['id' => $document->id, 'documents' => 'true', 'front_layout' => 'new']); $meetingDate = (string) ($meeting->date_start ?? ''); $meetingDateParts = preg_split('/\s+/', trim($meetingDate)); $meetingYear = ''; if (!empty($meetingDateParts[0])) { $meetingDateBits = explode('/', $meetingDateParts[0]); $meetingYear = $meetingDateBits[2] ?? ''; } $meetingLabel = 'SESSÃO - ' . ($meeting->number ?: '-') . ($meetingYear ? '/' . $meetingYear : ''); $summaryDescription = $voting ? trim(($resumeDescription ?? '') ?: 'Veja o gráfico da votação e o resumo dos votos por parlamentares.') : 'Esta proposição ainda não possui votação registrada para esta sessão.'; $isLongSummary = \Illuminate\Support\Str::length($summaryDescription) > 360; $summaryPreview = $isLongSummary ? \Illuminate\Support\Str::limit($summaryDescription, 360, '...') : $summaryDescription; @endphp @section('site_content')
@include('site.components.materials-tab', ['label' => 'Voltar para todas as sessões', 'href' => $backToPropositionsUrl, 'active' => false]) @include('site.components.materials-tab', ['label' => 'Resumo', 'href' => $summaryUrl, 'active' => true])

{{ $meetingLabel }}

Resumo

@if ($isLongSummary)
{{ $summaryPreview }} Mostrar menos
{!! nl2br(e($summaryDescription)) !!}
@else

{!! nl2br(e($summaryDescription)) !!}

@endif
{{ $summary['status'] }}
@if ($voting)

{{ $meetingLabel }}

{{ $summary['status'] }}
@include('site.components.status-chart', ['items' => $chartItems])
{{ $summary['yes'] }} Sim
{{ $summary['no'] }} Não
{{ $summary['abstention'] }} Abstenção
{{ $summary['out'] }} Ausente

Status votação eletrônica

@if ($summary['opened_at']) Abertura: {{ \Carbon\Carbon::parse($summary['opened_at'])->format('d/m/Y H:i') }} @endif @if ($summary['closed_at']) Fechamento: {{ \Carbon\Carbon::parse($summary['closed_at'])->format('d/m/Y H:i') }} @endif
@foreach ($voteRows as $voteRow)
@if ($voteRow['image']) {{ $voteRow['name'] }} @else {{ \Illuminate\Support\Str::substr($voteRow['name'], 0, 1) }} @endif
{{ $voteRow['name'] }} {{ $voteRow['role'] }}
{{ $voteRow['choice'] }}
@endforeach
@else

Nenhuma votação encontrada

Assim que a proposição tiver uma votação vinculada a esta sessão, o resumo aparecerá aqui.

@endif
@endsection