Commit 5d4bc201 authored by Pietro Cavassin's avatar Pietro Cavassin
Browse files

get new semesteform

parent 446c83ab
......@@ -75,6 +75,12 @@
"principalId": "$everyone",
"permission": "ALLOW",
"property": "search"
},
{
"accessType":"READ",
"principalType": "ROLE",
"principalId": "$unauthenticated",
"permission": "ALLOW"
}
],
"methods": {
......
......@@ -70,6 +70,12 @@
"principalId": "$everyone",
"permission": "ALLOW",
"property": "search"
},
{
"accessType":"READ",
"principalType": "ROLE",
"principalId": "$unauthenticated",
"permission": "ALLOW"
}
],
"methods": {}
......
......@@ -81,6 +81,12 @@
"principalType": "ROLE",
"principalId": "secretario_dpto",
"permission": "ALLOW"
},
{
"accessType":"READ",
"principalType": "ROLE",
"principalId": "$unauthenticated",
"permission": "ALLOW"
}
],
"methods": {}
......
......@@ -50,6 +50,7 @@ function check_fields(obj) {
async function handle_line(line) {
var course = line.NOME_DISCIPLINA.replace('\n','');
var period_list = line.PERIODO.split(' ');
//var period_list = line.PERIODO.split('/')
// verifica a quantidade de campos da linha, deve ter ao menos
var fields_missing = check_fields(line)
......@@ -57,6 +58,8 @@ async function handle_line(line) {
return {"status":true,"msg":"Os seguintes campos estão faltando: "+fields_missing.join(", ")}
var row = {
//'ano': period_list[0],
//'duracao': (period_list[1] == "Anual")? "Anual" : "Semestral",
'ano': period_list[period_list.length -1],
'duracao': (period_list[0] == "Anual")? "Anual" : "Semestral",
'disciplina': course.replace(',',''),
......@@ -68,6 +71,7 @@ async function handle_line(line) {
'horario_fim': line.HR_FIM,
'curso_cod': line.COD_CURSO.toUpperCase(),
'turma_cod': line.COD_TURMA,
//'periodo': (period_list[1] == "Anual")? 0 : period_list[1].charAt(0)
'periodo': (period_list[0] == "Anual")? 0 : period_list[0].charAt(0)
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment