Skip to content
Snippets Groups Projects
Commit bbb6485d authored by Anderson Frasao's avatar Anderson Frasao
Browse files

Merge branch 'add_nao_classificado' into 'master'

add 'nao classificado' option for employees

See merge request !406
parents 9383a33a 791e5756
No related branches found
No related tags found
3 merge requests!408Development,!407Master,!406add 'nao classificado' option for employees
......@@ -125,6 +125,7 @@ employeesApp.get('/function', (req, res, next) => {
{id: 10, name: "Secretário"},
{id: 11, name: "Segurança"},
{id: 12, name: "Monitores"},
{id: 99, name: "Não Classificado"}
];
next();
}, response('function'));
......@@ -490,6 +491,7 @@ function formatFunction(queryOriginal,reqDims) {
qtde_monitores: "Monitores",
qtde_gestores: "Gestores",
qtde_assistente_social: "Assistente Social",
qtde_null: "Não Classificado"
}
let resultObj = []
//Nesse caso apenas precisamos acertar as dimensoes que o banco retorna, ou seja, criando um objeto para cada funcao de funcionario
......@@ -578,7 +580,7 @@ employeesApp.get('/', rqfSchool.parse(), (req, res, next) => {
if ("function" in req.dims) {
delete req.dims.function;
req.sql
req.sql.field('SUM(funcionarios_por_escola.total)', 'qtde_null')
.field('funcionarios_por_escola.ano_censo', 'year')
.from('funcionarios_por_escola')
.group('funcionarios_por_escola.ano_censo')
......
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