Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SMPPIR
Portal-SMPPIR-React
Commits
d05885ac
Commit
d05885ac
authored
May 06, 2019
by
Rafael S Castilho
Browse files
removed comented bits of code
parent
346912c1
Changes
27
Hide whitespace changes
Inline
Side-by-side
src/Charts/BuildBar.js
View file @
d05885ac
...
...
@@ -24,8 +24,6 @@ import React, { Component } from 'react';
import
{
ResponsiveContainer
,
Bar
,
BarChart
,
XAxis
,
YAxis
,
CartesianGrid
,
Tooltip
,
Legend
}
from
'
recharts
'
;
//Old const COLORS = ["#363b1b","#78752e","#b66526","#ea7c27","#0e3959","#0b7b6b","#211517","#76361a","#722416","#c93829","#081a24","#363b1b"]
const
COLORS
=
[
"
#0E3959
"
,
"
#0B7B6B
"
,
"
#EA7C27
"
,
"
#B66526
"
,
"
#CA3828
"
,
"
#363B1B
"
,
"
#78752E
"
,
"
#081A24
"
,
"
#211517
"
,
"
#763618
"
,
"
#722417
"
,
"
#C93829
"
,
"
#363B1BU
"
];
const
renderTooltipContent
=
(
o
)
=>
{
...
...
src/Charts/BuildBiaxialBars.js
View file @
d05885ac
...
...
@@ -64,13 +64,7 @@ class BuildBiaxialBars extends Component {
data
:
null
};
}
// componentDidUptade(prevProps,prevState) {
// console.log("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
// if(prevState.data !== this.state.data ) {
// this.setState({data: this.props.data})
// console.log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
// }
// }
static
getDerivedStateFromProps
(
nextProps
,
prevState
)
{
if
(
nextProps
.
data
!==
prevState
.
data
)
{
return
{
data
:
nextProps
.
data
};
...
...
@@ -79,12 +73,6 @@ class BuildBiaxialBars extends Component {
return
null
}
// componentWillReceiveProps(nextProps) {
// console.log("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")
// this.setState({data: nextProps.data})
// }
render
()
{
if
(
this
.
state
.
data
&&
this
.
state
.
data
.
length
>
0
)
{
return
(
...
...
src/Charts/BuildLineNotFixed.js
View file @
d05885ac
...
...
@@ -82,11 +82,6 @@ const renderTooltipContent = (o) => {
render
()
{
if
(
this
.
state
.
data
&&
this
.
state
.
data
.
length
>
0
)
{
var
newData
=
this
.
state
.
data
;
// newData = newData.map(function(element) {
// return this.renameKeys(element, this.props.customKeys);
// }, this);
var
dataKey
=
this
.
props
.
dataKey
;
return
(
...
...
src/Charts/BuildMixedBar.js
View file @
d05885ac
...
...
@@ -58,19 +58,6 @@ const renderTooltipContent = (o) => {
);
};
// const renderCustomizedLabel = (props) => {
// const { x, y, width, value } = props;
// const radius = 10;
// return (
// <g>
// <circle cx={x + width / 2} cy={y - radius} r={radius} fill="#000" />
// <text x={x + width / 2} y={y - radius} fill="#fff" textAnchor="middle" dominantBaseline="middle">
// {value}
// </text>
// </g>
// );
// };
function
verifyKeyBar
(
bar
,
keysBars
)
{
let
verifiedKey
=
'
a
'
...
...
@@ -165,7 +152,6 @@ class BuildMixedBar extends Component {
fill
=
{
COLORS
[
index
]}
>
{
index
===
Object
.
keys
(
newData
[
0
]).
length
-
1
?
// <LabelList dataKey={label} content={renderCustomizedLabel} /> : null}
<
LabelList
dataKey
=
{
label
}
position
=
"
top
"
/>
:
null
}
<
/Bar
>
)
...
...
src/Charts/BuildPie.js
View file @
d05885ac
...
...
@@ -36,10 +36,7 @@ class BuildPie extends Component {
data
:
null
,
sum
:
1
};
// this.getPercent = this.getPercent.bind(this);
// this.toPercent = this.toPercent.bind(this);
// this.renderTooltipContent = this.renderTooltipContent.bind(this);
}
componentDidUpdate
(
prevProps
)
{
...
...
src/Charts/BuildStackedBar.js
View file @
d05885ac
...
...
@@ -60,19 +60,6 @@ const renderTooltipContent = (o) => {
);
};
// const renderCustomizedLabel = (props) => {
// const { x, y, width, height, value } = props;
// const radius = 10;
// return (
// <g>
// <circle cx={x + width / 2} cy={y - radius} r={radius} fill="#000" />
// <text x={x + width / 2} y={y - radius} fill="#fff" textAnchor="middle" dominantBaseline="middle">
// {value}
// </text>
// </g>
// );
// };
/**
* Component that creates charts with bars containing multiple
* information, each information with a diferent color than the others
...
...
@@ -140,7 +127,6 @@ class BuildStackedBar extends Component {
return
(
<
Bar
isAnimationActive
=
{
false
}
key
=
{
Math
.
random
()}
dataKey
=
{
bar
}
stackId
=
"
a
"
fill
=
{
COLORS
[
index
]}
>
{
index
===
Object
.
keys
(
newData
[
0
]).
length
-
1
?
// <LabelList dataKey={label} content={renderCustomizedLabel} /> : null}
<
LabelList
dataKey
=
{
label
}
position
=
"
top
"
/>
:
null
}
<
/Bar
>
)
...
...
src/Components/BarraBrasil.js
View file @
d05885ac
...
...
@@ -44,11 +44,6 @@ function BarraBrasil() {
Portal
do
Governo
Brasileiro
<
/a
>
<
/li>
{
/* <li>
<a id={"barra-brasil-link1"} href={"http://epwg.governoeletronico.gov.br/barra/atualize.html"}>
Atualize sua Barra de Governo
</a>
</li> */
}
<
/ul
>
<
/div
>
<
/div
>
...
...
src/Components/DropdownCampi.js
View file @
d05885ac
...
...
@@ -45,7 +45,6 @@ export default class DropdownCampi extends Component {
}
}
render
()
{
// console.log(this.props)
return
(
<
div
className
=
{
'
dropdownCampi
'
}
>
<
Row
>
...
...
src/Components/HeatMap.js
View file @
d05885ac
...
...
@@ -24,9 +24,6 @@ import React, { Component } from 'react';
import
HeatMapBr
from
'
../maps/heatbr
'
;
import
{
getStateId
}
from
'
../enviroment
'
;
// function byState(state) {
// return rep => rep.state === state
// }
/**
* Component that creates a heat map of the information displayed. <br />
* Takes 6 props __getMapClick__, __ddValue__, __clicked__, __datafield__, __data__ and __levels__. <br />
...
...
@@ -70,7 +67,6 @@ class HeatMap extends Component {
}
render
()
{
// const { messages } = this.props
const
{
filtered
,
active
}
=
this
.
state
return
(
...
...
src/Components/Map.js
View file @
d05885ac
...
...
@@ -24,9 +24,7 @@ import React, { Component } from 'react';
import
MapBr
from
'
../maps/br
'
;
import
{
getStateId
}
from
'
../enviroment
'
;
// function byState(state) {
// return rep => rep.state === state
// }
/**
* Component that creates a map. <br />
* Recieves 3 props, __getMapClick__, __ddValue__ and __clicked__. <br />
...
...
@@ -69,7 +67,6 @@ class Map extends Component {
render
()
{
// const { messages } = this.props
const
{
filtered
,
active
}
=
this
.
state
return
(
...
...
src/Components/NavigationBar.js
View file @
d05885ac
...
...
@@ -46,7 +46,6 @@ function NavigationBar() {
let
links
=
(
<
React
.
Fragment
>
{
/* <li id={`${contrastString}navBarInicio`} className={'z-depth-0 ' + actualPath}><Link to='/'>Início</Link></li> */
}
<
li
id
=
{
`
${
contrastString
}
navBarBrasilQ`
}
className
=
{
'
z-depth-0
'
+
actualPath
}
><
Link
to
=
'
/quilombolas
'
>
Brasil
Quilombola
<
/Link></
li
>
<
li
id
=
{
`
${
contrastString
}
navBarJuventudeV`
}
className
=
{
'
z-depth-0
'
+
actualPath
}
><
Link
to
=
'
/juventude
'
>
Juventude
Viva
<
/Link></
li
>
<
li
id
=
{
`
${
contrastString
}
navBarMatrizAficana`
}
className
=
{
'
z-depth-0
'
+
actualPath
}
><
Link
to
=
'
/matrizAfricana
'
>
Matriz
Africana
<
/Link></
li
>
...
...
src/MainPage.js
View file @
d05885ac
...
...
@@ -46,9 +46,6 @@ function MainPage() {
<
/Col
>
<
/Row
>
<
Row
>
{
/* <Col m={12} l={5} offset={'l1'}>
<MainCard color='mainPageOrange' title='Mapas' subpages={subpages3} text={text3} image={'mapas.png'}/>
</Col> */
}
<
Col
m
=
{
12
}
l
=
{
10
}
offset
=
{
'
l1
'
}
className
=
{
'
mainPageMargin
'
}
>
<
MainCard
color
=
'
mainPageDarkBlue
'
title
=
'
Matriz Africana
'
subpages
=
{
subpages4
}
text
=
{
text4
}
image
=
{
'
matriz_africana4.png
'
}
/
>
<
/Col
>
...
...
@@ -88,13 +85,6 @@ const text2 = <div>
<
li
>
Transformação
de
Territórios
<
/li
>
<
li
>
Aperfeiçoamento
Institucional
<
/li
>
<
/div
>
// const text3 = <div>
// <p>
// Os mapas a seguir contém dados referentes a:
// </p>
// <li>Comunidades Quilombolas</li>
// <li>Juventude Viva</li>
// </div>
const
text4
=
<
div
>
Este
módulo
contém
informações
do
CadÚnico
sobre
comunidades
de
Matriz
Africana
.
<
/div
>
...
...
@@ -115,7 +105,6 @@ const text6 = <div>
// Subpages is an Array of arrays that in the first position expects the title and in the second position the route
const
subpages1
=
{
'
route
'
:
'
/quilombolas
'
,
'
links
'
:[
'
EIXO 1
'
,
'
EIXO 2
'
,
'
EIXO 3
'
,
'
EIXO 4
'
,
'
SOBRE
'
]}
const
subpages2
=
{
'
route
'
:
'
/juventude
'
,
'
links
'
:[
'
VULNERABILIDADES
'
,
'
EDUCAÇÃO
'
,
'
TRABALHO
'
]}
// const subpages3 = {'route': '/mapas', 'links':['COMUNIDADES', 'JUVENTUDE VIVA']}
const
subpages4
=
{
'
route
'
:
'
/matrizAfricana
'
,
'
links
'
:[
"
DIREITOS
"
,
"
CULTURA
"
,
"
SUSTENTABILIDADE
"
]}
const
subpages5
=
{
'
route
'
:
'
/cotas
'
,
'
links
'
:[
'
EVASÃO
'
,
'
CONCLUINTES
'
,
'
ESCOLARIDADE
'
,
'
FIES
'
,
'
PROUNI
'
,
'
FINANCIAMENTO
'
,
'
ATIVIDADE EXTRACURRICULAR
'
,
'
INGRESSO
'
,
'
APOIO SOCIAL
'
,
'
VAGAS OFERTADAS
'
]}
const
subpages6
=
{
'
route
'
:
'
/quilombola
'
,
'
links
'
:[
'
EIXO 2
'
,
'
EIXO 3
'
,
'
EIXO 4
'
]}
...
...
src/Maps.js
View file @
d05885ac
...
...
@@ -36,9 +36,7 @@ import './Styles/Maps.css'
var
ck
=
new
Cookies
();
var
contrastCK
=
new
Cookies
();
var
cookieStatus
=
contrastCK
.
get
(
'
contrast
'
);
/**
* I is here
*/
class
Maps
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
src/SubPages/AfricanCulture.js
View file @
d05885ac
...
...
@@ -36,7 +36,6 @@ import './Styles/AfricanRights.css'
const
type
=
"
culture
"
;
//Ver se é culture mesmo
const
cad_unico
=
"
african_culture
"
// const ibge = "ibge_census"
const
serverURL
=
getServerURL
();
const
customKey
=
{
'
total
'
:
'
Total
'
,
...
...
src/SubPages/AfricanRights.js
View file @
d05885ac
...
...
@@ -255,10 +255,10 @@ class AfricanRights extends Component {
let
head
=
header
.
trim
()
switch
(
head
)
{
case
'
Famílias pertencentes a Comunidade de Terreiro
'
:
route
=
cad_unico
+
'
?dims=year
'
;
//Colocar filtro aqui
route
=
cad_unico
+
'
?dims=year
'
;
break
;
case
'
Escolaridade das pessoas de famílias pertencentes a Comunidade de Terreiro
'
:
route
=
cad_unico
+
'
?dims=year,education_families,education_families_level&filter=education_families_conclude:"1"
'
//Colocar filtro aqui
route
=
cad_unico
+
'
?dims=year,education_families,education_families_level&filter=education_families_conclude:"1"
'
break
;
default
:
console
.
log
(
"
404
"
);
...
...
src/SubPages/AfricanSustainability.js
View file @
d05885ac
...
...
@@ -34,7 +34,6 @@ import './Styles/AfricanRights.css'
const
type
=
"
rights
"
;
const
cad_unico
=
"
african_sustentability
"
// const ibge = "ibge_census"
const
serverURL
=
getServerURL
();
const
customKey
=
{
'
total
'
:
'
Total
'
,
...
...
src/SubPages/Eixo1.js
View file @
d05885ac
...
...
@@ -26,7 +26,6 @@ import CardFooter from '../Components/CardFooter';
import
UfBar
from
'
../Components/UfBar
'
;
import
GrayBar
from
'
../Components/GrayBar
'
;
import
MapMarker
from
'
./icons/map-marker.png
'
;
// import HeatMap from '../Components/HeatMap';
import
{
getStateExtendedName
}
from
'
../enviroment
'
;
import
*
as
data
from
'
../JsonsAntigos/brasil-quilombola/bqe1
'
import
BuildLineNotFixed
from
'
../Charts/BuildLineNotFixed
'
...
...
@@ -34,12 +33,6 @@ import BuildPie from '../Charts/BuildPie'
import
Table
from
'
../Components/Table
'
import
Map
from
'
../Components/Map
'
;
// import csv1 from './CSVoriginais/pbq/comunidades_certificadas_por_uf.csv'
// import csv2 from './CSVoriginais/pbq/comunidades_tituladas_por_uf_ano.csv'
// import csv4 from './CSVoriginais/pbq/COMUNIDADES.csv'
// import csv5 from './CSVoriginais/pbq/comunidades_por_status_por_uf.csv'
import
'
./Styles/Eixo1.css
'
import
{
Store
}
from
'
../Store
'
;
...
...
@@ -163,7 +156,6 @@ class Eixo1 extends Component {
getMapClick
(
clicked
)
{
this
.
setState
({
clickedInMap
:
clicked
});
// console.log(JSON.stringify(data.gete1p32()))
}
clearMap
(){
...
...
src/SubPages/QuilombolaIndicator1.js
View file @
d05885ac
...
...
@@ -162,23 +162,6 @@ class QuilombolaIndicator1 extends Component {
<
CardFooter
source
=
"
Cadastro Único para Programas Sociais (CadÚnico)
Min. do Desenvolvimento Social e Combate à Fome (MDS)
"
/>
<
/CollapsibleContainer
>
{
/* <CollapsibleContainer id={`${contrastString}redCollapsible`} header='Forma de iluminação - Pessoas'>
<div id={'Forma_de_iluminacao_2'+type}>
<div id={'collection-info'}>
<Collection>
<CollectionItem>
O gráfico abaixo exibe a forma de iluminação nos domicílios quilombolas por pessoa.
</CollectionItem>
</Collection>
</div>
<BuildStackedBar
dataKey='Ano'
data={organizeJson(this.state.charts['Forma de iluminação - Pessoas'], "cod_iluminacao_domic_fam", "ano_pesquisa")}
customKeys={homeLighting}
/>
</div>
<Loading/>
</CollapsibleContainer> */
}
<
CollapsibleContainer
id
=
{
`
${
contrastString
}
redCollapsible`
}
header
=
'
Forma de iluminação - Famílias
'
>
<
div
id
=
{
'
Forma_de_iluminacao
'
+
type
}
>
<
div
id
=
{
'
collection-info
'
}
>
...
...
@@ -307,13 +290,9 @@ class QuilombolaIndicator1 extends Component {
var
route
;
let
head
=
header
.
trim
()
switch
(
head
)
{
//count pega informações da familia, sem count são pegas as informações por pessoa
case
'
Tipo de domicílio
'
:
route
=
type
+
"
?dims=year,cod_local_home
"
break
;
// case 'Forma de iluminação - Pessoas':
// route = type+"?dims=cod_home_lighting,year&filter=quilombola_family:\"1\""
// break;
case
'
Forma de iluminação - Famílias
'
:
route
=
type
+
"
?dims=cod_home_lighting,year
"
break
;
...
...
src/SubPages/QuilombolaIndicator2.js
View file @
d05885ac
...
...
@@ -30,7 +30,6 @@ import './Styles/QuilombolaIndicator1.css';
import
axios
from
'
axios
'
;
import
{
getServerURL
,
organizeJson
,
getRegionState
,
deactivateLoadingAnimation
,
getStateName
,
searchHash
,
createIntervals
}
from
'
../enviroment
'
import
BuildStackedBar
from
'
../Charts/BuildStackedBar
'
;
//import BuildBar from '../Charts/BuildBar';
import
Loading
from
'
../Components/Loading
'
;
import
{
Store
}
from
'
../Store
'
...
...
@@ -363,7 +362,6 @@ class QuilombolaIndicator2 extends Component {
var
route
;
let
head
=
header
.
trim
()
switch
(
head
)
{
//count pega informações da familia, sem count são pegas as informações por pessoa
case
'
Extrativismo
'
:
route
=
type
+
"
?dims=year,cod_agriculture_job
"
break
;
...
...
src/SubPages/QuilombolaIndicator3.js
View file @
d05885ac
...
...
@@ -37,11 +37,7 @@ import { Store } from '../Store'
const
serverURL
=
getServerURL
();
const
type
=
"
eixo_4
"
;
// const AnoLabel = {
// '0': 'Não',
// '1': 'Sim',
// 'null': 'Indefinido',
// }
const
Education
=
{
'
null
'
:
'
Sem informações
'
,
'
1
'
:
'
Creche
'
,
...
...
@@ -117,24 +113,6 @@ class QuilombolaIndicator3 extends Component {
<
Col
s
=
{
12
}
m
=
{
10
}
l
=
{
10
}
offset
=
{
'
m1 l1
'
}
>
<
Collapsible
onClick
=
{
this
.
getHeader
}
>
{
/* <CollapsibleContainer id={`${contrastString}redCollapsible`} header='Número de famílias'>
<div id={'Numero_de_familias' + type}>
<div id={'collection-info'}>
<Collection>
<CollectionItem>
Número de famílias quilombolas que recebem Bolsa Família.
</CollectionItem>
</Collection>
</div>
<BuildMixedBar
dataKey='Ano'
data={organizeJson(this.state.charts['Número de famílias'], "marc_pbf", "ano_pesquisa")}
customKeys={AnoLabel}
keysBars={{ 'Não': 'b', 'Sim': 'c', 'Indefinido': 'b' }}
/>
</div>
<Loading />
</CollapsibleContainer> */
}
<
CollapsibleContainer
id
=
{
`
${
contrastString
}
redCollapsible`
}
header
=
'
Escolaridade Segundo CadÚnico
'
>
<
div
id
=
{
'
Escolaridade_Segundo_Cadunico
'
+
type
}
>
<
BuildMixedBar
...
...
@@ -244,14 +222,10 @@ class QuilombolaIndicator3 extends Component {
const
data
=
res
.
data
.
result
var
temp
=
this
.
state
.
charts
let
filter
=
[
// {
// 'filter': 'ind_familia_quilombola_fam',
// 'value': '1',
// }
]
if
(
chart
===
'
População no CadÚnico por Faixa Etária
'
)
{
temp
[
chart
.
trim
()]
=
createIntervals
(
filterJson
(
data
,
filter
),
'
idade
'
,
10
,
'
ano_pesquisa
'
,
100
);
// temp[chart.trim()] = createIntervals(data, 'idade', 10, 'ano_pesquisa');
}
else
if
(
chart
===
'
População no CadÚnico por Faixa Etária e Gênero
'
)
{
let
chartData
=
[]
...
...
@@ -324,25 +298,18 @@ class QuilombolaIndicator3 extends Component {
//count pega informações da familia, sem count são pegas as informações por pessoa
case
'
Número de famílias
'
:
route
=
type
+
"
_count?dims=year,cod_home_bolsa_familia
"
//route = type + "_count?dims=year,cod_home_bolsa_familia,quilombola_family"
break
;
case
'
Escolaridade Segundo CadÚnico
'
:
route
=
type
+
"
?dims=education_families,year
"
//route = type + "?dims=education_families,year,quilombola_family"
break
;
case
'
População no CadÚnico por Faixa Etária
'
:
route
=
type
+
"
?dims=age,year
"
//route = type + "?dims=age,year,quilombola_family"
break
;
case
'
População no CadÚnico por Gênero
'
:
route
=
type
+
"
?dims=gender,year
"
//route = type + "?dims=gender,year,quilombola_family"
break
;
case
'
População no CadÚnico por Faixa Etária e Gênero
'
:
route
=
type
+
"
?dims=gender,age,year
"
//route = type + "?dims=gender,age,year,quilombola_family"
break
;
default
:
console
.
log
(
"
404
"
);
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment