@extends('site.layouts.new.app') @section('site_content') @php $isGuestAuthScreen = !$currentCitizenVoiceUser; $authMode = $authMode ?? 'login'; $profileTabHref = $currentCitizenVoiceUser ? route('site.citizen-voice.my-polls', ['front_layout' => 'new']) : route('site.citizen-voice.account.login-form', ['front_layout' => 'new']); @endphp
@include('site.components.materials-tab', [ 'label' => 'Enquetes abertas', 'href' => route('site.citizen-voice', ['front_layout' => 'new']), 'active' => false, ]) @include('site.components.materials-tab', [ 'label' => 'Meu perfil', 'href' => $profileTabHref, 'active' => true, ])
@if (session('citizen_voice_success'))
{{ session('citizen_voice_success') }}
@endif @if (session('citizen_voice_error'))
{{ session('citizen_voice_error') }}
@endif @if (request()->boolean('auth_required'))
Faça login no perfil para participar das enquetes e comentar depois.
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
perfil do cidadão CPF e senha para participar, comentar e acompanhar.

{{ $currentCitizenVoiceUser ? 'Seu acesso está ativo no Voz do cidadão.' : ($authMode === 'register' ? 'Crie seu perfil para participar das enquetes.' : 'Entre no seu perfil para acompanhar e comentar.') }}

{{ $currentCitizenVoiceUser ? 'Com o login ativo, você vê suas participações, registra comentários nas enquetes já respondidas e pode atualizar sua senha quando precisar.' : ($authMode === 'register' ? 'O cadastro pede apenas CPF e senha. Depois do primeiro acesso, o cidadão acompanha suas respostas, comenta enquetes já participadas e altera os próprios dados.' : 'Entre com CPF e senha para acessar suas participações, comentar enquetes respondidas e atualizar seu perfil quando precisar.') }}

@if ($currentCitizenVoiceUser)
@csrf
@elseif ($isGuestAuthScreen) @endif
@if ($isGuestAuthScreen)
@if ($authMode === 'register') @component('site.components.panel', ['title' => 'Criar perfil', 'className' => 'sl-citizen-voice__panel sl-citizen-voice-auth-card'])
@csrf
@endcomponent @else @component('site.components.panel', ['title' => 'Entrar no perfil', 'className' => 'sl-citizen-voice__panel sl-citizen-voice-auth-card'])
@csrf
@endcomponent @endif
@else
Perfil do cidadão

{{ $profileSummary['name'] }}

{{ $profileSummary['cpf'] }}
E-mail {{ $profileSummary['email'] }}
Bairro {{ $profileSummary['district'] }}
Faixa etária {{ $profileSummary['age_range'] }}
Enquetes participadas {{ number_format($profileSummary['participations_count'], 0, ',', '.') }}
Última participação
{{ $profileSummary['last_participation_at'] }}
Ações rápidas
@component('site.components.panel', ['title' => 'Atualizar dados do perfil', 'className' => 'sl-citizen-voice__panel sl-citizen-voice-auth-card'])
@csrf
@endcomponent @component('site.components.panel', ['title' => 'Alterar senha', 'className' => 'sl-citizen-voice__panel sl-citizen-voice-auth-card'])
@csrf
@endcomponent
@component('site.components.panel', ['title' => 'Enquetes já participadas', 'className' => 'sl-citizen-voice__panel']) @if ($participations->isEmpty())

Nenhuma enquete encontrada

Assim que você participar de uma enquete, ela aparecerá aqui para comentário.

@else
@foreach ($participations as $participation)
{{ $participation['poll_title'] }} {{ $participation['participated_at'] ?: 'Data não informada' }} • {{ $participation['district'] }}

Pergunta: {{ $participation['survey_question'] }}

Respostas: {{ $participation['answers_summary'] }}

@csrf
@endforeach
@endif @endcomponent
@endif
@if ($currentCitizenVoiceUser && $participations->isNotEmpty()) @foreach ($participations as $participation) @component('site.components.modal', [ 'id' => 'citizen-voice-results-profile-' . $participation['participation_id'], 'title' => 'Resultado Enquete ' . $participation['poll_code'], 'description' => $participation['survey_question'], 'panelClass' => 'sl-citizen-voice-results-modal', ])

Resultado da enquete

@foreach ($participation['results'] as $result)
{{ $result['display_value'] }}
{{ $result['label'] }}
@endforeach

Votos por bairros

@foreach ($participation['neighborhoods'] as $neighborhood)
{{ $neighborhood['name'] }} {{ number_format($neighborhood['votes'], 0, ',', '.') }} votos
@endforeach
{{ number_format($participation['results_total'], 0, ',', '.') }}

Comentários da enquete

@if (!empty($participation['comments'])) @php $visibleCommentsLimit = 3; $commentsCount = count($participation['comments']); @endphp
@foreach ($participation['comments'] as $commentIndex => $comment)
= $visibleCommentsLimit) hidden data-comment-hidden @endif>
{{ $comment['name'] }} {{ $comment['district'] }} • {{ $comment['cpf'] }}

{{ $comment['comment'] }}

@endforeach
@if ($commentsCount > $visibleCommentsLimit) @endif
@else

Sem comentários ainda

Os comentários enviados pelos cidadãos aparecerão aqui.

@endif
@slot('footer') @endslot @endcomponent @endforeach @endif
@endsection @push('scripts') @endpush