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
Branches
Tags
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/>. ...@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
module.exports = function capitalCode(id) { module.exports = function capitalCode(id) {
switch (id) { switch (id) {
case null:
return 'Não é capital';
case 11: case 11:
return 'Porto Velho'; return 'Porto Velho';
case 12: case 12:
...@@ -76,6 +74,8 @@ module.exports = function capitalCode(id) { ...@@ -76,6 +74,8 @@ module.exports = function capitalCode(id) {
return 'Goiânia'; return 'Goiânia';
case 53: case 53:
return 'Brasília'; return 'Brasília';
case 99:
return 'Não é capital';
default: default:
return 'Não informado'; return 'Não informado';
} }
......
...@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>. ...@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
module.exports = function metroCode(id) { module.exports = function metroCode(id) {
switch (id) { switch (id) {
case null:
return 'Não é região metropolitana ou região administrativa integrada';
case 13: case 13:
return 'Região Metropolitana de Manaus'; return 'Região Metropolitana de Manaus';
case 15: case 15:
...@@ -64,6 +62,8 @@ module.exports = function metroCode(id) { ...@@ -64,6 +62,8 @@ module.exports = function metroCode(id) {
return 'Região Metropolitana de Vale do Rio Cuiabá'; return 'Região Metropolitana de Vale do Rio Cuiabá';
case 52: case 52:
return 'Região Metropolitana de Goiânia'; return 'Região Metropolitana de Goiânia';
case 99:
return 'Não é região metropolitana ou região administrativa integrada';
default: default:
return 'Não informado'; return 'Não informado';
} }
......
...@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>. ...@@ -20,8 +20,6 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
module.exports = function modalityShift(id) { module.exports = function modalityShift(id) {
switch (id) { switch (id) {
case null:
return 'Não informado';
case 1: case 1:
return 'Matutino'; return 'Matutino';
case 2: case 2:
...@@ -36,6 +34,8 @@ module.exports = function modalityShift(id) { ...@@ -36,6 +34,8 @@ module.exports = function modalityShift(id) {
return 'Não se aplica - pós graduação presencial'; return 'Não se aplica - pós graduação presencial';
case 7: case 7:
return 'EaD ou semipresencial'; return 'EaD ou semipresencial';
case 9:
return 'Não informado';
case 99: case 99:
return 'Não frequenta instituição de ensino'; return 'Não frequenta instituição de ensino';
} }
......
...@@ -117,7 +117,7 @@ PnadNovoApp.get('/cap_code', (req, res, next) => { ...@@ -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(); next();
}, response('cap_code')); }, response('cap_code'));
...@@ -131,7 +131,7 @@ PnadNovoApp.get('/metro_code', (req, res, next) => { ...@@ -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(); next();
}, response('metro_code')); }, response('metro_code'));
...@@ -218,8 +218,8 @@ PnadNovoApp.get('/modality_shift', (req, res, next) => { ...@@ -218,8 +218,8 @@ PnadNovoApp.get('/modality_shift', (req, res, next) => {
id: i, name: id2str.modalityShift(i) 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: 99, name: id2str.modality(99)});
req.result.push({id: null, name: id2str.modality(null)});
next(); next();
}, response('modality_shift')); }, response('modality_shift'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment