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

Remove houlsehold income

parent 56c4af81
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!108Remove houlsehold income
Pipeline #
......@@ -133,27 +133,6 @@ glossEnrollmentRatioApp.get('/location', (req, res, next) => {
next();
}, response('location'));
glossEnrollmentRatioApp.get('/fifth_household_income', (req, res, next) => {
req.result = [
{id: 1, name: '20% menores'},
{id: 2, name: '2o quinto'},
{id: 3, name: '3o quinto'},
{id: 4, name: '4o quinto'},
{id: 5, name: '20% maiores'},
{id: -1, name: 'Sem declaração'}
];
next();
},response('fifth_household_income'));
glossEnrollmentRatioApp.get('/extremes_household_income', (req, res, next) => {
req.result = [
{id: 1, name: '10% menores'},
{id: 2, name: '10% maiores'},
{id: -1, name: 'Sem declaração'}
];
next();
}, response('extremes_household_income'));
rqf.addField({
name: 'filter',
field: false,
......@@ -254,26 +233,6 @@ rqf.addField({
type: 'integer',
field: 'etapa_resumida'
}
}).addValue({
name: 'extremes_household_income',
table: 'pnad',
tableField: 'extremos_nivel_rendimento',
resultField: 'extremes_household_income_id',
where: {
relation: '=',
type: 'integer',
field: 'extremos_nivel_rendimento'
}
}).addValue({
name: 'fifth_household_income',
table: 'pnad',
tableField: 'quintil_nivel_rendimento',
resultField: 'fifth_household_income_id',
where: {
relation: '=',
type: 'integer',
field: 'quintil_nivel_rendimento'
}
});
glossEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => {
......@@ -287,11 +246,7 @@ glossEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => {
.field('matricula.ano_censo', 'year')
.group('matricula.ano_censo')
.order('matricula.ano_censo')
if ("fifth_household_income" in req.filter) {
delete req.filter.fifth_household_income;
} else if ("extremes_household_income" in req.filter) {
delete req.filter.extremes_household_income;
}
next();
}, rqf.build(), query, (req, res, next) => {
req.numerator = req.result;
......
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