diff --git a/CHANGELOG.md b/CHANGELOG.md index 633fc48b9c8a4ce638de2e548e97911a867d6808..33617dd163b50fd114874a1935d997dd46d50de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.4.2 - 2018-07-23 +### Added +- Added new url's in daily charge amount indicator +### Changed +- Fix variable name and url in daily charge amount indicator + ## 1.4.1 - 2018-07-03 ### Changed - Fix duplicate in transport indicator diff --git a/src/libs/routes/dailyChargeAmount.js b/src/libs/routes/dailyChargeAmount.js index 1514b4413d3d7aa96e77d96f7b347ec73f138c56..2bf1f513ab9b006eb14a2c76bdc9c7a53cc3fa43 100644 --- a/src/libs/routes/dailyChargeAmount.js +++ b/src/libs/routes/dailyChargeAmount.js @@ -124,6 +124,30 @@ dailyChargeAmountApp.get('/average/education_level_mod', (req, res, next) => { next(); }, response('education_level_mod')); +dailyChargeAmountApp.get('/period', (req, res, next) => { + req.result = []; + for(let i = 1; i <= 3; ++i) { + req.result.push({ + id: i, + name: id2str.period(i) + }); + }; + req.result.push({ + id: 99, + name: id2str.period(99) + }); + next(); +}, response('period')); + +dailyChargeAmountApp.get('/integral_time', (req, res, next) => { + req.result = [ + {id: null, name: 'Não Disponível'}, + {id: 0, name: 'Não'}, + {id: 1, name: 'Sim'} + ]; + next(); +}, response('integral_time')); + rqf.addField({ name: 'filter', field: false, @@ -380,7 +404,7 @@ dailyChargeAmountApp.get('/average', rqf.parse(), rqf.build(), (req, res, next) req.sql.from('turma') .field('turma.ano_censo', 'year') .field('turma.etapas_mod_ensino_segmento_id', 'education_level_mod_id') - .field('AVG(turma.duracao_turma)/60.0', 'average_class_duration') + .field('AVG(turma.duracao_turma)/60.0', 'total') .group('turma.ano_censo') .group('turma.etapas_mod_ensino_segmento_id') .order('turma.ano_censo')