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

Fix bug in diagnosis and projection routes

parent 56d318e9
No related branches found
No related tags found
2 merge requests!150Portal mec school,!145v1.6.0
......@@ -4,6 +4,10 @@ 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/).
## Unreleased
### Changed
- Fix bug in diagnosis and projection routes
## 1.4.2 - 2018-07-23
### Added
- Added new url's in daily charge amount indicator
......
......@@ -503,6 +503,10 @@ enrollmentApp.get('/diagnosis', rqf.parse(), (req, res, next) => {
let i = 0;
while(i < enrollments.length) {
let enrollment = enrollments[i];
if(!educationSchoolYear[enrollment.school_year_id]) {
++i;
continue;
}
let educationLevelHash = '' + enrollment.year + educationSchoolYear[enrollment.school_year_id].id;
let schoolYearHash = '' + enrollment.year + enrollment.school_year_id;
......@@ -702,12 +706,18 @@ enrollmentApp.get('/projection', rqf.parse(), (req, res, next) => {
}
}
console.log(educationSchoolYear);
let result = [];
let educationLevelSet = new Set();
let schoolYearSet = new Set();
let i = 0;
while(i < enrollments.length) {
let enrollment = enrollments[i];
if(!educationSchoolYear[enrollment.school_year_id]) {
++i;
continue;
}
let educationLevelHash = '' + enrollment.year + educationSchoolYear[enrollment.school_year_id].id;
let schoolYearHash = '' + enrollment.year + enrollment.school_year_id;
......
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