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