Commit 9b7944b5 authored by luiz-davi's avatar luiz-davi
Browse files

Merge branch 'master' of github.com:luiz-davi/submeta into novos_logins_coordenador

parents 62386f44 721ddb4f
...@@ -50,9 +50,10 @@ ...@@ -50,9 +50,10 @@
} }
@endphp @endphp
<div class="col-sm-12"> <div class="col-sm-12">
<label for="anexoProjeto" class="col-form-label font-tam" style="font-weight: bold" @if($participante->planoTrabalho != null)
title="{{$participante->planoTrabalho->titulo}}">{{ __('Projeto: ') }}{{$participante->planoTrabalho->titulo}}</label> <label for="anexoProjeto" class="col-form-label font-tam" style="font-weight: bold"
title="{{$participante->planoTrabalho->titulo}}">{{ __('Projeto: ') }}{{$participante->planoTrabalho->titulo}}</label>
@endif
@if($planoTrabalhoTemp != null) @if($planoTrabalhoTemp != null)
<a href="{{route('download', ['file' => $planoTrabalhoTemp])}}"><img src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a> <a href="{{route('download', ['file' => $planoTrabalhoTemp])}}"><img src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
@endif @endif
......
...@@ -567,12 +567,12 @@ ...@@ -567,12 +567,12 @@
<div class="form-group"> <div class="form-group">
<label for="modeloDocumento">Anexar arquivo com os modelos de documentos do edital:</label> <label for="modeloDocumento">Anexar arquivo com os modelos de documentos do edital:</label>
@if(old('modeloDocumentoPreenchido') != null) @if(old('modeloDocumentoPreenchido') != null)
<a id="modeloDocumentoTemp" href="{{ route('baixar.evento.temp', ['nomeAnexo' => 'modeloDocumento' ])}}">Arquivo atual</a> <a id="modeloDocumentoTemp" href="{{ route('baixar.modelo.evento.temp', ['nomeAnexo' => 'modeloDocumento' ])}}">Arquivo atual</a>
@endif @endif
<input type="hidden" id="modeloDocumentoPreenchido" name="modeloDocumentoPreenchido" value="{{ old('modeloDocumentoPreenchido') }}"> <input type="hidden" id="modeloDocumentoPreenchido" name="modeloDocumentoPreenchido" value="{{ old('modeloDocumentoPreenchido') }}">
<input type="file" class="form-control-file @error('modeloDocumento') is-invalid @enderror" name="modeloDocumento" value="{{ old('modeloDocumento') }}" id="modeloDocumento" onchange="exibirAnexoTemp(this)"> <input type="file" class="form-control-file @error('modeloDocumento[]') is-invalid @enderror" name="modeloDocumento[]" multiple value="{{ old('modeloDocumento') }}" id="modeloDocumento" onchange="exibirAnexoTemp(this)" accept=".doc,.docx,.pdf">
<small>O arquivo selecionado deve ter até 2mb.</small> <small>Os arquivos selecionado deve ter até 2mb.</small>
@error('modeloDocumento') @error('modeloDocumento[]')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
......
...@@ -695,7 +695,7 @@ ...@@ -695,7 +695,7 @@
<div class="form-group"> <div class="form-group">
<label for="modeloDocumento">Arquivo com os modelos de documentos do edital:</label> <label for="modeloDocumento">Arquivo com os modelos de documentos do edital:</label>
@if($evento->modeloDocumento != null) @if($evento->modeloDocumento != null)
<a href="{{route('download', ['file' => $evento->modeloDocumento])}}" target="_new" style="font-size: 20px; color: #114048ff;" > <a href="{{route('baixar.modelos', ['id' => $evento->id])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px"> <img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a> </a>
@else @else
...@@ -703,9 +703,9 @@ ...@@ -703,9 +703,9 @@
<i class="fas fa-times-circle fa-2x" style="color:red; font-size:25px"></i> <i class="fas fa-times-circle fa-2x" style="color:red; font-size:25px"></i>
</a> </a>
@endif @endif
<input type="file" class="form-control-file @error('modeloDocumento') is-invalid @enderror" name="modeloDocumento" value="{{ old('modeloDocumento') }}" id="modeloDocumento"> <input type="file" class="form-control-file @error('modeloDocumento[]') is-invalid @enderror" name="modeloDocumento[]" multiple value="{{ old('modeloDocumento') }}" id="modeloDocumento" onchange="exibirAnexoTemp(this)" accept=".doc,.docx,.pdf">
<small>O arquivo selecionado deve ter até 2mb.</small> <small>Os arquivos selecionado deve ter até 2mb.</small>
@error('modeloDocumento') @error('modeloDocumento[]')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
......
...@@ -132,6 +132,44 @@ ...@@ -132,6 +132,44 @@
</div> </div>
</div> </div>
@endif @endif
@if($edital->tipo == "PIBIC" && $edital->natureza_id == 2)
<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;">
O questionário de pesquisa de prospecção interna foi respondido?<span style="color: red; font-weight:bold"> *</span>
</label>
<input type="radio" id="formSim" name="preenchimentoFormFlag" value="sim">
<label for="formSim" style="margin-right: 5px">Sim</label>
<input type="radio" id="formNao" name="preenchimentoFormFlag" value="nao" checked>
<label for="formNao" style="margin-right: 5px;">Não</label><br>
<a href="https://forms.gle/cAND8Z3z1yVr9u6a6" target="_blank" style="margin: 0px;">(endereço eletrônico de acesso)</a>
</div>
<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 estudante(s) de ações afirmativas?') }} </label>
<input type="radio" id="radioAcoesAfirmativasSim" name="radioAcoesAfirmativas" onchange="displayAcoesAfirmativas('sim')" value="sim">
<label for="radioSim" style="margin-right: 5px">Sim</label>
<input type="radio" id="radioAcoesAfirmativasNao" name="radioAcoesAfirmativas" onchange="displayAcoesAfirmativas('nao')" checked
value="nao">
<label for="radioNao" style="margin-right: 5px" >Não</label><br>
<div class="form-group" id="displayAcoesAfirmativas" style="display: none; margin-top:-1rem">
<label for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold;font-size: 13px">{{ __('Declaração de ação afirmativa') }}<span style="color: red; font-weight:bold"> *</span></label>
<input type="file" class="input-group-text" name="anexo_acao_afirmativa" accept=".pdf" />
@error('anexoAcaoAfirmativa')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
@endif
@if($edital->nome_docExtra != null) @if($edital->nome_docExtra != null)
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label title="{{$edital->nome_docExtra}}" for="anexo_docExtra" class="col-form-label font-tam" style="font-weight: bold">{{$edital->nome_docExtra}}: @if($edital->obrigatoriedade_docExtra == true) <span style="color: red; font-weight:bold">*</span> @endif</label> <label title="{{$edital->nome_docExtra}}" for="anexo_docExtra" class="col-form-label font-tam" style="font-weight: bold">{{$edital->nome_docExtra}}: @if($edital->obrigatoriedade_docExtra == true) <span style="color: red; font-weight:bold">*</span> @endif</label>
...@@ -176,4 +214,12 @@ ...@@ -176,4 +214,12 @@
} }
} }
function displayAcoesAfirmativas(valor) {
if(valor == "sim"){
document.getElementById("displayAcoesAfirmativas").style.display = "block";
}else {
document.getElementById("displayAcoesAfirmativas").style.display = "none";
}
}
</script> </script>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class=" d-flex justify-content-between align-items-center" style="margin-top: 15px; margin-bottom:18px"> <div class=" d-flex justify-content-between align-items-center" style="margin-top: 15px; margin-bottom:18px">
<h6 style="font-weight: bold"><span style="color: red; font-weight:bold">*</span> Campos obrigatórios</h6> <h6 style="font-weight: bold"><span style="color: red; font-weight:bold">*</span> Campos obrigatórios</h6>
<button id="submeterFormProposta" type="submit" style="display: none;"></button> <button id="submeterFormProposta" type="submit" style="display: none;"></button>
<button type="button" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button> <!-- <button type="button" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button> -->
<button type="submit" class="btn btn-success" id="idButtonSubmitProjeto" >{{ __('Submeter projeto') }}</button> <button type="submit" class="btn btn-success" id="idButtonSubmitProjeto" >{{ __('Submeter projeto') }}</button>
</div> </div>
......
<div class="col-md-12" style="margin-top: 20px"> <div class="col-md-12" style="margin-top: 20px">
<div class="card" style="border-radius: 5px"> <div class="card" style="border-radius: 5px">
<div class="card-body" style="padding-top: 0.2rem;"> <div class="card-body" style="padding-top: 0.2rem;">
<div class="container"> <div class="container">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-11"> <div class="col-md-11">
<h5 style="color: #234B8B; font-weight: bold">Adicionar Integrante(s)</h5> <h5 style="color: #234B8B; font-weight: bold">Adicionar Integrante(s)</h5>
</div> </div>
<div class="col-md-1 text-sm-right"> <div class="col-md-1 text-sm-right">
<a type="button" value="{{ $edital->id }}" id="atribuir1" data-toggle="modal" data-target="#modalIntegrante"> <a type="button" value="{{ $edital->id }}" id="atribuir1" data-toggle="modal"
data-target="#modalIntegrante">
<img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt=""> <img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt="">
</a> </a>
</div> </div>
</div> </div>
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
<!-- <h6 style="color: #234B8B; font-weight: bold;">Integrantes</h6> --> <!-- <h6 style="color: #234B8B; font-weight: bold;">Integrantes</h6> -->
<div class="row" id="integrante" style="display:none"> <div class="row" id="integrante" style="display:none">
</div> </div>
@include('evento.formulario.participantes') @include('evento.formulario.participantes')
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- MODAL --> <!-- MODAL -->
<div class="modal fade" id="modalIntegrante" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="modalIntegrante" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
<div class="modal-dialog modal-dialog-centered modal-sm"> aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Adicionar Integrante</h5> <h5 class="modal-title" id="exampleModalLabel">Adicionar Integrante</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="container"> <div class="container">
<div class="row justify-content-center" style="padding-left:35px; padding-right:45px"> <div class="row justify-content-center" style="padding-left:35px; padding-right:45px">
<div class="form-controll" style="margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;"> <div class="form-controll"
style="margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;">
<div class="form-row d-flex"> <div class="form-row d-flex">
<label for="cpf_consulta">CPF:</label> <label for="cpf_consulta">CPF:</label>
<input type="text" id="cpf_consulta" name="cpf_consulta" class="form-control"> <input type="text" id="cpf_consulta" name="cpf_consulta" class="form-control">
</div> </div>
<div class="form-row d-flex" style="margin-top:10px"> <div class="form-row d-flex" style="margin-top:10px">
<label for="funcao_participante">Função do Integrante:</label> <label for="funcao_participante">Função do Integrante:</label>
<select name="" id="funcao_participante" class="form-control"> <select name="" id="funcao_participante" class="form-control">
@foreach($funcaoParticipantes as $funcao) @foreach($funcaoParticipantes as $funcao)
@if($edital->natureza_id == 3) <!-- EXTENSÃO -->
@if($edital->tipo == "CONTINUO" && $funcao->nome != 'Bolsista') @if($edital->natureza_id == 3 && $edital->tipo == "CONTINUO")
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif
@elseif($edital->natureza_id == 3 && $edital->tipo == "PIBEX")
@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>
@elseif($funcao->nome != "Consultor" && $funcao->nome != "Pesquisador" && $funcao->nome != "Voluntário") @endif
<!-- PESQUISA -->
@else
@if($funcao->nome == "Bolsista" || $funcao->nome == "Voluntário")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option> <option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif @endif
@else
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif @endif
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="form-row justify-content-center" style="margin-top:20px;"> <div class="form-row justify-content-center" style="margin-top:20px;">
<button type="button" class="btn btn-primary" onclick="preencherUsuarioExistente()">Adicionar</button> <button type="button" class="btn btn-primary" onclick="preencherUsuarioExistente()">
Adicionar
</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -75,14 +85,15 @@ ...@@ -75,14 +85,15 @@
<!-- MODAL DE ERRO --> <!-- MODAL DE ERRO -->
<div class="modal fade" id="aviso-modal-usuario-nao-existe" data-backdrop="static" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="aviso-modal-usuario-nao-existe" data-backdrop="static" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #dc3545;"> <div class="modal-header" style="background-color: #dc3545;">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5> <h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
CPF não consta no sistema! CPF não consta no sistema!
...@@ -94,14 +105,15 @@ ...@@ -94,14 +105,15 @@
</div> </div>
</div> </div>
<div class="modal fade" id="aviso-modal-usuario-adicionado" data-backdrop="static" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="aviso-modal-usuario-adicionado" data-backdrop="static" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #32CD32;"> <div class="modal-header" style="background-color: #32CD32;">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Sucesso!</h5> <h5 class="modal-title" id="exampleModalLabel" style="color: white;">Sucesso!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
Integrante adicionado com sucesso Integrante adicionado com sucesso
...@@ -113,16 +125,17 @@ ...@@ -113,16 +125,17 @@
</div> </div>
</div> </div>
<div class="modal fade" id="aviso-modal-limite-de-integrantes" data-backdrop="static" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="aviso-modal-limite-de-integrantes" data-backdrop="static" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #dc3545;"> <div class="modal-header" style="background-color: #dc3545;">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5> <h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body" > <div class="modal-body">
<span id="texto-erro">O limite de integrantes para esse projeto foi atingido.</span> <span id="texto-erro">O limite de integrantes para esse projeto foi atingido.</span>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
...@@ -133,7 +146,6 @@ ...@@ -133,7 +146,6 @@
</div> </div>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
$("#cpf_consulta").mask("999.999.999-99"); $("#cpf_consulta").mask("999.999.999-99");
...@@ -144,7 +156,7 @@ ...@@ -144,7 +156,7 @@
} }
function preencherUsuarioExistente() { function preencherUsuarioExistente() {
if(!document.getElementById(`exampleModal${modal_id}`)){ if (!document.getElementById(`exampleModal${modal_id}`)) {
exibirModalNumeroMaximoDeIntegrantes(); exibirModalNumeroMaximoDeIntegrantes();
return; return;
} }
...@@ -155,41 +167,29 @@ ...@@ -155,41 +167,29 @@
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
} }
}); });
$.ajax({ $.ajax({
url: '{{ route('trabalho.buscarUsuario') }}', url: '{{ route('trabalho.buscarUsuario') }}',
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: { data: {
'cpf_consulta': $('#cpf_consulta').val(), 'cpf_consulta': $('#cpf_consulta').val(),
'funcao': $('#funcao_participante').val() 'funcao': $('#funcao_participante').val()
}, },
success: function (data) {
success: function (data) { if (data == 'inexistente' || $('#cpf_consulta').val() == "") {
if(data == 'inexistente' || $('#cpf_consulta').val() == ""){ exibirModalUsuarioInexistente();
exibirModalUsuarioInexistente(); } else {
}else { if ($('#funcao_participante').val() != 4 || data[0].tipo == 'participante') {
exibirUsuarioAdicionado(data); exibirUsuarioAdicionado(data);
$('#integrante').append(` } else {
<div id="integrante${data[0]['id']}" class="col-md-6"> marcar(modal_id, data);
<div class="row"> exibirProfessorAdicionado();
<input name="integrantes[]" type="text" value="${data[0]['id']},${$('#funcao_participante').val()}" hidden>
<div class="col-md-2" style="display: flex; align-items: center;"> }
<img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt=""> }
</div>
<div class="col-md-4 mb-1">
<strong>Nome:</strong> ${data[0]['name']}
<strong>CPF:</strong> ${data[0]['cpf']}
<strong>Função:</strong> ${data[1]['nome']}
<button type="button" class="btn btn-danger" onclick="removerIntegrante(${data[0]['id']})">Remover</button>
</div>
</div>
</div>
`)
} }
}
}); });
} }
...@@ -202,65 +202,85 @@ ...@@ -202,65 +202,85 @@
$('#aviso-modal-limite-de-integrantes').modal('show'); $('#aviso-modal-limite-de-integrantes').modal('show');
} }
let modal_id = 0; let modal_id = Number(document.getElementById('quantidadeModais').value);
function exibirUsuarioAdicionado(data) { function exibirUsuarioAdicionado(data) {
$('#modalIntegrante').modal('hide'); console.log(data[0])
$('#modalIntegrante').modal('hide');
document.getElementById(`nome${modal_id}`).value = data[0]['name']; document.getElementById(`nome${modal_id}`).value = data[0]['name'];
document.getElementById(`nome${modal_id}`).setAttribute("readonly", ""); document.getElementById(`nome${modal_id}`).setAttribute("readonly", "");
document.getElementById(`email${modal_id}`).value = data[0]['email']; document.getElementById(`email${modal_id}`).value = data[0]['email'];
document.getElementById(`email${modal_id}`).setAttribute("readonly", ""); document.getElementById(`email${modal_id}`).setAttribute("readonly", "");
document.getElementById(`data_de_nascimento${modal_id}`).value = (new Date(data[2]['data_de_nascimento'])).toLocaleDateString(); if (data[0]['tipo'] == "participante") {
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", ""); let [y, m, d] = data[2]['data_de_nascimento'].split('-');
document.getElementById(`data_de_nascimento${modal_id}`).value = (new Date(y, m - 1, d)).toLocaleDateString();
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", "");
} else {
document.getElementById(`data_de_nascimento${modal_id}`).value = null;
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`cpf${modal_id}`).value = data[0]['cpf']; document.getElementById(`cpf${modal_id}`).value = data[0]['cpf'];
document.getElementById(`cpf${modal_id}`).setAttribute("readonly", ""); document.getElementById(`cpf${modal_id}`).setAttribute("readonly", "");
document.getElementById(`rg${modal_id}`).value = data[2]['rg'];
document.getElementById(`rg${modal_id}`).setAttribute("readonly", "");
document.getElementById(`celular${modal_id}`).value = data[0]['celular'];
document.getElementById(`celular${modal_id}`).setAttribute("readonly", "");
document.getElementById(`cep${modal_id}`).value = data[3]['cep']; if (data?.[2]?.rg) {
document.getElementById(`cep${modal_id}`).setAttribute("readonly", ""); document.getElementById(`rg${modal_id}`).value = data[2]['rg'];
document.getElementById(`rg${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`uf${modal_id}`).value = data[3]['uf']; if (data?.[0]?.celular) {
document.getElementById(`uf${modal_id}`).setAttribute("readonly", ""); document.getElementById(`celular${modal_id}`).value = data[0]['celular'];
document.getElementById(`celular${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`cidade${modal_id}`).value = data[3]['cidade']; if (data[3] != null) {
document.getElementById(`cidade${modal_id}`).setAttribute("readonly", ""); document.getElementById(`cep${modal_id}`).value = data[3].cep;
document.getElementById(`cep${modal_id}`).setAttribute("readonly", "");
document.getElementById(`bairro${modal_id}`).value = data[3]['bairro'];
document.getElementById(`bairro${modal_id}`).setAttribute("readonly", "");
document.getElementById(`rua${modal_id}`).value = data[3]['rua']; document.getElementById(`uf${modal_id}`).value = data[3].uf;
document.getElementById(`rua${modal_id}`).setAttribute("readonly", ""); document.getElementById(`uf${modal_id}`).setAttribute("readonly", "");
document.getElementById(`numero${modal_id}`).value = data[3]['numero']; document.getElementById(`cidade${modal_id}`).value = data[3].cidade;
document.getElementById(`numero${modal_id}`).setAttribute("readonly", ""); document.getElementById(`cidade${modal_id}`).setAttribute("readonly", "");
document.getElementById(`complemento${modal_id}`).value = data[3]['complemento']; document.getElementById(`bairro${modal_id}`).value = data[3].bairro;
document.getElementById(`complemento${modal_id}`).setAttribute("readonly", ""); document.getElementById(`bairro${modal_id}`).setAttribute("readonly", "");
document.getElementById(`rua${modal_id}`).value = data[3].rua;
document.getElementById(`rua${modal_id}`).setAttribute("readonly", "");
document.getElementById(`numero${modal_id}`).value = data[3].numero;
document.getElementById(`numero${modal_id}`).setAttribute("readonly", "");
document.getElementById(`complemento${modal_id}`).value = data[3].complemento;
document.getElementById(`complemento${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`instituicao[${modal_id}]`).value = data[0]['instituicao']; document.getElementById(`instituicao[${modal_id}]`).value = data[0].instituicao;
document.getElementById(`instituicao[${modal_id}]`).setAttribute("readonly", ""); document.getElementById(`instituicao[${modal_id}]`).setAttribute("readonly", "");
document.getElementById(`curso[${modal_id}]`).value = data[2]['curso']; document.getElementById(`curso[${modal_id}]`).value = data[2].curso;
document.getElementById(`curso[${modal_id}]`).setAttribute("readonly", ""); document.getElementById(`curso[${modal_id}]`).setAttribute("readonly", "");
console.log(document.getElementById(`funcaoParticipante${modal_id}`)); console.log(document.getElementById(`funcaoParticipante${modal_id}`));
document.getElementById(`funcaoParticipante${modal_id}`).value = data[1]['nome']; document.getElementById(`funcaoParticipante${modal_id}`).value = data[1]['nome'];
if(data[1].nome != "Bolsista" && data[1].nome != "Voluntário"){ if (data[1].nome != "Bolsista" && data[1].nome != "Voluntário") {
console.log(document.getElementById(`plano-titulo${modal_id}`));
document.getElementById(`plano-titulo${modal_id}`).setAttribute('hidden', ""); document.getElementById(`plano-titulo${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-nome${modal_id}`).setAttribute('hidden', ""); document.getElementById(`plano-nome${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-anexo${modal_id}`).setAttribute('hidden', ""); document.getElementById(`plano-anexo${modal_id}`).setAttribute('hidden', "");
} }
$(`#exampleModal${modal_id}`).modal('show'); $(`#exampleModal${modal_id}`).modal('show');
} }
function exibirProfessorAdicionado() {
$('#modalIntegrante').modal('hide');
$(`#aviso-modal-usuario-adicionado`).modal('show');
}
</script> </script>
\ No newline at end of file
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="col-1" style="margin-top:9.3px" hidden> <div class="col-1" style="margin-top:9.3px" hidden>
{{-- <button type="button" class="btn btn-danger shadow-sm" id="buttonRemover" onclick="removerPart(this)" >X</button> --}} {{-- <button type="button" class="btn btn-danger shadow-sm" id="buttonRemover" onclick="removerPart(this)" >X</button> --}}
<input type="hidden" name="estudante[{{$i}}]" id="estudante[{{$i}}]">
<input type="checkbox" id="checkB{{$i}}" aria-label="Checkbox for following text input" @if(isset(old('marcado')[$i])) checked @endif name="marcado[]" value="{{ $i }}"> <input type="checkbox" id="checkB{{$i}}" aria-label="Checkbox for following text input" @if(isset(old('marcado')[$i])) checked @endif name="marcado[]" value="{{ $i }}">
</div> </div>
...@@ -358,38 +359,40 @@ ...@@ -358,38 +359,40 @@
</div> </div>
@endif @endif
@if($edital->tipo != "CONTINUO") <div style="display: block" @if(old('funcaoParticipante') == null || !array_key_exists($i, old('funcaoParticipante')) || old('funcaoParticipante')[$i] == 'Bolsista') @else hidden @endif>
<div class="col-md-12" id="plano-titulo{{$i}}">
<h5>Plano de trabalho</h5> <div class="col-md-12" id="plano-titulo{{$i}}">
</div> <h5>Plano de trabalho</h5>
<div class="col-12" id="plano-nome{{$i}}"> </div>
@component('componentes.input', ['label' => 'Título']) <div class="col-12" id="plano-nome{{$i}}">
<input type="text" class="form-control" value="{{old('nomePlanoTrabalho')[$i] ?? "" }}" name="nomePlanoTrabalho[{{$i}}]" placeholder="Digite o título do plano de trabalho" maxlength="255" id="nomePlanoTrabalho{{$i}}"> @component('componentes.input', ['label' => 'Título'])
<span style="color: red; font-size: 12px" id="caracsRestantesnomePlanoTrabalho{{$i}}"> <input type="text" class="form-control" value="{{old('nomePlanoTrabalho')[$i] ?? "" }}" name="nomePlanoTrabalho[{{$i}}]" placeholder="Digite o título do plano de trabalho" maxlength="255" id="nomePlanoTrabalho{{$i}}">
</span> <span style="color: red; font-size: 12px" id="caracsRestantesnomePlanoTrabalho{{$i}}">
@error('nomePlanoTrabalho.'.$i) </span>
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> @error('nomePlanoTrabalho.'.$i)
<strong>{{ $message }}</strong> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
</span> <strong>{{ $message }}</strong>
@enderror </span>
@endcomponent @enderror
</div> @endcomponent
<div class="col-12" id="plano-anexo{{$i}}"> </div>
@component('componentes.input', ['label' => 'Anexo (.pdf)']) <div class="col-12" id="plano-anexo{{$i}}">
<input type="file" class="input-group-text" value="{{old('anexoPlanoTrabalho')[$i] ?? "" }}" name="anexoPlanoTrabalho[{{$i}}]" accept=".pdf" placeholder="Anexo do Plano de Trabalho" /> @component('componentes.input', ['label' => 'Anexo (.pdf)'])
@error('anexoPlanoTrabalho.'.$i) <input type="file" class="input-group-text" value="{{old('anexoPlanoTrabalho')[$i] ?? "" }}" name="anexoPlanoTrabalho[{{$i}}]" accept=".pdf" placeholder="Anexo do Plano de Trabalho" />
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> @error('anexoPlanoTrabalho.'.$i)
<strong>{{ $message }}</strong> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
</span> <strong>{{ $message }}</strong>
@enderror </span>
@error('anexoPlanoTrabalho') @enderror
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> @error('anexoPlanoTrabalho')
<strong>{{ $message }}</strong> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
</span> <strong>{{ $message }}</strong>
@enderror </span>
@endcomponent @enderror
</div> @endcomponent
@endif </div>
</div>
{{-- <div class="col-6"> {{-- <div class="col-6">
<button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})" @if(isset(old('marcado')[$i+1])) disabled @endif>Cancelar</button> <button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})" @if(isset(old('marcado')[$i+1])) disabled @endif>Cancelar</button>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<form method="POST" id="criarProjetoForm" action="{{route('trabalho.store')}}" enctype="multipart/form-data" > <form method="POST" id="criarProjetoForm" action="{{route('trabalho.store')}}" enctype="multipart/form-data" >
@csrf @csrf
<input type="hidden" name="editalId" value="{{$edital->id}}"> <input type="hidden" name="editalId" value="{{$edital->id}}">
<input type="hidden" name="quantidadeModais" id="quantidadeModais" value="{{old('quantidadeModais', 0)}}" >
<div class="container"> <div class="container">
...@@ -206,17 +207,18 @@ ...@@ -206,17 +207,18 @@
return nome_funcao; return nome_funcao;
} }
function marcar(id){ function marcar(id, data = null){
let nome = document.getElementById("nome"+id); let nome = document.getElementById("nome"+id);
let linkNome = document.getElementById("nomePart"+(id+1)); let linkNome = document.getElementById("nomePart"+(id+1));
let nomePlano = document.getElementById("nomePlano"+(id+1)); let nomePlano = document.getElementById("nomePlano"+(id+1));
let linkTituloProj = document.getElementById("tituloProj"+(id+1)); let linkTituloProj = document.getElementById("tituloProj"+(id+1));
let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id); let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id);
let instituicao = document.getElementById('instituicao['+id+']');
let celular = document.getElementById('celular'+id);
let estudante = document.getElementById("estudante["+id+"]");
let cpf = document.getElementById("cpf"+id); let cpf = document.getElementById("cpf"+id);
let funcao = document.getElementById("funcao_participante"); let funcao = document.getElementById("funcao_participante");
let email = document.getElementById("email"+id); let email = document.getElementById("email"+id);
let funcaoParticipantes = <?php echo json_encode($funcaoParticipantes); ?>; let funcaoParticipantes = <?php echo json_encode($funcaoParticipantes); ?>;
let nome_funcao = get_funcao(funcao.value); let nome_funcao = get_funcao(funcao.value);
...@@ -229,20 +231,32 @@ ...@@ -229,20 +231,32 @@
} }
if(nome.value != ""){ if(nome.value != ""){
estudante.value = true;
if(planoTrabalho != null && planoTrabalho.value != ""){ if(planoTrabalho != null && planoTrabalho.value != ""){
nomePlano.innerHTML = ` <p style='font-weight: normal; line-height: normal;'><strong>Nome: </strong>${nome.value}<br> nomePlano.innerHTML = ` <strong>Nome: </strong>${nome.value}<br>
<strong>E-mail: </strong>${email.value} <br> <strong>E-mail: </strong>${email.value} <br>
<strong>Plano: </strong>${planoTrabalho.value}<br> <strong>Plano: </strong>${planoTrabalho.value}<br>
<strong>CPF: </strong>${cpf.value} <br> <strong>CPF: </strong>${cpf.value} <br>
<strong>Função: </strong>${nome_funcao}</p>`; <strong>Função: </strong>${nome_funcao}`;
}else { }else {
nomePlano.innerHTML = ` <p style='font-weight: normal; line-height: normal;'><strong>Nome: </strong>${nome.value}<br> nomePlano.innerHTML = ` <strong>Nome: </strong>${nome.value}<br>
<strong>E-mail: </strong>${email.value} <br> <strong>E-mail: </strong>${email.value} <br>
<strong>CPF: </strong>${cpf.value} <br> <strong>CPF: </strong>${cpf.value} <br>
<strong>Função: </strong>${nome_funcao}</p>`; <strong>Função: </strong>${nome_funcao}`;
} }
}else{ }else if(data != null) {
nomePlano.innerText = `Discente `+(id+1); estudante.value = false;
nome.value = data[0].name;
email.value = data[0].email;
instituicao.value = data[0].instituicao;
cpf.value = data[0].cpf;
celular.value = data[0].celular;
nomePlano.innerHTML = ` <strong>Nome: </strong>${nome.value}<br>
<strong>E-mail: </strong>${email.value} <br>
<strong>CPF: </strong>${cpf.value} <br>
<strong>Função: </strong>${data[1].nome}`;
} }
if(id >=1){ if(id >=1){
document.getElementById("cancelar"+(id-1)).setAttribute("disabled", true); document.getElementById("cancelar"+(id-1)).setAttribute("disabled", true);
...@@ -251,6 +265,7 @@ ...@@ -251,6 +265,7 @@
document.getElementById("checkB"+id).checked = true; document.getElementById("checkB"+id).checked = true;
//$("#atribuir1").attr('data-target','#modalIntegrante'+(id+1)); //$("#atribuir1").attr('data-target','#modalIntegrante'+(id+1));
modal_id = id+1; modal_id = id+1;
document.getElementById("quantidadeModais").value = modal_id;
document.getElementById("part"+id).removeAttribute("hidden"); document.getElementById("part"+id).removeAttribute("hidden");
//document.getElementById("exampleModal"+id).modal('hide'); //document.getElementById("exampleModal"+id).modal('hide');
...@@ -265,6 +280,7 @@ ...@@ -265,6 +280,7 @@
document.getElementById("part"+id).setAttribute("hidden",true); document.getElementById("part"+id).setAttribute("hidden",true);
//$("#atribuir1").attr('data-target','#exampleModal'+(id)); //$("#atribuir1").attr('data-target','#exampleModal'+(id));
modal_id -= 1; modal_id -= 1;
document.getElementById("quantidadeModais").value = modal_id;
document.getElementById("exampleModal"+id).modal('hide'); document.getElementById("exampleModal"+id).modal('hide');
} }
@endif @endif
......
...@@ -143,7 +143,13 @@ ...@@ -143,7 +143,13 @@
</div> </div>
</div> </div>
@else @else
<a class="btn btn-success " href="{{route('trabalho.index',['id'=>$evento->id])}}" style="width:100%; height:50px; padding-top:7px; font-size:20px"><img src="{{asset('img/icons/icon_enviar_proposta.png')}}" class="card-img-top" alt="..." style="width:30px; margin-right:5px"> Submeter proposta</a> {{-- @if(empty($evento->trabalho->arquivo->relatorioFinal))
<a class="btn btn-success" style="width:100%; height:50px; padding-top:7px; font-size:20px" onclick="modalSubmeterProposta()">
<img src="{{asset('img/icons/icon_enviar_proposta.png')}}" class="card-img-top" alt="..." style="width:30px; margin-right:5px"> Submeter proposta</a>
@else --}}
<a class="btn btn-success" href="{{route('trabalho.index',['id'=>$evento->id])}}" style="width:100%; height:50px; padding-top:7px; font-size:20px">
<img src="{{asset('img/icons/icon_enviar_proposta.png')}}" class="card-img-top" alt="..." style="width:30px; margin-right:5px"> Submeter proposta</a>
{{-- @endif --}}
@endif @endif
</div> </div>
@endif @endif
...@@ -259,26 +265,25 @@ ...@@ -259,26 +265,25 @@
<div class="col-md-12"> <div class="col-md-12">
@if($evento->modeloDocumento != null) @if($evento->modeloDocumento != null)
<div class="d-flex justify-content-left align-items-center" style="margin-bottom: -15px"> <div class="d-flex justify-content-left align-items-center" style="margin-bottom: -15px">
<div style="margin-right:10px; margin-top:-15px"> <div style="margin-right:10px; margin-top:-15px">
<img class="" src="{{asset('img/icons/icon_modelo.png')}}" alt="" width="40px"> <img class="" src="{{asset('img/icons/icon_modelo.png')}}" alt="" width="40px">
</div> </div>
<div class="form-group" style="width: 100%"> <div class="form-group" style="width: 100%">
<div class="d-flex justify-content-between" style="width: 100%"> <div class="d-flex justify-content-between" style="width: 100%">
<div><h5 style=" font-size:17px; margin-top:9px">Outros<br>documentos</h5></div> <div><h5 style=" font-size:17px; margin-top:9px">Outros<br>documentos</h5></div>
<div> <div>
<a class="btn btn-light" href="{{route('baixar.modelos', ['id' => $evento->id])}}" target="_new" style="" > <a class="btn btn-light" href="{{route('baixar.modelos', ['id' => $evento->id])}}" target="_new" style="" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px"><br> <img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px"><br>
Baixar</a> Baixar</a>
</div> </div>
</div>
</div>
</div> </div>
</div>
</div>
@else @else
<h6 style="color: #909090">O criador do edital não disponibilizou modelos</h6> <h6 style="color: #909090">O criador do edital não disponibilizou modelos</h6>
@endif @endif
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -325,5 +330,10 @@ ...@@ -325,5 +330,10 @@
function changeTrabalho(x){ function changeTrabalho(x){
document.getElementById('trabalhoNovaVersaoId').value = x; document.getElementById('trabalhoNovaVersaoId').value = x;
} }
// function modalSubmeterProposta(){
// return alert("Usuário impossibilitado de submeter proposta à não inadimplência com um edital anterior!");
// }
</script> </script>
@endsection @endsection
...@@ -285,11 +285,11 @@ ...@@ -285,11 +285,11 @@
<div class="col-sm-4 form-group" style="margin-top: 0.5rem; color:#909090"> <div class="col-sm-4 form-group" style="margin-top: 0.5rem; color:#909090">
<div style="margin-top: 5px; margin-bottom:5px">Desenvolvido por:</div> <div style="margin-top: 5px; margin-bottom:5px">Desenvolvido por:</div>
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-sm-5" style="margin-right: 0.5rem;"> <div class="col-sm-5" style="margin-right: 0.8rem;">
<a href="http://ufape.edu.br/" target="_blank"><img src="{{ asset('img\icons\Logo_UFAPE_Colorida_com_Lettering.png') }}" alt="Logo" width="170px;" style="margin-right: 0.5rem;"></a> <a href="http://ufape.edu.br/" target="_blank"><img src="{{ asset('img\icons\Logo_UFAPE_Colorida_com_Lettering.png') }}" alt="Logo" width="160px;"></a>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5" style="margin-top: 10px;">
<a href="http://lmts.uag.ufrpe.br/" target="_blank"><img src="{{ asset('img/icons/logo_ufape_color.png') }}" alt="Logo" width="160px;"></a> <a href="http://lmts.uag.ufrpe.br/" target="_blank"><img src="{{ asset('img/icons/logo_ufape_color.png') }}" alt="Logo" width="155px;"></a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
<button id="submeterFormProposta" type="submit" style="display: none;"></button> <button id="submeterFormProposta" type="submit" style="display: none;"></button>
<a href="{{ route('proponente.projetosEdital', ['id' => $edital->id])}}" class="btn btn-secondary">Cancelar</a> <a href="{{ route('proponente.projetosEdital', ['id' => $edital->id])}}" class="btn btn-secondary">Cancelar</a>
@if(Auth::user()->tipo != 'administrador') <!-- @if(Auth::user()->tipo != 'administrador')
<button type="submit" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button> <button type="submit" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button>
@endif @endif -->
<button type="submit" class="btn btn-success" id="idButtonSubmitProjeto" >{{ __('Submeter projeto') }}</button> <button type="submit" class="btn btn-success" id="idButtonSubmitProjeto" >{{ __('Submeter projeto') }}</button>
</div> </div>
@if($errors->any()) @if($errors->any())
......
...@@ -272,6 +272,7 @@ ...@@ -272,6 +272,7 @@
if(<?php echo json_encode($trabalho_user) ?>['funcao']){ if(<?php echo json_encode($trabalho_user) ?>['funcao']){
modal_id += 1; modal_id += 1;
document.getElementById("quantidadeModais").value = modal_id;
} }
$('#integrante').append(` $('#integrante').append(`
......
...@@ -105,27 +105,29 @@ ...@@ -105,27 +105,29 @@
<script> <script>
let radio_sim = document.getElementById("radioSim");
if(document.getElementById("radioSim").checked){ if(radio_sim){
document.getElementById("radioSim").checked = true; if(radio_sim.checked){
document.getElementById("radioNao").checked = false; document.getElementById("radioSim").checked = true;
document.getElementById("displaySim").style.display = "block"; document.getElementById("radioNao").checked = false;
document.getElementById("displayNao").style.display = "none"; document.getElementById("displaySim").style.display = "block";
document.getElementById("idAvisoAutorizacaoEspecial").style.display = "none"; document.getElementById("displayNao").style.display = "none";
}else{ document.getElementById("idAvisoAutorizacaoEspecial").style.display = "none";
document.getElementById("radioSim").checked = false; }else{
document.getElementById("radioNao").checked = true; document.getElementById("radioSim").checked = false;
document.getElementById("displaySim").style.display = "none"; document.getElementById("radioNao").checked = true;
document.getElementById("displayNao").style.display = "block"; document.getElementById("displaySim").style.display = "none";
document.getElementById("idAvisoAutorizacaoEspecial").style.display = "none"; document.getElementById("displayNao").style.display = "block";
document.getElementById("idAvisoAutorizacaoEspecial").style.display = "none";
}
} }
let buttonSubmit = document.getElementById('idButtonSubmitProjeto'); let buttonSubmit = document.getElementById('idButtonSubmitProjeto');
let buttonRascunho = document.getElementById('idButtonSubmitRascunho'); let buttonRascunho = document.getElementById('idButtonSubmitRascunho');
@if($edital->numParticipantes != 0) @if($edital->numParticipantes != 0)
let parts = document.getElementById('participante'); let parts = document.getElementById('participante');
let partsFirst = document.getElementById('participanteFirst'); //let partsFirst = document.getElementById('participanteFirst');
const participante = partsFirst.firstElementChild; //const participante = partsFirst.firstElementChild;
@endif @endif
let contador = 0; let contador = 0;
...@@ -138,6 +140,7 @@ ...@@ -138,6 +140,7 @@
const input = '<input id="input_rascunho" type="hidden" name="rascunho" value="true">'; const input = '<input id="input_rascunho" type="hidden" name="rascunho" value="true">';
$("#updateProjetoForm").append(input); $("#updateProjetoForm").append(input);
}) })
@if($edital->numParticipantes != 0) @if($edital->numParticipantes != 0)
function gerarPeriodo(e){ function gerarPeriodo(e){
var select = e.parentElement.parentElement.nextElementSibling; var select = e.parentElement.parentElement.nextElementSibling;
...@@ -172,57 +175,57 @@ ...@@ -172,57 +175,57 @@
} }
}; };
$("input.cpf:text").mask("000.000.000-00"); //$("input.cpf:text").mask("000.000.000-00");
$("input.celular:text").mask(SPMaskBehavior, spOptions); //$("input.celular:text").mask(SPMaskBehavior, spOptions);
$("input.cep:text").mask("00000-000"); //$("input.cep:text").mask("00000-000");
buttonMais.addEventListener("click", (e) => { // buttonMais.addEventListener("click", (e) => {
if(parts.children.length >= "{{ $edital->numParticipantes }}"){ // if(parts.children.length >= "{{ $edital->numParticipantes }}"){
alert('Limite de participante.') // alert('Limite de participante.')
}else{ // }else{
contador++; // contador++;
var cln = participante.cloneNode(true); // var cln = participante.cloneNode(true);
cln.setAttribute('style', " "); // cln.setAttribute('style', " ");
var id = cln.children[2].firstElementChild.id; // var id = cln.children[2].firstElementChild.id;
var id2 = cln.children[0].firstElementChild.id; // var id2 = cln.children[0].firstElementChild.id;
cln.children[2].firstElementChild.setAttribute('id', id + contador); // cln.children[2].firstElementChild.setAttribute('id', id + contador);
cln.children[0].firstElementChild.setAttribute('href', "#collapseParticipante" + contador); // cln.children[0].firstElementChild.setAttribute('href', "#collapseParticipante" + contador);
cln.children[0].firstElementChild.setAttribute('id', id2 + contador); // cln.children[0].firstElementChild.setAttribute('id', id2 + contador);
for (i = 0; i < cln.children.length; i++) { // for (i = 0; i < cln.children.length; i++) {
for (let index = 0; index < cln.children[i].querySelectorAll('input').length; index++) { // for (let index = 0; index < cln.children[i].querySelectorAll('input').length; index++) {
let input = cln.children[i].querySelectorAll('input')[index]; // let input = cln.children[i].querySelectorAll('input')[index];
let name = input.getAttributeNode("name").value; // let name = input.getAttributeNode("name").value;
name = name.replace("[]", ""); // name = name.replace("[]", "");
input.getAttributeNode("name").value = name + '['+ contador +']'; // input.getAttributeNode("name").value = name + '['+ contador +']';
let select = cln.children[i].querySelectorAll('select')[index]; // let select = cln.children[i].querySelectorAll('select')[index];
if(select){ // if(select){
let selectName = select.getAttributeNode("name").value; // let selectName = select.getAttributeNode("name").value;
selectName = selectName.replace("[", ""); // selectName = selectName.replace("[", "");
selectName = selectName.replace("]", ""); // selectName = selectName.replace("]", "");
select.getAttributeNode("name").value = selectName + '['+ contador +']'; // select.getAttributeNode("name").value = selectName + '['+ contador +']';
} // }
} // }
} // }
var SPMaskBehavior = function (val) { // var SPMaskBehavior = function (val) {
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; // return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
}, // },
spOptions = { // spOptions = {
onKeyPress: function(val, e, field, options) { // onKeyPress: function(val, e, field, options) {
field.mask(SPMaskBehavior.apply({}, arguments), options); // field.mask(SPMaskBehavior.apply({}, arguments), options);
} // }
}; // };
parts.appendChild(cln); // parts.appendChild(cln);
$("input.cpf:text").val("").mask("000.000.000-00"); // $("input.cpf:text").val("").mask("000.000.000-00");
$("input.celular:text").val("").mask(SPMaskBehavior, spOptions); // $("input.celular:text").val("").mask(SPMaskBehavior, spOptions);
$("input.cep:text").val("").mask("00000-000"); // $("input.cep:text").val("").mask("00000-000");
} // }
}); // });
function marcar(id){ function marcar(id){
let nome = document.getElementById("nome"+id); let nome = document.getElementById("nome"+id);
...@@ -257,6 +260,8 @@ ...@@ -257,6 +260,8 @@
document.getElementById("checkB"+id).checked = true; document.getElementById("checkB"+id).checked = true;
// $("#atribuir1").attr('data-target','#exampleModal'+(id+1)); // $("#atribuir1").attr('data-target','#exampleModal'+(id+1));
modal_id += 1; modal_id += 1;
document.getElementById("quantidadeModais").value = modal_id;
document.getElementById("part"+id).removeAttribute("hidden"); document.getElementById("part"+id).removeAttribute("hidden");
// document.getElementById("exampleModal"+id).modal('hide'); // document.getElementById("exampleModal"+id).modal('hide');
} }
...@@ -271,6 +276,7 @@ ...@@ -271,6 +276,7 @@
// $("#atribuir1").attr('data-target','#exampleModal'+(id)); // $("#atribuir1").attr('data-target','#exampleModal'+(id));
// document.getElementById("exampleModal"+id).modal('hide'); // document.getElementById("exampleModal"+id).modal('hide');
modal_id -= 1; modal_id -= 1;
document.getElementById("quantidadeModais").value = modal_id;
console.log(modal_id); console.log(modal_id);
} }
@endif @endif
......
...@@ -69,6 +69,13 @@ ...@@ -69,6 +69,13 @@
</div> </div>
@endif @endif
@if($edital->tipo == 'PIBIC' && $edital->natureza_id == 2)
<div class="col-sm-4">
<label title="Decisão da Câmara ou Conselho Pertinente" for="anexo_acao_afirmativa" class="col-form-label font-tam" style="font-weight: bold">{{ __('Ação Afirmativa: ') }}</label>
<a href="{{ route('baixar.anexo.acao.afirmativa', ['id' => $projeto->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div>
@endif
@if($edital->nome_docExtra != null) @if($edital->nome_docExtra != null)
{{-- Documento Extra --}} {{-- Documento Extra --}}
<div class="col-sm-4"> <div class="col-sm-4">
......
...@@ -13,24 +13,25 @@ ...@@ -13,24 +13,25 @@
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
<div class="row justify-content-start" style="alignment: center"> <div class="row justify-content-start" style="alignment: center">
@foreach($trabalhos_user as $trabalho_user) @foreach($projeto->participantes as $participante)
<div class="col-sm-1 mt-4"> <div class="col-sm-1 mt-4">
<img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt=""> <img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt="">
</div> </div>
<div class="col-sm-5 mt-4"> <div class="col-sm-5 mt-4">
<h5 class="mb-0">Nome: {{ $trabalho_user->user->name }}</h5> <h5 class="mb-0">Nome: {{$participante->user->name}}</h5>
<h5 class="mb-0">Função: {{ $trabalho_user->funcao->nome }}</h5> <h5 class="mb-0">Plano: @if(isset($participante->planoTrabalho)) {{$participante->planoTrabalho->titulo}} @else Plano Em Substituição @endif </h5>
<h6> <h6>
<a href="" data-toggle="modal" data-target="#modalVizuIntegrante{{$trabalho_user->id}}" class="button">Informações</a> <a href="" data-toggle="modal" data-target="#modalVizuParticipante{{$participante->id}}" class="button">Informações</a>
</h6> </h6>
</div> </div>
<div class="modal fade" id="modalVizuIntegrante{{$trabalho_user->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <!-- Modal visualizar informações participante -->
<div class="modal fade" id="modalVizuParticipante{{$participante->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl"> <div class="modal-dialog modal-dialog-centered modal-xl">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="overflow-x:auto; padding-left: 31px"> <div class="modal-header" style="overflow-x:auto; padding-left: 31px">
<h5 class="modal-title" id="exampleModalLabel" style= "color:#1492E6">Informações Integrante</h5> <h5 class="modal-title" id="exampleModalLabel" style= "color:#1492E6">Informações Participante</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="padding-top: 8px; color:#1492E6"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="padding-top: 8px; color:#1492E6">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
...@@ -38,22 +39,183 @@ ...@@ -38,22 +39,183 @@
</div> </div>
<div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;"> <div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;">
<div class="container-fluid">
<div class="col-sm-5 mt-4"> <div class="row">
<h5 class="mb-0">Nome: {{ $trabalho_user->user->name }}</h5> <div class="col-6">
<h5 class="mb-0">E-mail: {{ $trabalho_user->user->email }}</h5> @component('componentes.input', ['label' => 'Nome completo'])
<h5 class="mb-0">Instituição: {{ $trabalho_user->user->instituicao }}</h5> <input type="text" class="form-control " value="{{$participante->user->name}}" name="name" placeholder="Nome Completo" maxlength="150" id="nome{{$participante->id}}" disabled />
<h5 class="mb-0">Cargo no projeto: {{ $trabalho_user->funcao->nome }}</h5> @endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'E-mail'])
<input type="email" class="form-control" value="{{$participante->user->email}}" name="email" placeholder="E-mail" maxlength="150" id="email{{$participante->id}}" disabled />
@endcomponent
</div> </div>
</div> </div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Data de nascimento'])
<input type="date" class="form-control" value="{{$participante->data_de_nascimento}}" name="data_de_nascimento" placeholder="Data de nascimento" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'CPF'])
<input type="text" class="form-control cpf" value="{{$participante->user->cpf}}" name="cpf" placeholder="CPF" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'RG'])
<input type="text" class="form-control" min="1" maxlength="12" value="{{$participante->rg}}" name="rg" placeholder="RG" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Celular'])
<input type="tel" class="form-control celular" value="{{$participante->user->celular}}" name="celular" placeholder="Celular" id="inputCelular" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5 style="font-weight: bold;">Endereço</h5>
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'CEP'])
<input type="text" class="form-control cep" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->cep}} @endif" name="cep" placeholder="CEP" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.select', ['label' => 'Estado'])
<select name="uf" id="estado" class="form-control" style="visibility: visible" disabled>
<option value="@if(isset($participante->user->endereco)) {{$participante->user->endereco->uf}} @endif" selected>@if(isset($participante->user->endereco)) {{$participante->user->endereco->uf}} @endif</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Cidade'])
<input type="text" class="form-control" value=" @if(isset($participante->user->endereco)){{$participante->user->endereco->cidade}} @endif" name="cidade" placeholder="Cidade" maxlength="50" id="cidade{{$participante->id}}" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Bairro'])
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->bairro}} @endif" name="bairro" placeholder="Bairro" maxlength="50" id="bairro{{$participante->id}}" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Rua'])
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)) {{ $participante->user->endereco->rua}} @endif" name="rua" placeholder="Rua" maxlength="100" id="rua{{$participante->id}}" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Número'])
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->numero}} @endif" name="numero" placeholder="Número" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-12">
<div class="form-group">
<label class=" control-label" for="firstname">Complemento</label>
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{ $participante->user->endereco->complemento}} @endif" name="complemento" placeholder="Complemento" maxlength="75" id="complemento{{$participante->id}}" disabled />
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5 style="font-weight: bold;">Dados do curso</h5>
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Instituição de Ensino'])
<select style="display: inline" onchange="showInstituicao(this)" class="form-control" name="instituicao" id="instituicao[{{$participante->id}}]" disabled>
<option value="{{$participante->user->instituicao}}" disabled selected hidden>{{$participante->user->instituicao}}</option>
</select>
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Curso'])
<select style="display: inline" class="form-control" name="curso" onchange="showCurso(this)" id="curso[{{$participante->id}}]" disabled>
<option value="{{$participante->curso}}" disabled selected hidden>{{$participante->curso}}</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.select', ['label' => 'Turno'])
<select name="turno" class="form-control" disabled>
<option value="{{$participante->turno}}" selected>{{$participante->turno}}</option>
</select>
@endcomponent
</div>
<div class="col-6">
@component('componentes.select', ['label' => 'Total de períodos/anos do curso'])
<select name="total_periodos" class="form-control" onchange="gerarPeriodo(this)" disabled>
<option value="{{$participante->total_periodos}}" selected>{{$participante->total_periodos}}</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.select', ['label' => 'Período/Ano atual'])
<select name="periodo_atual" class="form-control" disabled>
<option value="{{$participante->periodo_atual}}" selected>{{$participante->periodo_atual}}</option>
</select>
@endcomponent
</div>
<div class="col-6">
@component('componentes.select', ['label' => 'Ordem de prioridade'])
<select name="ordem_prioridade" class="form-control" disabled>
<option value="{{$participante->ordem_prioridade}}" selected>{{$participante->ordem_prioridade}}</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5 style="font-weight: bold;">Plano de trabalho</h5>
</div>
</div>
<div class="row justify-content-center">
@if($participante->planoTrabalho)
<div class="col-6">
<h6>{{$participante->planoTrabalho->titulo}}</h6>
</div>
<div class="col-6">
<a href="{{ route('baixar.plano', ['id' => $participante->planoTrabalho->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@endforeach @endforeach
</div> </div>
</div> </div>
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
</div> </div>
<div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;"> <div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;">
@include('administrador.substituirParticipanteForm', ['visualizarOnly' => 1,'trabalho' => $projeto])
</div> </div>
</div> </div>
</div> </div>
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
--}} --}}
<!-- Button trigger modal --> <!-- Button trigger modal -->
@if(($projeto->status == "rascunho") || ($projeto->evento->fimSubmissao > $hoje)) @if(($projeto->status == "rascunho") || ($projeto->evento->fimSubmissao >= $hoje))
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col text-center" style="margin-left: 20px"> <div class="col text-center" style="margin-left: 20px">
......
This diff is collapsed.
This diff is collapsed.
...@@ -212,6 +212,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () { ...@@ -212,6 +212,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () {
//########## Rotas de download de documentos ########################### //########## Rotas de download de documentos ###########################
Route::get('/baixar/anexo-projeto/{id}', 'TrabalhoController@baixarAnexoProjeto')->name('baixar.anexo.projeto'); Route::get('/baixar/anexo-projeto/{id}', 'TrabalhoController@baixarAnexoProjeto')->name('baixar.anexo.projeto');
Route::get('/baixar/anexo-consu/{id}', 'TrabalhoController@baixarAnexoConsu')->name('baixar.anexo.consu'); Route::get('/baixar/anexo-consu/{id}', 'TrabalhoController@baixarAnexoConsu')->name('baixar.anexo.consu');
Route::get('/baixar/anexo-acao-afirmativa/{id}', 'TrabalhoController@baixarAcaoAfirmativa')->name('baixar.anexo.acao.afirmativa');
Route::get('/baixar/anexo-comite/{id}', 'TrabalhoController@baixarAnexoComite')->name('baixar.anexo.comite'); Route::get('/baixar/anexo-comite/{id}', 'TrabalhoController@baixarAnexoComite')->name('baixar.anexo.comite');
Route::get('/baixar/anexo-justificativa/{id}', 'TrabalhoController@baixarAnexoJustificativa')->name('baixar.anexo.justificativa'); Route::get('/baixar/anexo-justificativa/{id}', 'TrabalhoController@baixarAnexoJustificativa')->name('baixar.anexo.justificativa');
Route::get('/baixar/anexo-lattes/{id}', 'TrabalhoController@baixarAnexoLattes')->name('baixar.anexo.lattes'); Route::get('/baixar/anexo-lattes/{id}', 'TrabalhoController@baixarAnexoLattes')->name('baixar.anexo.lattes');
...@@ -220,6 +221,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () { ...@@ -220,6 +221,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () {
Route::get('/baixar/anexoGrupoPesquisa/{id}', 'TrabalhoController@baixarAnexoGrupoPesquisa')->name('baixar.anexoGrupoPesquisa'); Route::get('/baixar/anexoGrupoPesquisa/{id}', 'TrabalhoController@baixarAnexoGrupoPesquisa')->name('baixar.anexoGrupoPesquisa');
Route::get('/baixar/anexo-temp/{eventoId}/{nomeAnexo}', 'TrabalhoController@baixarAnexoTemp')->name('baixar.anexo.temp'); Route::get('/baixar/anexo-temp/{eventoId}/{nomeAnexo}', 'TrabalhoController@baixarAnexoTemp')->name('baixar.anexo.temp');
Route::get('/baixar/evento-temp/{nomeAnexo}', 'TrabalhoController@baixarEventoTemp')->name('baixar.evento.temp'); Route::get('/baixar/evento-temp/{nomeAnexo}', 'TrabalhoController@baixarEventoTemp')->name('baixar.evento.temp');
Route::get('/baixar/modelo-evento-temp/{nomeAnexo}', 'TrabalhoController@baixarModeloEventoTemp')->name('baixar.modelo.evento.temp');
Route::get('/baixar/documentosParticipante', 'ParticipanteController@baixarDocumento')->name('baixar.documentosParticipante'); Route::get('/baixar/documentosParticipante', 'ParticipanteController@baixarDocumento')->name('baixar.documentosParticipante');
Route::get('/baixar/anexoDocExtra/{id}', 'TrabalhoController@baixarAnexoDocExtra')->name('baixar.anexo.docExtra'); Route::get('/baixar/anexoDocExtra/{id}', 'TrabalhoController@baixarAnexoDocExtra')->name('baixar.anexo.docExtra');
Route::get('/baixar/anexoSIPAC/{id}', 'TrabalhoController@baixarAnexoSIPAC')->name('baixar.anexo.SIPAC'); Route::get('/baixar/anexoSIPAC/{id}', 'TrabalhoController@baixarAnexoSIPAC')->name('baixar.anexo.SIPAC');
...@@ -323,7 +325,7 @@ Route::prefix('cursos')->name('cursos.')->group(function (){ ...@@ -323,7 +325,7 @@ Route::prefix('cursos')->name('cursos.')->group(function (){
//############ Evento ############################################## //############ Evento ##############################################
Route::prefix('evento')->name('evento.')->group(function () { Route::prefix('evento')->name('evento.')->group(function () {
Route::get('/criar', 'EventoController@create')->name('criar')->middleware('checkRoles:coordenador,administrador'); Route::get('/criar', 'EventoController@create')->name('criar')->middleware('checkRoles:coordenador,administrador');
Route::post('/criar', 'EventoController@store')->name('criar')->middleware('checkRoles:coordenador,checkAdministrador'); Route::post('/criar', 'EventoController@store')->name('criar')->middleware('checkRoles:coordenador,administrador');
Route::get('/visualizar/{id}', 'EventoController@show')->name('visualizar')->middleware('auth'); Route::get('/visualizar/{id}', 'EventoController@show')->name('visualizar')->middleware('auth');
Route::get('/listar', 'EventoController@listar')->name('listar')->middleware('auth'); Route::get('/listar', 'EventoController@listar')->name('listar')->middleware('auth');
Route::delete('/excluir/{id}', 'EventoController@destroy')->name('deletar')->middleware('checkRoles:coordenador,administrador'); Route::delete('/excluir/{id}', 'EventoController@destroy')->name('deletar')->middleware('checkRoles:coordenador,administrador');
......
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