From b0afd2503ebd19ccb7dc30e490deffcd4e90e984 Mon Sep 17 00:00:00 2001 From: hi15 <hi15@inf.ufpr.br> Date: Wed, 19 Apr 2017 10:50:18 -0300 Subject: [PATCH] Added filters of directors_room, teacher_room, playground, nusery and toilet_inside_building --- src/libs/routes/school.js | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/libs/routes/school.js b/src/libs/routes/school.js index f2940245..b03bd108 100644 --- a/src/libs/routes/school.js +++ b/src/libs/routes/school.js @@ -308,6 +308,56 @@ rqfCount.addField({ type: 'boolean', field: 'reg_infantil_preescola' } +}).addValue({ + name: 'directors_room', + table: 'escola', + tableField: 'sala_diretoria', + resultField: 'directors_room_name', + where: { + relation: '=', + type: 'boolean', + field: 'sala_diretoria' + } +}).addValue({ + name: 'teacher_room', + table: 'escola', + tableField: 'sala_professor', + resultField: 'teacher_room_name', + where: { + relation: '=', + type: 'boolean', + field: 'sala_professor' + } +}).addValue({ + name: 'playground', + table: 'escola', + tableField: 'parque_infantil', + resultField: 'playground_name', + where: { + relation: '=', + type: 'boolean', + field: 'parque_infantil' + } +}).addValue({ + name: 'nusery', + table: 'escola', + tableField: 'bercario', + resultField: 'nusery_name', + where: { + relation: '=', + type: 'boolean', + field: 'bercario' + } +}).addValue({ + name: 'toilet_inside_building', + table: 'escola', + tableField: 'sanitario_dentro_predio', + resultField: 'toilet_inside_building_name', + where: { + relation: '=', + type: 'boolean', + field: 'sanitario_dentro_predio' + } }); schoolApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { -- GitLab