Unverified Commit c9288303 authored by José Fernando Mendes da Costa's avatar José Fernando Mendes da Costa Committed by GitHub
Browse files

Merge pull request #802 from jofernando/edicao

Edicao somente de rascunho
parents 529aa6fd 9c868d36
...@@ -505,6 +505,8 @@ class TrabalhoController extends Controller ...@@ -505,6 +505,8 @@ class TrabalhoController extends Controller
$projeto = Trabalho::find($id); $projeto = Trabalho::find($id);
}else{ }else{
$projeto = Auth::user()->proponentes->trabalhos()->where('id', $id)->first(); $projeto = Auth::user()->proponentes->trabalhos()->where('id', $id)->first();
if ($projeto->status != 'rascunho')
return redirect()->back()->with('mensagem', 'Não é possível alterar uma proposta já submetida');
} }
$proponente = Proponente::where('user_id', $projeto->proponente->user_id)->first(); $proponente = Proponente::where('user_id', $projeto->proponente->user_id)->first();
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</a> </a>
<div class="dropdown-menu"> <div class="dropdown-menu">
@if($hoje <= $projeto->evento->fimSubmissao) @if($hoje <= $projeto->evento->fimSubmissao && $projeto->status == 'rascunho')
<a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;"> <a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;">
Editar Editar
</a> </a>
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
</a> </a>
<div class="dropdown-menu"> <div class="dropdown-menu">
@if($hoje <= $edital->fimSubmissao) @if($hoje <= $edital->fimSubmissao && $projeto->status == 'rascunho')
<a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;"> <a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;">
Editar Editar
</a> </a>
......
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