Skip to content
Snippets Groups Projects
Commit ad2a3230 authored by Fernando Gbur dos Santos's avatar Fernando Gbur dos Santos
Browse files

[FIX] modified values for the frontend to be able to make the request...

[FIX] modified values for the frontend to be able to make the request (capitalCode, metroCode and modalityShift)
parent 18a0b624
No related branches found
No related tags found
3 merge requests!391Hom -> Prod,!390dev -> homologa,!389new_pnad -> dev
......@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
module.exports = function capitalCode(id) {
switch (id) {
case null:
return 'Não é capital';
case 11:
return 'Porto Velho';
case 12:
......@@ -76,6 +74,8 @@ module.exports = function capitalCode(id) {
return 'Goiânia';
case 53:
return 'Brasília';
case 99:
return 'Não é capital';
default:
return 'Não informado';
}
......
......@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
module.exports = function metroCode(id) {
switch (id) {
case null:
return 'Não é região metropolitana ou região administrativa integrada';
case 13:
return 'Região Metropolitana de Manaus';
case 15:
......@@ -64,6 +62,8 @@ module.exports = function metroCode(id) {
return 'Região Metropolitana de Vale do Rio Cuiabá';
case 52:
return 'Região Metropolitana de Goiânia';
case 99:
return 'Não é região metropolitana ou região administrativa integrada';
default:
return 'Não informado';
}
......
......@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
module.exports = function modalityShift(id) {
switch (id) {
case null:
return 'Não informado';
case 1:
return 'Matutino';
case 2:
......@@ -36,6 +34,8 @@ module.exports = function modalityShift(id) {
return 'Não se aplica - pós graduação presencial';
case 7:
return 'EaD ou semipresencial';
case 9:
return 'Não informado';
case 99:
return 'Não frequenta instituição de ensino';
}
......
......@@ -117,7 +117,7 @@ PnadNovoApp.get('/cap_code', (req, res, next) => {
});
}
}
req.result.push({id: null, name: id2str.capitalCode(null)});
req.result.push({id: 99, name: id2str.capitalCode(99)});
next();
}, response('cap_code'));
......@@ -131,7 +131,7 @@ PnadNovoApp.get('/metro_code', (req, res, next) => {
});
}
}
req.result.push({id: null, name: id2str.metroCode(null)});
req.result.push({id: 99, name: id2str.metroCode(99)});
next();
}, response('metro_code'));
......@@ -218,8 +218,8 @@ PnadNovoApp.get('/modality_shift', (req, res, next) => {
id: i, name: id2str.modalityShift(i)
});
}
req.result.push({id: 9, name: id2str.modality(9)});
req.result.push({id: 99, name: id2str.modality(99)});
req.result.push({id: null, name: id2str.modality(null)});
next();
}, response('modality_shift'));
......
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