diff --git a/CHANGELOG.md b/CHANGELOG.md index 546a425c009198fa56b489073672b44a2cfed777..fde777f5c393989b743af1102f1719977ae2e090 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 +## Added +- Add school building filter/dimension to school count route + ## 1.3.2 - 2018-06-20 ### Changed - Fixed math error in classroom count at total classroom needed expression diff --git a/src/libs/routes/school.js b/src/libs/routes/school.js index be935636bc20bc9f15ec55926a407d868967b761..33b5e1cf983e146e30c928f50a22af6d1f98e813 100644 --- a/src/libs/routes/school.js +++ b/src/libs/routes/school.js @@ -452,6 +452,16 @@ rqfCount.addField({ type: 'integer', field: 'ano_censo' } +}).addValue({ + name: 'school_building', + table: 'escola', + tableField: 'local_func_predio_escolar', + resultField: 'school_building', + where: { + relation: '=', + type: 'boolean', + field: 'local_func_predio_escolar' + } }); schoolApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { if(typeof req.filter === 'undefined' || Object.keys(req.filter).length === 0) {