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

Change school levels to boolean convert

parent 169e404a
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!47School number count
Pipeline #
......@@ -38,7 +38,14 @@ const ids = {
restroom_pne_id: booleanVariable,
broadband_id: booleanVariable,
energy_id: booleanVariable,
wastepipe_id: booleanVariable
wastepipe_id: booleanVariable,
education_day_care_child_id: booleanVariable,
education_preschool_child_id: booleanVariable,
education_begin_elementary_school_id: booleanVariable,
education_end_elementary_school_id: booleanVariable,
education_middle_school_id: booleanVariable,
education_professional_id: booleanVariable,
education_eja_id: booleanVariable
};
function transform(removeId=false) {
......
......@@ -214,6 +214,7 @@ schoolApp.get('/wastepipe', (req, res, next) => {
schoolApp.get('/education_day_care_child', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -222,6 +223,7 @@ schoolApp.get('/education_day_care_child', (req, res, next) => {
schoolApp.get('/education_preschool_child', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -230,6 +232,7 @@ schoolApp.get('/education_preschool_child', (req, res, next) => {
schoolApp.get('/education_begin_elementary_school', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -238,6 +241,7 @@ schoolApp.get('/education_begin_elementary_school', (req, res, next) => {
schoolApp.get('/education_end_elementary_school', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -246,6 +250,7 @@ schoolApp.get('/education_end_elementary_school', (req, res, next) => {
schoolApp.get('/education_middle_school', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -254,6 +259,7 @@ schoolApp.get('/education_middle_school', (req, res, next) => {
schoolApp.get('/education_professional', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -262,6 +268,7 @@ schoolApp.get('/education_professional', (req, res, next) => {
schoolApp.get('/education_eja', (req, res, next) => {
req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'},
{id: 1, name: 'Sim'}
];
......@@ -505,7 +512,7 @@ rqfCount.addField({
name: 'education_eja',
table: 'escola',
tableField: 'ensino_eja',
resultField: 'education_eja_name',
resultField: 'education_eja_id',
where: {
relation: '=',
type: 'boolean',
......@@ -515,7 +522,7 @@ rqfCount.addField({
name: 'education_professional',
table: 'escola',
tableField: 'educacao_profissional',
resultField: 'education_professional_name',
resultField: 'education_professional_id',
where: {
relation: '=',
type: 'boolean',
......@@ -525,7 +532,7 @@ rqfCount.addField({
name: 'education_middle_school',
table: 'escola',
tableField: 'reg_medio_medio',
resultField: 'education_middle_school_name',
resultField: 'education_middle_school_id',
where: {
relation: '=',
type: 'boolean',
......@@ -535,7 +542,7 @@ rqfCount.addField({
name: 'education_end_elementary_school',
table: 'escola',
tableField: 'reg_fund_af',
resultField: 'education_end_elementary_school_name',
resultField: 'education_end_elementary_school_id',
where: {
relation: '=',
type: 'boolean',
......@@ -545,7 +552,7 @@ rqfCount.addField({
name: 'education_begin_elementary_school',
table: 'escola',
tableField: 'reg_fund_ai',
resultField: 'education_begin_elementary_school_name',
resultField: 'education_begin_elementary_school_id',
where: {
relation: '=',
type: 'boolean',
......@@ -555,7 +562,7 @@ rqfCount.addField({
name: 'education_preschool_child',
table: 'escola',
tableField: 'reg_infantil_preescola',
resultField: 'education_preschool_child_name',
resultField: 'education_preschool_child_id',
where: {
relation: '=',
type: 'boolean',
......@@ -565,7 +572,7 @@ rqfCount.addField({
name: 'education_day_care_child',
table: 'escola',
tableField: 'reg_infantil_creche',
resultField: 'education_day_care_child_name',
resultField: 'education_day_care_child_id',
where: {
relation: '=',
type: 'boolean',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment