@extends('site.layouts.new.app') @php $trackedMeetingsLabel = number_format($allTrackedMeetingsCount ?? 0, 0, ',', '.'); $topAttendanceName = $topAttendance['name'] ?? 'Nenhum parlamentar'; $topAttendanceValue = isset($topAttendance['percentage']) ? $topAttendance['percentage'] . '%' : '0%'; @endphp @section('site_content')
@include('site.components.materials-tab', [ 'label' => 'Lista de presença', 'href' => request()->fullUrl(), 'active' => true, ])

Presenças registradas

Frequência dos parlamentares nas sessões monitoradas

O ranking considera apenas sessões que possuem presença registrada no sistema e contabiliza a participação real dos parlamentares.

Sessões monitoradas {{ $trackedMeetingsLabel }}
Maior frequência {{ $topAttendanceValue }} {{ $topAttendanceName }}
Limpar
@component('site.components.panel', ['title' => 'Sessões com presença registrada', 'className' => 'sl-attendance__panel'])
@forelse ($records as $meeting)
{{ $meeting->meeting_label }}

{{ \Illuminate\Support\Str::before((string) $meeting->date_start, ' ') ?: (string) $meeting->date_start }}

{{ $meeting->presence_total }} {{ \Illuminate\Support\Str::plural('presença', $meeting->presence_total) }} registrada(s)
@component('site.components.modal', [ 'id' => 'attendance-meeting-' . $meeting->id, 'title' => 'Lista de presença - ' . $meeting->meeting_label, 'description' => \Illuminate\Support\Str::before((string) $meeting->date_start, ' ') ?: (string) $meeting->date_start, 'panelClass' => 'sl-modal__dialog--presence', ]) @include('site.components.meeting-presence-grid', [ 'assemblymen' => $meeting->present_assemblymen, ]) @slot('footer') @endslot @endcomponent @empty

Nenhuma presença encontrada

Não há sessões com presença registrada para os filtros aplicados.

@endforelse
@if (method_exists($records, 'links'))
@include('site.components.materials-pagination', ['records' => $records])
@endif @endcomponent @component('site.components.panel', ['title' => 'Frequência por vereador', 'className' => 'sl-attendance__panel'])
Presenças Ausências Justificadas não informadas
@forelse ($attendanceRanking as $item) @php $presencePercentage = min(max((int) ($item['percentage'] ?? 0), 0), 100); $absencePercentage = max(100 - $presencePercentage, 0); $attendanceLabel = $item['name'] . ': ' . $presencePercentage . '% de presença e ' . $absencePercentage . '% de ausência nas sessões monitoradas.'; @endphp
@if ($item['image']) {{ $item['name'] }} @else {{ $item['initials'] }} @endif
{{ $item['name'] }} {{ collect([$item['role'], $item['party']])->filter()->join(' • ') }}
{{ $item['percentage'] }}%
{{ $item['presence_total'] }} presenças {{ $item['absence_total'] }} ausências
@empty

Sem ranking disponível

Ainda não há presenças suficientes para montar a frequência por vereador.

@endforelse
@endcomponent
@endsection