Skip to content
Snippets Groups Projects
Commit beb4d51e authored by lgtg20's avatar lgtg20
Browse files

fix: age range all options

parent 0b487d8c
No related branches found
No related tags found
4 merge requests!449Homologa,!444dev -> hom,!440New indicators,!433Issue 958
......@@ -154,12 +154,11 @@ iliteracyRate.get('/attended_modality', (req, res, next) => {
iliteracyRate.get('/income_range', (req, res, next) => {
req.result = []
for (let i = 1; i < 8; i++) {
for (let i = 1; i < 10; i++) {
req.result.push({
id: i, name: id2str.incomeRange(i)
});
}
req.result.push({id: 10, name: id2str.incomeRange(10)});
next();
}, response('income_range'));
......@@ -244,7 +243,7 @@ iliteracyRate.get('/state', (req, res, next) => {
iliteracyRate.get('/age_range_all', (req, res, next) => {
req.result = []
for (let i = 1; i < 12; i++) {
for (let i = 5; i < 12; i++) {
req.result.push({
id: i, name: id2str.ageRangeAll(i)
});
......@@ -426,12 +425,12 @@ rqf.addField({
}).addValue({
name: 'income_range',
table: 'pnad_novo',
tableField: 'faixa_rendimento_aux_tx',
tableField: 'faixa_rendimento_aux',
resultField: 'income_range_id',
where: {
relation: '=',
type: 'integer',
field: 'faixa_rendimento_aux_tx'
field: 'faixa_rendimento_aux'
}
}).addValue({
name: 'gender',
......@@ -568,6 +567,7 @@ function matchQueries(queryPartial, queryTotal) {
newObj.denominator = result.total;
newObj.partial = objMatch.total;
newObj.total = (objMatch.total / result.total) * 100;
newObj.total = newObj.total.toFixed(1);
match.push(newObj);
}
});
......
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