Created
March 23, 2021 20:55
-
-
Save guiszytko/d324c35705f23d78e273ddf0b38232c7 to your computer and use it in GitHub Desktop.
funçao recebendo undefined
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recuperaTipoEndereco(teste){ | |
debugger; | |
let tipoEnderecos = $('#tipoEndereco_hidden').val() | |
TIPOENDERECOS = JSON.parse(tipoEnderecos); | |
TIPOENDERECOS.map((v, index) => { | |
if (v.id == teste){ | |
return v.nome; | |
} | |
}); | |
return | |
}; | |
function montaTabelaEndereco() { | |
debugger; | |
let html = ""; | |
let teste = ""; | |
ENDERECOS.map((v, index) => { | |
recuperaTipoEndereco(v.tipoEnderecoID); | |
html += "<tr>"; | |
html += "<td>" + teste + "</td>"; | |
html += "<td>" + v.cep + "</td>"; | |
html += "<td>" + v.logradouro + "</td>"; | |
html += "<td>" + v.cidade + "-" + v.uf + "</td>"; | |
html += "<td><a href='#!' onclick='editar(\"" + index + "\");'>" + | |
"<i class='btn btn-orange500'>editar</i></a>" + | |
"<a href='#!' onclick='deleteEndereco(\"" + index + "\");'>" + | |
"<i class='btn btn-red'>Apagar</i></a></td>"; | |
html += "</tr>"; | |
}) | |
$('#tbody-endereco').html(html); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment