Commit de465bd9 authored by Yuri Resende's avatar Yuri Resende
Browse files

Corrigindo nome da função do integrante

parent d06b4784
...@@ -192,6 +192,20 @@ ...@@ -192,6 +192,20 @@
$("input.rg:text").mask('00.000.000-0'); $("input.rg:text").mask('00.000.000-0');
function get_funcao(id){
let funcao = document.getElementById("funcao_participante");
let fun_part = <?php echo json_encode($funcaoParticipantes); ?>;
let nome_funcao = "";
fun_part.forEach(function(func, i){
if(func.id == id){
nome_funcao = func.nome;
}
});
return nome_funcao;
}
function marcar(id){ function marcar(id){
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));
...@@ -204,7 +218,7 @@ ...@@ -204,7 +218,7 @@
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 = ""; let nome_funcao = get_funcao(funcao.value);
//pega o nome da função do participante //pega o nome da função do participante
for (var i = 0; i < funcaoParticipantes.length; i++) { for (var i = 0; i < funcaoParticipantes.length; i++) {
...@@ -214,19 +228,18 @@ ...@@ -214,19 +228,18 @@
} }
} }
if(nome.value != ""){ if(nome.value != ""){
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 = ` <p style='font-weight: normal; line-height: normal;'><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>${funcaoParticipantes[funcao.value -1].nome}</p>`; <strong>Função: </strong>${nome_funcao}</p>`;
}else { }else {
nomePlano.innerHTML = ` <p style='font-weight: normal; line-height: normal;'><strong>Nome: </strong>${nome.value}<br> nomePlano.innerHTML = ` <p style='font-weight: normal; line-height: normal;'><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>${funcaoParticipantes[funcao.value -1].nome}</p>`; <strong>Função: </strong>${nome_funcao}</p>`;
} }
}else{ }else{
nomePlano.innerText = `Discente `+(id+1); nomePlano.innerText = `Discente `+(id+1);
......
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