Commit 5b58a289 authored by José Fernando Mendes da Costa's avatar José Fernando Mendes da Costa
Browse files

n permite edicao de proposta submetida

parent f8237d70
...@@ -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();
......
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