Commit 916adb41 authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Ajustes nas telas de avaliador para se adequarem ao tipo de avaliador e seus...

Ajustes nas telas de avaliador para se adequarem ao tipo de avaliador e seus respesctivos acessos correspondentes
parent b2749af5
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="row justify-content-center" style="margin-top: 2rem;"> <div class="row justify-content-center" style="margin-top: 2rem;">
<div class="col-md-12 form-group" style="text-align: center"> <div class="col-md-12 form-group" style="text-align: center">
<h5 style="color: #1492E6; margin-top:0.5rem; font-size:25px">Página inicial</h5> <h5 style="color: #1492E6; margin-top:0.5rem; font-size:25px">Página inicial</h5>
<h5 style="color: #909090; margin-top:0.7rem; font-size:22px; font-weight:normal">Avaliador</h5> <h5 style="color: #909090; margin-top:0.7rem; font-size:22px; font-weight:normal">Avaliador {{Auth::user()->avaliadors->tipo}}</h5>
</div> </div>
<div class="" style="text-align: center"> <div class="" style="text-align: center">
<div class="form-group imagem_shadow" style="border-radius: 12px; padding:14px; height:200px; width:190px; margin:15px"> <div class="form-group imagem_shadow" style="border-radius: 12px; padding:14px; height:200px; width:190px; margin:15px">
......
...@@ -47,9 +47,15 @@ ...@@ -47,9 +47,15 @@
<tr> <tr>
<th scope="col" style="width:100%">Nome do Projeto</th> <th scope="col" style="width:100%">Nome do Projeto</th>
<th scope="col">Data de Criação</th> <th scope="col">Data de Criação</th>
<th scope="col">Projeto</th> @if(Auth::user()->avaliadors->tipo == 'Externo' || Auth::user()->avaliadors->tipo == null)
<th scope="col">Plano de Trabalho</th> <th scope="col">Projeto</th>
<th scope="col">Parecer</th> <th scope="col">Plano de Trabalho</th>
<th scope="col">Parecer Externo</th>
@else
<th scope="col">Status Parecer</th>
<th scope="col">Parecer Interno</th>
@endif
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -57,48 +63,70 @@ ...@@ -57,48 +63,70 @@
<tr> <tr>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td> <td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td>
<td style="text-align: center">{{ $trabalho->created_at->format('d/m/Y') }}</td> <td style="text-align: center">{{ $trabalho->created_at->format('d/m/Y') }}</td>
<td style="text-align: center"> @if(Auth::user()->avaliadors->tipo == 'Externo' || Auth::user()->avaliadors->tipo == null)
{{-- --}} <td style="text-align: center">
<a href="{{route('download', ['file' => $trabalho->anexoProjeto])}}" target="_new" style="font-size: 20px; color: #114048ff;" class="btn btn-light"> {{-- --}}
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:15px"> <a href="{{route('download', ['file' => $trabalho->anexoProjeto])}}" target="_new" style="font-size: 20px; color: #114048ff;" class="btn btn-light">
</a> <img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:15px">
</td> </a>
<td style="text-align: center"> </td>
@foreach( $trabalho->participantes as $participante) <td style="text-align: center">
@foreach( $trabalho->participantes as $participante)
@php
if( App\Arquivo::where('participanteId', $participante->id)->first() != null){
$planoTrabalho = App\Arquivo::where('participanteId', $participante->id)->first()->nome;
}else{
$planoTrabalho = null;
}
@endphp
@if ($planoTrabalho != null)
<a href="{{route('download', ['file' => $planoTrabalho])}}" target="_new" style="font-size: 20px; color: #114048ff;" class="btn btn-light">
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:15px">
</a>
@else
Não planos de trabalho.
@endif
@endforeach
</td>
<td>
<div class="row">
<form action="{{ route('avaliador.parecer', ['evento' => $evento]) }}" method="POST">
@csrf
<input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}" >
@if($trabalho->pivot->AnexoParecer == null)
<button type="submit" class="btn btn-primary mr-2 ml-2" >
Parecer
</button>
@else
<button type="submit" class="btn btn-secondary mr-2 ml-2" >
Enviado
</button>
@endif
</form>
</div>
</td>
@else
@php @php
if( App\Arquivo::where('participanteId', $participante->id)->first() != null){ $parecer = App\ParecerInterno::where([['avaliador_id',Auth::user()->avaliadors->id],['trabalho_id',$trabalho->id]])->first();
$planoTrabalho = App\Arquivo::where('participanteId', $participante->id)->first()->nome;
}else{
$planoTrabalho = null;
}
@endphp @endphp
@if ($planoTrabalho != null) <td style="text-align: center">
<a href="{{route('download', ['file' => $planoTrabalho])}}" target="_new" style="font-size: 20px; color: #114048ff;" class="btn btn-light"> @if($parecer != null && $parecer->statusParecer !=null){{$parecer->statusParecer}} @else Sem Parecer @endif
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:15px"> </td>
</a> <td>
@else <div class="row">
Não planos de trabalho. <form action="{{ route('avaliador.parecerInterno', ['evento' => $evento]) }}" method="POST">
@endif @csrf
@endforeach <input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}">
</td>
<td> <button type="submit" class="btn btn-primary mr-2 ml-2">
<div class="row"> Parecer
<form action="{{ route('avaliador.parecer', ['evento' => $evento]) }}" method="POST"> </button>
@csrf
<input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}" >
@if($trabalho->pivot->AnexoParecer == null)
<button type="submit" class="btn btn-primary mr-2 ml-2" >
Parecer
</button>
@else
<button type="submit" class="btn btn-secondary mr-2 ml-2" >
Enviado
</button>
@endif
</form> </form>
</div> </div>
</td> </td>
@endif
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
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