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

[FIX] '/state' subroute fixed in newPnad

parent 65828928
No related branches found
No related tags found
3 merge requests!391Hom -> Prod,!390dev -> homologa,!389new_pnad -> dev
...@@ -76,5 +76,7 @@ module.exports = function stateName(id) { ...@@ -76,5 +76,7 @@ module.exports = function stateName(id) {
return 'Distrito Federal'; return 'Distrito Federal';
case 99: case 99:
return 'Exterior'; return 'Exterior';
default:
return 'Não declarada';
} }
}; };
...@@ -232,9 +232,11 @@ PnadNovoApp.get('/modality_shift', (req, res, next) => { ...@@ -232,9 +232,11 @@ PnadNovoApp.get('/modality_shift', (req, res, next) => {
PnadNovoApp.get('/state', (req, res, next) => { PnadNovoApp.get('/state', (req, res, next) => {
req.result = [] req.result = []
for (let i = 11; i < 54; i++) { for (let i = 11; i < 54; i++) {
req.result.push({ if (id2str.stateName(i) !== 'Não declarada') {
id: i, name: id2str.stateName(i) req.result.push({
}); id: i, name: id2str.stateName(i)
});
}
} }
req.result.push({id: 99, name: id2str.stateName(99)}); req.result.push({id: 99, name: id2str.stateName(99)});
...@@ -379,7 +381,7 @@ rqf.addField({ ...@@ -379,7 +381,7 @@ rqf.addField({
where: { where: {
relation: '=', relation: '=',
type: 'integer', type: 'integer',
field: 'modality_shift_id' field: 'turno_nivel_etapa'
} }
}).addValue({ }).addValue({
name: 'bolsa_familia', name: 'bolsa_familia',
......
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