Commit 91af7454 authored by unknown's avatar unknown
Browse files

Correção na parte de adição dos integrantes aos projetos

parent 11e7777e
......@@ -52,30 +52,21 @@
<label for="funcao_participante">Função do Integrante:</label>
<select name="" id="funcao_participante" class="form-control">
@foreach($funcaoParticipantes as $funcao)
@if($funcao->nome == 'Bolsista')
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif
<!--
Ajuste temporário para permitir apenas bolsistas
@if($edital->natureza_id == 3)
@if($edital->tipo == "CONTINUO" && $funcao->nome != 'Bolsista')
<!-- EXTENSÃO -->
@if($edital->natureza_id == 3 && $edital->tipo == "CONTINUO")
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@elseif($funcao->nome != "Consultor" && $funcao->nome != "Pesquisador" && $funcao->nome != "Voluntário")
@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>
@endif
<!-- PESQUISA -->
@else
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@if($funcao->nome == "Bolsista" || $funcao->nome == "Voluntário")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif
@endif
-->
@endforeach
</select>
</div>
......@@ -232,75 +223,53 @@
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", "");
}
//if (data?.[3]?.cpf) {
document.getElementById(`cpf${modal_id}`).value = data[0]['cpf'];
document.getElementById(`cpf${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.rg) {
document.getElementById(`rg${modal_id}`).value = data[2]['rg'];
document.getElementById(`rg${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.celular) {
document.getElementById(`celular${modal_id}`).value = data[0]['celular'];
document.getElementById(`celular${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.cep) {
document.getElementById(`cep${modal_id}`).value = data[3].cep;
document.getElementById(`cep${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.cep) {
document.getElementById(`cep${modal_id}`).value = data[3].cep;
document.getElementById(`cep${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.uf) {
document.getElementById(`uf${modal_id}`).value = data[3].uf;
document.getElementById(`uf${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.cidade) {
document.getElementById(`cidade${modal_id}`).value = data[3].cidade;
document.getElementById(`cidade${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.bairro) {
document.getElementById(`bairro${modal_id}`).value = data[3].bairro;
document.getElementById(`bairro${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.rua) {
document.getElementById(`rua${modal_id}`).value = data[3].rua;
document.getElementById(`rua${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.numero) {
document.getElementById(`numero${modal_id}`).value = data[3].numero;
document.getElementById(`numero${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[3]?.complemento) {
document.getElementById(`complemento${modal_id}`).value = data[3].complemento;
document.getElementById(`complemento${modal_id}`).setAttribute("readonly", "");
//}
//if (data?.[0]?.instituicao) {
if (data?.[2]?.rg) {
document.getElementById(`rg${modal_id}`).value = data[2]['rg'];
document.getElementById(`rg${modal_id}`).setAttribute("readonly", "");
}
if (data?.[0]?.celular) {
document.getElementById(`celular${modal_id}`).value = data[0]['celular'];
document.getElementById(`celular${modal_id}`).setAttribute("readonly", "");
}
if (data[3] != null) {
document.getElementById(`cep${modal_id}`).value = data[3].cep;
document.getElementById(`cep${modal_id}`).setAttribute("readonly", "");
document.getElementById(`uf${modal_id}`).value = data[3].uf;
document.getElementById(`uf${modal_id}`).setAttribute("readonly", "");
document.getElementById(`cidade${modal_id}`).value = data[3].cidade;
document.getElementById(`cidade${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(`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}]`).setAttribute("readonly", "");
//
//if (data?.[2]?.curso) {
document.getElementById(`curso[${modal_id}]`).value = data[2].curso;
document.getElementById(`curso[${modal_id}]`).setAttribute("readonly", "");
//}
console.log(document.getElementById(`funcaoParticipante${modal_id}`));
document.getElementById(`funcaoParticipante${modal_id}`).value = data[1]['nome'];
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-nome${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-anexo${modal_id}`).setAttribute('hidden', "");
......
......@@ -360,7 +360,7 @@
@endif
<div style="display: block" @if(old('funcaoParticipante') == null || !array_key_exists($i, old('funcaoParticipante')) || old('funcaoParticipante')[$i] == 'Bolsista') @else hidden @endif>
@if($edital->tipo != "CONTINUO")
<div class="col-md-12" id="plano-titulo{{$i}}">
<h5>Plano de trabalho</h5>
</div>
......@@ -391,7 +391,7 @@
@enderror
@endcomponent
</div>
@endif
</div>
{{-- <div class="col-6">
......
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