Commit 933c7556 authored by Carlos André's avatar Carlos André
Browse files

view de editar e visualizar projeto

parent e96cf1b9
......@@ -507,25 +507,25 @@ class TrabalhoController extends Controller
//
$projeto = Trabalho::find($id);
$edital = Evento::find($projeto->evento_id);
$grandeArea = GrandeArea::where('id', $projeto->grande_area_id)->select('nome')->first();
$area = Area::where('id', $projeto->area_id)->select('nome')->first();
$subarea = Subarea::where('id', $projeto->sub_area_id)->select('nome')->first();
$proponente = Proponente::find($projeto->proponente_id);
$grandeAreas = GrandeArea::all();
$areas = Area::all();
$subareas = Subarea::all();
$funcaoParticipantes = FuncaoParticipantes::all();
$participantes = Participante::where('trabalho_id', $id)->get();
$participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get();
$users = User::whereIn('id', $participantesUsersIds)->get();
$arquivos = Arquivo::where('trabalhoId', $id)->get();
return view('projeto.visualizar')->with(['projeto' => $projeto,
'grandeArea' => $grandeArea,
'area' => $area,
'subArea' => $subarea,
'proponente' => $proponente,
'grandeAreas' => $grandeAreas,
'areas' => $areas,
'subAreas' => $subareas,
'edital' => $edital,
'users' => $users,
'funcaoParticipantes' => $funcaoParticipantes,
'participantes' => $participantes,
'arquivos' => $arquivos,]);
'arquivos' => $arquivos,
'enum_turno' => Participante::ENUM_TURNO,
]);
}
/**
......
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