Unverified Commit b71a3178 authored by Antônio Durval's avatar Antônio Durval Committed by GitHub
Browse files

Merge pull request #908 from antonioDurval/master

Visualizar qnd um relatório final for enviado (PIBEX)
parents 84e19071 2ec1de70
......@@ -111,13 +111,13 @@ class AdministradorController extends Controller
$funcaoParticipantes = FuncaoParticipantes::all();
$trabalhosRelatorioFinal = [];
if($evento->tipo == "PIBEX"){
if($evento->tipo == "PIBEX") {
foreach($trabalhos->get() as $trabalho) {
$arquivos_id = Arquivo::where("trabalhoId", $trabalho->id)->get()->pluck('id');
$avaliacaoRelatorio = AvaliacaoRelatorio::whereIn("arquivo_id", $arquivos_id)->where("arquivoAvaliacao", "!=", null)->first();
if(!empty($avaliacaoRelatorio)){
array_push($trabalhosRelatorioFinal, $trabalho->id);
foreach($trabalho->participantes as $participante) {
if(isset($participante->planoTrabalho) && $participante->planoTrabalho->relatorioFinal != null) {
array_push($trabalhosRelatorioFinal, $trabalho->id);
}
}
}
}
......
......@@ -31,6 +31,7 @@
</tr>
</thead>
@foreach($arquivos as $arquivo)
@if(isset($arquivo))
<tbody>
<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>
......@@ -221,6 +222,7 @@
</div>
</div>
</tbody>
@endif
@endforeach
</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