Unverified Commit 52bd1e9e authored by GuilhermeGz's avatar GuilhermeGz Committed by GitHub
Browse files

Merge pull request #200 from GuilhermeGz/master

Atualizações
parents b782393e 1cdf15f3
...@@ -72,16 +72,11 @@ class AdministradorController extends Controller ...@@ -72,16 +72,11 @@ class AdministradorController extends Controller
public function analisar(Request $request){ public function analisar(Request $request){
$evento = Evento::find($request->evento_id); $evento = Evento::find($request->evento_id);
$status = ['submetido', 'avaliado', 'aprovado', 'reprovado', 'corrigido']; $status = ['submetido', 'avaliado', 'aprovado', 'reprovado', 'corrigido'];
$withPath = '/usuarios/analisarProjetos?evento_id='.$evento->id;
if($request->column != null ) {
$status = [$request->column];
$withPath = '/usuarios/analisarProjetos/'.$request->column.'?evento_id='.$evento->id;
}
$trabalhos = Trabalho::where('evento_id', $evento->id) $trabalhos = Trabalho::where('evento_id', $evento->id)
->whereIn('status', $status) ->whereIn('status', $status)
->orderBy('titulo') ->orderBy('titulo')
->paginate(10) ->paginate(10);
->withPath($withPath);
$funcaoParticipantes = FuncaoParticipantes::all(); $funcaoParticipantes = FuncaoParticipantes::all();
// $participantes = Participante::where('trabalho_id', $id)->get(); // $participantes = Participante::where('trabalho_id', $id)->get();
...@@ -92,13 +87,7 @@ class AdministradorController extends Controller ...@@ -92,13 +87,7 @@ class AdministradorController extends Controller
} }
// Utilizado para paginação de Collection // Utilizado para paginação de Collection
public function paginate($items, $perPage = 5, $page = null, $options = [])
{
$page = $page ?: (Paginator::currentPage() ?: 1);
$items = $items instanceof Collection ? $items : Collection::make($items);
return new LengthAwarePaginator($items->forPage($page, $perPage), $items->count(), $perPage, $page, $options);
}
public function analisarProposta(Request $request){ public function analisarProposta(Request $request){
......
...@@ -95,10 +95,11 @@ ...@@ -95,10 +95,11 @@
{{$participante->user->name}}; {{$participante->user->name}};
@endforeach @endforeach
</div> </div>
@if($trabalho->grande_area_id != null && $trabalho->area_id != null && $trabalho->sub_area_id != null)
<div class="col-md-12"> <div class="col-md-12">
<h6 style="color: #234B8B; font-weight: bold;font-size: 13px;">{{$trabalho->grandeArea->nome}} > {{$trabalho->area->nome}} > {{$trabalho->subArea->nome}}</h6> <h6 style="color: #234B8B; font-weight: bold;font-size: 13px;">{{$trabalho->grandeArea->nome}} > {{$trabalho->area->nome}} > {{$trabalho->subArea->nome}}</h6>
</div> </div>
@endif
</div> </div>
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
<div class="row justify-content-center" > <div class="row justify-content-center" >
<div class="col-md-11"> <div class="col-md-11">
<br> <br>
{{ $trabalhos->links() }} {{ $trabalhos->appends(['evento_id' => $evento->id])->links() }}
</div> </div>
......
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