Skip to content
Snippets Groups Projects
Commit 96afaefc authored by Miguel Angelo Salerno's avatar Miguel Angelo Salerno
Browse files

add teacher adequacy to list of ids

parent d693bdca
No related branches found
No related tags found
1 merge request!309Merge new updates into master
Pipeline #24408 failed
/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = function teacherAdequacy(id) {
switch (id) {
case 0:
return 'Formação não adequada';
case 1:
return 'Formação adequada';
}
};
......@@ -89,6 +89,7 @@ const finishUniversity = require(`${libs}/convert/finishUniversity`);
const initialTraining = require(`${libs}/convert/initialTraining`);
const posTraining = require(`${libs}/convert/posTraining`);
const licentiateDegree = require(`${libs}/convert/licentiateDegree`);
const teacherAdequacy = require(`${libs}/convert/teacherAdequacy`);
const ids = {
gender_id: gender,
......@@ -169,7 +170,8 @@ const ids = {
finish_id: finishUniversity,
initial_training_id: initialTraining,
pos_training_id: posTraining,
licentiate_degree_id: licentiateDegree
licentiate_degree_id: licentiateDegree,
teacher_adequacy_id: teacherAdequacy
};
function transform(removeId=false) {
......@@ -277,5 +279,6 @@ module.exports = {
finishUniversity,
initialTraining,
posTraining,
licentiateDegree
licentiateDegree,
teacherAdequacy
};
......@@ -193,6 +193,17 @@ disciplinesApp.get('/discipline', (req, res, next) => {
next();
}, response('discipline'))
disciplinesApp.get('/discipline', (req, res, next) => {
req.result = [];
for (let i = 0; i <= 1; i++) {
req.result.push({
id: i,
name: id2str.teacherAdequacy(i)
})
}
next();
}, response('discipline'))
rqf.addField({
name: 'filter',
field: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment