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

Merge branch 'fix_diagnosis_projection_routes' into development

parents 8924acb2 48d2e64b
No related branches found
No related tags found
2 merge requests!150Portal mec school,!145v1.6.0
Pipeline #16831 failed
...@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ...@@ -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/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). 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 ## 1.4.2 - 2018-07-23
### Added ### Added
- Added new url's in daily charge amount indicator - Added new url's in daily charge amount indicator
......
...@@ -549,6 +549,10 @@ enrollmentApp.get('/diagnosis', rqf.parse(), (req, res, next) => { ...@@ -549,6 +549,10 @@ enrollmentApp.get('/diagnosis', rqf.parse(), (req, res, next) => {
let i = 0; let i = 0;
while(i < enrollments.length) { while(i < enrollments.length) {
let enrollment = enrollments[i]; let enrollment = enrollments[i];
if(!educationSchoolYear[enrollment.school_year_id]) {
++i;
continue;
}
let educationLevelHash = '' + enrollment.year + educationSchoolYear[enrollment.school_year_id].id; let educationLevelHash = '' + enrollment.year + educationSchoolYear[enrollment.school_year_id].id;
let schoolYearHash = '' + enrollment.year + enrollment.school_year_id; let schoolYearHash = '' + enrollment.year + enrollment.school_year_id;
...@@ -748,12 +752,18 @@ enrollmentApp.get('/projection', rqf.parse(), (req, res, next) => { ...@@ -748,12 +752,18 @@ enrollmentApp.get('/projection', rqf.parse(), (req, res, next) => {
} }
} }
console.log(educationSchoolYear);
let result = []; let result = [];
let educationLevelSet = new Set(); let educationLevelSet = new Set();
let schoolYearSet = new Set(); let schoolYearSet = new Set();
let i = 0; let i = 0;
while(i < enrollments.length) { while(i < enrollments.length) {
let enrollment = enrollments[i]; let enrollment = enrollments[i];
if(!educationSchoolYear[enrollment.school_year_id]) {
++i;
continue;
}
let educationLevelHash = '' + enrollment.year + educationSchoolYear[enrollment.school_year_id].id; let educationLevelHash = '' + enrollment.year + educationSchoolYear[enrollment.school_year_id].id;
let schoolYearHash = '' + enrollment.year + enrollment.school_year_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