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

Merge remote-tracking branch 'origin/v1.11.13'

parents 521f4907 79a1691f
No related branches found
No related tags found
1 merge request!231v1.11.13
Pipeline #21505 failed
......@@ -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/).
## 1.11.13 - 2019-09-11
## Changed
- Classroom with dim location and city filter, will always return both locations
## 1.11.12 - 2019-09-10
## Changed
- Changed classroom filters to match classroomCount
......
......@@ -252,6 +252,25 @@ classroomApp.get('/', cache('15 day'), rqf.parse(), rqf.build(), (req, res, next
.where('escola.situacao_de_funcionamento = 1 AND escola.local_func_predio_escolar = 1')
.where('escola.ensino_regular = 1 OR escola.ensino_eja = 1 OR escola.educacao_profissional = 1');
next();
}, query, addMissing(rqf), id2str.transform(), response('classroom'));
}, query, addMissing(rqf), id2str.transform(), (req, res, next) => {
if (req.dims.location && req.result.length < 2) { // Garantimos que conterá as duas localizações no resultado para o simCAQ
let result = [];
for (let i = 1; i <= 2; i++) {
if (i !== req.result[0].location_id) {
let newObj = Object.assign({}, req.result[0]);
newObj.location_id = i;
newObj.total = 0;
result.push(newObj);
}
else {
result.push(req.result[0]);
}
}
req.result = result;
}
next();
}, response('classroom'));
module.exports = classroomApp;
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