Commit 33b90a72 authored by Yuri Resende's avatar Yuri Resende
Browse files

Adicionando a visualização das notas dos relatorios parciais e finais para os proponentes

parent 6abd384b
...@@ -55,6 +55,7 @@ use App\Substituicao; ...@@ -55,6 +55,7 @@ use App\Substituicao;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use App\Desligamento; use App\Desligamento;
use App\ObjetivoDeDesenvolvimentoSustentavel; use App\ObjetivoDeDesenvolvimentoSustentavel;
use App\AvaliacaoRelatorio;
class TrabalhoController extends Controller class TrabalhoController extends Controller
{ {
...@@ -402,6 +403,24 @@ class TrabalhoController extends Controller ...@@ -402,6 +403,24 @@ class TrabalhoController extends Controller
$trabalhos_user = TrabalhoUser::where('trabalho_id', $projeto->id)->get(); $trabalhos_user = TrabalhoUser::where('trabalho_id', $projeto->id)->get();
$AvalRelatParcial = [];
$AvalRelatFinal = [];
foreach ($participantes as $participante) {
if (isset($participante->planoTrabalho)) {
$avals = AvaliacaoRelatorio::where('arquivo_id', $participante->planoTrabalho->id)->get();
} else {
$avals = [];
}
foreach ($avals as $aval) {
if ($aval->tipo == 'Parcial') {
array_push($AvalRelatParcial, $aval);
} else {
array_push($AvalRelatFinal, $aval);
}
}
}
return view('projeto.visualizar')->with(['projeto' => $projeto, return view('projeto.visualizar')->with(['projeto' => $projeto,
'grandeAreas' => $grandeAreas, 'grandeAreas' => $grandeAreas,
'areas' => $areas, 'areas' => $areas,
...@@ -416,7 +435,9 @@ class TrabalhoController extends Controller ...@@ -416,7 +435,9 @@ class TrabalhoController extends Controller
'enum_turno' => Participante::ENUM_TURNO, 'enum_turno' => Participante::ENUM_TURNO,
'areasTematicas' => $areasTematicas, 'areasTematicas' => $areasTematicas,
'flagSubstituicao' =>$flagSubstituicao, 'flagSubstituicao' =>$flagSubstituicao,
'trabalhos_user' => $trabalhos_user 'trabalhos_user' => $trabalhos_user,
'AvalRelatParcial' => $AvalRelatParcial,
'AvalRelatFinal' => $AvalRelatFinal,
]); ]);
} }
......
...@@ -44,8 +44,80 @@ ...@@ -44,8 +44,80 @@
<input id="dt_fimRelatorioFinal{{$edital->id}}" type="date" class="form-control" name="dt_fimRelatorioFinal" value="{{$edital->dt_fimRelatorioFinal}}" required autocomplete="dt_fimRelatorioFinal" disabled autofocus> <input id="dt_fimRelatorioFinal{{$edital->id}}" type="date" class="form-control" name="dt_fimRelatorioFinal" value="{{$edital->dt_fimRelatorioFinal}}" required autocomplete="dt_fimRelatorioFinal" disabled autofocus>
</div> </div>
</div> </div>
<br>
<div class="row justify-content-start">
<div class="col-md-3"><h6 style="color: #234B8B; font-weight: bold">Avaliações dos Relatórios</h6></div>
</div>
<table class="table">
<thead>
<tr>
<th style="color: black;">Avaliador</th>
<th style="color: black;">Relatório</th>
<th style="color: black;">Nota</th>
<th style="color: black;">Visualizar</th>
</tr>
</thead>
<tbody>
@foreach($AvalRelatParcial as $aval)
<tr>
<th style="color: black;">{{$cont += 1}}</th>
<td>Parcial</td>
<td>@if($aval->nota == null) Pendente @else {{$aval->nota}} @endif</td>
<td><a href="" data-toggle="modal" data-target="#modalVizuRelatParcial{{$aval->id}}" class="button">Visualizar</a></td>
</tr>
<!-- Modal visualizar informações da avaliação -->
<div class="modal fade" id="modalVizuRelatParcial{{$aval->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-header" style="overflow-x:auto; padding-left: 31px">
<h5 class="modal-title" id="exampleModalLabel" style="color:#1492E6">
Avaliação do relatório parcial @if($aval->nota == null)<b style="color: red">Pendente</b>@endif</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close" style="padding-top: 8px; color:#1492E6">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body"
style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;">
@include('avaliacaoRelatorio.avaliacao', ['avaliacao' => $aval])
</div>
</div>
</div>
</div>
@endforeach
@foreach($AvalRelatFinal as $aval)
<tr>
<th style="color: black;">{{$cont += 1}}</th>
<td>Final</td>
<td>@if($aval->nota == null) Pendente @else {{$aval->nota}} @endif</td>
<td><a href="" data-toggle="modal" data-target="#modalVizuRelatFinal{{$aval->id}}" class="button">Visualizar</a></td>
</tr>
<!-- Modal visualizar informações participante -->
<div class="modal fade" id="modalVizuRelatFinal{{$aval->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-header" style="overflow-x:auto; padding-left: 31px">
<h5 class="modal-title" id="exampleModalLabel" style="color:#1492E6">
Avaliação do relatório final @if($aval->nota == null) <b style="color: red">Pendente</b>@endif</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close" style="padding-top: 8px; color:#1492E6">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body"
style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;">
@include('avaliacaoRelatorio.avaliacao', ['avaliacao' => $aval])
</div>
</div>
</div>
</div>
@endforeach
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
<!--X Relatórios X-->
\ No newline at end of file
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
@component('projeto.formularioVisualizar.integrantes', ['projeto' => $projeto, 'edital' => $edital, 'trabalhos_user' => $trabalhos_user]) @component('projeto.formularioVisualizar.integrantes', ['projeto' => $projeto, 'edital' => $edital, 'trabalhos_user' => $trabalhos_user])
@endcomponent @endcomponent
@endif @endif
@component('projeto.formularioVisualizar.relatorio',['edital' => $edital,'projeto' => $projeto,'flagSubstituicao' =>$flagSubstituicao]) @component('projeto.formularioVisualizar.relatorio',['edital' => $edital,'projeto' => $projeto,'flagSubstituicao' =>$flagSubstituicao,
'AvalRelatParcial' => $AvalRelatParcial, 'AvalRelatFinal' => $AvalRelatFinal, 'cont' => 0])
@endcomponent @endcomponent
@component('projeto.formularioVisualizar.resultado2', @component('projeto.formularioVisualizar.resultado2',
......
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