Skip to content
Snippets Groups Projects
Commit 3c71a777 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Add /education_level and /education_level_mod to /enrollment

No tests added though
parent 213f3748
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!44Feature multiple where
Pipeline #
......@@ -35,7 +35,7 @@ enrollmentApp.get('/location', (req, res, next) => {
next();
}, query, response('location'));
// Returns all educational levels avaible
// Returns all school years available
enrollmentApp.get('/school_year', (req, res, next) => {
req.sql.from('serie_ano')
.field('id')
......@@ -43,6 +43,22 @@ enrollmentApp.get('/school_year', (req, res, next) => {
next();
}, query, response('school_year'));
// Returns all school years available
enrollmentApp.get('/education_level', (req, res, next) => {
req.sql.from('etapa_ensino')
.field('id')
.field('desc_etapa', 'name');
next();
}, query, response('education_level'));
// Returns all school years available
enrollmentApp.get('/education_level_mod', (req, res, next) => {
req.sql.from('etapa_ensino')
.field('id')
.field('nome', 'name');
next();
}, query, response('education_level_mod'));
// Returns all adm dependencies
enrollmentApp.get('/adm_dependency', (req, res, next) => {
req.sql.from('dependencia_adm')
......@@ -118,6 +134,24 @@ rqf.addField({
relation: '=',
type: 'integer'
}
}).addValue({
name: 'education_level',
table: 'matricula',
tableField: 'etapa_ensino_id',
resultField: 'education_level_id',
where: {
relation: '=',
type: 'integer'
}
}).addValue({
name: 'education_level_mod',
table: 'matricula',
tableField: 'etapas_mod_ensino_segmento_id',
resultField: 'education_level_mod_id',
where: {
relation: '=',
type: 'integer'
}
}).addValue({
name: 'region',
table: 'regiao',
......
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