Commit 0076dca1 authored by GuilhermeGz's avatar GuilhermeGz
Browse files

Alterado modo de verificação para a listagem de avaliações de relatórios no perfil avaliador

parent e3e8fdb1
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\AvaliacaoRelatorio;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Auth; use Auth;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
...@@ -44,7 +45,8 @@ class HomeController extends Controller ...@@ -44,7 +45,8 @@ class HomeController extends Controller
return view('proponente.index'); return view('proponente.index');
} }
else if (Auth::user()->avaliadors != null) { else if (Auth::user()->avaliadors != null) {
return view('avaliador.index'); $flagAvalRelatorio = count(AvaliacaoRelatorio::where('user_id',Auth::user()->id )->get());
return view('avaliador.index', compact('flagAvalRelatorio'));
} }
else if (Auth::user()->participantes != null) { else if (Auth::user()->participantes != null) {
return view('participante.index'); return view('participante.index');
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</a> </a>
</div> </div>
</div> </div>
@if(\App\AvaliacaoRelatorio::where('user_id',Auth::user()->id )->get()->count()!=0) @if($flagAvalRelatorio != 0)
<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">
<a href="{{ route('planos.avaliacoes.index') }}" style="text-decoration:none; color: inherit;"> <a href="{{ route('planos.avaliacoes.index') }}" style="text-decoration:none; color: inherit;">
......
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