Commit 904ecc3f authored by Gabriel-31415's avatar Gabriel-31415
Browse files

exibir projetos do proponente na view visualizar edital

parent eda6aa23
......@@ -178,8 +178,8 @@ class EventoController extends Controller
if($proponente != null){
$hasTrabalho = false;
$hasFile = false;
$trabalhos = $proponente->trabalhos()->get();
$trabalhosCount = $proponente->trabalhos()->count();
$trabalhos = $proponente->trabalhos()->where('evento_id', $evento->id )->get();
$trabalhosCount = $proponente->trabalhos()->where('evento_id', $evento->id )->count();
if($trabalhosCount != 0){
$hasTrabalho = true;
......
......@@ -24,8 +24,12 @@ class EventoPolicy
public function isCoordenador(User $user, Evento $evento){
if(Auth()->user()->coordenadorComissao->first() != null ){
return $evento->criador_id == Auth()->user()->coordenadorComissao->first()->id;
}else{
return false;
}
}
}
......@@ -114,7 +114,7 @@
<p>
<img class="" src="{{asset('img/icons/calendar-evento.svg')}}" alt="">
{{date('d/m/Y',strtotime($evento->inicioRevisao))}} - {{date('d/m/Y',strtotime($evento->fimRevisao))}}
</p> --}}
</p>
</div>
</div>
<div class="row margin">
......
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