@php use App\Models\PontoFocal; use App\Models\Structure; // Buscar todos os pontos focais com suas instituições $pontosFocais = PontoFocal::with('instituicao') ->whereHas('instituicao', function ($query) { $query->where('status', 'ATIVADO'); }) ->get() ->groupBy('structure_id'); // Buscar as instituições que têm pontos focais $instituicoesIds = $pontosFocais->keys(); $instituicoes = Structure::whereIn('id', $instituicoesIds) ->where('status', 'ATIVADO') ->orderBy('name', 'asc') ->get(); @endphp

PONTOS FOCAIS

{{ __('Capa do Guia do Ponto Focal') }}

{{ __('Guia do Ponto Focal') }}

{{ __('Conheça suas responsabilidades, atribuições e recomendações para atuar como Ponto Focal.') }}
{{ __('Responsabilidades') }} {{ __('Atribuições') }} {{ __('Boas práticas') }}

Veja quem são os Ponto Focais da PMAR e CMAR

  • 1- Bernard de Oliveira Maia
    Matrícula: 5272
    Tel: (24) 2404-1713
    Email: sti@angradosreis.rj.leg.br
  • 2- Carlos Frederico de Carvalho
    Matrícula: 4545
    Tel: (24) 2404-1713
    Email: sti@angradosreis.rj.leg.br
  • 3- Thiago da Silva Oliveira Souza
    Matrícula: 5270
    Tel: (24) 2404-1713
    Email: sti@angradosreis.rj.leg.br
  • 4- Maximiliano Moreira Rodrigues
    Matrícula: 4616
    Tel: (24) 2404-1713
    Email: sti@angradosreis.rj.leg.br
  • 5- André da Glória Santos Ferreira
    Matrícula: 8289
    Tel: (24) 2404-1713
    Email: sti@angradosreis.rj.leg.br
@foreach($instituicoes as $instituicao) @php $pontos = $pontosFocais->get($instituicao->id, collect()); $headerId = 'header' . str_replace([' ', '(', ')', '-'], '', $instituicao->id); $collapseId = 'collapse' . str_replace([' ', '(', ')', '-'], '', $instituicao->id); @endphp

    @foreach($pontos as $index => $ponto)
  • {{ $index + 1 }}- {{ $ponto->nome }}
    @if($ponto->matricula) Matrícula: {{ $ponto->matricula }}
    @endif @if($ponto->telefone_ramal) @php $telefoneRamal = $ponto->telefone_ramal; if (str_contains($telefoneRamal, 'Ramal:')) { $telefoneRamal = str_replace('Ramal:', '', $telefoneRamal); echo 'Ramal: ' . trim($telefoneRamal) . '
    '; } elseif (str_contains($telefoneRamal, '/')) { $parts = explode('/', $telefoneRamal); $tel = trim($parts[0]); $ramal = isset($parts[1]) ? trim(str_replace('Ramal:', '', $parts[1])) : ''; if ($tel) { echo 'Tel: ' . $tel . '
    '; } if ($ramal) { echo 'Ramal: ' . $ramal . '
    '; } } else { echo 'Tel: ' . $telefoneRamal . '
    '; } @endphp @endif @if($ponto->email) Email: {{ $ponto->email }} @endif
  • @endforeach
@endforeach