Commit 86bb1dab authored by Thiago Cavalcanti's avatar Thiago Cavalcanti
Browse files

Ajustadas informacoes do integrante ao ser inserido na proposta

parent d98ebd87
...@@ -221,29 +221,14 @@ ...@@ -221,29 +221,14 @@
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);
let curso = document.getElementById("curso"+id);
//pega o nome da função do participante
for (var i = 0; i < funcaoParticipantes.length; i++) {
if(funcaoParticipantes[i].id == funcao.value){
nome_funcao = funcaoParticipantes[i].nome;
break;
}
}
if(nome.value != ""){ if(nome.value != ""){
estudante.value = true; estudante.value = true;
if(planoTrabalho != null && planoTrabalho.value != ""){ nomePlano.innerHTML = exibirInformacoesGeraisDoIntegrante(nome.value, email.value, celular.value, curso, nome_funcao);
nomePlano.innerHTML = ` <strong>Nome: </strong>${nome.value}<br> if (nome_funcao == "Bolsista") {
<strong>E-mail: </strong>${email.value} <br> nomePlano.innerHTML += `<br><strong>Plano: </strong>${planoTrabalho.value !== null ? planoTrabalho.value : ''}`;
<strong>Plano: </strong>${planoTrabalho.value}<br> }
<strong>CPF: </strong>${cpf.value} <br>
<strong>Função: </strong>${nome_funcao}`;
}else {
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>${nome_funcao}`;
}
}else if(data != null) { }else if(data != null) {
estudante.value = false; estudante.value = false;
...@@ -252,11 +237,9 @@ ...@@ -252,11 +237,9 @@
instituicao.value = data[0].instituicao; instituicao.value = data[0].instituicao;
cpf.value = data[0].cpf; cpf.value = data[0].cpf;
celular.value = data[0].celular; celular.value = data[0].celular;
nome_funcao = data[1].nome;
nomePlano.innerHTML = ` <strong>Nome: </strong>${nome.value}<br> curso = data[2].curso;
<strong>E-mail: </strong>${email.value} <br> nomePlano.innerHTML = exibirInformacoesGeraisDoIntegrante(nome.value, email.value, celular.value, curso, nome_funcao);
<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);
...@@ -268,10 +251,16 @@ ...@@ -268,10 +251,16 @@
document.getElementById("quantidadeModais").value = modal_id; 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');
}
function exibirInformacoesGeraisDoIntegrante(nome, email, celular, curso, nomeFuncao) {
return `<strong>Nome: </strong>${nome}<br>
<strong>E-mail: </strong>${email}<br>
<strong>Telefone: </strong>${celular !== null ? celular : ''}<br>
<strong>Curso: </strong>${curso !== null ? curso : ''}<br>
<strong>Função: </strong>${nomeFuncao}`;
} }
function desmarcar(id){ function desmarcar(id){
if(id >= 1){; if(id >= 1){;
document.getElementById("cancelar"+(id-1)).removeAttribute("disabled"); document.getElementById("cancelar"+(id-1)).removeAttribute("disabled");
......
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