Commit 0ded9715 authored by unknown's avatar unknown
Browse files

Edição do projeto PIACEX pelo perfil de ADM e alterações visuais

parent ce01a1be
...@@ -92,8 +92,6 @@ class AvaliadorController extends Controller ...@@ -92,8 +92,6 @@ class AvaliadorController extends Controller
$trabalhos = $aval->trabalhos->where('evento_id', $request->evento_id); $trabalhos = $aval->trabalhos->where('evento_id', $request->evento_id);
} else { } else {
// aki
dd($aval->trabalhos()->where("trabalho_id",$trab->id)->first());
foreach ($aval->trabalhos->where('evento_id',$evento->id) as $trab){ foreach ($aval->trabalhos->where('evento_id',$evento->id) as $trab){
if($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 2)->orderBy('created_at','DESC')->first() if($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 2)->orderBy('created_at','DESC')->first()
|| $aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 3)->orderBy('created_at','DESC')->first() || || $aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 3)->orderBy('created_at','DESC')->first() ||
......
...@@ -1072,18 +1072,17 @@ class TrabalhoController extends Controller ...@@ -1072,18 +1072,17 @@ class TrabalhoController extends Controller
$data['instituicao'] = $request->outrainstituicao[$part]; $data['instituicao'] = $request->outrainstituicao[$part];
} }
$data['total_periodos'] = $request->total_periodos[$part];
if ($request->curso[$part] != "Outro") { if ($request->curso[$part] != "Outro") {
$data['curso'] = $request->curso[$part]; $data['curso'] = $request->curso[$part];
} else { } else {
$data['curso'] = $request->outrocurso[$part]; $data['curso'] = $request->outrocurso[$part];
} }
if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX") {
$data['turno'] = $request->turno[$part]; $data['turno'] = $request->turno[$part];
$data['periodo_atual'] = $request->periodo_atual[$part]; $data['periodo_atual'] = $request->periodo_atual[$part];
$data['ordem_prioridade'] = $request->ordem_prioridade[$part]; $data['ordem_prioridade'] = $request->ordem_prioridade[$part];
if($evento->tipo!="PIBEX") { $data['total_periodos'] = $request->total_periodos[$part];
$data['media_do_curso'] = $request->media_do_curso[$part]; $data['media_do_curso'] = $request->media_do_curso[$part];
} }
$data['nomePlanoTrabalho'] = $request->nomePlanoTrabalho[$part]; $data['nomePlanoTrabalho'] = $request->nomePlanoTrabalho[$part];
...@@ -1218,6 +1217,7 @@ class TrabalhoController extends Controller ...@@ -1218,6 +1217,7 @@ class TrabalhoController extends Controller
} catch (\Throwable $th) { } catch (\Throwable $th) {
DB::rollback(); DB::rollback();
return redirect(route('proponente.projetos'))->with(['mensagem' => $th->getMessage()]); return redirect(route('proponente.projetos'))->with(['mensagem' => $th->getMessage()]);
} }
......
...@@ -60,15 +60,17 @@ class UpdateTrabalho extends FormRequest ...@@ -60,15 +60,17 @@ class UpdateTrabalho extends FormRequest
$rules['curso.'.$value] = ['required', 'string']; $rules['curso.'.$value] = ['required', 'string'];
if($evento->tipo != "PIBEX" && $evento->tipo != "CONTINUO") { if($evento->tipo != "PIBEX" && $evento->tipo != "CONTINUO" && $evento->tipo != "PIACEX") {
$rules['media_do_curso.' . $value] = ['required', 'string']; $rules['media_do_curso.' . $value] = ['required', 'string'];
} }
if($evento->tipo != "CONTINUO"){ if($evento->tipo != "CONTINUO"){
if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX"){
$rules['turno.'.$value] = ['required', 'string']; $rules['turno.'.$value] = ['required', 'string'];
$rules['ordem_prioridade.'.$value] = ['required', 'string']; $rules['ordem_prioridade.'.$value] = ['required', 'string'];
$rules['periodo_atual.'.$value] = ['required', 'string']; $rules['periodo_atual.'.$value] = ['required', 'string'];
$rules['total_periodos.'.$value] = ['required', 'string']; $rules['total_periodos.'.$value] = ['required', 'string'];
}
$rules['anexoPlanoTrabalho.'.$value] = [Rule::requiredIf($participante->planoTrabalho == null)]; $rules['anexoPlanoTrabalho.'.$value] = [Rule::requiredIf($participante->planoTrabalho == null)];
$rules['nomePlanoTrabalho.'.$value] = ['required', 'string']; $rules['nomePlanoTrabalho.'.$value] = ['required', 'string'];
} }
...@@ -88,7 +90,7 @@ class UpdateTrabalho extends FormRequest ...@@ -88,7 +90,7 @@ class UpdateTrabalho extends FormRequest
}else{ }else{
//$rules = []; //$rules = [];
if($evento->tipo!="PIBEX" && $evento->tipo!="CONTINUO"){ if($evento->tipo!="PIBEX" && $evento->tipo!="CONTINUO" && $evento->tipo != "PIACEX"){
$rules['anexoPlanilhaPontuacao'] = [Rule::requiredIf($projeto->anexoPlanilhaPontuacao == null)]; $rules['anexoPlanilhaPontuacao'] = [Rule::requiredIf($projeto->anexoPlanilhaPontuacao == null)];
$rules['anexoLattesCoordenador'] = [Rule::requiredIf($projeto->anexoLattesCoordenador == null), 'mimes:pdf']; $rules['anexoLattesCoordenador'] = [Rule::requiredIf($projeto->anexoLattesCoordenador == null), 'mimes:pdf'];
$rules['anexoGrupoPesquisa'] = [Rule::requiredIf($projeto->anexoGrupoPesquisa == null), 'mimes:pdf']; $rules['anexoGrupoPesquisa'] = [Rule::requiredIf($projeto->anexoGrupoPesquisa == null), 'mimes:pdf'];
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
@endif @endif
</div> </div>
@if($evento->tipo != "PIBEX" && $evento->tipo != "CONTINUO") @if($evento->tipo != "PIBEX" && $evento->tipo != "CONTINUO" && $evento->tipo != "PIACEX")
<div class="col-md-12"> <div class="col-md-12">
<br> <br>
<b style="color: #4D4D4D;">Grupo de Pesquisa: </b> <b style="color: #4D4D4D;">Grupo de Pesquisa: </b>
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
</div> </div>
@if($evento->tipo != "PIBEX") @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
<div class="col-sm-4"> <div class="col-sm-4">
<label for="anexoLatterCoordenador" class="col-form-label font-tam" <label for="anexoLatterCoordenador" class="col-form-label font-tam"
style="font-weight: bold">{{ __('Lattes do Coordenador: ') }}</label> style="font-weight: bold">{{ __('Lattes do Coordenador: ') }}</label>
...@@ -483,7 +483,7 @@ ...@@ -483,7 +483,7 @@
</div> </div>
@endif @endif
@if($evento->tipo != "PIBEX") @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
<div class="col-sm-4"> <div class="col-sm-4">
@if($trabalho->anexoAutorizacaoComiteEtica != null) @if($trabalho->anexoAutorizacaoComiteEtica != null)
<label title="Declaração da autorização especial" for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">{{ __('Autorização Especial: ') }}</label> <label title="Declaração da autorização especial" for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">{{ __('Autorização Especial: ') }}</label>
...@@ -499,7 +499,7 @@ ...@@ -499,7 +499,7 @@
</div> </div>
@endif @endif
@if($evento->tipo != "PIBEX") @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
<div class="col-sm-4"> <div class="col-sm-4">
<label for="anexoPlanilha" class="col-form-label font-tam" <label for="anexoPlanilha" class="col-form-label font-tam"
style="font-weight: bold">{{ __('Planilha de Pontuação: ') }}</label> style="font-weight: bold">{{ __('Planilha de Pontuação: ') }}</label>
...@@ -510,7 +510,7 @@ ...@@ -510,7 +510,7 @@
</div> </div>
@endif @endif
@if($evento->tipo != "PIBEX") @if($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX")
<div class="col-sm-4"> <div class="col-sm-4">
<label for="nomeTrabalho" class="col-form-label font-tam" <label for="nomeTrabalho" class="col-form-label font-tam"
style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label> style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label>
...@@ -524,7 +524,7 @@ ...@@ -524,7 +524,7 @@
</div> </div>
@endif @endif
@if($evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM' || $evento->tipo == "PIBEX") @if($evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM' || $evento->tipo == "PIBEX" || $evento->tipo == "PIACEX")
{{-- Decisão do CONSU --}} {{-- Decisão do CONSU --}}
<div class="col-sm-4"> <div class="col-sm-4">
<label title="Decisão da Câmara ou Conselho Pertinente" for="anexoCONSU" class="col-form-label font-tam" <label title="Decisão da Câmara ou Conselho Pertinente" for="anexoCONSU" class="col-form-label font-tam"
...@@ -598,7 +598,7 @@ ...@@ -598,7 +598,7 @@
<div class="row justify-content-center"> <div class="row justify-content-center">
{{-- Relatório Parcial --}} {{-- Relatório Parcial --}}
@if($evento->tipo != 'PIBEX') @if($evento->tipo != 'PIBEX' && $evento->tipo != 'PIACEX')
<div class="col-sm-3"> <div class="col-sm-3">
<label for="dt_inicioRelatorioParcial" class="col-form-label font-tam" <label for="dt_inicioRelatorioParcial" class="col-form-label font-tam"
style="font-weight: bold">{{ __('Início do Relatório Parcial: ') }}</label> style="font-weight: bold">{{ __('Início do Relatório Parcial: ') }}</label>
...@@ -695,7 +695,7 @@ ...@@ -695,7 +695,7 @@
@csrf @csrf
<input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}"> <input type="hidden" name="trabalho_id" value="{{ $trabalho->id }}">
<input type="hidden" name="evento_id" value="{{ $evento->id }}"> <input type="hidden" name="evento_id" value="{{ $evento->id }}">
@if($evento->tipo != "PIBEX" && $evento->dt_fimRelatorioParcial < $hoje && $hoje<$evento->dt_inicioRelatorioFinal) @if(($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX") && $evento->dt_fimRelatorioParcial < $hoje && $hoje<$evento->dt_inicioRelatorioFinal)
<input type="hidden" name="tipo_relatorio" value="Parcial"> <input type="hidden" name="tipo_relatorio" value="Parcial">
@php $tipoTemp = "Parcial"; @endphp @php $tipoTemp = "Parcial"; @endphp
@else @else
...@@ -705,7 +705,7 @@ ...@@ -705,7 +705,7 @@
<div class="form-group"> <div class="form-group">
<div class="row" style="margin-left: 2px;margin-bottom: 1px"> <div class="row" style="margin-left: 2px;margin-bottom: 1px">
<div class="col-md-6"> <div class="col-md-6">
@if($evento->tipo != "PIBEX" && $evento->dt_fimRelatorioParcial < $hoje && $hoje<$evento->dt_inicioRelatorioFinal) @if(($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX") && $evento->dt_fimRelatorioParcial < $hoje && $hoje<$evento->dt_inicioRelatorioFinal)
<label for="exampleFormControlSelect2" <label for="exampleFormControlSelect2"
style="font-size: 16px;">Selecione o(s) avaliador(es) style="font-size: 16px;">Selecione o(s) avaliador(es)
para a(s) avaliacões de relatorio parcial</label> para a(s) avaliacões de relatorio parcial</label>
...@@ -788,7 +788,7 @@ ...@@ -788,7 +788,7 @@
</div> </div>
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
@if(count($arquivos) > 0 && $evento->tipo != "PIBEX") @if(count($arquivos) > 0 && ($evento->tipo != "PIBEX" && $evento->tipo != "PIACEX"))
<div class="row justify-content-start" style="alignment: center"> <div class="row justify-content-start" style="alignment: center">
<div class="col-md-11"><h6 style="color: #234B8B; font-weight: bold">Avaliações de Relatórios Parciais</h6></div> <div class="col-md-11"><h6 style="color: #234B8B; font-weight: bold">Avaliações de Relatórios Parciais</h6></div>
</div> </div>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador") @if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option> <option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif @endif
@elseif($edital->natureza_id == 3 && $edital->tipo == "PIBEX") @elseif($edital->natureza_id == 3 && ($edital->tipo == "PIBEX" || $edital->tipo == "PIACEX"))
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador" || $funcao->nome == "Bolsista") @if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador" || $funcao->nome == "Bolsista")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option> <option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif @endif
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX" && $edital->tipo != "PIACEX")
<div class="form-group col-md-6" style="margin-top: 10px"> <div class="form-group col-md-6" style="margin-top: 10px">
<label for="anexoLatterCoordenador" class="col-form-label font-tam" style="font-weight: bold">{{ __('Lattes do Coordenador: ') }}</label> <label for="anexoLatterCoordenador" class="col-form-label font-tam" style="font-weight: bold">{{ __('Lattes do Coordenador: ') }}</label>
@if($projeto->anexoLattesCoordenador) @if($projeto->anexoLattesCoordenador)
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
@endif @endif
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX" && $edital->tipo != "PIACEX")
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="anexoPlanilhaPontuacao" class="col-form-label font-tam" style="font-weight: bold">{{ __('Planilha de Pontuação: ') }}</label> <label for="anexoPlanilhaPontuacao" class="col-form-label font-tam" style="font-weight: bold">{{ __('Planilha de Pontuação: ') }}</label>
@if($projeto->anexoPlanilhaPontuacao) @if($projeto->anexoPlanilhaPontuacao)
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</div> </div>
@endif @endif
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX" && $edital->tipo != "PIACEX")
<div class="form-group col-md-6" style="margin-top: 10px"> <div class="form-group col-md-6" style="margin-top: 10px">
<label for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label> <label for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label>
@if($projeto->anexoGrupoPesquisa) @if($projeto->anexoGrupoPesquisa)
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
@endif @endif
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX" && $edital->tipo != "PIACEX")
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="botao" class="col-form-label font-tam @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="font-weight: bold">{{ __('Possui autorizações especiais?') }} <span style="color: red; font-weight:bold">*</span></label> <label for="botao" class="col-form-label font-tam @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="font-weight: bold">{{ __('Possui autorizações especiais?') }} <span style="color: red; font-weight:bold">*</span></label>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
@enderror @enderror
</div> </div>
@if($edital->tipo != "PIBEX" && $edital->tipo !='CONTINUO') @if($edital->tipo != "PIBEX" && $edital->tipo !='CONTINUO' && $edital->tipo != "PIACEX")
<div class="col-md-2"> <div class="col-md-2">
<br> <br>
<label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label> <label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</div> </div>
@endif @endif
@if($edital->tipo != "PIBEX" && $edital->tipo !='CONTINUO') @if($edital->tipo != "PIBEX" && $edital->tipo !='CONTINUO' && $edital->tipo != "PIACEX")
<div class="col-md-3"> <div class="col-md-3">
<br> <br>
<label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Valor da Planilha de Pontuação: ') }}</label> <label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Valor da Planilha de Pontuação: ') }}</label>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
</div> </div>
@endif @endif
@if($edital->tipo !='CONTINUO' && $edital->tipo != "PIBEX") @if($edital->tipo !='CONTINUO' && $edital->tipo != "PIBEX" && $edital->tipo != "PIACEX")
<div class="col-md-2"> <div class="col-md-2">
<br> <br>
<label for="conflitosInteresse" class="col-form-label font-tam" <label for="conflitosInteresse" class="col-form-label font-tam"
......
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