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