Commit 7b97025b authored by Gabriel-31415's avatar Gabriel-31415
Browse files

contador de projetos de avaliador

parent 113509a2
...@@ -79,7 +79,7 @@ class TrabalhoController extends Controller ...@@ -79,7 +79,7 @@ class TrabalhoController extends Controller
//Relaciona o projeto criado com o proponente que criou o projeto //Relaciona o projeto criado com o proponente que criou o projeto
$proponente = Proponente::where('user_id', Auth::user()->id)->first(); $proponente = Proponente::where('user_id', Auth::user()->id)->first();
//$trabalho->proponentes()->save($proponente); //$trabalho->proponentes()->save($proponente);
//dd($coordenador->id); //dd($coordenador);
$trabalho = "trabalho"; $trabalho = "trabalho";
if($evento->inicioSubmissao > $mytime){ if($evento->inicioSubmissao > $mytime){
if($mytime >= $evento->fimSubmissao){ if($mytime >= $evento->fimSubmissao){
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</h2> </h2>
</div> </div>
<div id="collapseOne{{ $trabalho->id }}" class="collapse " aria-labelledby="headingOne" data-parent="#accordionExample"> <div id="collapseOne{{ $trabalho->id }}" class="collapse @if($trabalhos->first() == $trabalho) show @endif" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body"> <div class="card-body">
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<tbody> <tbody>
@foreach ($avaliadores as $avaliador) @foreach ($avaliadores as $avaliador)
@php $contador = 0; @endphp @php $contador = 0; @endphp
@foreach($avaliador->trabalhos as $trabalho) @foreach($avaliador->trabalhos->where('evento_id', $evento->id) as $trabalho)
@if($trabalho->pivot->status == true) @if($trabalho->pivot->status == true)
@php $contador++; @endphp @php $contador++; @endphp
@endif @endif
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<tr> <tr>
<td>{{ $avaliador->user->name }}</td> <td>{{ $avaliador->user->name }}</td>
<td>{{ $avaliador->user->email }}</td> <td>{{ $avaliador->user->email }}</td>
<td>{{ $contador }} / {{ $avaliador->trabalhos->count() }}</td> <td>{{ $contador }} / {{ $avaliador->trabalhos->where('evento_id', $evento->id)->count() }}</td>
<td style="text-align:center"> ...</td> <td style="text-align:center"> ...</td>
</tr> </tr>
@endforeach @endforeach
......
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