Skip to content
Snippets Groups Projects
Commit da6f5107 authored by Pietro Cavassin's avatar Pietro Cavassin
Browse files

fix não declarado in studentDeficiency and schoolType

parent c79483f5
No related branches found
No related tags found
3 merge requests!329Update enrollment - new filters,!311fix não declarado in studentDeficiency and schoolType,!309Merge new updates into master
......@@ -18,12 +18,13 @@ 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 studentDeficiency(id) {
module.exports = function schoolType(id) {
switch (id) {
case 1:
return 'Pública';
case 2:
return 'Privada';
case 9:
default:
return 'Não classificado';
}
......
......@@ -24,6 +24,7 @@ module.exports = function studentDeficiency(id) {
return 'Não';
case 1:
return 'Sim';
case 9:
default:
return 'Não declarado'
}
......
......@@ -207,8 +207,11 @@ universityEnrollmentApp.get('/upper_turn', (req, res, next) => {
}, response('upper_turn'));
universityEnrollmentApp.get('/student_deficiency', (req, res, next) => {
req.result = [];
for(let i = 0; i <= 2; ++i) {
req.result = [{
id: 9,
name: id2str.studentDeficiency(9)
}];
for(let i = 0; i <= 1; ++i) {
req.result.push({
id: i,
name: id2str.studentDeficiency(i)
......@@ -232,8 +235,11 @@ universityEnrollmentApp.get('/ethnic_group_ies', (req, res, next) => {
}, response('ethnic_group_ies'));
universityEnrollmentApp.get('/school_type', (req, res, next) => {
req.result = [];
for(let i = 0; i <= 2; ++i) {
req.result = [{
id: 9,
name: id2str.schoolType(9)
}];
for(let i = 1; i <= 2; ++i) {
req.result.push({
id: i,
name: id2str.schoolType(i)
......
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