@extends('layouts.app') @section('styles') @endsection @section('content') @php $grandesAreas = \App\GrandeArea::all(); $hoje = \Carbon\Carbon::today('America/Recife'); $hoje = $hoje->toDateString(); @endphp
@if (session('sucesso'))
{{ session('sucesso') }}
@endif @if($errors->any())
{{$errors->first()}}
@endif
Informações da Proposta @if($trabalho->arquivado == false)
@csrf
@else
@csrf
@endif

@if(Auth::user()->tipo == 'administrador') @endif

Edital: {{$evento->nome}}

Título: {{$trabalho->titulo}}

@if($evento->natureza_id == 3)

Proponente: {{ App\Proponente::find($trabalho->proponente_id)->user->name }}

Área temática: {{$trabalho->areaTematica->nome}}

ODS:

@foreach($trabalho->ods as $ods)

- {{$ods->nome}}

@endforeach
@endif
@if($trabalho->evento->natureza_id != 3)
Área de Ensino
{{App\GrandeArea::where('id', $trabalho->grande_area_id)->first()->nome}} > {{App\Area::where('id', $trabalho->area_id)->first()->nome}} @if(App\SubArea::where('id', $trabalho->sub_area_id)->first() != null) > {{App\SubArea::where('id', $trabalho->sub_area_id)->first()->nome}}@endif
@endif
@if($evento->natureza_id != 3)

Informações do Proponente

Nome: {{ App\Proponente::find($trabalho->proponente_id)->user->name }}

Lattes: @if(App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes != null) {{ App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes }} @endif
@if($evento->tipo != "PIBEX" && $evento->tipo != "CONTINUO" && $evento->tipo != "PIACEX")

Valor da Planilha de Pontuação: {{$trabalho->pontuacaoPlanilha}}
@endif @if($trabalho->modalidade != null) @endif @if ($evento->numParticipantes == 0) @php $arquivo = App\Arquivo::where("trabalhoId", $trabalho->id)->first(); @endphp

Título do Plano de Trabalho: {{$arquivo->titulo}}

@endif @if ($trabalho->conflitosInteresse != null)

Conflitos de Interesse: {{ $trabalho->conflitosInteresse }}
@endif
@endif @if ($evento->numParticipantes != 0)
Discentes
@if($substituicoesPendentes->count() > 0) Substituições Pendentes @else Substituições/Desligamentos @endif

@foreach($trabalho->participantes as $participante)
{{$participante->user->name}}
Informações
@foreach($substituicoesProjeto as $subs) @endforeach @endforeach
@endif {{--Janelas para aprovação ou reprovação de substituição--}}
Anexos

@if($evento->tipo != "CONTINUO") {{-- Anexo do Projeto --}} {{-- Arquivo --}}
@if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
@endif @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
@if($trabalho->anexoAutorizacaoComiteEtica != null) @else @if($trabalho->justificativaAutorizacaoEtica != null) @else - @endif @endif
@endif @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
@endif @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
@if($trabalho->anexoGrupoPesquisa != null) @else - @endif
@endif @if($evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM' || $evento->tipo == "PIBEX" || $evento->tipo == "PIACEX") {{-- Decisão do CONSU --}}
@endif @if($evento->tipo == 'PIBIC' && $evento->natureza_id == 2)
@endif @if($evento->tipo == 'PIBITI' && $evento->natureza_id == 2)
@endif @if($evento->nome_docExtra != null) {{-- Documento Extra --}}
@if($trabalho->anexo_docExtra) @else @endif
@endif @else
@endif
@if($evento->tipo != "CONTINUO")
Relatórios
@if($substituicoesPendentes->count() == 0 || $evento->numParticipantes == 0) Listar Relatórios @else Listar Relatórios @endif

{{-- Relatório Parcial --}} @if($evento->tipo != 'PIBEX' && $evento->tipo != 'PIACEX')
@endif {{-- Relatório Final --}}
Avaliações de Relatórios
@if((($evento->dt_fimRelatorioParcial < $hoje && $hoje<$evento->dt_inicioRelatorioFinal) || ($hoje>$evento->dt_fimRelatorioFinal)) && ($substituicoesPendentes->count() == 0 || $evento->numParticipantes == 0) ) @else @endif @if($substituicoesPendentes->count() == 0 || $evento->numParticipantes == 0) @endif

@if(count($arquivos) > 0 && ($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX"))
Avaliações de Relatórios Parciais
@for ($i = 0; $i < count($arquivos); $i++)
Título: {{$arquivos[$i]->titulo}}
Média das avaliações: {{$mediaAval[$i]['relatorio_parcial']}}
Média da apresentação: {{$mediaAval[$i]['apresentacao_parcial']}}
Avaliações pendentes: {{$mediaAval[$i]['pendentes_parcial']}}


@foreach($mediaAval[$i]['avaliacoes_parciais'] as $aval)
{{\App\User::find($aval->user_id)->name}}
@if($aval->nota == null) Pendente @else Avaliação @endif
@if($aval->nota == null)
Remover
@endif
@endforeach
@endfor @endif @if(count($arquivos) > 0) @foreach ($mediaAval as $aval) @if(count($aval['avaliacoes_finais']) > 0)

Avaliações de Relatórios Finais
@for ($i = 0; $i < count($arquivos); $i++)
Título: {{$arquivos[$i]->titulo}}
Média das avaliações: {{$mediaAval[$i]['relatorio_final']}}
Média da apresentação: {{$mediaAval[$i]['apresentacao_final']}}
Avaliações pendentes: {{$mediaAval[$i]['pendentes_final']}}


@foreach($mediaAval[$i]['avaliacoes_finais'] as $aval)
{{\App\User::find($aval->user_id)->name}}
@if($aval->nota == null) Pendente @else Avaliação @endif
@if($aval->nota == null)
Remover
@endif
@endforeach
@endfor @break @endif @endforeach @endif
Avaliadores
@if($hoje >= $evento->inicioRevisao && $hoje <= $evento->fimRevisao) @endif

Avaliadores - Internos
@foreach($trabalho->avaliadors as $avaliador) @if(($avaliador->tipo == 'Interno' && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == 2 || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == 3)) || (($avaliador->user->instituicao == "UFAPE" || $avaliador->user->instituicao == "Universidade Federal do Agreste de Pernambuco") && $avaliador->tipo == null && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == 2 || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == 3))) @if ($evento->tipoAvaliacao == 'form')
{{$avaliador->user->name}}
@php $parecerInterno = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); @endphp @if($parecerInterno == null) Pendente @else Avaliado @endif
Remover
Reenviar convite
@elseif ($evento->tipoAvaliacao == "campos")
{{$avaliador->user->name}}
@php $avaliacaoTrabalho = App\AvaliacaoTrabalho::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); @endphp @if($avaliacaoTrabalho == null) Pendente @else Avaliado @endif
Remover
Reenviar convite
@elseif ($evento->tipoAvaliacao == "link")
{{$avaliador->user->name}}
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == false) Pendente @else Avaliado @endif
Remover
Reenviar convite
@endif @endif @endforeach

Avaliadores - Ad Hoc
@foreach($trabalho->avaliadors as $avaliador) @php $acesso = $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso; $instituicao_avaliador = $avaliador->user->instituicao; @endphp @if( ($acesso == null && $avaliador->tipo == "Externo") || $acesso == 1 || $acesso == 3 || ( ( $instituicao_avaliador != "UFAPE" && $instituicao_avaliador != "Universidade Federal do Agreste de Pernambuco" ) && $avaliador->tipo == null && ( $acesso == null || $acesso == 1 || $acesso == 3 ) ) ) @if ($evento->tipoAvaliacao == 'form')
{{$avaliador->user->name}}
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == false) Pendente @else Avaliado @endif
Remover
Reenviar convite
@elseif ($evento->tipoAvaliacao == "campos")
{{$avaliador->user->name}}
@php $avaliacaoTrabalho = App\AvaliacaoTrabalho::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); @endphp @if($avaliacaoTrabalho == null) Pendente @else Avaliado @endif
Remover
Reenviar convite
@elseif ($evento->tipoAvaliacao == "link")
{{$avaliador->user->name}}
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == false) Pendente @else Avaliado @endif
Remover
Reenviar convite
@endif @endif @endforeach
@endif
Recomendação da Proposta

@csrf
Comentário
status=="aprovado") checked @endif> Recomendada
status=="reprovado") checked @endif> Não Recomendada
Voltar
@endsection @section('javascript') @endsection