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

Merge branch 'release_v1.2.0' into development

parents 4977005a 968b71e7
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## 1.2.0 - 2018-05-21
### Added
- Classroom count route
## 1.1.1 - 2018-05-10
### Changed
- Fix bug in gloss enrollment ratio route
- Fix bug in liquid enrollment ratio route
## 1.1.0 - 2018-05-02
### Added
- Out of school population indicator
......
......@@ -61,6 +61,7 @@ const distributionFactor = require(`${libs}/routes/distributionFactor`);
const siope = require(`${libs}/routes/siope`);
const outOfSchool = require(`${libs}/routes/outOfSchool`);
const classroomCount = require(`${libs}/routes/classroomCount`);
api.get('/', (req, res) => {
......
......@@ -447,7 +447,6 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
currentLocation.education_level = [...cityLocation.education_level];
} else {
let l = 0;
// FIXME: erros ao agregar brasil nas regiões 3 e 4
while(l < cityLocation.education_level.length) {
let cityEducation = cityLocation.education_level[l];
let m = 0;
......@@ -467,7 +466,11 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
currentEducation.enrollment.night_classes += cityEducation.enrollment.night_classes;
currentEducation.enrollment.total_classrooms_needed += cityEducation.enrollment.total_classrooms_needed;
} else {
currentLocation.education_level.splice(m, 0, cityEducation);
if(currentEducation.education_level_short_id < cityEducation.education_level_short_id) {
currentLocation.education_level.splice(++m, 0, cityEducation);
} else {
currentLocation.education_level.splice(m, 0, cityEducation);
}
}
++l;
}
......@@ -484,12 +487,6 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
}
}
if(req.dims.state) {
console.log('ESTADO!!!!');
} else if(!req.dims.city) {
console.log('BRASIL!!!');
}
req.result = reduction || result;
next();
......
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