Commit c4834eb8 authored by S-Nathalia's avatar S-Nathalia
Browse files

restringir envio de parecer fora da data

parent d8e2596f
...@@ -135,6 +135,8 @@ class AvaliadorController extends Controller ...@@ -135,6 +135,8 @@ class AvaliadorController extends Controller
// //
$participantes = $trabalho->participantes; $participantes = $trabalho->participantes;
$arquivos = Arquivo::where('trabalhoId', $trabalho->id)->get(); $arquivos = Arquivo::where('trabalhoId', $trabalho->id)->get();
$hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString();
return view('avaliador.parecerInterno', return view('avaliador.parecerInterno',
['trabalho'=>$trabalho, ['trabalho'=>$trabalho,
...@@ -147,6 +149,7 @@ class AvaliadorController extends Controller ...@@ -147,6 +149,7 @@ class AvaliadorController extends Controller
'enum_turno' => Participante::ENUM_TURNO, 'enum_turno' => Participante::ENUM_TURNO,
'arquivos' => $arquivos, 'arquivos' => $arquivos,
'estados' => $this->estados, 'estados' => $this->estados,
'hoje' => $hoje
]); ]);
} }
......
...@@ -218,15 +218,10 @@ ...@@ -218,15 +218,10 @@
<form action="{{ route('avaliador.parecer', ['evento' => $evento]) }}" method="POST"> <form action="{{ route('avaliador.parecer', ['evento' => $evento]) }}" method="POST">
@csrf @csrf
<input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}" > <input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}" >
@if($trabalho->pivot->AnexoParecer == null) <button type="submit" class="btn btn-primary mr-2 ml-2" >
<button type="submit" class="btn btn-primary mr-2 ml-2" >
Parecer Parecer
</button> </button>
@else
<button type="submit" class="btn btn-secondary mr-2 ml-2" >
Enviado
</button>
@endif
</form> </form>
</div> </div>
......
...@@ -235,9 +235,9 @@ ...@@ -235,9 +235,9 @@
<div><hr></div> <div><hr></div>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<div style="margin-right: 15px"><a href="{{ route('avaliador.visualizarTrabalho', ['evento_id' => $evento->id])}}" class="btn btn-light" style="color: red;">Cancelar</a></div> <div style="margin-right: 15px"><a href="{{ route('avaliador.visualizarTrabalho', ['evento_id' => $evento->id])}}" class="btn btn-light" style="color: red;">Cancelar</a></div>
<div><button type="submit" class="btn btn-success">Enviar meu parecer</button></div> <div>
<button type="submit" class="btn btn-success" @if($evento->inicioRevisao > $hoje || $evento->fimRevisao < $hoje) disabled @endif>Enviar meu parecer</button></div>
</div> </div>
</form> </form>
</div> </div>
</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