This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjavascript.js
198 lines (163 loc) · 8.31 KB
/
javascript.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/**
* Created by edion on 28/05/2017.
*/
$( document ).ready(function(){
$(".button-collapse").sideNav();
$('.modal').modal();
$('ul.tabs').tabs();
$('.tooltipped').tooltip({delay: 50});
});
$('.button-collapse').sideNav({
menuWidth: 210
});
function excluirTarefa(idDaLinha) {
const tabelaDeTarefas = document.getElementById("dados-de-tarefas");
const linhaASerApagada = document.getElementById(idDaLinha);
if (window.confirm("Deseja apagar a linha selecionada?")) {
tabelaDeTarefas.deleteRow(linhaASerApagada.rowIndex);
}
}
function incluirAcompanhamento() {
const tabelaDeTarefas = document.getElementById("dados-de-acompanhamento");
const nome = document.getElementById("nome_aluno");
const texto = document.getElementById("titulo");
const data = document.getElementById("data-solicitacao");
const novaTarefa= tabelaDeTarefas.insertRow(0);
const campo1 = novaTarefa.insertCell();
const campo2 = novaTarefa.insertCell();
const campo3 = novaTarefa.insertCell();
const campo4 = novaTarefa.insertCell();
const campo5 = novaTarefa.insertCell();
const campo6 = novaTarefa.insertCell();
const campo7 = novaTarefa.insertCell();
campo1.appendChild(document.createTextNode(texto.value));
campo2.appendChild(document.createTextNode(nome.value));
campo3.appendChild(document.createTextNode(data.value));
campo6.appendChild(document.createTextNode('Pendente'));
const iconeDoBotaoDetalhes = document.createElement('i');
iconeDoBotaoDetalhes.className = "material-icons";
iconeDoBotaoDetalhes.innerText = "remove_red_eye";
const botaoDetalhes = document.createElement('a');
botaoDetalhes.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoDetalhes.setAttribute('data-delay', '50');
botaoDetalhes.setAttribute('data-tooltip', 'Visualizar');
botaoDetalhes.appendChild(iconeDoBotaoDetalhes);
const iconeDoBotaoExcluir = document.createElement('i');
iconeDoBotaoExcluir.className = "material-icons";
iconeDoBotaoExcluir.innerText = "delete";
const botaoExcluir = document.createElement('a');
botaoExcluir.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoExcluir.setAttribute('data-delay', '50');
botaoExcluir.setAttribute('data-tooltip', 'Visualizar');
botaoExcluir.appendChild(iconeDoBotaoExcluir);
const iconeDoBotaoAssumir = document.createElement('i');
iconeDoBotaoAssumir.className = "material-icons";
iconeDoBotaoAssumir.innerText = "pan_tool";
const botaoAssumir = document.createElement('a');
botaoAssumir.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoAssumir.setAttribute('data-delay', '50');
botaoAssumir.setAttribute('data-tooltip', 'Assumir tarefa');
botaoAssumir.appendChild(iconeDoBotaoAssumir);
campo7.appendChild(botaoDetalhes);
campo7.appendChild(document.createTextNode(" "));
campo7.appendChild(botaoExcluir);
campo7.appendChild(document.createTextNode(" "));
campo7.appendChild(botaoAssumir);}
function incluirTarefa() {
const tabelaDeTarefas = document.getElementById("dados-de-tarefas");
const nome = document.getElementById("nome_aluno");
const texto = document.getElementById("titulo");
const data = document.getElementById("data-solicitacao");
const novaTarefa= tabelaDeTarefas.insertRow(0);
const campo1 = novaTarefa.insertCell();
const campo2 = novaTarefa.insertCell();
const campo3 = novaTarefa.insertCell();
const campo4 = novaTarefa.insertCell();
const campo5 = novaTarefa.insertCell();
const campo6 = novaTarefa.insertCell();
const campo7 = novaTarefa.insertCell();
campo1.appendChild(document.createTextNode(texto.value));
campo2.appendChild(document.createTextNode(nome.value));
campo3.appendChild(document.createTextNode(data.value));
campo6.appendChild(document.createTextNode('Pendente'));
const iconeDoBotaoDetalhes = document.createElement('i');
iconeDoBotaoDetalhes.className = "material-icons";
iconeDoBotaoDetalhes.innerText = "remove_red_eye";
const botaoDetalhes = document.createElement('a');
botaoDetalhes.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoDetalhes.setAttribute('data-delay', '50');
botaoDetalhes.setAttribute('data-tooltip', 'Visualizar');
botaoDetalhes.appendChild(iconeDoBotaoDetalhes);
const iconeDoBotaoExcluir = document.createElement('i');
iconeDoBotaoExcluir.className = "material-icons";
iconeDoBotaoExcluir.innerText = "delete";
const botaoExcluir = document.createElement('a');
botaoExcluir.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoExcluir.setAttribute('data-delay', '50');
botaoExcluir.setAttribute('data-tooltip', 'Visualizar');
botaoExcluir.appendChild(iconeDoBotaoExcluir);
const iconeDoBotaoAssumir = document.createElement('i');
iconeDoBotaoAssumir.className = "material-icons";
iconeDoBotaoAssumir.innerText = "pan_tool";
const botaoAssumir = document.createElement('a');
botaoAssumir.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoAssumir.setAttribute('data-delay', '50');
botaoAssumir.setAttribute('data-tooltip', 'Assumir tarefa');
botaoAssumir.appendChild(iconeDoBotaoAssumir);
campo7.appendChild(botaoDetalhes);
campo7.appendChild(document.createTextNode(" "));
campo7.appendChild(botaoExcluir);
campo7.appendChild(document.createTextNode(" "));
campo7.appendChild(botaoAssumir);}
function incluirAluno() {
const tabelaDeDiscentes = document.getElementById("dados-de-alunos");
const nome = document.getElementById("nome_completo");
const matricula = document.getElementById("matricula");
const curso = document.getElementById("curso");
const email = document.getElementById("email");
const telefone1 = document.getElementById("telefone1");
const telefone2 = document.getElementById("telefone2");
const novoDiscente = tabelaDeDiscentes.insertRow(0);
const campo1 = novoDiscente.insertCell();
const campo2 = novoDiscente.insertCell();
const campo3 = novoDiscente.insertCell();
const campo4 = novoDiscente.insertCell();
const campo5 = novoDiscente.insertCell();
const campo6 = novoDiscente.insertCell();
const campo7 = novoDiscente.insertCell();
campo1.appendChild(document.createTextNode(nome.value));
campo2.appendChild(document.createTextNode(matricula.value));
campo3.appendChild(document.createTextNode(curso.value));
campo4.appendChild(document.createTextNode(email.value));
campo5.appendChild(document.createTextNode(telefone1.value));
campo6.appendChild(document.createTextNode(telefone2.value));
const iconeDoBotaoDetalhes = document.createElement('i');
iconeDoBotaoDetalhes.className = "material-icons";
iconeDoBotaoDetalhes.innerText = "remove_red_eye";
const botaoDetalhes = document.createElement('a');
botaoDetalhes.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoDetalhes.setAttribute('data-delay', '50');
botaoDetalhes.setAttribute('data-tooltip', 'Visualizar');
botaoDetalhes.appendChild(iconeDoBotaoDetalhes);
const iconeDoBotaoEmail = document.createElement('i');
iconeDoBotaoEmail.className = "material-icons";
iconeDoBotaoEmail.innerText = "mail";
const botaoEmail = document.createElement('a');
botaoEmail.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoEmail.setAttribute('data-delay', '50');
botaoEmail.setAttribute('data-tooltip', 'Visualizar');
botaoEmail.appendChild(iconeDoBotaoEmail);
const iconeDoBotaoExcluir = document.createElement('i');
iconeDoBotaoExcluir.className = "material-icons";
iconeDoBotaoExcluir.innerText = "delete";
const botaoExcluir = document.createElement('a');
botaoExcluir.className = "waves-effect waves-light btn pink accent-1 btn tooltipped";
botaoExcluir.setAttribute('data-delay', '50');
botaoExcluir.setAttribute('data-tooltip', 'Visualizar');
botaoExcluir.appendChild(iconeDoBotaoExcluir);
campo7.appendChild(botaoDetalhes);
campo7.appendChild(document.createTextNode(" "));
campo7.appendChild(botaoEmail);
campo7.appendChild(document.createTextNode(" "));
campo7.appendChild(botaoExcluir);
}