@extends('site.layouts.new.app') @php $lawSummaryText = $summaryText ?: 'Nenhuma ementa informada para este projeto.'; $lawSummaryPreviewCard = \Illuminate\Support\Str::limit($lawSummaryText, 900, '...'); $lawSummaryIsLongCard = \Illuminate\Support\Str::length($lawSummaryText) > 900; $hasAttachments = $attachments->isNotEmpty(); $hasProcessing = $processingItems->isNotEmpty(); $hasMeetings = $meetingItems->isNotEmpty(); $primaryGridClass = $hasAttachments ? 'sl-document-details__grid' : 'sl-document-details__grid is-single'; $secondaryGridClass = match (true) { $hasProcessing && $hasMeetings => 'sl-document-details__grid is-secondary', $hasProcessing || $hasMeetings => 'sl-document-details__grid is-secondary is-single', default => null, }; @endphp @section('site_content')
@include('site.components.materials-tab', [ 'label' => 'Voltar para projetos', 'href' => $backUrl, 'active' => false, ]) @include('site.components.materials-tab', [ 'label' => 'Detalhes do projeto', 'href' => request()->fullUrl(), 'active' => true, ])

{{ $lawTitle }}

{{ $lawHeadline }}

{{ $lawsProject->law_date ?? '-' }} {{ $primaryAuthor }}

@if ($hasLongSummary)
{{ $summaryPreview }} Mostrar menos
{!! nl2br(e($lawSummaryText)) !!}
@else
{!! nl2br(e($lawSummaryText)) !!}
@endif
Protocolo: {{ $protocolLabel }} Parecer: {{ $legalOpinionLabel }} @if ($approvalLabel) {{ $approvalLabel }} @endif
Abrir projeto
Tipo {{ $lawTitle }}
Número {{ $lawNumber }}
Última movimentação {{ $updatedLabel }}
Responsável {{ $primaryAuthor }}
@component('site.components.panel', ['title' => 'Resumo do projeto', 'className' => 'sl-document-card'])
Ementa @if ($lawSummaryIsLongCard)
{{ $lawSummaryPreviewCard }} Ver menos
{!! nl2br(e($lawSummaryText)) !!}
@else

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

@endif
Parecer atual

{{ $legalOpinionLabel }}

@if ($mandatoryAmendment)
Emenda impositiva
Projeto {{ $mandatoryAmendment->projectLaw->law_number ?? '_' }} / {{ $mandatoryAmendment->projectLaw->law_date ?? '—' }}
Autor {{ $mandatoryAmendment->assemblyman_name }}
Valor R$ {{ number_format($mandatoryAmendment->valor ?? 0, 2, ',', '.') }}
Área {{ $mandatoryAmendment->area ?? '—' }}
@endif
@endcomponent @if ($hasAttachments) @component('site.components.panel', ['title' => 'Arquivos e referências', 'className' => 'sl-document-card'])
@foreach ($attachments as $attachment) @endforeach
@endcomponent @endif
@if ($secondaryGridClass)
@if ($hasProcessing) @component('site.components.panel', ['title' => 'Tramitação', 'className' => 'sl-document-card'])
@foreach ($processingItems as $processingItem)
{{ $processingItem['status'] }} {{ $processingItem['date'] ?: '-' }}
@if (!empty($processingItem['destination_path']))

{{ $processingItem['destination_path']->implode(' -> ') }}

@endif
Prazo: {{ $processingItem['deadline'] ?: 'Não definido' }} Licitação: {{ $processingItem['number_bids'] ?: '—' }} Contrato: {{ $processingItem['number_contract'] ?: '—' }}
@if ($processingItem['description']) {{ $processingItem['description'] }} @endif @if ($processingItem['observation'])
@if ($processingItem['observation_is_long'])
{{ $processingItem['observation_preview'] }} Ver menos
{!! nl2br(e($processingItem['observation'])) !!}
@else {!! nl2br(e($processingItem['observation'])) !!} @endif
@endif
@endforeach
@endcomponent @endif @if ($hasMeetings) @component('site.components.panel', ['title' => 'Sessões relacionadas', 'className' => 'sl-document-card'])
@foreach ($meetingItems as $meetingItem) @endforeach
@endcomponent @endif
@endif
@endsection