Skip to content

Commit b5f6005

Browse files
committed
Ajustando para vínculos de outra unidade
1 parent f9c0f1c commit b5f6005

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

app/Replicado/Replicado.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ public static function listarVinculosEstendidos($codpes)
1414
switch ($vinculo['tipvinext']) {
1515
case 'Aluno de Pós-Graduação':
1616
$pg = Posgraduacao::obterVinculoAtivo($codpes);
17-
$vinculo = array_merge($vinculo, $pg);
17+
if (!empty($pg)) {
18+
$vinculo = array_merge($vinculo, $pg);
19+
}
1820
break;
1921

2022
case 'Servidor':

resources/views/ldapusers/partials/show-vinculos.blade.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
<td>
1515
@switch($vinculo['tipvinext'])
1616
@case('Aluno de Pós-Graduação')
17-
Orientador: {{ $vinculo['nompesori'] }},
18-
Programa: {{ $vinculo['nomcur'] }} - nível {{ $vinculo['nivpgm'] }}
17+
{{-- Opcional por não ser vínculo ativo na unidade --}}
18+
@if (!empty($vinculo['nompesori']))
19+
Orientador: {{ $vinculo['nompesori'] }},
20+
Programa: {{ $vinculo['nomcur'] }} - nível {{ $vinculo['nivpgm'] }}
21+
@else
22+
Unidade: {{ $vinculo['sglclgund'] }} - {{ $vinculo['nomclgund'] }}
23+
@endif
1924
@break
2025

2126
@case('Servidor')

0 commit comments

Comments
 (0)