Commit d2312c7f authored by unknown's avatar unknown
Browse files

Adição de info. na listagem de projetos, para que o Coordenador possa...

Adição de info. na listagem de projetos, para que o Coordenador possa visualizar quando um relatorio final foi enviado (PIBEX)
parent 66556b90
...@@ -111,13 +111,13 @@ class AdministradorController extends Controller ...@@ -111,13 +111,13 @@ class AdministradorController extends Controller
$funcaoParticipantes = FuncaoParticipantes::all(); $funcaoParticipantes = FuncaoParticipantes::all();
$trabalhosRelatorioFinal = []; $trabalhosRelatorioFinal = [];
if($evento->tipo == "PIBEX"){ if($evento->tipo == "PIBEX") {
foreach($trabalhos->get() as $trabalho) { foreach($trabalhos->get() as $trabalho) {
$arquivos_id = Arquivo::where("trabalhoId", $trabalho->id)->get()->pluck('id'); foreach($trabalho->participantes as $participante) {
$avaliacaoRelatorio = AvaliacaoRelatorio::whereIn("arquivo_id", $arquivos_id)->where("arquivoAvaliacao", "!=", null)->first(); if(isset($participante->planoTrabalho) && $participante->planoTrabalho->relatorioFinal != null) {
if(!empty($avaliacaoRelatorio)){ array_push($trabalhosRelatorioFinal, $trabalho->id);
array_push($trabalhosRelatorioFinal, $trabalho->id); }
} }
} }
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
</tr> </tr>
</thead> </thead>
@foreach($arquivos as $arquivo) @foreach($arquivos as $arquivo)
@if(isset($arquivo))
<tbody> <tbody>
<td style="text-align: center;" title="{{$arquivo->trabalho->titulo}}">{{$arquivo->trabalho->titulo}}</td> <td style="text-align: center;" title="{{$arquivo->trabalho->titulo}}">{{$arquivo->trabalho->titulo}}</td>
<td style="text-align: center;" title="{{$arquivo->trabalho->proponente->user->name}}">{{$arquivo->trabalho->proponente->user->name}}</td> <td style="text-align: center;" title="{{$arquivo->trabalho->proponente->user->name}}">{{$arquivo->trabalho->proponente->user->name}}</td>
...@@ -221,6 +222,7 @@ ...@@ -221,6 +222,7 @@
</div> </div>
</div> </div>
</tbody> </tbody>
@endif
@endforeach @endforeach
</table> </table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment