diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index e8ee43a5345a6eb9f5157fef5c1686db9cf37f88..7d9c5388dc79e8743b48627873bf8a6e6617b06e 100644 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -505,27 +505,27 @@ class TrabalhoController extends Controller public function show($id) { // - $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); - $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(); + $projeto = Trabalho::find($id); + $edital = Evento::find($projeto->evento_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, - 'edital' => $edital, - 'users' => $users, - 'funcaoParticipantes' => $funcaoParticipantes, - 'participantes' => $participantes, - 'arquivos' => $arquivos,]); + 'grandeAreas' => $grandeAreas, + 'areas' => $areas, + 'subAreas' => $subareas, + 'edital' => $edital, + 'users' => $users, + 'funcaoParticipantes' => $funcaoParticipantes, + 'participantes' => $participantes, + 'arquivos' => $arquivos, + 'enum_turno' => Participante::ENUM_TURNO, + ]); } /** @@ -1371,7 +1371,7 @@ class TrabalhoController extends Controller public function atualizar(Request $request, $id) { $edital = Evento::find($request->editalId); $hoje = now(); - + $projeto = Trabalho::find($id); if (!($edital->inicioSubmissao < $hoje && $edital->fimSubmissao >= $hoje)) { diff --git a/resources/views/projeto/visualizar.blade.php b/resources/views/projeto/visualizar.blade.php index 57095e1caaa8e8ec25adb735f8e2a5c971c68d2c..9a375ee39bb246e352c0980ae09487c8d1cde12e 100644 --- a/resources/views/projeto/visualizar.blade.php +++ b/resources/views/projeto/visualizar.blade.php @@ -1,212 +1,2064 @@ @extends('layouts.app') @section('content') -
+
+ {{--
+ @csrf --}} + +
-
-
-
-
Visualizar Projeto
-

- - - {{-- Nome do Projeto --}} -

-
- - {{ $projeto->titulo }} -
-
+ + + {{--

1º Passo

+
Preencha os campos com as informações do projeto
--}} +
+
+ +
+
+
+
Informações do projeto
+

- {{-- Grande Area --}} -
-
- - {{$grandeArea->nome}} -
-
- - {{$area->nome}} -
-
- - {{$subArea->nome}} -
-
+
+ + + @error('nomeProjeto') + + {{ $message }} + + @enderror +
-
+
+ + + @error('grandeArea') + + {{ $message }} + + @enderror +
+
+ + + + @error('area') + + {{ $message }} + + @enderror +
+
+ + + -

Coordenador

- {{-- Coordenador --}} -
+ @error('subArea') + + {{ $message }} + + @enderror +
+ +
+
+
+
+
+ + + {{--

2º Passo

+
Preencha os campos com as informações do proponente
--}} +
+
+
+
+
+
Informações do proponente
+

-
- - {{ $proponente->user->name }} -
+
+ + + +
-
- - - @if($proponente->linkLattes != null) - {{ $proponente->linkLattes }} - @endif - -
+
+ + user()->proponentes != null && Auth()->user()->proponentes->linkLattes != null) + value="{{ Auth()->user()->proponentes->linkLattes }}" + @else + value="" + @endif required> + Ex.: http://lattes.cnpq.br/8363536830656923 + @error('linkLattesEstudante') + + {{ $message }} + + @enderror +
+
+ + -
- - {{$projeto->pontuacaoPlanilha}} -
+ @error('pontuacaoPlanilha') + + {{ $message }} + + @enderror +
+
+ + -
- - {{ $projeto->linkGrupoPesquisa }} -
+ Ex.: http://dgp.cnpq.br/dgp/espelhogrupo/228363 + @error('linkGrupo') + + {{ $message }} + + @enderror +
+ +
+
+
+
+
+ + + {{--

3º Passo

+
Anexos
--}} +
+
+
+
+
+
Anexos
Para alterar os arquivos envie os novos
+

+ +
+ Arquivo atual + {{-- @if(old('anexoProjetoPreenchido') != null || (isset($rascunho) && $rascunho->anexoProjeto != "")) + Arquivo atual + @endif --}} + {{-- anexoProjeto != "") value="sim" @else value="{{old('anexoProjetoPreenchido')}}" @endif > --}} + {{--
+ +
+ + +
+
+ @error('anexoProjeto') + + {{ $message }} + + @enderror --}} +
+ +
+ Arquivo atual + {{-- @if(old('anexoLattesPreenchido') != null || (isset($rascunho) && $rascunho->anexoLattesCoordenador != "")) + Arquivo atual + @endif + anexoLattesCoordenador != "") value="sim" @else value="{{old('anexoLattesPreenchido')}}" @endif > + +
+ +
+ + +
+
+ Dos últimos 5 anos + @error('anexoLattesCoordenador') + + {{ $message }} + + @enderror --}} +
+
+ Arquivo atual + {{-- @if(old('anexoPlanilhaPreenchido') != null || (isset($rascunho) && $rascunho->anexoPlanilhaPontuacao != "")) + Arquivo atual + @endif + anexoPlanilhaPontuacao != "") value="sim" @else value="{{old('anexoPlanilhaPreenchido')}}" @endif > +
+
+ + +
+
+ @error('anexoPlanilha') + + {{ $message }} + + @enderror + @error('anexoPlanilhaPontuacao') + + {{ $message }} + + @enderror --}} +
+
+ Arquivo atual + {{-- @if(old('anexoConsuPreenchido') != null || (isset($rascunho) && $rascunho->anexoDecisaoCONSU != "" && $rascunho->anexoDecisaoCONSU != null)) + Arquivo atual + @endif + anexoDecisaoCONSU != "") value="sim" @else value="{{old('anexoConsuPreenchido')}}" @endif required> +
+ +
+ + +
+
+ @error('anexoCONSU') + + {{ $message }} + + @enderror --}} +
+
+ Arquivo atual
+ {{-- + + +
+ --}} + + {{-- + + --}} +
+ +
+
+
+
+
-
-

Anexos

+ @php + $resultado_participante_um = array_key_exists(0, $participantes->toArray()); + $resultado_participante_dois = array_key_exists(1, $participantes->toArray()); + $resultado_participante_tres = array_key_exists(2, $participantes->toArray()); + @endphp + + + {{--

4º Passo

+
Área do(s) participante(s)
--}} +
+
+
+
+
Participante(s)
+ {{--
--}} +
+

+
- {{-- Anexo do Projeto --}} -
- {{-- Arquivo --}} -
- - Arquivo atual -
+
+
Selecione o número de participantes do projeto
+
+ + + +
+
-
- - Arquivo atual -
+
+ +@endsection + +@section('javascript') + + + @endsection