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 = { ...@@ -38,7 +38,14 @@ const ids = {
restroom_pne_id: booleanVariable, restroom_pne_id: booleanVariable,
broadband_id: booleanVariable, broadband_id: booleanVariable,
energy_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) { function transform(removeId=false) {
......
...@@ -214,6 +214,7 @@ schoolApp.get('/wastepipe', (req, res, next) => { ...@@ -214,6 +214,7 @@ schoolApp.get('/wastepipe', (req, res, next) => {
schoolApp.get('/education_day_care_child', (req, res, next) => { schoolApp.get('/education_day_care_child', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -222,6 +223,7 @@ schoolApp.get('/education_day_care_child', (req, res, next) => { ...@@ -222,6 +223,7 @@ schoolApp.get('/education_day_care_child', (req, res, next) => {
schoolApp.get('/education_preschool_child', (req, res, next) => { schoolApp.get('/education_preschool_child', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -230,6 +232,7 @@ schoolApp.get('/education_preschool_child', (req, res, next) => { ...@@ -230,6 +232,7 @@ schoolApp.get('/education_preschool_child', (req, res, next) => {
schoolApp.get('/education_begin_elementary_school', (req, res, next) => { schoolApp.get('/education_begin_elementary_school', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -238,6 +241,7 @@ schoolApp.get('/education_begin_elementary_school', (req, res, next) => { ...@@ -238,6 +241,7 @@ schoolApp.get('/education_begin_elementary_school', (req, res, next) => {
schoolApp.get('/education_end_elementary_school', (req, res, next) => { schoolApp.get('/education_end_elementary_school', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -246,6 +250,7 @@ schoolApp.get('/education_end_elementary_school', (req, res, next) => { ...@@ -246,6 +250,7 @@ schoolApp.get('/education_end_elementary_school', (req, res, next) => {
schoolApp.get('/education_middle_school', (req, res, next) => { schoolApp.get('/education_middle_school', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -254,6 +259,7 @@ schoolApp.get('/education_middle_school', (req, res, next) => { ...@@ -254,6 +259,7 @@ schoolApp.get('/education_middle_school', (req, res, next) => {
schoolApp.get('/education_professional', (req, res, next) => { schoolApp.get('/education_professional', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -262,6 +268,7 @@ schoolApp.get('/education_professional', (req, res, next) => { ...@@ -262,6 +268,7 @@ schoolApp.get('/education_professional', (req, res, next) => {
schoolApp.get('/education_eja', (req, res, next) => { schoolApp.get('/education_eja', (req, res, next) => {
req.result = [ req.result = [
{id: null, name: 'Não Declarado'},
{id: 0, name: 'Não'}, {id: 0, name: 'Não'},
{id: 1, name: 'Sim'} {id: 1, name: 'Sim'}
]; ];
...@@ -505,7 +512,7 @@ rqfCount.addField({ ...@@ -505,7 +512,7 @@ rqfCount.addField({
name: 'education_eja', name: 'education_eja',
table: 'escola', table: 'escola',
tableField: 'ensino_eja', tableField: 'ensino_eja',
resultField: 'education_eja_name', resultField: 'education_eja_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
...@@ -515,7 +522,7 @@ rqfCount.addField({ ...@@ -515,7 +522,7 @@ rqfCount.addField({
name: 'education_professional', name: 'education_professional',
table: 'escola', table: 'escola',
tableField: 'educacao_profissional', tableField: 'educacao_profissional',
resultField: 'education_professional_name', resultField: 'education_professional_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
...@@ -525,7 +532,7 @@ rqfCount.addField({ ...@@ -525,7 +532,7 @@ rqfCount.addField({
name: 'education_middle_school', name: 'education_middle_school',
table: 'escola', table: 'escola',
tableField: 'reg_medio_medio', tableField: 'reg_medio_medio',
resultField: 'education_middle_school_name', resultField: 'education_middle_school_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
...@@ -535,7 +542,7 @@ rqfCount.addField({ ...@@ -535,7 +542,7 @@ rqfCount.addField({
name: 'education_end_elementary_school', name: 'education_end_elementary_school',
table: 'escola', table: 'escola',
tableField: 'reg_fund_af', tableField: 'reg_fund_af',
resultField: 'education_end_elementary_school_name', resultField: 'education_end_elementary_school_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
...@@ -545,7 +552,7 @@ rqfCount.addField({ ...@@ -545,7 +552,7 @@ rqfCount.addField({
name: 'education_begin_elementary_school', name: 'education_begin_elementary_school',
table: 'escola', table: 'escola',
tableField: 'reg_fund_ai', tableField: 'reg_fund_ai',
resultField: 'education_begin_elementary_school_name', resultField: 'education_begin_elementary_school_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
...@@ -555,7 +562,7 @@ rqfCount.addField({ ...@@ -555,7 +562,7 @@ rqfCount.addField({
name: 'education_preschool_child', name: 'education_preschool_child',
table: 'escola', table: 'escola',
tableField: 'reg_infantil_preescola', tableField: 'reg_infantil_preescola',
resultField: 'education_preschool_child_name', resultField: 'education_preschool_child_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
...@@ -565,7 +572,7 @@ rqfCount.addField({ ...@@ -565,7 +572,7 @@ rqfCount.addField({
name: 'education_day_care_child', name: 'education_day_care_child',
table: 'escola', table: 'escola',
tableField: 'reg_infantil_creche', tableField: 'reg_infantil_creche',
resultField: 'education_day_care_child_name', resultField: 'education_day_care_child_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
......
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