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 @@ ...@@ -36,6 +36,7 @@
<thead> <thead>
<tr> <tr>
<th scope="col">Avaliador</th> <th scope="col">Avaliador</th>
<th scope="col">Tipo</th>
<th scope="col">E-mail</th> <th scope="col">E-mail</th>
<th scope="col">Data</th> <th scope="col">Data</th>
<th scope="col">Recomendação</th> <th scope="col">Recomendação</th>
...@@ -46,40 +47,76 @@ ...@@ -46,40 +47,76 @@
@foreach($trabalho->avaliadors as $avaliador) @foreach($trabalho->avaliadors as $avaliador)
<tr> <tr>
<td>{{ $avaliador->user->name }}</td> <td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td> <td>{{ $avaliador->user->email }}</td>
<td> {{--Data--}}
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) @if($avaliador->tipo !=null && $avaliador->tipo == "Interno")
Indisponível @php
@else $parecerInterno = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first();
{{ date('d/m/Y', strtotime($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->created_at)) }} @endphp
@endif <td>
@if($parecerInterno == null)
</td> Indisponível
<td> @else
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) {{ date('d/m/Y', strtotime($parecerInterno->created_at)) }}
Indisponível @endif
@else </td>
{{ $avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->recomendacao }} {{--Parecer--}}
@endif <td>
@if($parecerInterno == null)
</td> Indisponível
<td> @else
<form action="{{ route('admin.visualizarParecer') }}" method="post"> {{ $parecerInterno->statusParecer }}
@csrf @endif
<input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}"> </td>
<input type="hidden" name="avaliador_id" value="{{ $avaliador->id }}"> {{--Acesso ao parecer interno--}}
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) <td>
<button class="btn btn-danger" disabled="disabled" > @if($parecerInterno == null)
<a class="btn btn-danger" disabled="disabled" >
Indisponível Indisponível
</button> </a>
@else @else
<button class="btn btn-primary" > <a href="{{ route('admin.visualizarParecerInterno', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="btn btn-primary" >
Visualizar Visualizar
</button> </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
@else
{{ $avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->recomendacao }}
@endif @endif
</form>
</td>
</td> <td>
<form action="{{ route('admin.visualizarParecer') }}" method="post">
@csrf
<input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}">
<input type="hidden" name="avaliador_id" value="{{ $avaliador->id }}">
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null)
<button class="btn btn-danger" disabled="disabled" >
Indisponível
</button>
@else
<button class="btn btn-primary" >
Visualizar
</button>
@endif
</form>
</td>
@endif
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<th scope="col">Nome do Usuário</th> <th scope="col">Nome do Usuário</th>
<th scope="col">Email</th> <th scope="col">Email</th>
<th scope="col">Área</th> <th scope="col">Área</th>
<th scope="col">Tipo</th>
<th scope="col" style="text-align:center">Ação</th> <th scope="col" style="text-align:center">Ação</th>
</tr> </tr>
</thead> </thead>
...@@ -60,6 +61,13 @@ ...@@ -60,6 +61,13 @@
@endif @endif
</td> </td>
<td>
@if($avaliador->tipo == null)
Externo
@else
{{$avaliador->tipo}}
@endif
</td>
<td style="text-align:center"> <td style="text-align:center">
<form action="{{ route('admin.adicionar') }}" method="POST"> <form action="{{ route('admin.adicionar') }}" method="POST">
@csrf @csrf
...@@ -83,6 +91,7 @@ ...@@ -83,6 +91,7 @@
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do Usuário</th> <th scope="col">Nome do Usuário</th>
<th scope="col">Tipo</th>
<th scope="col">Email</th> <th scope="col">Email</th>
<th scope="col">Status</th> <th scope="col">Status</th>
<th scope="col" style="text-align:center">Ação</th> <th scope="col" style="text-align:center">Ação</th>
...@@ -92,6 +101,7 @@ ...@@ -92,6 +101,7 @@
@foreach ($avalSelecionados as $avaliador) @foreach ($avalSelecionados as $avaliador)
<tr> <tr>
<td>{{ $avaliador->user->name }}</td> <td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td> <td>{{ $avaliador->user->email }}</td>
@if($avaliador->eventos->where('id', $evento->id)->first()->pivot->convite == true) @if($avaliador->eventos->where('id', $evento->id)->first()->pivot->convite == true)
<td style="color: rgb(3, 189, 3);">Aceito</td> <td style="color: rgb(3, 189, 3);">Aceito</td>
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do Usuário</th> <th scope="col">Nome do Usuário</th>
<th scope="col">Tipo</th>
<th scope="col">E-mail</th> <th scope="col">E-mail</th>
<th scope="col">Titulo do projeto</th> <th scope="col">Titulo do projeto</th>
<th scope="col">Status avaliação</th> <th scope="col">Status avaliação</th>
...@@ -126,28 +127,56 @@ ...@@ -126,28 +127,56 @@
@endif @endif
<tr> <tr>
<td>{{ $avaliador->user->name }}</td> <td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td> <td>{{ $avaliador->user->email }}</td>
<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>{{ $contador }} / {{ $avaliador->trabalhos->where('evento_id', $evento->id)->count() }}</td> --}} {{-- <td>{{ $contador }} / {{ $avaliador->trabalhos->where('evento_id', $evento->id)->count() }}</td> --}}
<td>@if($trabalho->pivot->parecer == null) Pendente @else Avaliado @endif</td> @if($avaliador->tipo=="Externo" || $avaliador->tipo=null)
<td> <td>@if($trabalho->pivot->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($trabalho->pivot->parecer != null)
<a href="{{ route('admin.visualizarParecer', ['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>
@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"> <div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <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"> <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> </a>
<div class="dropdown-menu">
@if($trabalho->pivot->parecer != null)
<a href="{{ route('admin.visualizarParecer', ['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>
</div> </div>
</td> </td>
@endif
</tr> </tr>
@endforeach @endforeach
@endforeach @endforeach
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do Usuário</th> <th scope="col">Nome do Usuário</th>
<th scope="col">Tipo</th>
<th scope="col">E-mail</th> <th scope="col">E-mail</th>
<th scope="col">Status</th> <th scope="col">Status</th>
<th scope="col" style="text-align:center">Ação</th> <th scope="col" style="text-align:center">Ação</th>
...@@ -125,6 +126,7 @@ ...@@ -125,6 +126,7 @@
@endforeach @endforeach
<tr> <tr>
<td>{{ $avaliador->user->name }}</td> <td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->tipo }}</td>
<td>{{ $avaliador->user->email }}</td> <td>{{ $avaliador->user->email }}</td>
<td>{{ $contador }} / {{ $avaliador->planoTrabalhos->count() }}</td> <td>{{ $contador }} / {{ $avaliador->planoTrabalhos->count() }}</td>
<td style="text-align:center"> ...</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