Commit d90d753e authored by ns17's avatar ns17
Browse files

Merge branch 'Demandas4_Henrique' into 'development'

Fix bugs in Escolas Quilombolas and Escolas Indígenas

See merge request !99
parents 1c7cc89d 7a7bcab0
......@@ -174,15 +174,17 @@ class IndigenasSchools extends Component {
<Button className="clearmapbtn" onClick={this.clearMap}> Limpar Mapa </Button>
</Row>
{c[0] ? (
<UfBar img={MapMarker} ufname={uf} val={ c[0][c[0].length - 1][0] +
c[0][c[0].length - 1][1] +
c[0][c[0].length - 1][2] +
c[0][c[0].length - 1][3] +
c[0][c[0].length - 1][4] +
c[0][c[0].length - 1][5] +
c[0][c[0].length - 1][6] +
" escolas"
} />
c[0].length > 0 ? (
<UfBar img={MapMarker} ufname={uf} val={ c[0][c[0].length - 1][0] +
c[0][c[0].length - 1][1] +
c[0][c[0].length - 1][2] +
c[0][c[0].length - 1][3] +
c[0][c[0].length - 1][4] +
c[0][c[0].length - 1][5] +
c[0][c[0].length - 1][6] +
" escolas"
} />
) : <UfBar img={MapMarker} ufname={uf} val="Sem informação" />
) : (
<UfBar img={MapMarker} ufname={uf} val="Sem informação" />
)}
......
......@@ -161,15 +161,17 @@ class QuilombolaSchools extends Component {
<Button className="clearmapbtn" onClick={this.clearMap}> Limpar Mapa </Button>
</Row>
{c[0] ? (
<UfBar img={MapMarker} ufname={uf} val={ c[0][c[0].length - 1][0] +
c[0][c[0].length - 1][1] +
c[0][c[0].length - 1][2] +
c[0][c[0].length - 1][3] +
c[0][c[0].length - 1][4] +
c[0][c[0].length - 1][5] +
c[0][c[0].length - 1][6] +
" escolas"
} />
c[0].length > 0 ? (
<UfBar img={MapMarker} ufname={uf} val={ c[0][c[0].length - 1][0] +
c[0][c[0].length - 1][1] +
c[0][c[0].length - 1][2] +
c[0][c[0].length - 1][3] +
c[0][c[0].length - 1][4] +
c[0][c[0].length - 1][5] +
c[0][c[0].length - 1][6] +
" escolas"
} />
) : <UfBar img={MapMarker} ufname={uf} val="Sem informação" />
) : (
<UfBar img={MapMarker} ufname={uf} val="Sem informação" />
)}
......@@ -357,8 +359,16 @@ class QuilombolaSchools extends Component {
changeData(data){
var resul = []
for (let i=0; i<8; i++)
if (data.length > 0){
for (let i=0; i<8; i++)
resul[i] = {'Ano': data[i].Ano, '3': data[i][3]}
}
else{
for (let i=0; i<8; i++){
resul[i] = {'Ano': 2012 + i, '3': 0}
}
}
return (resul)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment