-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenderer.js
More file actions
36 lines (29 loc) · 1.15 KB
/
renderer.js
File metadata and controls
36 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
let caminhoPlanilha = null;
async function selecionarPlanilha() {
caminhoPlanilha = await window.api.selecionarPlanilha();
if (caminhoPlanilha) {
document.getElementById("arquivo").innerText = "Planilha Selecionada!";
document.getElementById("arquivo").classList.remove("d-none");
document.getElementById("arquivo").classList.add("d-flex");
document.getElementById("arquivo").hidden = false;
}
}
async function processar() {
if (!caminhoPlanilha) {
alert("Selecione a planilha primeiro");
return;
}
const dados = {
cpf: document.getElementById("cpf").value,
senha: document.getElementById("senha").value,
turma: document.getElementById("turma").value,
disciplina: document.getElementById("disciplina").value,
mes: document.getElementById("mes").value,
caminhoArquivo: caminhoPlanilha
};
document.getElementById("formu").style.display = "none";
document.getElementById("load").hidden = false;
await window.api.processarPlanilha(dados);
document.getElementById("arquivo").innerText = "Processando Informações da planilha";
await window.api.iniciarAutomacao(dados);
}