This file contains 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
<!--/** | |
* Copyright 2023 Prof. Ms. Ricardo Leme All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
https://drive.google.com/drive/folders/1xsBzRWdFWaO3fDsHQrew1yZy56gXleRr?usp=sharing |
This file contains 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 formatarRG(campo) { | |
// Remove caracteres não numéricos | |
var rg = campo.value.replace(/\D/g, ''); | |
// Adiciona pontos e traço conforme o usuário digita | |
rg = rg.replace(/(\d{2})(\d)/, '$1.$2'); | |
rg = rg.replace(/(\d{3})(\d)/, '$1.$2'); | |
rg = rg.replace(/(\d{3})(\d{1,2})$/, '$1-$2'); | |
// Verifica se o último dígito é X e adiciona a string de retorno |
This file contains 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
/** | |
* errors. | |
* Constante com a tradução em pt-BR dos principais erros de autenticação | |
**/ | |
const errors = { | |
'auth/app-deleted': 'O banco de dados não foi localizado.', | |
'auth/expired-action-code': 'O código da ação o ou link expirou.', | |
'auth/invalid-action-code': 'O código da ação é inválido. Isso pode acontecer se o código estiver malformado ou já tiver sido usado.', | |
'auth/user-disabled': 'O usuário correspondente à credencial fornecida foi desativado.', |
This file contains 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
[ | |
{ | |
"codigo_ibge" : 5200050, | |
"nome" : "Abadia de Goiás", | |
"latitude" : -16.7573, | |
"longitude" : -49.4412, | |
"capital" : false, | |
"codigo_uf" : 52 | |
}, | |
{ |
This file contains 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
[ | |
{ | |
"codigo_uf": 11, | |
"uf": "RO", | |
"nome": "Rondônia", | |
"latitude": -10.83, | |
"longitude": -63.34 | |
}, | |
{ | |
"codigo_uf": 12, |