Skip to content

Commit

Permalink
Merge pull request #126 from Marcelo-k-USP/master
Browse files Browse the repository at this point in the history
Correção de bug: deixa de consultar o Replicado para obter ramal se o usuário não estiver no replicado
  • Loading branch information
thiagogomesverissimo authored Sep 28, 2024
2 parents e4b3bca + 6d31e2d commit 6646e85
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions resources/views/partials/skins/ip/login_bar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@
<!-- Vamos colocal o menu nesta posição -->
</span>
@auth
@if (isset(Auth::user()->role)) <strong>{{ Auth::user()->role }}</strong> - @endif
@if (isset(Auth::user()->role)) <strong>{{ Auth::user()->role }}</strong> - @endif
@php
$ramal = \Uspdev\Replicado\Pessoa::obterRamalUsp(Auth::user()->codpes);
if (is_numeric(Auth::user()->codpes))
$ramal = \Uspdev\Replicado\Pessoa::obterRamalUsp(Auth::user()->codpes);
@endphp
@if (isset(Auth::user()->role)) <strong>{{ Auth::user()->role }}</strong> - @endif
<i class="fas fa-user"></i> {{ Auth::user()->name }} &nbsp;
<i class="fas fa-envelope"></i> {{ Auth::user()->email }} &nbsp;
<a class="text-white" href="https://uspdigital.usp.br/telefonia/" target="_blank" title="Se necessário, atualize seu ramal."><i class="fas fa-phone"></i>
{{ !empty($ramal) ? $ramal : 'sem ramal' }}</a> |
@if (is_numeric(Auth::user()->codpes))
<a class="text-white" href="https://uspdigital.usp.br/telefonia/" target="_blank" title="Se necessário, atualize seu ramal."><i class="fas fa-phone"></i>
{{ !empty($ramal) ? $ramal : 'sem ramal' }}</a> |
@endif
@include('laravel-usp-theme::partials.login_bar.logout_link')
@else
Não autenticado |
Expand Down

0 comments on commit 6646e85

Please sign in to comment.