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

Fix filters in infrastructure indicator

parent c0f6a912
No related branches found
No related tags found
1 merge request!155Release v1.7.0
Pipeline #17510 failed
......@@ -67,19 +67,26 @@ infrastructureApp.get('/rural_location', (req, res, next) => {
}, response('rural_location'));
infrastructureApp.get('/adm_dependency', (req, res, next) => {
req.sql.from('dependencia_adm')
.field('id')
.field('nome', 'name')
.where('id <= 4');
req.result = [];
for(let i = 1; i <= 4; ++i) {
req.result.push({
id: i,
name: id2str.admDependency(i)
});
};
next();
}, query, response('adm_dependency'));
}, response('adm_dependency'));
infrastructureApp.get('/adm_dependency_detailed', (req, res, next) => {
req.sql.from('dependencia_adm_priv')
.field('id', 'id')
.field('nome', 'name');
req.result = [];
for(let i = 1; i <= 6; ++i) {
req.result.push({
id: i,
name: id2str.admDependencyPriv(i)
});
};
next();
}, query, response('adm_dependency_detailed'));
}, response('adm_dependency_detailed'));
rqf.addField({
name: 'filter',
......
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