Skip to content
Snippets Groups Projects
Commit dcdf1663 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Change population filter name

parent 300e4aec
No related branches found
No related tags found
2 merge requests!156v1.7.0,!155Release v1.7.0
Pipeline #17723 failed
module.exports = function citySize(id) { module.exports = function citySize(id) {
switch (id) { switch (id) {
case 1: case 1:
return 'até 5000'; return '0 - 5000';
case 2: case 2:
return '5001 - 10000'; return '5001 - 10000';
case 3: case 3:
......
...@@ -67,19 +67,26 @@ infrastructureApp.get('/rural_location', (req, res, next) => { ...@@ -67,19 +67,26 @@ infrastructureApp.get('/rural_location', (req, res, next) => {
}, response('rural_location')); }, response('rural_location'));
infrastructureApp.get('/adm_dependency', (req, res, next) => { infrastructureApp.get('/adm_dependency', (req, res, next) => {
req.sql.from('dependencia_adm') req.result = [];
.field('id') for(let i = 1; i <= 4; ++i) {
.field('nome', 'name') req.result.push({
.where('id <= 4'); id: i,
name: id2str.admDependency(i)
});
};
next(); next();
}, query, response('adm_dependency')); }, response('adm_dependency'));
infrastructureApp.get('/adm_dependency_detailed', (req, res, next) => { infrastructureApp.get('/adm_dependency_detailed', (req, res, next) => {
req.sql.from('dependencia_adm_priv') req.result = [];
.field('id', 'id') for(let i = 1; i <= 6; ++i) {
.field('nome', 'name'); req.result.push({
id: i,
name: id2str.admDependencyPriv(i)
});
};
next(); next();
}, query, response('adm_dependency_detailed')); }, response('adm_dependency_detailed'));
rqf.addField({ rqf.addField({
name: 'filter', name: 'filter',
......
...@@ -41,7 +41,7 @@ populationApp.get('/years', (req, res, next) => { ...@@ -41,7 +41,7 @@ populationApp.get('/years', (req, res, next) => {
populationApp.get('/city_size', (req, res, next) => { populationApp.get('/city_size', (req, res, next) => {
req.result = [ req.result = [
{id: 1, name: "até 5000"}, {id: 1, name: "0 - 5000"},
{id: 2, name: "5001 - 10000"}, {id: 2, name: "5001 - 10000"},
{id: 3, name: "10001 - 20000"}, {id: 3, name: "10001 - 20000"},
{id: 4, name: "20001 - 50000"}, {id: 4, name: "20001 - 50000"},
......
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