Painel Administrativo
Acesso liberado
Cadastro de Chapas
Chapas Cadastradas: 0
Controle de Alunos
Alunos Cadastrados: 0
Controles da Eleição
Estatísticas Atuais
Total de votos0
Alunos que votaram0
Chapas cadastradas0
Alunos cadastrados0
Sistema pronto para votação segura
URNA ELETRÔNICA
EMEF Eng. José Amadei – Eleição do Grêmio Estudantil
Alunos cadastrados
0
Chapas cadastradas
0
Votos registrados
0
ELEIÇÃO PARA GRÊMIO ESTUDANTIL
SISTEMA BLOQUEADO
Nenhum aluno foi cadastrado ainda.
Abra o painel administrativo, cadastre pelo menos um aluno e a votação será liberada automaticamente.
Escolha das chapas do Grêmio
Digite dois números para selecionar a chapa.
Confirme seu voto ou corrija.
Acesso Administrativo
Nenhuma chapa cadastrada.
';
return;
}chapas.forEach((chapa) => {
const item = document.createElement("div");
item.className = "chapa-item";
item.innerHTML = `
${escapeHtml(chapa.numero)} - ${escapeHtml(chapa.nome)}
`;
lista.appendChild(item);
});
}function atualizarListaAlunos() {
const alunos = obterAlunos().sort((a, b) => a.nome.localeCompare(b.nome, "pt-BR"));
const votos = obterVotos();
const lista = document.getElementById("listaAlunos");
document.getElementById("totalAlunosCadastrados").textContent = alunos.length;
lista.innerHTML = "";if (alunos.length === 0) {
lista.innerHTML = 'Nenhum aluno cadastrado.
';
return;
}alunos.forEach((aluno) => {
const jaVotou = votos.some((voto) => voto.numero.toLowerCase() === aluno.numero.toLowerCase());
const item = document.createElement("div");
item.className = "chapa-item";
item.innerHTML = `
${escapeHtml(aluno.numero)} - ${escapeHtml(aluno.nome)}
Turma: ${escapeHtml(aluno.turma)} | ${jaVotou ? "Votou" : "Não votou"}
`;
lista.appendChild(item);
});
}function atualizarEstatisticas() {
const votos = obterVotos();
const alunos = obterAlunos();
const chapas = obterChapas();
document.getElementById("totalVotosAdmin").textContent = votos.length;
document.getElementById("alunosVotaram").textContent = new Set(votos.map((voto) => voto.numero.toLowerCase())).size;
document.getElementById("totalChapasAdmin").textContent = chapas.length;
document.getElementById("totalAlunosAdmin").textContent = alunos.length;
document.getElementById("resumoAlunos").textContent = alunos.length;
document.getElementById("resumoChapas").textContent = chapas.length;
document.getElementById("resumoVotos").textContent = votos.length;
}window.addEventListener("load", async () => {
await inicializarSDKs();
controlarBotoesVotacao(false);document.addEventListener("keydown", (event) => {
if (event.key === "Escape" && document.getElementById("modalSenha").style.display === "flex") {
fecharModalSenha();
}if (!appState.eleitorAtual || appState.isProcessing) return;
if (/^\d$/.test(event.key) && !event.ctrlKey && !event.metaKey && !event.altKey) {
digitarNumero(event.key);
}
});document.getElementById("identificacaoEleitor").addEventListener("keydown", (event) => {
if (event.key === "Enter") verificarEleitor();
});document.getElementById("inputSenha").addEventListener("keydown", (event) => {
if (event.key === "Enter") verificarSenha();
});document.getElementById("numeroChapa").addEventListener("input", (event) => {
event.target.value = event.target.value.replace(/\D/g, "").slice(0, 2);
});document.getElementById("numeroAluno").addEventListener("input", (event) => {
event.target.value = event.target.value.replace(/[^\wÀ-ÿ.\- ]/g, "").slice(0, 6);
});document.getElementById("modalSenha").addEventListener("click", (event) => {
if (event.target.id === "modalSenha") {
fecharModalSenha();
}
});
});
Turma: ${escapeHtml(aluno.turma)} | ${jaVotou ? "Votou" : "Não votou"}