Commit bf6e4e89 authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Ajuste de telas para adequação ao novo parecer interno e avaliador

parent 5839ace1
......@@ -36,6 +36,7 @@
<thead>
<tr>
<th scope="col">Avaliador</th>
<th scope="col">Tipo</th>
<th scope="col">E-mail</th>
<th scope="col">Data</th>
<th scope="col">Recomendação</th>
......@@ -46,15 +47,50 @@
@foreach($trabalho->avaliadors as $avaliador)
<tr>
<td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td>
{{--Data--}}
@if($avaliador->tipo !=null && $avaliador->tipo == "Interno")
@php
$parecerInterno = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first();
@endphp
<td>
@if($parecerInterno == null)
Indisponível
@else
{{ date('d/m/Y', strtotime($parecerInterno->created_at)) }}
@endif
</td>
{{--Parecer--}}
<td>
@if($parecerInterno == null)
Indisponível
@else
{{ $parecerInterno->statusParecer }}
@endif
</td>
{{--Acesso ao parecer interno--}}
<td>
@if($parecerInterno == null)
<a class="btn btn-danger" disabled="disabled" >
Indisponível
</a>
@else
<a href="{{ route('admin.visualizarParecerInterno', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="btn btn-primary" >
Visualizar
</a>
@endif
</td>
@else
{{--Data--}}
<td>
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null)
Indisponível
@else
{{ date('d/m/Y', strtotime($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->created_at)) }}
@endif
</td>
{{--Parecer--}}
<td>
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null)
Indisponível
......@@ -80,6 +116,7 @@
</form>
</td>
@endif
</tr>
@endforeach
</tbody>
......
......@@ -44,6 +44,7 @@
<th scope="col">Nome do Usuário</th>
<th scope="col">Email</th>
<th scope="col">Área</th>
<th scope="col">Tipo</th>
<th scope="col" style="text-align:center">Ação</th>
</tr>
</thead>
......@@ -60,6 +61,13 @@
@endif
</td>
<td>
@if($avaliador->tipo == null)
Externo
@else
{{$avaliador->tipo}}
@endif
</td>
<td style="text-align:center">
<form action="{{ route('admin.adicionar') }}" method="POST">
@csrf
......@@ -83,6 +91,7 @@
<thead>
<tr>
<th scope="col">Nome do Usuário</th>
<th scope="col">Tipo</th>
<th scope="col">Email</th>
<th scope="col">Status</th>
<th scope="col" style="text-align:center">Ação</th>
......@@ -92,6 +101,7 @@
@foreach ($avalSelecionados as $avaliador)
<tr>
<td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td>
@if($avaliador->eventos->where('id', $evento->id)->first()->pivot->convite == true)
<td style="color: rgb(3, 189, 3);">Aceito</td>
......
......@@ -111,6 +111,7 @@
<thead>
<tr>
<th scope="col">Nome do Usuário</th>
<th scope="col">Tipo</th>
<th scope="col">E-mail</th>
<th scope="col">Titulo do projeto</th>
<th scope="col">Status avaliação</th>
......@@ -126,9 +127,11 @@
@endif
<tr>
<td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td>
{{-- <td>{{ $contador }} / {{ $avaliador->trabalhos->where('evento_id', $evento->id)->count() }}</td> --}}
@if($avaliador->tipo=="Externo" || $avaliador->tipo=null)
<td>@if($trabalho->pivot->parecer == null) Pendente @else Avaliado @endif</td>
<td>
<div class="btn-group dropright dropdown-options">
......@@ -148,6 +151,32 @@
</div>
</div>
</td>
@else
@php
$parecer = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first();
@endphp
<td>
@if($parecer == null) Pendente @else Avaliado @endif
</td>
<td>
<div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px">
</a>
<div class="dropdown-menu">
@if($parecer != null)
<a href="{{ route('admin.visualizarParecerInterno', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="dropdown-item text-center">
Vizualizar Parecer
</a>
@endif
<a href="{{ route('admin.removerProjAval', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="dropdown-item text-center">
Desatribuir Avaliador
</a>
</div>
</div>
</td>
@endif
</tr>
@endforeach
@endforeach
......
......@@ -110,6 +110,7 @@
<thead>
<tr>
<th scope="col">Nome do Usuário</th>
<th scope="col">Tipo</th>
<th scope="col">E-mail</th>
<th scope="col">Status</th>
<th scope="col" style="text-align:center">Ação</th>
......@@ -125,6 +126,7 @@
@endforeach
<tr>
<td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td>
<td>{{ $contador }} / {{ $avaliador->planoTrabalhos->count() }}</td>
<td style="text-align:center"> ...</td>
......
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