Commit 87436d84 authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Correção de erro na listagem de propostas

parent 7c6239e0
......@@ -111,7 +111,7 @@ class ProponenteController extends Controller
}
public function projetosEdital($id) {
$edital = Evento::find($id);
$projetos = Trabalho::where('evento_id', '=', $id)->orderBy('titulo')->paginate(10);
$projetos = Trabalho::where('evento_id', '=', $id)->where('proponente_id', Auth::user()->proponentes->id)->orderBy('titulo')->paginate(1);
$hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString();
......
......@@ -183,6 +183,9 @@
<a href="{{route('admin.editais')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Editais</a>
<!--<a href="{{route('admin.showProjetos')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);" >Projetos</a> -->
<a href="{{route('notificacao.listarTrab')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);" >Notificações</a>
@elseif(Auth::user()->coordenadorComissao != null)
<a href="{{route('notificacao.listarTrab')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);" >Notificações</a>
<a href="{{ route('coordenador.editais') }}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Editais</a>
@else
<a href="{{route('notificacao.listarTrab')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);" >Notificações</a>
<a href="{{route('coord.home')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Editais</a>
......
......@@ -91,7 +91,6 @@
</thead>
<tbody id="projetos">
@foreach ($projetos as $projeto)
@if (Auth()->user()->proponentes != null && $projeto->proponente_id === Auth()->user()->proponentes->id)
<tr>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">
{{ $projeto->titulo }}
......@@ -120,6 +119,7 @@
Solicitar Substituições
</a>
<hr class="dropdown-hr">
@endif
<a href="{{route('docComplementar.listar', ['projeto_id' => $projeto->id])}}" class="dropdown-item" style="text-align: center">
Documentos Complementares
......@@ -131,7 +131,7 @@
</a>--}}
<hr class="dropdown-hr">
@endif
<a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Visualizar
</a>
......@@ -162,7 +162,6 @@
</div>
</td>
</tr>
@endif
<!-- Modal deletar -->
<div class="modal fade" id="modal{{$projeto->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
......
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