diff --git a/resources/views/evento/submeterTrabalho.blade.php b/resources/views/evento/submeterTrabalho.blade.php index 2ac667c6e767d6e8772dab0646bf02115e092735..b23bcaf2cbac3492837b50ad203d9acb8b44133e 100755 --- a/resources/views/evento/submeterTrabalho.blade.php +++ b/resources/views/evento/submeterTrabalho.blade.php @@ -192,6 +192,20 @@ $("input.rg:text").mask('00.000.000-0'); + function get_funcao(id){ + let funcao = document.getElementById("funcao_participante"); + let fun_part = ; + let nome_funcao = ""; + fun_part.forEach(function(func, i){ + if(func.id == id){ + nome_funcao = func.nome; + } + + + }); + return nome_funcao; + } + function marcar(id){ let nome = document.getElementById("nome"+id); let linkNome = document.getElementById("nomePart"+(id+1)); @@ -204,7 +218,7 @@ let email = document.getElementById("email"+id); let funcaoParticipantes = ; - let nome_funcao = ""; + let nome_funcao = get_funcao(funcao.value); //pega o nome da função do participante for (var i = 0; i < funcaoParticipantes.length; i++) { @@ -214,19 +228,18 @@ } } - if(nome.value != ""){ if(planoTrabalho != null && planoTrabalho.value != ""){ nomePlano.innerHTML = `

Nome: ${nome.value}
E-mail: ${email.value}
Plano: ${planoTrabalho.value}
CPF: ${cpf.value}
- Função: ${funcaoParticipantes[funcao.value -1].nome}

`; + Função: ${nome_funcao}

`; }else { nomePlano.innerHTML = `

Nome: ${nome.value}
E-mail: ${email.value}
CPF: ${cpf.value}
- Função: ${funcaoParticipantes[funcao.value -1].nome}

`; + Função: ${nome_funcao}

`; } }else{ nomePlano.innerText = `Discente `+(id+1);